[wp-trac] [WordPress Trac] #28290: Changing _site_option functions for _network_option functions

WordPress Trac noreply at wordpress.org
Sun Sep 20 22:33:00 UTC 2015


#28290: Changing _site_option functions for _network_option functions
------------------------------------+---------------------------
 Reporter:  jmlapam                 |       Owner:  spacedmonkey
     Type:  enhancement             |      Status:  assigned
 Priority:  normal                  |   Milestone:  4.4
Component:  Options, Meta APIs      |     Version:  4.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  multisite
------------------------------------+---------------------------

Comment (by spacedmonkey):

 Replying to [comment:20 DrewAPicture]:
 >
 > * It would be good to patch the function changes separately from the
 changeovers from `*_site_option` to `*_network_option`, especially since
 they'll probably be committed separately anyway. Also, easier to grok
 changes  during iteration

 Cool. Let me know when you want to do that and I will submit another
 patch.

 > * I'm not 100 percent on board with introducing new hooks in the name of
 vernacular, that is to say, new hooks that do exactly the same thing but
 are named differently. This is one area of core where we're starting to
 see a lot of technical debt (duplicate hooks with different names)

 I personally wasn't sure about them either. But I thought without them,
 anyone coming to these functions posts 4.4, might be confused by the none
 guessable filter name. Also those filters and actions all have network id
 passed to them, so in a way they do do something different. I have left
 them in in my new patch.

 > * We should add changelog entries to the DocBlocks for the
 `*_site_option` functions indicating that they were converted to wrappers
 for `*_network_option`

 Added changelog. There is now a since. There was also a uses in there as
 well.

 > * Looks like there's copy pasta in the hook doc `@since` for
 `pre_delete_network_option_' . $option`

 Done


 > * Always use spaces in phpDocs, never tabs :)

 Should be done.

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


More information about the wp-trac mailing list