File "class-wp-sitemaps-registry.php"

Full path: /home/kosmetik/public_html/wp-content-20250628092616/sitemaps/class-wp-sitemaps-registry.php
File size: 733 B
MIME-type: text/x-php
Charset: utf-8

Download   Open   Edit   Advanced Editor   Back

<?php

class WP_Sitemaps_Registry
{
    private $providers = array();
    public function add_provider($name, WP_Sitemaps_Provider $provider)
    {
        if (isset($this->providers[$name])) {
            return false;
        }
        $provider = apply_filters('wp_sitemaps_add_provider', $provider, $name);
        if (!$provider instanceof WP_Sitemaps_Provider) {
            return false;
        }
        $this->providers[$name] = $provider;
        return true;
    }
    public function get_provider($name)
    {
        if (!isset($this->providers[$name])) {
            return null;
        }
        return $this->providers[$name];
    }
    public function get_providers()
    {
        return $this->providers;
    }
}