me Block type name including namespace. * @return bool True if the block type is registered, false otherwise. */ public function is_registered( $name ) { return isset( $name, $this->registered_block_types[ $name ] ); } public function __wakeup() { if ( ! $this->registered_block_types ) { return; } if ( ! is_array( $this->registered_block_types ) ) { throw new UnexpectedValueException(); } foreach ( $this->registered_block_types as $value ) { if ( ! $value instanceof WP_Block_Type ) { throw new UnexpectedValueException(); } } } /** * Utility method to retrieve the main instance of the class. * * The instance will be created if it does not exist yet. * * @since 5.0.0 * * @return WP_Block_Type_Registry The main instance. */ public static function get_instance() { if ( null === self::$instance ) { self::$instance = new self(); } return self::$instance; } } @todo replace with `wp_trigger_error()`. _doing_it_wrong( __METHOD__, __( 'Font src must be a non-empty string or an array of strings.' ), '6.4.0' ); return false; } // Validate the 'src' property. foreach ( (array) $font_face['src'] as $src ) { if ( empty( $src ) || ! is_string( $src ) ) { // @todo replace with `wp_trigger_error()`. _doing_it_wrong( __METHOD__, __( 'Each font src must be a non-empty string.' ), '6.4.0' ); return false; } } // Check the font-weight. if ( ! is_string( $font_face['font-weight'] ) && ! is_int( $font_face['font-weight'] ) ) { // @todo replace with `wp_trigger_error()`. _doing_it_wrong( __METHOD__, __( 'Font font-weight must be a properly formatted string or integer.' ), '6.4.0' ); return false; } // Check the font-display. if ( ! in_array( $font_face['font-display'], $this->valid_font_display, true ) ) { $font_face['font-display'] = $this->font_face_property_defaults['font-display']; } // Remove invalid properties. foreach ( $font_face as $property => $value ) { if ( ! in_array( $property, $this->valid_font_face_properties, true ) ) { unset( $font_face[ $property ] ); } } return $font_face; } /** * Gets the style element for wrapping the `@font-face` CSS. * * @since 6.4.0 * * @return string The style element. */ private function get_style_element() { $attributes = $this->generate_style_element_attributes(); return "\n"; } /** * Gets the defined