[wp-trac] [WordPress Trac] #45594: Action 'switch_blog' duplicated $new_blog param

WordPress Trac noreply at wordpress.org
Wed Dec 12 17:42:20 UTC 2018


#45594: Action 'switch_blog' duplicated $new_blog param
-------------------------------------+-----------------------------
 Reporter:  ChriCo                   |       Owner:  (none)
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Networks and Sites       |     Version:  5.0
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+-----------------------------

Comment (by ChriCo):

 Replying to [comment:2 jeremyfelt]:

 > I think we can remove `$prev_blog_id` entirely and change both action
 calls to `do_action( 'switch_blog', $new_blog, $blog_id );`


 Thanks for your feedback. My intention was to name it in way everyone can
 understand it and also in terms of automatic generation of documentation
 out of docblocks. The var name {{{$blog_id}}} is not very exact here. Is
 it the current, new or previous one? I'll have a look at it tomorrow if we
 can get somehow more clearance here. :)

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


More information about the wp-trac mailing list