[wp-trac] [WordPress Trac] #40807: Starter content: Allow for setting a "parent" for pages (and other hierarchical CPTs)

WordPress Trac noreply at wordpress.org
Wed Oct 4 12:11:59 UTC 2017


#40807: Starter content: Allow for setting a "parent" for pages (and other
hierarchical CPTs)
--------------------------------------+-----------------------------
 Reporter:  webmandesign              |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Customize                 |     Version:  4.7
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+-----------------------------
Changes (by birgire):

 * keywords:  needs-patch => has-patch has-unit-tests


Comment:

 Sounds like a good idea.

 Here's a first attempt to support setting a {{{parent}}} post symbol.

 In [attachment:40807.patch]

 - Translate the parent post symbol to an ID and assign it to the
 post_parent field with {{{wp_update_post()}}}
 - Uses the {{{parent}}} key for symbols, to not confuse it with
 {{{post_parent}}} that only supports an integer value.
 - Includes a test, based on the existing one for starter-content

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40807#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list