Make WordPress Core


Ignore:
Timestamp:
07/21/2020 03:27:48 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Sitemaps: Rename 'sitemap' to 'provider' in WP_Sitemaps_Registry class.

This class is for registering sitemap providers, not individual sitemaps.

Props swissspidy.
Fixes #50724.

File:
1 edited

Legend:

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

    r48523 r48536  
    136136        /* @var WP_Sitemaps_Provider $provider */
    137137        foreach ( $providers as $name => $provider ) {
    138             $this->registry->add_sitemap( $name, $provider );
     138            $this->registry->add_provider( $name, $provider );
    139139        }
    140140    }
     
    213213        }
    214214
    215         $provider = $this->registry->get_sitemap( $sitemap );
     215        $provider = $this->registry->get_provider( $sitemap );
    216216
    217217        if ( ! $provider ) {
Note: See TracChangeset for help on using the changeset viewer.