ould_skip_block_supports_serialization( $block_type, '__experimentalBorder', 'color' ) ? $border['color'] : null, 'style' => isset( $border['style'] ) && ! wp_should_skip_block_supports_serialization( $block_type, '__experimentalBorder', 'style' ) ? $border['style'] : null, ); $border_block_styles[ $side ] = $border_side_values; } } // Collect classes and styles. $attributes = array(); $styles = wp_style_engine_get_styles( array( 'border' => $border_block_styles ) ); if ( ! empty( $styles['classnames'] ) ) { $attributes['class'] = $styles['classnames']; } if ( ! empty( $styles['css'] ) ) { $attributes['style'] = $styles['css']; } return $attributes; } /** * Checks whether the current block type supports the border feature requested. * * If the `__experimentalBorder` support flag is a boolean `true` all border * support features are available. Otherwise, the specific feature's support * flag nested under `experimentalBorder` must be enabled for the feature * to be opted into. * * @since 5.8.0 * @access private * * @param WP_Block_Type $block_type Block type to check for support. * @param string $feature Name of the feature to check support for. * @param mixed $default_value Fallback value for feature support, defaults to false. * @return bool Whether the feature is supported. */ function wp_has_border_feature_support( $block_type, $feature, $default_value = false ) { // Check if all border support features have been opted into via `"__experimentalBorder": true`. if ( property_exists( $block_type, 'supports' ) && ( true === _wp_array_get( $block_type->supports, array( '__experimentalBorder' ), $default_value ) ) ) { return true; } // Check if the specific feature has been opted into individually // via nested flag under `__experimentalBorder`. return block_has_support( $block_type, array( '__experimentalBorder', $feature ), $default_value ); } // Register the block support. WP_Block_Supports::get_instance()->register( 'border', array( 'register_attribute' => 'wp_register_border_support', 'apply' => 'wp_apply_border_support', ) );
Warning: session_start(): Session cannot be started after headers have already been sent in /htdocs/wp-content/plugins/shipping-rate-by-cities/shipping_rate_by_cities.php on line 106
php#L95-L98 * @link https://github.com/WordPress/wordpress-develop/blob/6.0.3/src/wp-includes/post.php#L2067-L2076 * @link https://github.com/WordPress/wordpress-develop/blob/6.0.3/src/wp-includes/default-filters.php#L537 * * Taken together, when using the suggested `wc_admin_register_page` to add a submenu * under Marketing menu, if the priority of "admin_menu" action is > 6, it won't appear. * If the priority is <= 6, the order of added submenu will be above the Coupons. * When using the dedicated "woocommerce_marketing_menu_items" filter, the order of added * submenu will still be above the Coupons. * * In summary, the order in which submenus call `add_submenu_page` determines the order * in which they appear in the Marketing menu, and the way in which submenus call * `add_submenu_page` and whether they are called before the Marketing menu calls * `add_menu_page` determines whether the submenus can match the parent slug to appear * under Marketing menu. * * The method and order of calling is as follows: * 1. Overview submenu: PageController->register_page() with priority 5. * 2. Marketing menu: add_menu_page() with priority 6. * 3. Coupons submenu: add_submenu_page() with the default priority 10. * 4. This workaround will be this order if we add a submenu by "admin_menu" * action with a priority >= 10. Moreover, the `position` will be effective * to change the final ordering. * * @param array $options { * Array describing the submenu page. * * @type string id ID to reference the page. * @type string title Page title. Used in menus and breadcrumbs. * @type string parent Parent ID. * @type string path Path for this page. * @type string capability Capability needed to access the page. * @type int position|null Menu item position. * } */ protected function register_classic_submenu_page( $options ) { $defaults = [ 'capability' => 'manage_woocommerce', 'position' => null, ]; $options = wp_parse_args( $options, $defaults ); $options['js_page'] = true; if ( 0 !== strpos( $options['path'], PageController::PAGE_ROOT ) ) { $options['path'] = PageController::PAGE_ROOT . '&path=' . $options['path']; } add_submenu_page( $options['parent'], $options['title'], $options['title'], $options['capability'], $options['path'], [ PageController::class, 'page_wrapper' ], $options['position'], ); PageController::get_instance()->connect_page( $options ); } }
Fatal error: Trait "Automattic\WooCommerce\GoogleListingsAndAds\Menu\MenuFixesTrait" not found in /htdocs/wp-content/plugins/google-listings-and-ads/src/Menu/GetStarted.php on line 16