WordPress.org

Make WordPress Core

Changeset 48541


Ignore:
Timestamp:
07/21/2020 04:04:35 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Sitemaps: Rename wp_get_sitemaps_providers() to wp_get_sitemap_providers().

Follow-up to [48536], [48540].

Props pbiron, swissspidy, SergeyBiryukov.
See #50724.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sitemaps.php

    r48540 r48541  
    5050 * @return WP_Sitemaps_Provider[] Array of sitemap providers.
    5151 */
    52 function wp_get_sitemaps_providers() {
     52function wp_get_sitemap_providers() {
    5353    $sitemaps = wp_sitemaps_get_server();
    5454    return $sitemaps->registry->get_providers();
  • trunk/tests/phpunit/tests/sitemaps/functions.php

    r48540 r48541  
    4242
    4343    /**
    44      * Test wp_get_sitemaps default functionality
     44     * Test wp_get_sitemap_providers default functionality.
    4545     */
    46     public function test_wp_get_sitemaps_providers() {
    47         $sitemaps = wp_get_sitemaps_providers();
     46    public function test_wp_get_sitemap_providers() {
     47        $sitemaps = wp_get_sitemap_providers();
    4848
    4949        $expected = array(
  • trunk/tests/phpunit/tests/sitemaps/sitemaps.php

    r48540 r48541  
    101101        $entries = array();
    102102
    103         $providers = wp_get_sitemaps_providers();
     103        $providers = wp_get_sitemap_providers();
    104104
    105105        foreach ( $providers as $provider ) {
     
    219219     */
    220220    public function test_get_url_list_post() {
    221         $providers = wp_get_sitemaps_providers();
     221        $providers = wp_get_sitemap_providers();
    222222
    223223        $post_list = $providers['posts']->get_url_list( 1, 'post' );
     
    235235        add_filter( 'pre_option_show_on_front', '__return_true' );
    236236
    237         $providers = wp_get_sitemaps_providers();
     237        $providers = wp_get_sitemap_providers();
    238238
    239239        $post_list = $providers['posts']->get_url_list( 1, 'page' );
     
    248248     */
    249249    public function test_get_url_list_page_with_home() {
    250         $providers = wp_get_sitemaps_providers();
     250        $providers = wp_get_sitemap_providers();
    251251
    252252        $post_list = $providers['posts']->get_url_list( 1, 'page' );
     
    271271        wp_set_current_user( self::$editor_id );
    272272
    273         $providers = wp_get_sitemaps_providers();
     273        $providers = wp_get_sitemap_providers();
    274274
    275275        $post_list_before = $providers['posts']->get_url_list( 1, 'post' );
     
    298298        $ids = self::factory()->post->create_many( 10, array( 'post_type' => $post_type ) );
    299299
    300         $providers = wp_get_sitemaps_providers();
     300        $providers = wp_get_sitemap_providers();
    301301
    302302        $post_list = $providers['posts']->get_url_list( 1, $post_type );
     
    321321        self::factory()->post->create_many( 10, array( 'post_type' => $post_type ) );
    322322
    323         $providers = wp_get_sitemaps_providers();
     323        $providers = wp_get_sitemap_providers();
    324324
    325325        $post_list = $providers['posts']->get_url_list( 1, $post_type );
     
    349349        self::factory()->post->create_many( 10, array( 'post_type' => $post_type ) );
    350350
    351         $providers = wp_get_sitemaps_providers();
     351        $providers = wp_get_sitemap_providers();
    352352
    353353        $post_list = $providers['posts']->get_url_list( 1, $post_type );
     
    392392        wp_register_sitemap( 'test_sitemap', self::$test_provider );
    393393
    394         $sitemaps = wp_get_sitemaps_providers();
     394        $sitemaps = wp_get_sitemap_providers();
    395395
    396396        $this->assertEquals( $sitemaps['test_sitemap'], self::$test_provider, 'Can not confirm sitemap registration is working.' );
Note: See TracChangeset for help on using the changeset viewer.