[wp-trac] [WordPress Trac] #16379: Better UI for doing "Page on Front"

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 19 01:21:47 UTC 2012


#16379: Better UI for doing "Page on Front"
----------------------------------+------------------
 Reporter:  markjaquith           |       Owner:
     Type:  task (blessed)        |      Status:  new
 Priority:  normal                |   Milestone:  3.5
Component:  Administration        |     Version:  3.1
 Severity:  normal                |  Resolution:
 Keywords:  jane-likes has-patch  |
----------------------------------+------------------

Comment (by SergeyBiryukov):

 Replying to [comment:51 lessbloat]:
 > - If you have zero pages, or only the "sample page", show the "Add new
 page" option by default.

 Some more tweaks in [attachment:16379.8.patch]:

 * Use `selected()` function.
 * Only select "Add new page" if no other page is selected.
 * `__( 'sample-page' )` is a translatable string: [[BR]]
  http://core.trac.wordpress.org/browser/tags/3.4.2/wp-
 admin/includes/upgrade.php#L263
 * Sanitize `$_POST['page_on_front_title']` before searching for an
 existing page.

 > - When "Add new page" is selected, if title entered equals same title of
 an existing page, just use the existing page vs. creating a new page with
 the same title.

 I did the same in [attachment:16379.patch], but then thought it might be
 better to just always create a new page as requested. Either way is fine
 for me though.

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


More information about the wp-trac mailing list