ring) $slug; $indexed_template_types[] = $template_type; } $custom_settings = array( 'siteUrl' => site_url(), 'postsPerPage' => get_option( 'posts_per_page' ), 'styles' => get_block_editor_theme_styles(), 'defaultTemplateTypes' => $indexed_template_types, 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), 'supportsLayout' => wp_theme_has_theme_json(), 'supportsTemplatePartsMode' => ! wp_is_block_theme() && current_theme_supports( 'block-template-parts' ), ); // Add additional back-compat patterns registered by `current_screen` et al. $custom_settings['__experimentalAdditionalBlockPatterns'] = \WP_Block_Patterns_Registry::get_instance()->get_all_registered( true ); $custom_settings['__experimentalAdditionalBlockPatternCategories'] = \WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered( true ); $editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context ); $active_global_styles_id = \WP_Theme_JSON_Resolver::get_user_global_styles_post_id(); $active_theme = get_stylesheet(); $preload_paths = array( array( '/wp/v2/media', 'OPTIONS' ), '/wp/v2/types?context=view', '/wp/v2/types/wp_template?context=edit', '/wp/v2/types/wp_template-part?context=edit', '/wp/v2/templates?context=edit&per_page=-1', '/wp/v2/template-parts?context=edit&per_page=-1', '/wp/v2/themes?context=edit&status=active', '/wp/v2/global-styles/' . $active_global_styles_id . '?context=edit', '/wp/v2/global-styles/' . $active_global_styles_id, '/wp/v2/global-styles/themes/' . $active_theme, ); block_editor_rest_api_preload( $preload_paths, $block_editor_context ); wp_add_inline_script( 'wp-blocks', sprintf( 'window.wcBlockSettings = %s;', wp_json_encode( $editor_settings ) ) ); // Preload server-registered block schemas. wp_add_inline_script( 'wp-blocks', 'wp.blocks.unstable__bootstrapServerSideBlockDefinitions(' . wp_json_encode( get_block_editor_server_block_settings() ) . ');' ); wp_add_inline_script( 'wp-blocks', sprintf( 'wp.blocks.setCategories( %s );', wp_json_encode( isset( $editor_settings['blockCategories'] ) ? $editor_settings['blockCategories'] : array() ) ), 'after' ); wp_enqueue_script( 'wp-editor' ); wp_enqueue_script( 'wp-format-library' ); // Not sure if this is needed. wp_enqueue_script( 'wp-router' ); wp_enqueue_style( 'wp-editor' ); wp_enqueue_style( 'wp-edit-site' ); wp_enqueue_style( 'wp-format-library' ); wp_enqueue_media(); if ( current_theme_supports( 'wp-block-styles' ) && ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) ) { wp_enqueue_style( 'wp-block-library-theme' ); } /** This action is documented in wp-admin/edit-form-blocks.php * * @since 8.0.3 */ do_action( 'enqueue_block_editor_assets' ); // Load Jetpack's block editor assets because they are not enqueued by default. if ( class_exists( 'Jetpack_Gutenberg' ) ) { Jetpack_Gutenberg::enqueue_block_editor_assets(); } } /** * Appends a small style to hide admin bar * * @param bool $show Whether to show the admin bar. */ public function possibly_hide_wp_admin_bar( $show ) { if ( isset( $_GET['cys-hide-admin-bar'] ) ) { // @phpcs:ignore return false; } return $show; } /** * Runs script and add styles to remove unwanted elements and hide scrollbar * when users are viewing with ?cys-hide-admin-bar=true. * * @return void */ public function possibly_remove_unwanted_ui_elements() { if ( isset( $_GET['cys-hide-admin-bar'] ) ) { // @phpcs:ignore echo ' '; } } }
Fatal error: Uncaught Error: Class "Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks\CustomizeStore" not found in /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php:148 Stack trace: #0 /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(260): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskList->__construct(Array) #1 /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(139): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::add_list(Array) #2 /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskLists.php(73): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::init_default_lists() #3 /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/Init.php(36): Automattic\WooCommerce\Admin\Features\OnboardingTasks\TaskLists::init() #4 /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/Features.php(138): Automattic\WooCommerce\Admin\Features\OnboardingTasks\Init->__construct() #5 /htdocs/wp-includes/class-wp-hook.php(324): Automattic\WooCommerce\Admin\Features\Features::load_features('') #6 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #7 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #8 /htdocs/wp-settings.php(704): do_action('init') #9 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #10 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #11 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #12 /htdocs/index.php(17): require('/htdocs/wp-blog...') #13 {main} thrown in /htdocs/wp-content/plugins/woocommerce/src/Admin/Features/OnboardingTasks/TaskList.php on line 148