Make WordPress Core


Ignore:
Timestamp:
06/08/2016 03:02:34 AM (9 years ago)
Author:
jeremyfelt
Message:

Multisite: Deprecate wp_get_sites()

Defer to the new get_sites() replacement, offering fresh (...or cached) WP_Site objects via the new WP_Site_Query.

Props flixos90.
Fixes #36994.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/multisite/site.php

    r36721 r37653  
    582582     *
    583583     * @ticket 14511
     584     * @expectedDeprecated wp_get_sites
    584585     */
    585586    function test_wp_get_sites_with_default_arguments() {
     
    591592    /**
    592593     * No sites should match a query that specifies an invalid network ID.
     594     *
     595     * @expectedDeprecated wp_get_sites
    593596     */
    594597    function test_wp_get_sites_with_invalid_network_id() {
     
    598601    /**
    599602     * A network ID of null should query for all public sites on all networks.
     603     *
     604     * @expectedDeprecated wp_get_sites
    600605     */
    601606    function test_wp_get_sites_with_network_id_null() {
     
    607612    /**
    608613     * Expect only sites on the specified network ID to be returned.
     614     *
     615     * @expectedDeprecated wp_get_sites
    609616     */
    610617    function test_wp_get_sites_with_specific_network_id() {
     
    616623    /**
    617624     * Expect sites from both networks if both network IDs are specified.
     625     *
     626     * @expectedDeprecated wp_get_sites
    618627     */
    619628    function test_wp_get_sites_with_multiple_network_ids() {
     
    625634    /**
    626635     * Queries for public or non public sites should work across all networks if network ID is null.
     636     *
     637     * @expectedDeprecated wp_get_sites
    627638     */
    628639    function test_wp_get_sites_with_public_meta_on_all_networks() {
     
    635646    /**
    636647     * If a network ID is specified, queries for public sites should be restricted to that network.
     648     *
     649     * @expectedDeprecated wp_get_sites
    637650     */
    638651    function test_wp_get_sites_with_public_meta_restrict_to_one_network() {
     
    645658    /**
    646659     * Test the limit and offset arguments for wp_get_sites when multiple sites are available.
     660     *
     661     * @expectedDeprecated wp_get_sites
    647662     */
    648663    function test_wp_get_sites_limit_offset() {
     
    662677    /**
    663678     * Expect 0 sites when using an offset larger than the total number of sites.
     679     *
     680     * @expectedDeprecated wp_get_sites
    664681     */
    665682    function test_wp_get_sites_offset_greater_than_available_sites() {
Note: See TracChangeset for help on using the changeset viewer.