[wp-trac] [WordPress Trac] #17470: Display warning when editing the page_for_posts page

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 22 02:35:25 UTC 2012


#17470: Display warning when editing the page_for_posts page
--------------------------------------------+-----------------------------
 Reporter:  alexkingorg                     |       Owner:
     Type:  enhancement                     |      Status:  new
 Priority:  normal                          |   Milestone:  Future Release
Component:  Administration                  |     Version:  3.2
 Severity:  normal                          |  Resolution:
 Keywords:  has-patch ui-feedback needs-ui  |
--------------------------------------------+-----------------------------
Changes (by bootsz):

 * keywords:  has-patch => has-patch ui-feedback needs-ui


Comment:

 http://core.trac.wordpress.org/attachment/ticket/17470/17470.diff

 OK, a disclaimer:  This is my first patch ever, so please bear with me.
 This issue is something that I struggle with almost daily, so I couldn’t
 resist diving in.

 As isaackeyet alluded to, this particular issue is really one instance of
 a larger problem, which is the current inability to distinguish between
 regular “content” pages, and pages that are used as placeholders for
 custom templates / dynamic content.

 As a result, in putting together my first patch I've attempted to start
 looking at the big picture, and trying to set some kind of a foundation
 for the concept of "System Pages" as described by isaackeyet here:
 http://core.trac.wordpress.org/ticket/17470#comment:4.

 '''The Patch:'''

 Changes from alexking's original patch are essentially still in effect.
 The additional changes are as follows:

 1) Setting a particular page as the "Posts Page" under Settings->Reading
 creates a new entry in wp_postmeta for the page's ID with the key
 "_system_page" and value set to "1".

 2) Under the "Pages" tab, for each page displayed in the table WordPress
 will now check if the page has a "_system_page" meta value of 1.  If it
 does, the "Edit" link is not displayed, allowing the using to only modify
 the Title and other basic attributes.

 3) If the edit page happens to get accessed directly, the WYSIWYG editor
 is hidden (in addition to other irrelevant meta boxes).

 So essentially, now instead of modifying behavior based on the value of
 “page_for_posts”, we have a meta key “_system_page” that can be applied
 not only to the page_for_posts, but also to any number of additional pages
 specified by a theme or plugin developer who need to create additional
 non-editable pages.

 '''Next Steps:'''

 1)      UI changes to the Pages table & page editor to visually
 distinguish “system pages”, and possibly provide an explanation for why
 they behave differently.

 2)      Determine how developers to create additional system pages.  My
 first thought was to extend the commenting convention on custom templates,
 to allow a developer to specify that a particular template should be
 treated as a “system page”.

 My questions at this point:
 -       Are these changes extensive enough to warrant a separate ticket?
 -       Is something like this realistic to achieve for 3.5, or will it
 have to wait?

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17470#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list