WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #34450, comment 6


Ignore:
Timestamp:
09/15/2016 10:53:28 PM (4 years ago)
Author:
flixos90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34450, comment 6

    initial v1  
    1 [attachment:34450.patch] is an updated patch that makes use of `WP_Site_Query` (via `get_sites()`) in the function. This also allows us to get rid of the `get_id_from_blogname_*` cache key, since site query results are cached anyway. An additional benefit we get is that the function now actually returns an integer, as stated in the docs (before the return value would actually be a string, due to `wpdb::get_var()`).
     1[attachment:34450.diff] is an updated patch that makes use of `WP_Site_Query` (via `get_sites()`) in the function. This also allows us to get rid of the `get_id_from_blogname_*` cache key, since site query results are cached anyway. An additional benefit we get is that the function now actually returns an integer, as stated in the docs (before the return value would actually be a string, due to `wpdb::get_var()`).
    22
    33The patch also adds unit tests, one for a www-prefixed network, another one without www.