[wp-trac] [WordPress Trac] #21492: Theme customizer > Static front page: missing error message when front page and posts pages are similar

WordPress Trac noreply at wordpress.org
Sat Feb 18 01:25:18 UTC 2017


#21492: Theme customizer > Static front page: missing error message when front page
and posts pages are similar
--------------------------+--------------------
 Reporter:  hd-J          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.7.3
Component:  Customize     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui
--------------------------+--------------------

Comment (by westonruter):

 @MatheusGimenez it looks like your patch has additional unrelated media
 changes?

 Also, is it handling the case where the user changes both the
 `page_for_posts` and the `page_on_front` in the same session? To handle
 this case, you should make sure you get the dirty value if it exists for
 the setting you want to check compare with. For example:

 {{{#!diff
   $page_for_posts = absint( get_option( 'page_for_posts', 0 ) );
 + $page_for_posts = $this->get_setting( 'page_for_posts' )->post_value(
 $page_for_posts );
 }}}

 When you pass a value into the `post_value` method then it is used as the
 default if there was no dirty post value (in the current changeset) or it
 is invalid.

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


More information about the wp-trac mailing list