WordPress.org

Make WordPress Core

Changeset 41912


Ignore:
Timestamp:
10/18/2017 05:38:35 PM (2 years ago)
Author:
jeremyfelt
Message:

Multisite: Document all return types in get_sites().

Adds more complete documentation to get_sites() and the corresponding methods in WP_Site_Query.

Fixes #41789.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-site-query.php

    r41795 r41912  
    212212     *
    213213     * @param string|array $query Array or URL query string of parameters.
    214      * @return array|int List of WP_Site objects, or number of sites when 'count' is passed as a query var.
     214     * @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
     215     *                   or the number of sites when 'count' is passed as a query var.
    215216     */
    216217    public function query( $query ) {
     
    225226     * @since 4.6.0
    226227     *
    227      * @return array|int List of WP_Site objects, or number of sites when 'count' is passed as a query var.
     228     * @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
     229     *                   or the number of sites when 'count' is passed as a query var.
    228230     */
    229231    public function get_sites() {
  • trunk/src/wp-includes/ms-blogs.php

    r41884 r41912  
    637637 *     @type bool         $update_site_cache Whether to prime the cache for found sites. Default true.
    638638 * }
    639  * @return array|int List of sites, or number of sites when 'count' is passed as a query var.
     639 * @return array|int List of WP_Site objects, a list of site ids when 'fields' is set to 'ids',
     640 *                   or the number of sites when 'count' is passed as a query var.
    640641 */
    641642function get_sites( $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.