[wp-trac] [WordPress Trac] #35936: Add validation for Custom Structure permalinks

WordPress Trac noreply at wordpress.org
Thu Jun 16 16:59:13 UTC 2016


#35936: Add validation for Custom Structure permalinks
-------------------------------------------------+-------------------------
 Reporter:  SteveNetRivet                        |       Owner:  swissspidy
     Type:  enhancement                          |      Status:  reviewing
 Priority:  normal                               |   Milestone:  Future
Component:  Permalinks                           |  Release
 Severity:  normal                               |     Version:
 Keywords:  good-first-bug has-patch has-unit-   |  Resolution:
  tests                                          |     Focuses:  ui
-------------------------------------------------+-------------------------

Comment (by ocean90):

 [attachment:35936.4.diff]: The change to `src/wp-admin/admin-header.php`
 isn't necessary, `$parent_file` is `options-general.php` for all options-*
 screens.

 The block
 {{{
 if ( ! get_settings_errors() ) {
         $wp_rewrite->set_permalink_structure( $permalink_structure );
 }
 }}}
 can be removed too. `$permalink_structure` will be the
 [https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/formatting.php?marks=4429&rev=37698#L4228 same as before] and
 `WP_Rewrite::set_permalink_structure()` does a `$permalink_structure !=
 $this->permalink_structure`
 [https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-wp-
 rewrite.php?marks=1884&rev=37539#L1883 check]. `get_settings_errors()` is
 also unreliable because it returns errors for all settings.

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


More information about the wp-trac mailing list