Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/wp-includes/class-wp-icons-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ class WP_Icons_Registry {
*
* @var array[]
*/
private $registered_icons = array();
protected $registered_icons = array();


/**
* Container for the main instance of the class.
*
* @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.
Expand All @@ -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';
Expand Down Expand Up @@ -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__,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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']
Expand Down
Loading