[wp-trac] [WordPress Trac] #38681: Rename WP_User::for_blog() to WP_User::for_site()

WordPress Trac noreply at wordpress.org
Sat Nov 5 08:58:36 UTC 2016


#38681: Rename WP_User::for_blog() to WP_User::for_site()
-------------------------+-----------------------------
 Reporter:  flixos90     |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Users        |    Version:
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:  multisite    |
-------------------------+-----------------------------
 Related to #38645, the name `WP_User::for_blog()` method follows the old
 naming conventions (what used to be called a blog is now called a site)
 and I think this one makes for a rather straightforward renaming process.
 I think we should rename the method to `for_site()` so that this new name
 is the preferred way of using that functionality and is highlighted in
 IDEs. The `for_blog()` should continue to work as a magic method for
 backward compatibility.

 I think it should also be deprecated, but we could also do this change
 silently.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38681>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list