diff --git a/src/wp-includes/class-wp-icons-registry.php b/src/wp-includes/class-wp-icons-registry.php index 32c4ad83bc396..2e306bec77e53 100644 --- a/src/wp-includes/class-wp-icons-registry.php +++ b/src/wp-includes/class-wp-icons-registry.php @@ -18,7 +18,7 @@ class WP_Icons_Registry { * * @var array[] */ - private $registered_icons = array(); + protected $registered_icons = array(); /** @@ -26,12 +26,12 @@ class WP_Icons_Registry { * * @var WP_Icons_Registry|null */ - private static $instance = null; + protected static $instance = null; /** * Constructor. * - * WP_Icons_Registry is a singleton class, so keep this private. + * WP_Icons_Registry is a singleton class, so keep this protected. * * For 7.0, the Icons Registry is closed for third-party icon registry, * serving only a subset of core icons. @@ -40,7 +40,7 @@ class WP_Icons_Registry { * SVG files and as entries in a single manifest file. On init, the * registry is loaded with those icons listed in the manifest. */ - private function __construct() { + protected function __construct() { $icons_directory = __DIR__ . '/icons/'; $icons_directory = trailingslashit( $icons_directory ); $manifest_path = $icons_directory . 'manifest.php'; @@ -101,7 +101,7 @@ private function __construct() { * } * @return bool True if the icon was registered with success and false otherwise. */ - private function register( $icon_name, $icon_properties ) { + protected function register( $icon_name, $icon_properties ) { if ( ! isset( $icon_name ) || ! is_string( $icon_name ) ) { _doing_it_wrong( __METHOD__, @@ -188,7 +188,7 @@ private function register( $icon_name, $icon_properties ) { * @param string $icon_content The icon SVG content to sanitize. * @return string The sanitized icon SVG content. */ - private function sanitize_icon_content( $icon_content ) { + protected function sanitize_icon_content( $icon_content ) { $allowed_tags = array( 'svg' => array( 'class' => true, @@ -223,7 +223,7 @@ private function sanitize_icon_content( $icon_content ) { * @param string $icon_name Icon name including namespace. * @return string|null The content of the icon, if found. */ - private function get_content( $icon_name ) { + protected function get_content( $icon_name ) { if ( ! isset( $this->registered_icons[ $icon_name ]['content'] ) ) { $content = file_get_contents( $this->registered_icons[ $icon_name ]['filePath']