$icon ) { if ( ! is_string( $name ) || ! is_array( $icon ) || ( $icon['name'] ?? null ) !== $name || ! isset( $icon['collection'], $icon['label'] ) || ! is_string( $icon['collection'] ) || ! is_string( $icon['label'] ) ) { return self::unsupported_registry(); } } return $vars['registered_icons']; } /** * Returns a service-unavailable error for unsupported Core registry layouts. * * @return \WP_Error Compatibility error. */ private static function unsupported_registry() { return new \WP_Error( 'icon_library_picker_registry_unsupported', __( 'Icon browsing is unavailable with this WordPress Icon API version.', 'aculect-icon-library' ), array( 'status' => 503 ) ); } }