WordPress.org

Make WordPress Core

Changeset 48553


Ignore:
Timestamp:
07/21/2020 08:13:59 PM (14 months ago)
Author:
SergeyBiryukov
Message:

Sitemaps: Rename wp_register_sitemap() to wp_register_sitemap_provider().

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

Props pbiron.
Fixes #50724.

Location:
trunk
Files:
2 edited

Legend:

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

    r48541 r48553  
    6464 * @return bool Returns true if the sitemap was added. False on failure.
    6565 */
    66 function wp_register_sitemap( $name, WP_Sitemaps_Provider $provider ) {
     66function wp_register_sitemap_provider( $name, WP_Sitemaps_Provider $provider ) {
    6767    $sitemaps = wp_sitemaps_get_server();
    6868    return $sitemaps->registry->add_provider( $name, $provider );
  • trunk/tests/phpunit/tests/sitemaps/sitemaps.php

    r48541 r48553  
    390390     */
    391391    public function test_register_sitemap_provider() {
    392         wp_register_sitemap( 'test_sitemap', self::$test_provider );
     392        wp_register_sitemap_provider( 'test_sitemap', self::$test_provider );
    393393
    394394        $sitemaps = wp_get_sitemap_providers();
     
    482482     */
    483483    public function test_empty_url_list_should_return_404() {
    484         wp_register_sitemap( 'foo', new WP_Sitemaps_Empty_Test_Provider( 'foo' ) );
     484        wp_register_sitemap_provider( 'foo', new WP_Sitemaps_Empty_Test_Provider( 'foo' ) );
    485485
    486486        $this->go_to( home_url( '/?sitemap=foo' ) );
Note: See TracChangeset for help on using the changeset viewer.