ype name including namespace. * @return bool True if the block type is registered, false otherwise. */ public function is_registered( $name ) { return isset( $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; } }
Fatal error: Uncaught Error: Class "WP_Block_Type_Registry" not found in /htdocs/wp-includes/blocks.php:678 Stack trace: #0 /htdocs/wp-includes/blocks/legacy-widget.php(68): register_block_type_from_metadata('/htdocs/wp-incl...', Array) #1 /htdocs/wp-includes/class-wp-hook.php(324): register_block_core_legacy_widget('') #2 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #3 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /htdocs/wp-settings.php(700): do_action('init') #5 /htdocs/wp-config.php(80): require_once('/htdocs/wp-sett...') #6 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #7 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #8 /htdocs/index.php(17): require('/htdocs/wp-blog...') #9 {main} thrown in /htdocs/wp-includes/blocks.php on line 678