[wp-trac] [WordPress Trac] #17470: Display warning when editing the page_for_posts page
WordPress Trac
noreply at wordpress.org
Wed May 20 11:15:23 UTC 2015
#17470: Display warning when editing the page_for_posts page
-------------------------------+---------------------------------
Reporter: alexkingorg | Owner: helen
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.2
Component: Posts, Post Types | Version: 3.2
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: ui, administration
-------------------------------+---------------------------------
Comment (by philiparthurmoore):
Hi @helen.
Replying to [comment:20 helen]:
> In [changeset:"31550"]:
> {{{
> #!CommitTicketReference repository="" revision="31550"
> Hide irrelevant UI and display a message when editing the page for
posts.
This changeset has caused a UI regression, as some themes actually use the
page content as introductory content for an index page (here's an
[https://creativeportfoliodemo.wordpress.com/updates/ example]). Before
WordPress 4.2, users were able to Edit the page that was used for posts,
add in content, and have that easily displayed if the theme supported it.
Now, users have to do the following in order to add content into their
posts page for themes that support it:
1. Go to Settings - Reading.
2. Remove the page as the posts page.
3. Add content into the page.
4. Re-assign the page as the posts page.
5. Now if a user has content in the page they can simply click Edit and
they will be shown the content box.
Before, a user had to:
1. Click Edit.
There's no way to override this currently, looking at [31550]. Could there
be a way to override this, at least by making the following code
filterable:
{{{
if ( $post_ID == get_option( 'page_for_posts' ) && empty(
$post->post_content ) ) {
add_action( 'edit_form_after_title', '_wp_posts_page_notice' );
remove_post_type_support( $post_type, 'editor' );
}
}}}
I don't see any way to add editor post type support for pages when this
code in `edit-form-advanced.php` overrides the theme.
Also, the logic here creates the disparate UX that I mentioned above. Why
not just always display the `_wp_posts_page_notice`, regardless of content
being there or not, and have the content box always available? Seems much
easier to deal with for themers who allow users to take advantage of this
on the front end of their sites. Thanks.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17470#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list