[wp-trac] [WordPress Trac] #44459: Options added to the Permalinks admin page do not get saved

WordPress Trac noreply at wordpress.org
Tue Jun 26 11:49:09 UTC 2018


#44459: Options added to the Permalinks admin page do not get saved
--------------------------------+------------------------------
 Reporter:  RavanH              |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:
--------------------------------+------------------------------

Comment (by subrataemfluence):

 If I understand correctly, the form is only submitting to itself, not to
 `option.php` to save permalink structures and this saves the settings
 fine.

 For new options, what I realize from initial look into the code is
 tag_base and category_base are the two options being considered so far and
 there is (probably) no room yet for considering a generic option or an
 additional option.

 In `options-permalink.php` options that handled are:


 {{{
 $category_base   = get_option( 'category_base' );
 $tag_base        = get_option( 'tag_base' );
 }}}


 Also, in `class-wp-rewrite.php`, functions are specially written to handle
 the same two options, i.e.

 set_category_base and set_tag_base, which are being used back in `wp-admin
 /options-permalink.php`:


 {{{
 $wp_rewrite->set_category_base( $category_base );
 $wp_rewrite->set_tag_base( $tag_base );
 }}}

 I may be entirely wrong in my understanding, but looks like in order to
 consider "any" custom options in permalink page we need to have generic
 methods in `class-wp-rewrite.php` as well as modify the logic of `options-
 permalink.php` to deal with dynamic inputs.

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


More information about the wp-trac mailing list