[wp-trac] [WordPress Trac] #21665: Allow non-editable pages to be classified & organized as "System Pages"
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 23 13:26:35 UTC 2012
#21665: Allow non-editable pages to be classified & organized as "System Pages"
--------------------------------------+------------------------------
Reporter: bootsz | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: UI | Version:
Severity: normal | Resolution:
Keywords: dev-feedback ui-feedback |
--------------------------------------+------------------------------
Comment (by bootsz):
Replying to [comment:4 scribu]:
> The problem with custom page templates is that they're NOT supposed to
be completely non-editable. Users should still be able to edit the slug at
least, as well as the title. Also, some templates actually use the page
content as well.
>
> So, we'd need some sort of API for specifying this.
>
> It could be another field in template's header:
>
> {{{
> <?php
> /**
> * Template Name: Showcase Template
> * Description: A Page Template that showcases Sticky Posts, Asides, and
Blog Posts
> * Supports: title, editor
> ...
> }}}
>
> Or a PHP function:
>
> {{{
> register_page_template( 'showcase.php', array( 'title', 'editor' ) );
> }}}
>
> The array would accept the same values as the 'supports' parameter from
`register_post_type()`.
My initial idea was similar to the first option: Add another field to the
template header where a developer can specify that the template is a
"system page". I think your solution is better, however, because it would
offer more flexibility. Some templates may need to offer more features
than others, so it would be nice to be able to spell out exactly what
features you want to support, much like we do with Custom Post Types.
I'm not sure which approach would be better in the long-run (template
commenting VS. a PHP function), but I'd imagine going with the 1st option
would be easier since it wouldn't require changing the way that custom
templates are created & added.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21665#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list