diff --git a/license.txt b/license.txt index a5e2c7965..85bf25e15 100644 --- a/license.txt +++ b/license.txt @@ -1,6 +1,6 @@ WordPress - Web publishing software -Copyright 2011-2023 by the contributors +Copyright 2011-2024 by the contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/readme.html b/readme.html index a40c5e98a..f0309df1e 100644 --- a/readme.html +++ b/readme.html @@ -52,13 +52,13 @@

Migrating from other systems

System Requirements

Recommendations

'; + } + + // Add directives to the submenu if needed. + if ( $has_submenus && $is_interactive ) { + $tags = new WP_HTML_Tag_Processor( $inner_blocks_html ); + $inner_blocks_html = block_core_navigation_add_directives_to_submenu( $tags, $attributes ); + } + + return $inner_blocks_html; + } + + /** + * Gets the inner blocks for the navigation block from the navigation post. + * + * @param array $attributes The block attributes. + * @return WP_Block_List Returns the inner blocks for the navigation block. + */ + private static function get_inner_blocks_from_navigation_post( $attributes ) { + $navigation_post = get_post( $attributes['ref'] ); + if ( ! isset( $navigation_post ) ) { + return new WP_Block_List( array(), $attributes ); + } + + // Only published posts are valid. If this is changed then a corresponding change + // must also be implemented in `use-navigation-menu.js`. + if ( 'publish' === $navigation_post->post_status ) { + $parsed_blocks = parse_blocks( $navigation_post->post_content ); + + // 'parse_blocks' includes a null block with '\n\n' as the content when + // it encounters whitespace. This code strips it. + $blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks ); + + if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) { + // Run Block Hooks algorithm to inject hooked blocks. + $markup = block_core_navigation_insert_hooked_blocks( $blocks, $navigation_post ); + $root_nav_block = parse_blocks( $markup )[0]; + + $blocks = isset( $root_nav_block['innerBlocks'] ) ? $root_nav_block['innerBlocks'] : $blocks; + } + + // TODO - this uses the full navigation block attributes for the + // context which could be refined. + return new WP_Block_List( $blocks, $attributes ); + } + } + + /** + * Gets the inner blocks for the navigation block from the fallback. + * + * @param array $attributes The block attributes. + * @return WP_Block_List Returns the inner blocks for the navigation block. + */ + private static function get_inner_blocks_from_fallback( $attributes ) { + $fallback_blocks = block_core_navigation_get_fallback_blocks(); + + // Fallback my have been filtered so do basic test for validity. + if ( empty( $fallback_blocks ) || ! is_array( $fallback_blocks ) ) { + return new WP_Block_List( array(), $attributes ); + } + + return new WP_Block_List( $fallback_blocks, $attributes ); + } + + /** + * Gets the inner blocks for the navigation block. + * + * @param array $attributes The block attributes. + * @param WP_Block $block The parsed block. + * @return WP_Block_List Returns the inner blocks for the navigation block. + */ + private static function get_inner_blocks( $attributes, $block ) { + $inner_blocks = $block->inner_blocks; + + // Ensure that blocks saved with the legacy ref attribute name (navigationMenuId) continue to render. + if ( array_key_exists( 'navigationMenuId', $attributes ) ) { + $attributes['ref'] = $attributes['navigationMenuId']; + } + + // If: + // - the gutenberg plugin is active + // - `__unstableLocation` is defined + // - we have menu items at the defined location + // - we don't have a relationship to a `wp_navigation` Post (via `ref`). + // ...then create inner blocks from the classic menu assigned to that location. + if ( + defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && + array_key_exists( '__unstableLocation', $attributes ) && + ! array_key_exists( 'ref', $attributes ) && + ! empty( block_core_navigation_get_menu_items_at_location( $attributes['__unstableLocation'] ) ) + ) { + $inner_blocks = block_core_navigation_get_inner_blocks_from_unstable_location( $attributes ); + } + + // Load inner blocks from the navigation post. + if ( array_key_exists( 'ref', $attributes ) ) { + $inner_blocks = static::get_inner_blocks_from_navigation_post( $attributes ); + } + + // If there are no inner blocks then fallback to rendering an appropriate fallback. + if ( empty( $inner_blocks ) ) { + $inner_blocks = static::get_inner_blocks_from_fallback( $attributes ); + } + + /** + * Filter navigation block $inner_blocks. + * Allows modification of a navigation block menu items. + * + * @since 6.1.0 + * + * @param \WP_Block_List $inner_blocks + */ + $inner_blocks = apply_filters( 'block_core_navigation_render_inner_blocks', $inner_blocks ); + + $post_ids = block_core_navigation_get_post_ids( $inner_blocks ); + if ( $post_ids ) { + _prime_post_caches( $post_ids, false, false ); + } + + return $inner_blocks; + } + + /** + * Gets the name of the current navigation, if it has one. + * + * @param array $attributes The block attributes. + * @return string Returns the name of the navigation. + */ + private static function get_navigation_name( $attributes ) { + + $navigation_name = $attributes['ariaLabel'] ?? ''; + + // Load the navigation post. + if ( array_key_exists( 'ref', $attributes ) ) { + $navigation_post = get_post( $attributes['ref'] ); + if ( ! isset( $navigation_post ) ) { + return $navigation_name; + } + + // Only published posts are valid. If this is changed then a corresponding change + // must also be implemented in `use-navigation-menu.js`. + if ( 'publish' === $navigation_post->post_status ) { + $navigation_name = $navigation_post->post_title; + + // This is used to count the number of times a navigation name has been seen, + // so that we can ensure every navigation has a unique id. + if ( isset( static::$seen_menu_names[ $navigation_name ] ) ) { + ++static::$seen_menu_names[ $navigation_name ]; + } else { + static::$seen_menu_names[ $navigation_name ] = 1; + } + } + } + + return $navigation_name; + } + + /** + * Returns the layout class for the navigation block. + * + * @param array $attributes The block attributes. + * @return string Returns the layout class for the navigation block. + */ + private static function get_layout_class( $attributes ) { + $layout_justification = array( + 'left' => 'items-justified-left', + 'right' => 'items-justified-right', + 'center' => 'items-justified-center', + 'space-between' => 'items-justified-space-between', + ); + + $layout_class = ''; + if ( + isset( $attributes['layout']['justifyContent'] ) && + isset( $layout_justification[ $attributes['layout']['justifyContent'] ] ) + ) { + $layout_class .= $layout_justification[ $attributes['layout']['justifyContent'] ]; + } + if ( isset( $attributes['layout']['orientation'] ) && 'vertical' === $attributes['layout']['orientation'] ) { + $layout_class .= ' is-vertical'; + } + + if ( isset( $attributes['layout']['flexWrap'] ) && 'nowrap' === $attributes['layout']['flexWrap'] ) { + $layout_class .= ' no-wrap'; + } + return $layout_class; + } + + /** + * Return classes for the navigation block. + * + * @param array $attributes The block attributes. + * @return string Returns the classes for the navigation block. + */ + private static function get_classes( $attributes ) { + // Restore legacy classnames for submenu positioning. + $layout_class = static::get_layout_class( $attributes ); + $colors = block_core_navigation_build_css_colors( $attributes ); + $font_sizes = block_core_navigation_build_css_font_sizes( $attributes ); + $is_responsive_menu = static::is_responsive( $attributes ); + + // Manually add block support text decoration as CSS class. + $text_decoration = $attributes['style']['typography']['textDecoration'] ?? null; + $text_decoration_class = sprintf( 'has-text-decoration-%s', $text_decoration ); + + $classes = array_merge( + $colors['css_classes'], + $font_sizes['css_classes'], + $is_responsive_menu ? array( 'is-responsive' ) : array(), + $layout_class ? array( $layout_class ) : array(), + $text_decoration ? array( $text_decoration_class ) : array() + ); + return implode( ' ', $classes ); + } + + /** + * Get styles for the navigation block. + * + * @param array $attributes The block attributes. + * @return string Returns the styles for the navigation block. + */ + private static function get_styles( $attributes ) { + $colors = block_core_navigation_build_css_colors( $attributes ); + $font_sizes = block_core_navigation_build_css_font_sizes( $attributes ); + $block_styles = isset( $attributes['styles'] ) ? $attributes['styles'] : ''; + return $block_styles . $colors['inline_styles'] . $font_sizes['inline_styles']; + } + + /** + * Get the responsive container markup + * + * @param array $attributes The block attributes. + * @param WP_Block_List $inner_blocks The list of inner blocks. + * @param string $inner_blocks_html The markup for the inner blocks. + * @return string Returns the container markup. + */ + private static function get_responsive_container_markup( $attributes, $inner_blocks, $inner_blocks_html ) { + $is_interactive = static::is_interactive( $attributes, $inner_blocks ); + $colors = block_core_navigation_build_css_colors( $attributes ); + $modal_unique_id = wp_unique_id( 'modal-' ); + + $is_hidden_by_default = isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu']; + + $responsive_container_classes = array( + 'wp-block-navigation__responsive-container', + $is_hidden_by_default ? 'hidden-by-default' : '', + implode( ' ', $colors['overlay_css_classes'] ), + ); + $open_button_classes = array( + 'wp-block-navigation__responsive-container-open', + $is_hidden_by_default ? 'always-shown' : '', + ); + + $should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon']; + $toggle_button_icon = ''; + if ( isset( $attributes['icon'] ) ) { + if ( 'menu' === $attributes['icon'] ) { + $toggle_button_icon = ''; + } + } + $toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' ); + $toggle_close_button_icon = ''; + $toggle_close_button_content = $should_display_icon_label ? $toggle_close_button_icon : __( 'Close' ); + $toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label. + $toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label. + + // Add Interactivity API directives to the markup if needed. + $open_button_directives = ''; + $responsive_container_directives = ''; + $responsive_dialog_directives = ''; + $close_button_directives = ''; + if ( $is_interactive ) { + $open_button_directives = ' + data-wp-on--click="actions.openMenuOnClick" + data-wp-on--keydown="actions.handleMenuKeydown" + '; + $responsive_container_directives = ' + data-wp-class--has-modal-open="state.isMenuOpen" + data-wp-class--is-menu-open="state.isMenuOpen" + data-wp-watch="callbacks.initMenu" + data-wp-on--keydown="actions.handleMenuKeydown" + data-wp-on--focusout="actions.handleMenuFocusout" + tabindex="-1" + '; + $responsive_dialog_directives = ' + data-wp-bind--aria-modal="state.ariaModal" + data-wp-bind--aria-label="state.ariaLabel" + data-wp-bind--role="state.roleAttribute" + '; + $close_button_directives = ' + data-wp-on--click="actions.closeMenuOnClick" + '; + $responsive_container_content_directives = ' + data-wp-watch="callbacks.focusFirstElement" + '; + } + + return sprintf( + ' +
+
+
+ +
+ %2$s +
+
+
+
', + esc_attr( $modal_unique_id ), + $inner_blocks_html, + $toggle_aria_label_open, + $toggle_aria_label_close, + esc_attr( implode( ' ', $responsive_container_classes ) ), + esc_attr( implode( ' ', $open_button_classes ) ), + esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ), + $toggle_button_content, + $toggle_close_button_content, + $open_button_directives, + $responsive_container_directives, + $responsive_dialog_directives, + $close_button_directives, + $responsive_container_content_directives + ); + } + + /** + * Get the wrapper attributes + * + * @param array $attributes The block attributes. + * @param WP_Block_List $inner_blocks A list of inner blocks. + * @return string Returns the navigation block markup. + */ + private static function get_nav_wrapper_attributes( $attributes, $inner_blocks ) { + $nav_menu_name = static::get_unique_navigation_name( $attributes ); + $is_interactive = static::is_interactive( $attributes, $inner_blocks ); + $is_responsive_menu = static::is_responsive( $attributes ); + $style = static::get_styles( $attributes ); + $class = static::get_classes( $attributes ); + $wrapper_attributes = get_block_wrapper_attributes( + array( + 'class' => $class, + 'style' => $style, + 'aria-label' => $nav_menu_name, + ) + ); + + if ( $is_responsive_menu ) { + $nav_element_directives = static::get_nav_element_directives( $is_interactive ); + $wrapper_attributes .= ' ' . $nav_element_directives; + } + + return $wrapper_attributes; + } + + /** + * Gets the nav element directives. + * + * @param bool $is_interactive Whether the block is interactive. + * @return string the directives for the navigation element. + */ + private static function get_nav_element_directives( $is_interactive ) { + if ( ! $is_interactive ) { + return ''; + } + // When adding to this array be mindful of security concerns. + $nav_element_context = wp_interactivity_data_wp_context( + array( + 'overlayOpenedBy' => array( + 'click' => false, + 'hover' => false, + 'focus' => false, + ), + 'type' => 'overlay', + 'roleAttribute' => '', + 'ariaLabel' => __( 'Menu' ), + ) + ); + $nav_element_directives = ' + data-wp-interactive="core/navigation" ' + . $nav_element_context; + + return $nav_element_directives; + } + + /** + * Handle view script module loading. + * + * @param array $attributes The block attributes. + * @param WP_Block $block The parsed block. + * @param WP_Block_List $inner_blocks The list of inner blocks. + */ + private static function handle_view_script_module_loading( $attributes, $block, $inner_blocks ) { + if ( static::is_interactive( $attributes, $inner_blocks ) ) { + $suffix = wp_scripts_get_suffix(); + if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { + $module_url = gutenberg_url( '/build/interactivity/navigation.min.js' ); + } + + wp_register_script_module( + '@wordpress/block-library/navigation', + isset( $module_url ) ? $module_url : includes_url( "blocks/navigation/view{$suffix}.js" ), + array( '@wordpress/interactivity' ), + defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' ) + ); + wp_enqueue_script_module( '@wordpress/block-library/navigation' ); + } + } + + /** + * Returns the markup for the navigation block. + * + * @param array $attributes The block attributes. + * @param WP_Block_List $inner_blocks The list of inner blocks. + * @return string Returns the navigation wrapper markup. + */ + private static function get_wrapper_markup( $attributes, $inner_blocks ) { + $inner_blocks_html = static::get_inner_blocks_html( $attributes, $inner_blocks ); + if ( static::is_responsive( $attributes ) ) { + return static::get_responsive_container_markup( $attributes, $inner_blocks, $inner_blocks_html ); + } + return $inner_blocks_html; + } + + /** + * Returns a unique name for the navigation. + * + * @param array $attributes The block attributes. + * @return string Returns a unique name for the navigation. + */ + private static function get_unique_navigation_name( $attributes ) { + $nav_menu_name = static::get_navigation_name( $attributes ); + + // If the menu name has been used previously then append an ID + // to the name to ensure uniqueness across a given post. + if ( isset( static::$seen_menu_names[ $nav_menu_name ] ) && static::$seen_menu_names[ $nav_menu_name ] > 1 ) { + $count = static::$seen_menu_names[ $nav_menu_name ]; + $nav_menu_name = $nav_menu_name . ' ' . ( $count ); + } + + return $nav_menu_name; + } + + /** + * Renders the navigation block. + * + * @param array $attributes The block attributes. + * @param string $content The saved content. + * @param WP_Block $block The parsed block. + * @return string Returns the navigation block markup. + */ + public static function render( $attributes, $content, $block ) { + /** + * Deprecated: + * The rgbTextColor and rgbBackgroundColor attributes + * have been deprecated in favor of + * customTextColor and customBackgroundColor ones. + * Move the values from old attrs to the new ones. + */ + if ( isset( $attributes['rgbTextColor'] ) && empty( $attributes['textColor'] ) ) { + $attributes['customTextColor'] = $attributes['rgbTextColor']; + } + + if ( isset( $attributes['rgbBackgroundColor'] ) && empty( $attributes['backgroundColor'] ) ) { + $attributes['customBackgroundColor'] = $attributes['rgbBackgroundColor']; + } + + unset( $attributes['rgbTextColor'], $attributes['rgbBackgroundColor'] ); + + $inner_blocks = static::get_inner_blocks( $attributes, $block ); + // Prevent navigation blocks referencing themselves from rendering. + if ( block_core_navigation_block_contains_core_navigation( $inner_blocks ) ) { + return ''; + } + + static::handle_view_script_module_loading( $attributes, $block, $inner_blocks ); + + return sprintf( + '', + static::get_nav_wrapper_attributes( $attributes, $inner_blocks ), + static::get_wrapper_markup( $attributes, $inner_blocks ) + ); + } +} + // These functions are used for the __unstableLocation feature and only active // when the gutenberg plugin is active. if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { @@ -65,68 +730,84 @@ function block_core_navigation_sort_menu_items_by_parent_id( $menu_items ) { return $menu_items_by_parent_id; } -} + /** + * Gets the inner blocks for the navigation block from the unstable location attribute. + * + * @param array $attributes The block attributes. + * @return WP_Block_List Returns the inner blocks for the navigation block. + */ + function block_core_navigation_get_inner_blocks_from_unstable_location( $attributes ) { + $menu_items = block_core_navigation_get_menu_items_at_location( $attributes['__unstableLocation'] ); + if ( empty( $menu_items ) ) { + return new WP_Block_List( array(), $attributes ); + } + + $menu_items_by_parent_id = block_core_navigation_sort_menu_items_by_parent_id( $menu_items ); + $parsed_blocks = block_core_navigation_parse_blocks_from_menu_items( $menu_items_by_parent_id[0], $menu_items_by_parent_id ); + return new WP_Block_List( $parsed_blocks, $attributes ); + } +} /** * Add Interactivity API directives to the navigation-submenu and page-list * blocks markup using the Tag Processor. * - * @param string $w Markup of the navigation block. - * @param array $block_attributes Block attributes. + * @param WP_HTML_Tag_Processor $tags Markup of the navigation block. + * @param array $block_attributes Block attributes. * * @return string Submenu markup with the directives injected. */ -function block_core_navigation_add_directives_to_submenu( $w, $block_attributes ) { - while ( $w->next_tag( +function block_core_navigation_add_directives_to_submenu( $tags, $block_attributes ) { + while ( $tags->next_tag( array( 'tag_name' => 'LI', 'class_name' => 'has-child', ) ) ) { // Add directives to the parent `
  • `. - $w->set_attribute( 'data-wp-interactive', true ); - $w->set_attribute( 'data-wp-context', '{ "core": { "navigation": { "submenuOpenedBy": {}, "type": "submenu" } } }' ); - $w->set_attribute( 'data-wp-effect', 'effects.core.navigation.initMenu' ); - $w->set_attribute( 'data-wp-on--focusout', 'actions.core.navigation.handleMenuFocusout' ); - $w->set_attribute( 'data-wp-on--keydown', 'actions.core.navigation.handleMenuKeydown' ); + $tags->set_attribute( 'data-wp-interactive', 'core/navigation' ); + $tags->set_attribute( 'data-wp-context', '{ "submenuOpenedBy": { "click": false, "hover": false, "focus": false }, "type": "submenu" }' ); + $tags->set_attribute( 'data-wp-watch', 'callbacks.initMenu' ); + $tags->set_attribute( 'data-wp-on--focusout', 'actions.handleMenuFocusout' ); + $tags->set_attribute( 'data-wp-on--keydown', 'actions.handleMenuKeydown' ); // This is a fix for Safari. Without it, Safari doesn't change the active // element when the user clicks on a button. It can be removed once we add // an overlay to capture the clicks, instead of relying on the focusout // event. - $w->set_attribute( 'tabindex', '-1' ); + $tags->set_attribute( 'tabindex', '-1' ); if ( ! isset( $block_attributes['openSubmenusOnClick'] ) || false === $block_attributes['openSubmenusOnClick'] ) { - $w->set_attribute( 'data-wp-on--mouseenter', 'actions.core.navigation.openMenuOnHover' ); - $w->set_attribute( 'data-wp-on--mouseleave', 'actions.core.navigation.closeMenuOnHover' ); + $tags->set_attribute( 'data-wp-on--mouseenter', 'actions.openMenuOnHover' ); + $tags->set_attribute( 'data-wp-on--mouseleave', 'actions.closeMenuOnHover' ); } // Add directives to the toggle submenu button. - if ( $w->next_tag( + if ( $tags->next_tag( array( 'tag_name' => 'BUTTON', 'class_name' => 'wp-block-navigation-submenu__toggle', ) ) ) { - $w->set_attribute( 'data-wp-on--click', 'actions.core.navigation.toggleMenuOnClick' ); - $w->set_attribute( 'data-wp-bind--aria-expanded', 'selectors.core.navigation.isMenuOpen' ); + $tags->set_attribute( 'data-wp-on--click', 'actions.toggleMenuOnClick' ); + $tags->set_attribute( 'data-wp-bind--aria-expanded', 'state.isMenuOpen' ); // The `aria-expanded` attribute for SSR is already added in the submenu block. } // Add directives to the submenu. - if ( $w->next_tag( + if ( $tags->next_tag( array( 'tag_name' => 'UL', 'class_name' => 'wp-block-navigation__submenu-container', ) ) ) { - $w->set_attribute( 'data-wp-on--focus', 'actions.core.navigation.openMenuOnFocus' ); + $tags->set_attribute( 'data-wp-on--focus', 'actions.openMenuOnFocus' ); } // Iterate through subitems if exist. - block_core_navigation_add_directives_to_submenu( $w, $block_attributes ); + block_core_navigation_add_directives_to_submenu( $tags, $block_attributes ); } - return $w->get_updated_html(); + return $tags->get_updated_html(); } /** @@ -310,7 +991,9 @@ function block_core_navigation_block_contains_core_navigation( $inner_blocks ) { function block_core_navigation_get_fallback_blocks() { $page_list_fallback = array( array( - 'blockName' => 'core/page-list', + 'blockName' => 'core/page-list', + 'innerContent' => array(), + 'attrs' => array(), ), ); @@ -318,12 +1001,7 @@ function block_core_navigation_get_fallback_blocks() { // If `core/page-list` is not registered then return empty blocks. $fallback_blocks = $registry->is_registered( 'core/page-list' ) ? $page_list_fallback : array(); - - if ( class_exists( 'WP_Navigation_Fallback' ) ) { - $navigation_post = WP_Navigation_Fallback::get_fallback(); - } else { - $navigation_post = Gutenberg_Navigation_Fallback::get_fallback(); - } + $navigation_post = WP_Navigation_Fallback::get_fallback(); // Use the first non-empty Navigation as fallback if available. if ( $navigation_post ) { @@ -333,6 +1011,17 @@ function block_core_navigation_get_fallback_blocks() { // Normalizing blocks may result in an empty array of blocks if they were all `null` blocks. // In this case default to the (Page List) fallback. $fallback_blocks = ! empty( $maybe_fallback ) ? $maybe_fallback : $fallback_blocks; + + if ( function_exists( 'set_ignored_hooked_blocks_metadata' ) ) { + // Run Block Hooks algorithm to inject hooked blocks. + // We have to run it here because we need the post ID of the Navigation block to track ignored hooked blocks. + $markup = block_core_navigation_insert_hooked_blocks( $fallback_blocks, $navigation_post ); + $blocks = parse_blocks( $markup ); + + if ( isset( $blocks[0]['innerBlocks'] ) ) { + $fallback_blocks = $blocks[0]['innerBlocks']; + } + } } /** @@ -344,7 +1033,7 @@ function block_core_navigation_get_fallback_blocks() { * * @since 5.9.0 * - * @param array[] default fallback blocks provided by the default block mechanic. + * @param array[] $fallback_blocks default fallback blocks provided by the default block mechanic. */ return apply_filters( 'block_core_navigation_render_fallback', $fallback_blocks ); } @@ -391,391 +1080,10 @@ function block_core_navigation_from_block_get_post_ids( $block ) { * @param string $content The saved content. * @param WP_Block $block The parsed block. * - * @return string Returns the post content with the legacy widget added. + * @return string Returns the navigation block markup. */ function render_block_core_navigation( $attributes, $content, $block ) { - static $seen_menu_names = array(); - - // Flag used to indicate whether the rendered output is considered to be - // a fallback (i.e. the block has no menu associated with it). - $is_fallback = false; - - $nav_menu_name = $attributes['ariaLabel'] ?? ''; - - /** - * Deprecated: - * The rgbTextColor and rgbBackgroundColor attributes - * have been deprecated in favor of - * customTextColor and customBackgroundColor ones. - * Move the values from old attrs to the new ones. - */ - if ( isset( $attributes['rgbTextColor'] ) && empty( $attributes['textColor'] ) ) { - $attributes['customTextColor'] = $attributes['rgbTextColor']; - } - - if ( isset( $attributes['rgbBackgroundColor'] ) && empty( $attributes['backgroundColor'] ) ) { - $attributes['customBackgroundColor'] = $attributes['rgbBackgroundColor']; - } - - unset( $attributes['rgbTextColor'], $attributes['rgbBackgroundColor'] ); - - /** - * This is for backwards compatibility after `isResponsive` attribute has been removed. - */ - $has_old_responsive_attribute = ! empty( $attributes['isResponsive'] ) && $attributes['isResponsive']; - $is_responsive_menu = isset( $attributes['overlayMenu'] ) && 'never' !== $attributes['overlayMenu'] || $has_old_responsive_attribute; - - $inner_blocks = $block->inner_blocks; - - // Ensure that blocks saved with the legacy ref attribute name (navigationMenuId) continue to render. - if ( array_key_exists( 'navigationMenuId', $attributes ) ) { - $attributes['ref'] = $attributes['navigationMenuId']; - } - - // If: - // - the gutenberg plugin is active - // - `__unstableLocation` is defined - // - we have menu items at the defined location - // - we don't have a relationship to a `wp_navigation` Post (via `ref`). - // ...then create inner blocks from the classic menu assigned to that location. - if ( - defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && - array_key_exists( '__unstableLocation', $attributes ) && - ! array_key_exists( 'ref', $attributes ) && - ! empty( block_core_navigation_get_menu_items_at_location( $attributes['__unstableLocation'] ) ) - ) { - $menu_items = block_core_navigation_get_menu_items_at_location( $attributes['__unstableLocation'] ); - if ( empty( $menu_items ) ) { - return ''; - } - - $menu_items_by_parent_id = block_core_navigation_sort_menu_items_by_parent_id( $menu_items ); - $parsed_blocks = block_core_navigation_parse_blocks_from_menu_items( $menu_items_by_parent_id[0], $menu_items_by_parent_id ); - $inner_blocks = new WP_Block_List( $parsed_blocks, $attributes ); - } - - // Load inner blocks from the navigation post. - if ( array_key_exists( 'ref', $attributes ) ) { - $navigation_post = get_post( $attributes['ref'] ); - if ( ! isset( $navigation_post ) ) { - return ''; - } - - // Only published posts are valid. If this is changed then a corresponding change - // must also be implemented in `use-navigation-menu.js`. - if ( 'publish' === $navigation_post->post_status ) { - $nav_menu_name = $navigation_post->post_title; - - if ( isset( $seen_menu_names[ $nav_menu_name ] ) ) { - ++$seen_menu_names[ $nav_menu_name ]; - } else { - $seen_menu_names[ $nav_menu_name ] = 1; - } - - $parsed_blocks = parse_blocks( $navigation_post->post_content ); - - // 'parse_blocks' includes a null block with '\n\n' as the content when - // it encounters whitespace. This code strips it. - $compacted_blocks = block_core_navigation_filter_out_empty_blocks( $parsed_blocks ); - - // TODO - this uses the full navigation block attributes for the - // context which could be refined. - $inner_blocks = new WP_Block_List( $compacted_blocks, $attributes ); - } - } - - // If there are no inner blocks then fallback to rendering an appropriate fallback. - if ( empty( $inner_blocks ) ) { - $is_fallback = true; // indicate we are rendering the fallback. - - $fallback_blocks = block_core_navigation_get_fallback_blocks(); - - // Fallback my have been filtered so do basic test for validity. - if ( empty( $fallback_blocks ) || ! is_array( $fallback_blocks ) ) { - return ''; - } - - $inner_blocks = new WP_Block_List( $fallback_blocks, $attributes ); - } - - if ( block_core_navigation_block_contains_core_navigation( $inner_blocks ) ) { - return ''; - } - - /** - * Filter navigation block $inner_blocks. - * Allows modification of a navigation block menu items. - * - * @since 6.1.0 - * - * @param \WP_Block_List $inner_blocks - */ - $inner_blocks = apply_filters( 'block_core_navigation_render_inner_blocks', $inner_blocks ); - - $layout_justification = array( - 'left' => 'items-justified-left', - 'right' => 'items-justified-right', - 'center' => 'items-justified-center', - 'space-between' => 'items-justified-space-between', - ); - - // Restore legacy classnames for submenu positioning. - $layout_class = ''; - if ( - isset( $attributes['layout']['justifyContent'] ) && - isset( $layout_justification[ $attributes['layout']['justifyContent'] ] ) - ) { - $layout_class .= $layout_justification[ $attributes['layout']['justifyContent'] ]; - } - if ( isset( $attributes['layout']['orientation'] ) && 'vertical' === $attributes['layout']['orientation'] ) { - $layout_class .= ' is-vertical'; - } - - if ( isset( $attributes['layout']['flexWrap'] ) && 'nowrap' === $attributes['layout']['flexWrap'] ) { - $layout_class .= ' no-wrap'; - } - - // Manually add block support text decoration as CSS class. - $text_decoration = $attributes['style']['typography']['textDecoration'] ?? null; - $text_decoration_class = sprintf( 'has-text-decoration-%s', $text_decoration ); - - $colors = block_core_navigation_build_css_colors( $attributes ); - $font_sizes = block_core_navigation_build_css_font_sizes( $attributes ); - $classes = array_merge( - $colors['css_classes'], - $font_sizes['css_classes'], - $is_responsive_menu ? array( 'is-responsive' ) : array(), - $layout_class ? array( $layout_class ) : array(), - $is_fallback ? array( 'is-fallback' ) : array(), - $text_decoration ? array( $text_decoration_class ) : array() - ); - - $post_ids = block_core_navigation_get_post_ids( $inner_blocks ); - if ( $post_ids ) { - _prime_post_caches( $post_ids, false, false ); - } - - $list_item_nav_blocks = array( - 'core/navigation-link', - 'core/home-link', - 'core/site-title', - 'core/site-logo', - 'core/navigation-submenu', - ); - - $needs_list_item_wrapper = array( - 'core/site-title', - 'core/site-logo', - ); - - $block_styles = isset( $attributes['styles'] ) ? $attributes['styles'] : ''; - $style = $block_styles . $colors['inline_styles'] . $font_sizes['inline_styles']; - $class = implode( ' ', $classes ); - - // If the menu name has been used previously then append an ID - // to the name to ensure uniqueness across a given post. - if ( isset( $seen_menu_names[ $nav_menu_name ] ) && $seen_menu_names[ $nav_menu_name ] > 1 ) { - $count = $seen_menu_names[ $nav_menu_name ]; - $nav_menu_name = $nav_menu_name . ' ' . ( $count ); - } - - $wrapper_attributes = get_block_wrapper_attributes( - array( - 'class' => $class, - 'style' => $style, - 'aria-label' => $nav_menu_name, - ) - ); - - $container_attributes = get_block_wrapper_attributes( - array( - 'class' => 'wp-block-navigation__container ' . $class, - 'style' => $style, - ) - ); - - $inner_blocks_html = ''; - $is_list_open = false; - $has_submenus = false; - foreach ( $inner_blocks as $inner_block ) { - $is_list_item = in_array( $inner_block->name, $list_item_nav_blocks, true ); - - if ( $is_list_item && ! $is_list_open ) { - $is_list_open = true; - $inner_blocks_html .= sprintf( - ''; - } - - $inner_block_content = $inner_block->render(); - $p = new WP_HTML_Tag_Processor( $inner_block_content ); - if ( $p->next_tag( - array( - 'name' => 'LI', - 'class_name' => 'has-child', - ) - ) ) { - $has_submenus = true; - } - if ( ! empty( $inner_block_content ) ) { - if ( in_array( $inner_block->name, $needs_list_item_wrapper, true ) ) { - $inner_blocks_html .= '
  • ' . $inner_block_content . '
  • '; - } else { - $inner_blocks_html .= $inner_block_content; - } - } - } - - if ( $is_list_open ) { - $inner_blocks_html .= ''; - } - - $should_load_view_script = ( $has_submenus && ( $attributes['openSubmenusOnClick'] || $attributes['showSubmenuIcon'] ) ) || $is_responsive_menu; - $view_js_file = 'wp-block-navigation-view'; - - // If the script already exists, there is no point in removing it from viewScript. - if ( ! wp_script_is( $view_js_file ) ) { - $script_handles = $block->block_type->view_script_handles; - - // If the script is not needed, and it is still in the `view_script_handles`, remove it. - if ( ! $should_load_view_script && in_array( $view_js_file, $script_handles, true ) ) { - $block->block_type->view_script_handles = array_diff( $script_handles, array( $view_js_file ) ); - } - // If the script is needed, but it was previously removed, add it again. - if ( $should_load_view_script && ! in_array( $view_js_file, $script_handles, true ) ) { - $block->block_type->view_script_handles = array_merge( $script_handles, array( $view_js_file ) ); - } - } - - // Add directives to the submenu if needed. - if ( $has_submenus && $should_load_view_script ) { - $w = new WP_HTML_Tag_Processor( $inner_blocks_html ); - $inner_blocks_html = block_core_navigation_add_directives_to_submenu( $w, $attributes ); - } - - $modal_unique_id = wp_unique_id( 'modal-' ); - - // Determine whether or not navigation elements should be wrapped in the markup required to make it responsive, - // return early if they don't. - if ( ! $is_responsive_menu ) { - return sprintf( - '', - $wrapper_attributes, - $inner_blocks_html - ); - } - - $is_hidden_by_default = isset( $attributes['overlayMenu'] ) && 'always' === $attributes['overlayMenu']; - - $responsive_container_classes = array( - 'wp-block-navigation__responsive-container', - $is_hidden_by_default ? 'hidden-by-default' : '', - implode( ' ', $colors['overlay_css_classes'] ), - ); - $open_button_classes = array( - 'wp-block-navigation__responsive-container-open', - $is_hidden_by_default ? 'always-shown' : '', - ); - - $should_display_icon_label = isset( $attributes['hasIcon'] ) && true === $attributes['hasIcon']; - $toggle_button_icon = ''; - if ( isset( $attributes['icon'] ) ) { - if ( 'menu' === $attributes['icon'] ) { - $toggle_button_icon = ''; - } - } - $toggle_button_content = $should_display_icon_label ? $toggle_button_icon : __( 'Menu' ); - $toggle_close_button_icon = ''; - $toggle_close_button_content = $should_display_icon_label ? $toggle_close_button_icon : __( 'Close' ); - $toggle_aria_label_open = $should_display_icon_label ? 'aria-label="' . __( 'Open menu' ) . '"' : ''; // Open button label. - $toggle_aria_label_close = $should_display_icon_label ? 'aria-label="' . __( 'Close menu' ) . '"' : ''; // Close button label. - - // Add Interactivity API directives to the markup if needed. - $nav_element_directives = ''; - $open_button_directives = ''; - $responsive_container_directives = ''; - $responsive_dialog_directives = ''; - $close_button_directives = ''; - if ( $should_load_view_script ) { - $nav_element_context = wp_json_encode( - array( - 'core' => array( - 'navigation' => array( - 'overlayOpenedBy' => array(), - 'type' => 'overlay', - 'roleAttribute' => '', - 'ariaLabel' => __( 'Menu' ), - ), - ), - ), - JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_AMP - ); - $nav_element_directives = ' - data-wp-interactive - data-wp-context=\'' . $nav_element_context . '\' - '; - $open_button_directives = ' - data-wp-on--click="actions.core.navigation.openMenuOnClick" - data-wp-on--keydown="actions.core.navigation.handleMenuKeydown" - '; - $responsive_container_directives = ' - data-wp-class--has-modal-open="selectors.core.navigation.isMenuOpen" - data-wp-class--is-menu-open="selectors.core.navigation.isMenuOpen" - data-wp-effect="effects.core.navigation.initMenu" - data-wp-on--keydown="actions.core.navigation.handleMenuKeydown" - data-wp-on--focusout="actions.core.navigation.handleMenuFocusout" - tabindex="-1" - '; - $responsive_dialog_directives = ' - data-wp-bind--aria-modal="selectors.core.navigation.ariaModal" - data-wp-bind--aria-label="selectors.core.navigation.ariaLabel" - data-wp-bind--role="selectors.core.navigation.roleAttribute" - data-wp-effect="effects.core.navigation.focusFirstElement" - '; - $close_button_directives = ' - data-wp-on--click="actions.core.navigation.closeMenuOnClick" - '; - } - - $responsive_container_markup = sprintf( - ' -
    -
    -
    - -
    - %2$s -
    -
    -
    -
    ', - esc_attr( $modal_unique_id ), - $inner_blocks_html, - $toggle_aria_label_open, - $toggle_aria_label_close, - esc_attr( implode( ' ', $responsive_container_classes ) ), - esc_attr( implode( ' ', $open_button_classes ) ), - esc_attr( safecss_filter_attr( $colors['overlay_inline_styles'] ) ), - $toggle_button_content, - $toggle_close_button_content, - $open_button_directives, - $responsive_container_directives, - $responsive_dialog_directives, - $close_button_directives - ); - - return sprintf( - '', - $wrapper_attributes, - $responsive_container_markup, - $nav_element_directives - ); + return WP_Navigation_Block_Renderer::render( $attributes, $content, $block ); } /** @@ -829,25 +1137,6 @@ function block_core_navigation_typographic_presets_backcompatibility( $parsed_bl add_filter( 'render_block_data', 'block_core_navigation_typographic_presets_backcompatibility' ); -/** - * Ensure that the view script has the `wp-interactivity` dependency. - * - * @since 6.4.0 - * - * @global WP_Scripts $wp_scripts - */ -function block_core_navigation_ensure_interactivity_dependency() { - global $wp_scripts; - if ( - isset( $wp_scripts->registered['wp-block-navigation-view'] ) && - ! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-navigation-view']->deps, true ) - ) { - $wp_scripts->registered['wp-block-navigation-view']->deps[] = 'wp-interactivity'; - } -} - -add_action( 'wp_print_scripts', 'block_core_navigation_ensure_interactivity_dependency' ); - /** * Turns menu item data into a nested array of parsed blocks * @@ -1066,3 +1355,221 @@ function block_core_navigation_get_most_recently_published_navigation() { return null; } + +/** + * Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks. + * + * @param string $serialized_block The serialized markup of a block and its inner blocks. + * @return string + */ +function block_core_navigation_remove_serialized_parent_block( $serialized_block ) { + $start = strpos( $serialized_block, '-->' ) + strlen( '-->' ); + $end = strrpos( $serialized_block, '`. Support these by defaulting an undefined label and @@ -36,7 +36,6 @@ function render_block_core_search( $attributes, $content, $block ) { $show_button = ( ! empty( $attributes['buttonPosition'] ) && 'no-button' === $attributes['buttonPosition'] ) ? false : true; $button_position = $show_button ? $attributes['buttonPosition'] : null; $query_params = ( ! empty( $attributes['query'] ) ) ? $attributes['query'] : array(); - $button_behavior = ( ! empty( $attributes['buttonBehavior'] ) ) ? $attributes['buttonBehavior'] : 'default'; $button = ''; $query_params_markup = ''; $inline_styles = styles_for_block_core_search( $attributes ); @@ -48,7 +47,7 @@ function render_block_core_search( $attributes, $content, $block ) { $border_color_classes = get_border_color_classes_for_block_core_search( $attributes ); // This variable is a constant and its value is always false at this moment. // It is defined this way because some values depend on it, in case it changes in the future. - $open_by_default = 'false'; + $open_by_default = false; $label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] ); $label = new WP_HTML_Tag_Processor( sprintf( '', $inline_styles['label'], $label_inner_html ) ); @@ -78,28 +77,29 @@ function render_block_core_search( $attributes, $content, $block ) { $input->set_attribute( 'value', get_search_query() ); $input->set_attribute( 'placeholder', $attributes['placeholder'] ); - $is_expandable_searchfield = 'button-only' === $button_position && 'expand-searchfield' === $button_behavior; + // If it's interactive, enqueue the script module and add the directives. + $is_expandable_searchfield = 'button-only' === $button_position; if ( $is_expandable_searchfield ) { - $input->set_attribute( 'data-wp-bind--aria-hidden', '!context.core.search.isSearchInputVisible' ); - $input->set_attribute( 'data-wp-bind--tabindex', 'selectors.core.search.tabindex' ); - // Adding these attributes manually is needed until the Interactivity API SSR logic is added to core. - $input->set_attribute( 'aria-hidden', 'true' ); - $input->set_attribute( 'tabindex', '-1' ); - } + $suffix = wp_scripts_get_suffix(); + if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) { + $module_url = gutenberg_url( '/build/interactivity/search.min.js' ); + } - // If the script already exists, there is no point in removing it from viewScript. - $view_js_file = 'wp-block-search-view'; - if ( ! wp_script_is( $view_js_file ) ) { - $script_handles = $block->block_type->view_script_handles; + wp_register_script_module( + '@wordpress/block-library/search', + isset( $module_url ) ? $module_url : includes_url( "blocks/search/view{$suffix}.js" ), + array( '@wordpress/interactivity' ), + defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' ) + ); + wp_enqueue_script_module( '@wordpress/block-library/search' ); - // If the script is not needed, and it is still in the `view_script_handles`, remove it. - if ( ! $is_expandable_searchfield && in_array( $view_js_file, $script_handles, true ) ) { - $block->block_type->view_script_handles = array_diff( $script_handles, array( $view_js_file ) ); - } - // If the script is needed, but it was previously removed, add it again. - if ( $is_expandable_searchfield && ! in_array( $view_js_file, $script_handles, true ) ) { - $block->block_type->view_script_handles = array_merge( $script_handles, array( $view_js_file ) ); - } + $input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' ); + $input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' ); + + // Adding these attributes manually is needed until the Interactivity API + // SSR logic is added to core. + $input->set_attribute( 'aria-hidden', 'true' ); + $input->set_attribute( 'tabindex', '-1' ); } } @@ -144,13 +144,15 @@ function render_block_core_search( $attributes, $content, $block ) { if ( $button->next_tag() ) { $button->add_class( implode( ' ', $button_classes ) ); - if ( 'expand-searchfield' === $attributes['buttonBehavior'] && 'button-only' === $attributes['buttonPosition'] ) { - $button->set_attribute( 'data-wp-bind--aria-label', 'selectors.core.search.ariaLabel' ); - $button->set_attribute( 'data-wp-bind--aria-controls', 'selectors.core.search.ariaControls' ); - $button->set_attribute( 'data-wp-bind--aria-expanded', 'context.core.search.isSearchInputVisible' ); - $button->set_attribute( 'data-wp-bind--type', 'selectors.core.search.type' ); - $button->set_attribute( 'data-wp-on--click', 'actions.core.search.openSearchInput' ); - // Adding these attributes manually is needed until the Interactivity API SSR logic is added to core. + if ( 'button-only' === $attributes['buttonPosition'] ) { + $button->set_attribute( 'data-wp-bind--aria-label', 'state.ariaLabel' ); + $button->set_attribute( 'data-wp-bind--aria-controls', 'state.ariaControls' ); + $button->set_attribute( 'data-wp-bind--aria-expanded', 'context.isSearchInputVisible' ); + $button->set_attribute( 'data-wp-bind--type', 'state.type' ); + $button->set_attribute( 'data-wp-on--click', 'actions.openSearchInput' ); + + // Adding these attributes manually is needed until the Interactivity + // API SSR logic is added to core. $button->set_attribute( 'aria-label', __( 'Expand search field' ) ); $button->set_attribute( 'aria-controls', 'wp-block-search__input-' . $input_id ); $button->set_attribute( 'aria-expanded', 'false' ); @@ -172,15 +174,25 @@ function render_block_core_search( $attributes, $content, $block ) { array( 'class' => $classnames ) ); $form_directives = ''; + + // If it's interactive, add the directives. if ( $is_expandable_searchfield ) { $aria_label_expanded = __( 'Submit Search' ); $aria_label_collapsed = __( 'Expand search field' ); + $form_context = wp_interactivity_data_wp_context( + array( + 'isSearchInputVisible' => $open_by_default, + 'inputId' => $input_id, + 'ariaLabelExpanded' => $aria_label_expanded, + 'ariaLabelCollapsed' => $aria_label_collapsed, + ) + ); $form_directives = ' - data-wp-interactive - data-wp-context=\'{ "core": { "search": { "isSearchInputVisible": ' . $open_by_default . ', "inputId": "' . $input_id . '", "ariaLabelExpanded": "' . $aria_label_expanded . '", "ariaLabelCollapsed": "' . $aria_label_collapsed . '" } } }\' - data-wp-class--wp-block-search__searchfield-hidden="!context.core.search.isSearchInputVisible" - data-wp-on--keydown="actions.core.search.handleSearchKeydown" - data-wp-on--focusout="actions.core.search.handleSearchFocusout" + data-wp-interactive="core/search"' + . $form_context . + 'data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible" + data-wp-on--keydown="actions.handleSearchKeydown" + data-wp-on--focusout="actions.handleSearchFocusout" '; } @@ -206,25 +218,6 @@ function register_block_core_search() { } add_action( 'init', 'register_block_core_search' ); -/** - * Ensure that the view script has the `wp-interactivity` dependency. - * - * @since 6.4.0 - * - * @global WP_Scripts $wp_scripts - */ -function block_core_search_ensure_interactivity_dependency() { - global $wp_scripts; - if ( - isset( $wp_scripts->registered['wp-block-search-view'] ) && - ! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-search-view']->deps, true ) - ) { - $wp_scripts->registered['wp-block-search-view']->deps[] = 'wp-interactivity'; - } -} - -add_action( 'wp_print_scripts', 'block_core_search_ensure_interactivity_dependency' ); - /** * Builds the correct top level classnames for the 'core/search' block. * @@ -249,10 +242,7 @@ function classnames_for_block_core_search( $attributes ) { } if ( 'button-only' === $attributes['buttonPosition'] ) { - $classnames[] = 'wp-block-search__button-only'; - if ( ! empty( $attributes['buttonBehavior'] ) && 'expand-searchfield' === $attributes['buttonBehavior'] ) { - $classnames[] = 'wp-block-search__button-behavior-expand wp-block-search__searchfield-hidden'; - } + $classnames[] = 'wp-block-search__button-only wp-block-search__searchfield-hidden'; } } diff --git a/wp-includes/blocks/search/block.json b/wp-includes/blocks/search/block.json index 5669a9089..8d5e20804 100644 --- a/wp-includes/blocks/search/block.json +++ b/wp-includes/blocks/search/block.json @@ -43,10 +43,6 @@ "type": "object", "default": {} }, - "buttonBehavior": { - "type": "string", - "default": "expand-searchfield" - }, "isSearchFieldHidden": { "type": "boolean", "default": false @@ -91,7 +87,6 @@ }, "html": false }, - "viewScript": "file:./view.min.js", "editorStyle": "wp-block-search-editor", "style": "wp-block-search" } diff --git a/wp-includes/blocks/search/editor-rtl.css b/wp-includes/blocks/search/editor-rtl.css index 05eeacfbb..26babe4f8 100644 --- a/wp-includes/blocks/search/editor-rtl.css +++ b/wp-includes/blocks/search/editor-rtl.css @@ -8,6 +8,7 @@ display:flex; height:auto; justify-content:center; + text-align:center; } .wp-block-search__components-button-group{ margin-top:10px; diff --git a/wp-includes/blocks/search/editor-rtl.min.css b/wp-includes/blocks/search/editor-rtl.min.css index b9c22f481..f24037ce5 100644 --- a/wp-includes/blocks/search/editor-rtl.min.css +++ b/wp-includes/blocks/search/editor-rtl.min.css @@ -1 +1 @@ -.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file +.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center;text-align:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file diff --git a/wp-includes/blocks/search/editor.css b/wp-includes/blocks/search/editor.css index 05eeacfbb..26babe4f8 100644 --- a/wp-includes/blocks/search/editor.css +++ b/wp-includes/blocks/search/editor.css @@ -8,6 +8,7 @@ display:flex; height:auto; justify-content:center; + text-align:center; } .wp-block-search__components-button-group{ margin-top:10px; diff --git a/wp-includes/blocks/search/editor.min.css b/wp-includes/blocks/search/editor.min.css index b9c22f481..f24037ce5 100644 --- a/wp-includes/blocks/search/editor.min.css +++ b/wp-includes/blocks/search/editor.min.css @@ -1 +1 @@ -.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file +.wp-block[data-align=center] .wp-block-search .wp-block-search__inside-wrapper{margin:auto}.wp-block-search .wp-block-search__button{align-items:center;border-radius:initial;display:flex;height:auto;justify-content:center;text-align:center}.wp-block-search__components-button-group{margin-top:10px} \ No newline at end of file diff --git a/wp-includes/blocks/search/style-rtl.css b/wp-includes/blocks/search/style-rtl.css index ff600861b..755681c38 100644 --- a/wp-includes/blocks/search/style-rtl.css +++ b/wp-includes/blocks/search/style-rtl.css @@ -6,9 +6,11 @@ line-height:0; } .wp-block-search__button svg{ - fill:currentColor; + height:1.25em; min-height:24px; min-width:24px; + width:1.25em; + fill:currentColor; vertical-align:text-bottom; } @@ -43,8 +45,33 @@ .wp-block-search.wp-block-search__button-only .wp-block-search__button{ flex-shrink:0; margin-right:0; + max-width:100%; +} +.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{ max-width:calc(100% - 100px); } +.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{ + min-width:0 !important; + transition-property:width; +} +.wp-block-search.wp-block-search__button-only .wp-block-search__input{ + flex-basis:100%; + transition-duration:.3s; +} +.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{ + overflow:hidden; +} +.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{ + border-left-width:0 !important; + border-right-width:0 !important; + flex-basis:0; + flex-grow:0; + margin:0; + min-width:0 !important; + padding-left:0 !important; + padding-right:0 !important; + width:0 !important; +} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){ border:1px solid #949494; @@ -67,29 +94,6 @@ margin:auto; } -.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{ - min-width:0 !important; - transition-property:width; -} -.wp-block-search__button-behavior-expand .wp-block-search__input{ - flex-basis:100%; - transition-duration:.3s; -} -.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{ - overflow:hidden; -} -.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{ - border-left-width:0 !important; - border-right-width:0 !important; - flex-basis:0; - flex-grow:0; - margin:0; - min-width:0 !important; - padding-left:0 !important; - padding-right:0 !important; - width:0 !important; -} - -.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{ +.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{ float:left; } \ No newline at end of file diff --git a/wp-includes/blocks/search/style-rtl.min.css b/wp-includes/blocks/search/style-rtl.min.css index 73dea5a6f..19f9266c7 100644 --- a/wp-includes/blocks/search/style-rtl.min.css +++ b/wp-includes/blocks/search/style-rtl.min.css @@ -1 +1 @@ -.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{fill:currentColor;min-height:24px;min-width:24px;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-right:0;max-width:calc(100% - 100px)}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search__button-behavior-expand .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{float:left} \ No newline at end of file +.wp-block-search__button{margin-right:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-right:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:left} \ No newline at end of file diff --git a/wp-includes/blocks/search/style.css b/wp-includes/blocks/search/style.css index 91fe4f72f..536a2d10c 100644 --- a/wp-includes/blocks/search/style.css +++ b/wp-includes/blocks/search/style.css @@ -6,9 +6,11 @@ line-height:0; } .wp-block-search__button svg{ - fill:currentColor; + height:1.25em; min-height:24px; min-width:24px; + width:1.25em; + fill:currentColor; vertical-align:text-bottom; } @@ -43,8 +45,33 @@ .wp-block-search.wp-block-search__button-only .wp-block-search__button{ flex-shrink:0; margin-left:0; + max-width:100%; +} +.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{ max-width:calc(100% - 100px); } +.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{ + min-width:0 !important; + transition-property:width; +} +.wp-block-search.wp-block-search__button-only .wp-block-search__input{ + flex-basis:100%; + transition-duration:.3s; +} +.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{ + overflow:hidden; +} +.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{ + border-left-width:0 !important; + border-right-width:0 !important; + flex-basis:0; + flex-grow:0; + margin:0; + min-width:0 !important; + padding-left:0 !important; + padding-right:0 !important; + width:0 !important; +} :where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){ border:1px solid #949494; @@ -67,29 +94,6 @@ margin:auto; } -.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{ - min-width:0 !important; - transition-property:width; -} -.wp-block-search__button-behavior-expand .wp-block-search__input{ - flex-basis:100%; - transition-duration:.3s; -} -.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{ - overflow:hidden; -} -.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{ - border-left-width:0 !important; - border-right-width:0 !important; - flex-basis:0; - flex-grow:0; - margin:0; - min-width:0 !important; - padding-left:0 !important; - padding-right:0 !important; - width:0 !important; -} - -.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{ +.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{ float:right; } \ No newline at end of file diff --git a/wp-includes/blocks/search/style.min.css b/wp-includes/blocks/search/style.min.css index c744f3770..82d39a5e1 100644 --- a/wp-includes/blocks/search/style.min.css +++ b/wp-includes/blocks/search/style.min.css @@ -1 +1 @@ -.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{fill:currentColor;min-height:24px;min-width:24px;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:calc(100% - 100px)}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search__button-behavior-expand .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden,.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search__button-behavior-expand.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}.wp-block[data-align=right] .wp-block-search__button-behavior-expand .wp-block-search__inside-wrapper{float:right} \ No newline at end of file +.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{-webkit-appearance:initial;appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:right} \ No newline at end of file diff --git a/wp-includes/blocks/search/view.asset.php b/wp-includes/blocks/search/view.asset.php index 9ecb989ae..e9b5021ae 100644 --- a/wp-includes/blocks/search/view.asset.php +++ b/wp-includes/blocks/search/view.asset.php @@ -1 +1 @@ - array(), 'version' => 'bbd4958a430d8ba14c4c'); + array(), 'version' => '2a0784014283afdd3c25'); diff --git a/wp-includes/blocks/search/view.js b/wp-includes/blocks/search/view.js index 9d18abf48..223484749 100644 --- a/wp-includes/blocks/search/view.js +++ b/wp-includes/blocks/search/view.js @@ -1,101 +1,112 @@ -"use strict"; -(self["__WordPressPrivateInteractivityAPI__"] = self["__WordPressPrivateInteractivityAPI__"] || []).push([[222],{ +import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity"; +/******/ // The require scope +/******/ var __webpack_require__ = {}; +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; -/***/ 534: -/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) { - -/* harmony import */ var _wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(754); +;// CONCATENATED MODULE: external "@wordpress/interactivity" +var x = (y) => { + var x = {}; __webpack_require__.d(x, y); return x +} +var y = (x) => (() => (x)) +const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) }); +;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/search/view.js /** * WordPress dependencies */ -(0,_wordpress_interactivity__WEBPACK_IMPORTED_MODULE_0__/* .store */ .h)({ - selectors: { - core: { - search: { - ariaLabel: ({ - context - }) => { - const { - ariaLabelCollapsed, - ariaLabelExpanded - } = context.core.search; - return context.core.search.isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed; - }, - ariaControls: ({ - context - }) => { - return context.core.search.isSearchInputVisible ? null : context.core.search.inputId; - }, - type: ({ - context - }) => { - return context.core.search.isSearchInputVisible ? 'submit' : 'button'; - }, - tabindex: ({ - context - }) => { - return context.core.search.isSearchInputVisible ? '0' : '-1'; - } - } +const { + actions +} = (0,interactivity_namespaceObject.store)('core/search', { + state: { + get ariaLabel() { + const { + isSearchInputVisible, + ariaLabelCollapsed, + ariaLabelExpanded + } = (0,interactivity_namespaceObject.getContext)(); + return isSearchInputVisible ? ariaLabelExpanded : ariaLabelCollapsed; + }, + get ariaControls() { + const { + isSearchInputVisible, + inputId + } = (0,interactivity_namespaceObject.getContext)(); + return isSearchInputVisible ? null : inputId; + }, + get type() { + const { + isSearchInputVisible + } = (0,interactivity_namespaceObject.getContext)(); + return isSearchInputVisible ? 'submit' : 'button'; + }, + get tabindex() { + const { + isSearchInputVisible + } = (0,interactivity_namespaceObject.getContext)(); + return isSearchInputVisible ? '0' : '-1'; } }, actions: { - core: { - search: { - openSearchInput: ({ - context, - event, - ref - }) => { - if (!context.core.search.isSearchInputVisible) { - event.preventDefault(); - context.core.search.isSearchInputVisible = true; - ref.parentElement.querySelector('input').focus(); - } - }, - closeSearchInput: ({ - context - }) => { - context.core.search.isSearchInputVisible = false; - }, - handleSearchKeydown: store => { - const { - actions, - event, - ref - } = store; - // If Escape close the menu. - if (event?.key === 'Escape') { - actions.core.search.closeSearchInput(store); - ref.querySelector('button').focus(); - } - }, - handleSearchFocusout: store => { - const { - actions, - event, - ref - } = store; - // If focus is outside search form, and in the document, close menu - // event.target === The element losing focus - // event.relatedTarget === The element receiving focus (if any) - // When focusout is outside the document, - // `window.document.activeElement` doesn't change. - if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) { - actions.core.search.closeSearchInput(store); - } - } + openSearchInput(event) { + const ctx = (0,interactivity_namespaceObject.getContext)(); + const { + ref + } = (0,interactivity_namespaceObject.getElement)(); + if (!ctx.isSearchInputVisible) { + event.preventDefault(); + ctx.isSearchInputVisible = true; + ref.parentElement.querySelector('input').focus(); + } + }, + closeSearchInput() { + const ctx = (0,interactivity_namespaceObject.getContext)(); + ctx.isSearchInputVisible = false; + }, + handleSearchKeydown(event) { + const { + ref + } = (0,interactivity_namespaceObject.getElement)(); + // If Escape close the menu. + if (event?.key === 'Escape') { + actions.closeSearchInput(); + ref.querySelector('button').focus(); + } + }, + handleSearchFocusout(event) { + const { + ref + } = (0,interactivity_namespaceObject.getElement)(); + // If focus is outside search form, and in the document, close menu + // event.target === The element losing focus + // event.relatedTarget === The element receiving focus (if any) + // When focusout is outside the document, + // `window.document.activeElement` doesn't change. + if (!ref.contains(event.relatedTarget) && event.target !== window.document.activeElement) { + actions.closeSearchInput(); } } } +}, { + lock: true }); -/***/ }) - -}, -/******/ function(__webpack_require__) { // webpackRuntimeModules -/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } -/******/ var __webpack_exports__ = (__webpack_exec__(534)); -/******/ } -]); \ No newline at end of file diff --git a/wp-includes/blocks/search/view.min.asset.php b/wp-includes/blocks/search/view.min.asset.php index dc204c939..f9f2fddc7 100644 --- a/wp-includes/blocks/search/view.min.asset.php +++ b/wp-includes/blocks/search/view.min.asset.php @@ -1 +1 @@ - array(), 'version' => 'ff76b5016de2df424c55'); + array(), 'version' => '765a40956d200c79d99e'); diff --git a/wp-includes/blocks/search/view.min.js b/wp-includes/blocks/search/view.min.js index f38519d52..3f154f9aa 100644 --- a/wp-includes/blocks/search/view.min.js +++ b/wp-includes/blocks/search/view.min.js @@ -1 +1 @@ -"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[222],{534:function(e,t,c){(0,c(754).h)({selectors:{core:{search:{ariaLabel:({context:e})=>{const{ariaLabelCollapsed:t,ariaLabelExpanded:c}=e.core.search;return e.core.search.isSearchInputVisible?c:t},ariaControls:({context:e})=>e.core.search.isSearchInputVisible?null:e.core.search.inputId,type:({context:e})=>e.core.search.isSearchInputVisible?"submit":"button",tabindex:({context:e})=>e.core.search.isSearchInputVisible?"0":"-1"}}},actions:{core:{search:{openSearchInput:({context:e,event:t,ref:c})=>{e.core.search.isSearchInputVisible||(t.preventDefault(),e.core.search.isSearchInputVisible=!0,c.parentElement.querySelector("input").focus())},closeSearchInput:({context:e})=>{e.core.search.isSearchInputVisible=!1},handleSearchKeydown:e=>{const{actions:t,event:c,ref:r}=e;"Escape"===c?.key&&(t.core.search.closeSearchInput(e),r.querySelector("button").focus())},handleSearchFocusout:e=>{const{actions:t,event:c,ref:r}=e;r.contains(c.relatedTarget)||c.target===window.document.activeElement||t.core.search.closeSearchInput(e)}}}}})}},function(e){var t;t=534,e(e.s=t)}]); \ No newline at end of file +import*as e from"@wordpress/interactivity";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const n=(e=>{var n={};return t.d(n,e),n})({getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store}),{actions:r}=(0,n.store)("core/search",{state:{get ariaLabel(){const{isSearchInputVisible:e,ariaLabelCollapsed:t,ariaLabelExpanded:r}=(0,n.getContext)();return e?r:t},get ariaControls(){const{isSearchInputVisible:e,inputId:t}=(0,n.getContext)();return e?null:t},get type(){const{isSearchInputVisible:e}=(0,n.getContext)();return e?"submit":"button"},get tabindex(){const{isSearchInputVisible:e}=(0,n.getContext)();return e?"0":"-1"}},actions:{openSearchInput(e){const t=(0,n.getContext)(),{ref:r}=(0,n.getElement)();t.isSearchInputVisible||(e.preventDefault(),t.isSearchInputVisible=!0,r.parentElement.querySelector("input").focus())},closeSearchInput(){(0,n.getContext)().isSearchInputVisible=!1},handleSearchKeydown(e){const{ref:t}=(0,n.getElement)();"Escape"===e?.key&&(r.closeSearchInput(),t.querySelector("button").focus())},handleSearchFocusout(e){const{ref:t}=(0,n.getElement)();t.contains(e.relatedTarget)||e.target===window.document.activeElement||r.closeSearchInput()}}},{lock:!0}); \ No newline at end of file diff --git a/wp-includes/blocks/separator/block.json b/wp-includes/blocks/separator/block.json index 970f6b5cb..484627aaa 100644 --- a/wp-includes/blocks/separator/block.json +++ b/wp-includes/blocks/separator/block.json @@ -28,6 +28,9 @@ }, "spacing": { "margin": [ "top", "bottom" ] + }, + "interactivity": { + "clientNavigation": true } }, "styles": [ diff --git a/wp-includes/blocks/separator/style-rtl.css b/wp-includes/blocks/separator/style-rtl.css index e0faf6da6..f9ca0b502 100644 --- a/wp-includes/blocks/separator/style-rtl.css +++ b/wp-includes/blocks/separator/style-rtl.css @@ -1,8 +1,7 @@ @charset "UTF-8"; .wp-block-separator{ - border:1px solid; - border-left:none; - border-right:none; + border:none; + border-top:2px solid; } .wp-block-separator.is-style-dots{ background:none !important; diff --git a/wp-includes/blocks/separator/style-rtl.min.css b/wp-includes/blocks/separator/style-rtl.min.css index 20f594b09..d1c2dbfb8 100644 --- a/wp-includes/blocks/separator/style-rtl.min.css +++ b/wp-includes/blocks/separator/style-rtl.min.css @@ -1 +1 @@ -@charset "UTF-8";.wp-block-separator{border:1px solid;border-left:none;border-right:none}.wp-block-separator.is-style-dots{background:none!important;border:none;height:auto;line-height:1;text-align:center}.wp-block-separator.is-style-dots:before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em} \ No newline at end of file +@charset "UTF-8";.wp-block-separator{border:none;border-top:2px solid}.wp-block-separator.is-style-dots{background:none!important;border:none;height:auto;line-height:1;text-align:center}.wp-block-separator.is-style-dots:before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em} \ No newline at end of file diff --git a/wp-includes/blocks/separator/style.css b/wp-includes/blocks/separator/style.css index e0faf6da6..f9ca0b502 100644 --- a/wp-includes/blocks/separator/style.css +++ b/wp-includes/blocks/separator/style.css @@ -1,8 +1,7 @@ @charset "UTF-8"; .wp-block-separator{ - border:1px solid; - border-left:none; - border-right:none; + border:none; + border-top:2px solid; } .wp-block-separator.is-style-dots{ background:none !important; diff --git a/wp-includes/blocks/separator/style.min.css b/wp-includes/blocks/separator/style.min.css index 20f594b09..d1c2dbfb8 100644 --- a/wp-includes/blocks/separator/style.min.css +++ b/wp-includes/blocks/separator/style.min.css @@ -1 +1 @@ -@charset "UTF-8";.wp-block-separator{border:1px solid;border-left:none;border-right:none}.wp-block-separator.is-style-dots{background:none!important;border:none;height:auto;line-height:1;text-align:center}.wp-block-separator.is-style-dots:before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em} \ No newline at end of file +@charset "UTF-8";.wp-block-separator{border:none;border-top:2px solid}.wp-block-separator.is-style-dots{background:none!important;border:none;height:auto;line-height:1;text-align:center}.wp-block-separator.is-style-dots:before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em} \ No newline at end of file diff --git a/wp-includes/blocks/shortcode/editor-rtl.css b/wp-includes/blocks/shortcode/editor-rtl.css index 47d6207a3..548a36945 100644 --- a/wp-includes/blocks/shortcode/editor-rtl.css +++ b/wp-includes/blocks/shortcode/editor-rtl.css @@ -23,5 +23,5 @@ .blocks-shortcode__textarea:focus{ border-color:var(--wp-admin-theme-color) !important; box-shadow:0 0 0 1px var(--wp-admin-theme-color) !important; - outline:2px solid transparent !important; + outline:2px solid #0000 !important; } \ No newline at end of file diff --git a/wp-includes/blocks/shortcode/editor-rtl.min.css b/wp-includes/blocks/shortcode/editor-rtl.min.css index 8128a6542..0917162a6 100644 --- a/wp-includes/blocks/shortcode/editor-rtl.min.css +++ b/wp-includes/blocks/shortcode/editor-rtl.min.css @@ -1 +1 @@ -[data-type="core/shortcode"].components-placeholder{min-height:0}.blocks-shortcode__textarea{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important;resize:none}@media (min-width:600px){.blocks-shortcode__textarea{font-size:13px!important}}.blocks-shortcode__textarea:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important} \ No newline at end of file +[data-type="core/shortcode"].components-placeholder{min-height:0}.blocks-shortcode__textarea{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important;resize:none}@media (min-width:600px){.blocks-shortcode__textarea{font-size:13px!important}}.blocks-shortcode__textarea:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid #0000!important} \ No newline at end of file diff --git a/wp-includes/blocks/shortcode/editor.css b/wp-includes/blocks/shortcode/editor.css index 47d6207a3..548a36945 100644 --- a/wp-includes/blocks/shortcode/editor.css +++ b/wp-includes/blocks/shortcode/editor.css @@ -23,5 +23,5 @@ .blocks-shortcode__textarea:focus{ border-color:var(--wp-admin-theme-color) !important; box-shadow:0 0 0 1px var(--wp-admin-theme-color) !important; - outline:2px solid transparent !important; + outline:2px solid #0000 !important; } \ No newline at end of file diff --git a/wp-includes/blocks/shortcode/editor.min.css b/wp-includes/blocks/shortcode/editor.min.css index 8128a6542..0917162a6 100644 --- a/wp-includes/blocks/shortcode/editor.min.css +++ b/wp-includes/blocks/shortcode/editor.min.css @@ -1 +1 @@ -[data-type="core/shortcode"].components-placeholder{min-height:0}.blocks-shortcode__textarea{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important;resize:none}@media (min-width:600px){.blocks-shortcode__textarea{font-size:13px!important}}.blocks-shortcode__textarea:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important} \ No newline at end of file +[data-type="core/shortcode"].components-placeholder{min-height:0}.blocks-shortcode__textarea{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important;resize:none}@media (min-width:600px){.blocks-shortcode__textarea{font-size:13px!important}}.blocks-shortcode__textarea:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid #0000!important} \ No newline at end of file diff --git a/wp-includes/blocks/site-logo/block.json b/wp-includes/blocks/site-logo/block.json index d1e3d1b20..3bdbdc1b8 100644 --- a/wp-includes/blocks/site-logo/block.json +++ b/wp-includes/blocks/site-logo/block.json @@ -45,6 +45,9 @@ "margin": false, "padding": false } + }, + "interactivity": { + "clientNavigation": true } }, "styles": [ diff --git a/wp-includes/blocks/site-logo/editor-rtl.css b/wp-includes/blocks/site-logo/editor-rtl.css index 78cb4544a..08710ac1f 100644 --- a/wp-includes/blocks/site-logo/editor-rtl.css +++ b/wp-includes/blocks/site-logo/editor-rtl.css @@ -94,7 +94,7 @@ .block-library-site-logo__inspector-media-replace-container img{ aspect-ratio:1; border-radius:50% !important; - box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); + box-shadow:inset 0 0 0 1px #0003; min-width:20px; width:20px; } diff --git a/wp-includes/blocks/site-logo/editor-rtl.min.css b/wp-includes/blocks/site-logo/editor-rtl.min.css index 4d7d77704..01f56f2e1 100644 --- a/wp-includes/blocks/site-logo/editor-rtl.min.css +++ b/wp-includes/blocks/site-logo/editor-rtl.min.css @@ -1 +1 @@ -.wp-block-site-logo.aligncenter>div,.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-left:auto;margin-right:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:60px;width:60px}.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container,.wp-block-site-logo.wp-block-site-logo>div{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder{align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;min-height:48px;min-width:48px;padding:0;width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text,.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{align-items:center;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-radius:50%;border-style:solid;color:#fff;display:flex;height:48px;justify-content:center;padding:0;position:relative;width:48px}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:inherit}.block-library-site-logo__inspector-upload-container{position:relative}.block-library-site-logo__inspector-upload-container .components-drop-zone__content-icon{display:none}.block-library-site-logo__inspector-media-replace-container button.components-button,.block-library-site-logo__inspector-upload-container button.components-button{box-shadow:inset 0 0 0 1px #ccc;color:#1e1e1e;display:block;height:40px;width:100%}.block-library-site-logo__inspector-media-replace-container button.components-button:hover,.block-library-site-logo__inspector-upload-container button.components-button:hover{color:var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container button.components-button:focus,.block-library-site-logo__inspector-upload-container button.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-media-replace-title,.block-library-site-logo__inspector-upload-container .block-library-site-logo__inspector-media-replace-title{text-align:start;text-align-last:center;white-space:normal;word-break:break-all}.block-library-site-logo__inspector-media-replace-container .components-dropdown{display:block}.block-library-site-logo__inspector-media-replace-container img{aspect-ratio:1;border-radius:50%!important;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);min-width:20px;width:20px}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-readonly-logo-preview{display:flex;height:40px;padding:6px 12px} \ No newline at end of file +.wp-block-site-logo.aligncenter>div,.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-left:auto;margin-right:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:60px;width:60px}.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container,.wp-block-site-logo.wp-block-site-logo>div{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder{align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;min-height:48px;min-width:48px;padding:0;width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text,.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{align-items:center;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-radius:50%;border-style:solid;color:#fff;display:flex;height:48px;justify-content:center;padding:0;position:relative;width:48px}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:inherit}.block-library-site-logo__inspector-upload-container{position:relative}.block-library-site-logo__inspector-upload-container .components-drop-zone__content-icon{display:none}.block-library-site-logo__inspector-media-replace-container button.components-button,.block-library-site-logo__inspector-upload-container button.components-button{box-shadow:inset 0 0 0 1px #ccc;color:#1e1e1e;display:block;height:40px;width:100%}.block-library-site-logo__inspector-media-replace-container button.components-button:hover,.block-library-site-logo__inspector-upload-container button.components-button:hover{color:var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container button.components-button:focus,.block-library-site-logo__inspector-upload-container button.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-media-replace-title,.block-library-site-logo__inspector-upload-container .block-library-site-logo__inspector-media-replace-title{text-align:start;text-align-last:center;white-space:normal;word-break:break-all}.block-library-site-logo__inspector-media-replace-container .components-dropdown{display:block}.block-library-site-logo__inspector-media-replace-container img{aspect-ratio:1;border-radius:50%!important;box-shadow:inset 0 0 0 1px #0003;min-width:20px;width:20px}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-readonly-logo-preview{display:flex;height:40px;padding:6px 12px} \ No newline at end of file diff --git a/wp-includes/blocks/site-logo/editor.css b/wp-includes/blocks/site-logo/editor.css index 78cb4544a..08710ac1f 100644 --- a/wp-includes/blocks/site-logo/editor.css +++ b/wp-includes/blocks/site-logo/editor.css @@ -94,7 +94,7 @@ .block-library-site-logo__inspector-media-replace-container img{ aspect-ratio:1; border-radius:50% !important; - box-shadow:inset 0 0 0 1px rgba(0,0,0,.2); + box-shadow:inset 0 0 0 1px #0003; min-width:20px; width:20px; } diff --git a/wp-includes/blocks/site-logo/editor.min.css b/wp-includes/blocks/site-logo/editor.min.css index 4d7d77704..01f56f2e1 100644 --- a/wp-includes/blocks/site-logo/editor.min.css +++ b/wp-includes/blocks/site-logo/editor.min.css @@ -1 +1 @@ -.wp-block-site-logo.aligncenter>div,.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-left:auto;margin-right:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:60px;width:60px}.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container,.wp-block-site-logo.wp-block-site-logo>div{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder{align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;min-height:48px;min-width:48px;padding:0;width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text,.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{align-items:center;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-radius:50%;border-style:solid;color:#fff;display:flex;height:48px;justify-content:center;padding:0;position:relative;width:48px}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:inherit}.block-library-site-logo__inspector-upload-container{position:relative}.block-library-site-logo__inspector-upload-container .components-drop-zone__content-icon{display:none}.block-library-site-logo__inspector-media-replace-container button.components-button,.block-library-site-logo__inspector-upload-container button.components-button{box-shadow:inset 0 0 0 1px #ccc;color:#1e1e1e;display:block;height:40px;width:100%}.block-library-site-logo__inspector-media-replace-container button.components-button:hover,.block-library-site-logo__inspector-upload-container button.components-button:hover{color:var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container button.components-button:focus,.block-library-site-logo__inspector-upload-container button.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-media-replace-title,.block-library-site-logo__inspector-upload-container .block-library-site-logo__inspector-media-replace-title{text-align:start;text-align-last:center;white-space:normal;word-break:break-all}.block-library-site-logo__inspector-media-replace-container .components-dropdown{display:block}.block-library-site-logo__inspector-media-replace-container img{aspect-ratio:1;border-radius:50%!important;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2);min-width:20px;width:20px}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-readonly-logo-preview{display:flex;height:40px;padding:6px 12px} \ No newline at end of file +.wp-block-site-logo.aligncenter>div,.wp-block[data-align=center]>.wp-block-site-logo{display:table;margin-left:auto;margin-right:auto}.wp-block-site-logo a{pointer-events:none}.wp-block-site-logo .custom-logo-link{cursor:inherit}.wp-block-site-logo .custom-logo-link:focus{box-shadow:none}.wp-block-site-logo .custom-logo-link.is-transient img{opacity:.3}.wp-block-site-logo img{display:block;height:auto;max-width:100%}.wp-block-site-logo.wp-block-site-logo.is-default-size .components-placeholder{height:60px;width:60px}.wp-block-site-logo.wp-block-site-logo .components-resizable-box__container,.wp-block-site-logo.wp-block-site-logo>div{border-radius:inherit}.wp-block-site-logo.wp-block-site-logo .components-placeholder{align-items:center;border-radius:inherit;display:flex;height:100%;justify-content:center;min-height:48px;min-width:48px;padding:0;width:100%}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-drop-zone__content-text,.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-form-file-upload{display:none}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button{align-items:center;background:var(--wp-admin-theme-color);border-color:var(--wp-admin-theme-color);border-radius:50%;border-style:solid;color:#fff;display:flex;height:48px;justify-content:center;padding:0;position:relative;width:48px}.wp-block-site-logo.wp-block-site-logo .components-placeholder .components-button.components-button>svg{color:inherit}.block-library-site-logo__inspector-upload-container{position:relative}.block-library-site-logo__inspector-upload-container .components-drop-zone__content-icon{display:none}.block-library-site-logo__inspector-media-replace-container button.components-button,.block-library-site-logo__inspector-upload-container button.components-button{box-shadow:inset 0 0 0 1px #ccc;color:#1e1e1e;display:block;height:40px;width:100%}.block-library-site-logo__inspector-media-replace-container button.components-button:hover,.block-library-site-logo__inspector-upload-container button.components-button:hover{color:var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container button.components-button:focus,.block-library-site-logo__inspector-upload-container button.components-button:focus{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color)}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-media-replace-title,.block-library-site-logo__inspector-upload-container .block-library-site-logo__inspector-media-replace-title{text-align:start;text-align-last:center;white-space:normal;word-break:break-all}.block-library-site-logo__inspector-media-replace-container .components-dropdown{display:block}.block-library-site-logo__inspector-media-replace-container img{aspect-ratio:1;border-radius:50%!important;box-shadow:inset 0 0 0 1px #0003;min-width:20px;width:20px}.block-library-site-logo__inspector-media-replace-container .block-library-site-logo__inspector-readonly-logo-preview{display:flex;height:40px;padding:6px 12px} \ No newline at end of file diff --git a/wp-includes/blocks/site-tagline/block.json b/wp-includes/blocks/site-tagline/block.json index 22fb59aab..2361be9ea 100644 --- a/wp-includes/blocks/site-tagline/block.json +++ b/wp-includes/blocks/site-tagline/block.json @@ -43,6 +43,9 @@ "__experimentalDefaultControls": { "fontSize": true } + }, + "interactivity": { + "clientNavigation": true } }, "editorStyle": "wp-block-site-tagline-editor" diff --git a/wp-includes/blocks/site-title/block.json b/wp-includes/blocks/site-title/block.json index e936bad0e..6179452cd 100644 --- a/wp-includes/blocks/site-title/block.json +++ b/wp-includes/blocks/site-title/block.json @@ -56,12 +56,11 @@ "__experimentalFontWeight": true, "__experimentalLetterSpacing": true, "__experimentalDefaultControls": { - "fontSize": true, - "lineHeight": true, - "fontAppearance": true, - "letterSpacing": true, - "textTransform": true + "fontSize": true } + }, + "interactivity": { + "clientNavigation": true } }, "editorStyle": "wp-block-site-title-editor", diff --git a/wp-includes/blocks/social-link.php b/wp-includes/blocks/social-link.php index cda8e1250..12c2904d5 100644 --- a/wp-includes/blocks/social-link.php +++ b/wp-includes/blocks/social-link.php @@ -33,7 +33,7 @@ function render_block_core_social_link( $attributes, $content, $block ) { * The `is_email` returns false for emails with schema. */ if ( is_email( $url ) ) { - $url = 'mailto:' . $url; + $url = 'mailto:' . antispambot( $url ); } /** @@ -62,10 +62,10 @@ function render_block_core_social_link( $attributes, $content, $block ) { $processor = new WP_HTML_Tag_Processor( $link ); $processor->next_tag( 'a' ); if ( $open_in_new_tab ) { - $processor->set_attribute( 'rel', esc_attr( $rel ) . ' noopener nofollow' ); + $processor->set_attribute( 'rel', trim( $rel . ' noopener nofollow' ) ); $processor->set_attribute( 'target', '_blank' ); } elseif ( '' !== $rel ) { - $processor->set_attribute( 'rel', esc_attr( $rel ) ); + $processor->set_attribute( 'rel', trim( $rel ) ); } return $processor->get_updated_html(); } @@ -194,6 +194,10 @@ function block_core_social_link_services( $service = '', $field = '' ) { 'name' => 'GitHub', 'icon' => '', ), + 'gravatar' => array( + 'name' => 'Gravatar', + 'icon' => '', + ), 'instagram' => array( 'name' => 'Instagram', 'icon' => '', @@ -224,7 +228,7 @@ function block_core_social_link_services( $service = '', $field = '' ) { ), 'patreon' => array( 'name' => 'Patreon', - 'icon' => '', + 'icon' => '', ), 'pinterest' => array( 'name' => 'Pinterest', diff --git a/wp-includes/blocks/social-link/block.json b/wp-includes/blocks/social-link/block.json index 50e95efed..d487465ef 100644 --- a/wp-includes/blocks/social-link/block.json +++ b/wp-includes/blocks/social-link/block.json @@ -31,7 +31,10 @@ ], "supports": { "reusable": false, - "html": false + "html": false, + "interactivity": { + "clientNavigation": true + } }, "editorStyle": "wp-block-social-link-editor" } diff --git a/wp-includes/blocks/social-links/block.json b/wp-includes/blocks/social-links/block.json index 20206511a..0c8c7be1e 100644 --- a/wp-includes/blocks/social-links/block.json +++ b/wp-includes/blocks/social-links/block.json @@ -4,6 +4,7 @@ "name": "core/social-links", "title": "Social Icons", "category": "widgets", + "allowedBlocks": [ "core/social-link" ], "description": "Display icons linking to your social media profiles or sites.", "keywords": [ "links" ], "textdomain": "default", @@ -77,6 +78,9 @@ "margin": true, "padding": false } + }, + "interactivity": { + "clientNavigation": true } }, "styles": [ diff --git a/wp-includes/blocks/social-links/style-rtl.css b/wp-includes/blocks/social-links/style-rtl.css index b8defda33..c564d34e6 100644 --- a/wp-includes/blocks/social-links/style-rtl.css +++ b/wp-includes/blocks/social-links/style-rtl.css @@ -65,9 +65,14 @@ transform:scale(1.1); } -.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited{ - fill:currentColor; +.wp-block-social-links .wp-block-social-link.wp-social-link{ + display:inline-block; + margin:0; + padding:0; +} +.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{ color:currentColor; + fill:currentColor; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link{ @@ -134,6 +139,10 @@ background-color:#ea4434; color:#fff; } +.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-gravatar{ + background-color:#1d4fc4; + color:#fff; +} .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{ background-color:#f00075; color:#fff; @@ -159,7 +168,7 @@ color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{ - background-color:#ff424d; + background-color:#000; color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{ @@ -179,9 +188,9 @@ color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{ - stroke:#000; background-color:#fefc00; color:#fff; + stroke:#000; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{ background-color:#ff5600; @@ -295,6 +304,9 @@ .wp-block-social-links.is-style-logos-only .wp-social-link-google{ color:#ea4434; } +.wp-block-social-links.is-style-logos-only .wp-social-link-gravatar{ + color:#1d4fc4; +} .wp-block-social-links.is-style-logos-only .wp-social-link-instagram{ color:#f00075; } @@ -314,7 +326,7 @@ color:#f6405f; } .wp-block-social-links.is-style-logos-only .wp-social-link-patreon{ - color:#ff424d; + color:#000; } .wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{ color:#e60122; @@ -329,8 +341,8 @@ color:#0478d7; } .wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{ - stroke:#000; color:#fff; + stroke:#000; } .wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{ color:#ff5600; diff --git a/wp-includes/blocks/social-links/style-rtl.min.css b/wp-includes/blocks/social-links/style-rtl.min.css index a54b7a1b0..ac85bbe9a 100644 --- a/wp-includes/blocks/social-links/style-rtl.min.css +++ b/wp-includes/blocks/social-links/style-rtl.min.css @@ -1 +1 @@ -.wp-block-social-links{background:none;box-sizing:border-box;margin-right:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link a{padding:.25em}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block;height:auto;transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.wp-block-social-link{transition-delay:0s;transition-duration:0s}}.wp-block-social-link a{align-items:center;display:flex;line-height:0;transition:transform .1s ease}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited{fill:currentColor;color:currentColor}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link{background-color:#f0f0f0;color:#444}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-amazon{background-color:#f90;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-behance{background-color:#0757fe;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-etsy{background-color:#f45800;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-facebook{background-color:#1778f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-flickr{background-color:#0461dd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-foursquare{background-color:#e65678;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-github{background-color:#24292d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-google{background-color:#ea4434;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{background-color:#f00075;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-medium{background-color:#02ab6c;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-meetup{background-color:#f6405f;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{background-color:#ff424d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{background-color:#e60122;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pocket{background-color:#ef4155;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-reddit{background-color:#ff4500;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-skype{background-color:#0478d7;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{stroke:#000;background-color:#fefc00;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-spotify{background-color:#1bd760;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-telegram{background-color:#2aabee;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads,.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tumblr{background-color:#011835;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitch{background-color:#6440a4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vk{background-color:#4680c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-x{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-yelp{background-color:#d32422;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-youtube{background-color:red;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link{background:none}.wp-block-social-links.is-style-logos-only .wp-social-link a{padding:0}.wp-block-social-links.is-style-logos-only .wp-social-link svg{height:1.25em;width:1.25em}.wp-block-social-links.is-style-logos-only .wp-social-link-amazon{color:#f90}.wp-block-social-links.is-style-logos-only .wp-social-link-bandcamp{color:#1ea0c3}.wp-block-social-links.is-style-logos-only .wp-social-link-behance{color:#0757fe}.wp-block-social-links.is-style-logos-only .wp-social-link-codepen{color:#1e1f26}.wp-block-social-links.is-style-logos-only .wp-social-link-deviantart{color:#02e49b}.wp-block-social-links.is-style-logos-only .wp-social-link-dribbble{color:#e94c89}.wp-block-social-links.is-style-logos-only .wp-social-link-dropbox{color:#4280ff}.wp-block-social-links.is-style-logos-only .wp-social-link-etsy{color:#f45800}.wp-block-social-links.is-style-logos-only .wp-social-link-facebook{color:#1778f2}.wp-block-social-links.is-style-logos-only .wp-social-link-fivehundredpx{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-flickr{color:#0461dd}.wp-block-social-links.is-style-logos-only .wp-social-link-foursquare{color:#e65678}.wp-block-social-links.is-style-logos-only .wp-social-link-github{color:#24292d}.wp-block-social-links.is-style-logos-only .wp-social-link-goodreads{color:#382110}.wp-block-social-links.is-style-logos-only .wp-social-link-google{color:#ea4434}.wp-block-social-links.is-style-logos-only .wp-social-link-instagram{color:#f00075}.wp-block-social-links.is-style-logos-only .wp-social-link-lastfm{color:#e21b24}.wp-block-social-links.is-style-logos-only .wp-social-link-linkedin{color:#0d66c2}.wp-block-social-links.is-style-logos-only .wp-social-link-mastodon{color:#3288d4}.wp-block-social-links.is-style-logos-only .wp-social-link-medium{color:#02ab6c}.wp-block-social-links.is-style-logos-only .wp-social-link-meetup{color:#f6405f}.wp-block-social-links.is-style-logos-only .wp-social-link-patreon{color:#ff424d}.wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{color:#e60122}.wp-block-social-links.is-style-logos-only .wp-social-link-pocket{color:#ef4155}.wp-block-social-links.is-style-logos-only .wp-social-link-reddit{color:#ff4500}.wp-block-social-links.is-style-logos-only .wp-social-link-skype{color:#0478d7}.wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{stroke:#000;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{color:#ff5600}.wp-block-social-links.is-style-logos-only .wp-social-link-spotify{color:#1bd760}.wp-block-social-links.is-style-logos-only .wp-social-link-telegram{color:#2aabee}.wp-block-social-links.is-style-logos-only .wp-social-link-threads,.wp-block-social-links.is-style-logos-only .wp-social-link-tiktok{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-tumblr{color:#011835}.wp-block-social-links.is-style-logos-only .wp-social-link-twitch{color:#6440a4}.wp-block-social-links.is-style-logos-only .wp-social-link-twitter{color:#1da1f2}.wp-block-social-links.is-style-logos-only .wp-social-link-vimeo{color:#1eb7ea}.wp-block-social-links.is-style-logos-only .wp-social-link-vk{color:#4680c2}.wp-block-social-links.is-style-logos-only .wp-social-link-whatsapp{color:#25d366}.wp-block-social-links.is-style-logos-only .wp-social-link-wordpress{color:#3499cd}.wp-block-social-links.is-style-logos-only .wp-social-link-x{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-yelp{color:#d32422}.wp-block-social-links.is-style-logos-only .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}.wp-block-social-links.is-style-pill-shape .wp-social-link a{padding-left:.66667em;padding-right:.66667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000} \ No newline at end of file +.wp-block-social-links{background:none;box-sizing:border-box;margin-right:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link a{padding:.25em}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block;height:auto;transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.wp-block-social-link{transition-delay:0s;transition-duration:0s}}.wp-block-social-link a{align-items:center;display:flex;line-height:0;transition:transform .1s ease}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link.wp-social-link{display:inline-block;margin:0;padding:0}.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{color:currentColor;fill:currentColor}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link{background-color:#f0f0f0;color:#444}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-amazon{background-color:#f90;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-behance{background-color:#0757fe;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-etsy{background-color:#f45800;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-facebook{background-color:#1778f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-flickr{background-color:#0461dd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-foursquare{background-color:#e65678;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-github{background-color:#24292d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-google{background-color:#ea4434;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-gravatar{background-color:#1d4fc4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{background-color:#f00075;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-medium{background-color:#02ab6c;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-meetup{background-color:#f6405f;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{background-color:#e60122;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pocket{background-color:#ef4155;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-reddit{background-color:#ff4500;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-skype{background-color:#0478d7;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{background-color:#fefc00;color:#fff;stroke:#000}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-spotify{background-color:#1bd760;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-telegram{background-color:#2aabee;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads,.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tumblr{background-color:#011835;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitch{background-color:#6440a4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vk{background-color:#4680c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-x{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-yelp{background-color:#d32422;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-youtube{background-color:red;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link{background:none}.wp-block-social-links.is-style-logos-only .wp-social-link a{padding:0}.wp-block-social-links.is-style-logos-only .wp-social-link svg{height:1.25em;width:1.25em}.wp-block-social-links.is-style-logos-only .wp-social-link-amazon{color:#f90}.wp-block-social-links.is-style-logos-only .wp-social-link-bandcamp{color:#1ea0c3}.wp-block-social-links.is-style-logos-only .wp-social-link-behance{color:#0757fe}.wp-block-social-links.is-style-logos-only .wp-social-link-codepen{color:#1e1f26}.wp-block-social-links.is-style-logos-only .wp-social-link-deviantart{color:#02e49b}.wp-block-social-links.is-style-logos-only .wp-social-link-dribbble{color:#e94c89}.wp-block-social-links.is-style-logos-only .wp-social-link-dropbox{color:#4280ff}.wp-block-social-links.is-style-logos-only .wp-social-link-etsy{color:#f45800}.wp-block-social-links.is-style-logos-only .wp-social-link-facebook{color:#1778f2}.wp-block-social-links.is-style-logos-only .wp-social-link-fivehundredpx{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-flickr{color:#0461dd}.wp-block-social-links.is-style-logos-only .wp-social-link-foursquare{color:#e65678}.wp-block-social-links.is-style-logos-only .wp-social-link-github{color:#24292d}.wp-block-social-links.is-style-logos-only .wp-social-link-goodreads{color:#382110}.wp-block-social-links.is-style-logos-only .wp-social-link-google{color:#ea4434}.wp-block-social-links.is-style-logos-only .wp-social-link-gravatar{color:#1d4fc4}.wp-block-social-links.is-style-logos-only .wp-social-link-instagram{color:#f00075}.wp-block-social-links.is-style-logos-only .wp-social-link-lastfm{color:#e21b24}.wp-block-social-links.is-style-logos-only .wp-social-link-linkedin{color:#0d66c2}.wp-block-social-links.is-style-logos-only .wp-social-link-mastodon{color:#3288d4}.wp-block-social-links.is-style-logos-only .wp-social-link-medium{color:#02ab6c}.wp-block-social-links.is-style-logos-only .wp-social-link-meetup{color:#f6405f}.wp-block-social-links.is-style-logos-only .wp-social-link-patreon{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{color:#e60122}.wp-block-social-links.is-style-logos-only .wp-social-link-pocket{color:#ef4155}.wp-block-social-links.is-style-logos-only .wp-social-link-reddit{color:#ff4500}.wp-block-social-links.is-style-logos-only .wp-social-link-skype{color:#0478d7}.wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{color:#fff;stroke:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{color:#ff5600}.wp-block-social-links.is-style-logos-only .wp-social-link-spotify{color:#1bd760}.wp-block-social-links.is-style-logos-only .wp-social-link-telegram{color:#2aabee}.wp-block-social-links.is-style-logos-only .wp-social-link-threads,.wp-block-social-links.is-style-logos-only .wp-social-link-tiktok{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-tumblr{color:#011835}.wp-block-social-links.is-style-logos-only .wp-social-link-twitch{color:#6440a4}.wp-block-social-links.is-style-logos-only .wp-social-link-twitter{color:#1da1f2}.wp-block-social-links.is-style-logos-only .wp-social-link-vimeo{color:#1eb7ea}.wp-block-social-links.is-style-logos-only .wp-social-link-vk{color:#4680c2}.wp-block-social-links.is-style-logos-only .wp-social-link-whatsapp{color:#25d366}.wp-block-social-links.is-style-logos-only .wp-social-link-wordpress{color:#3499cd}.wp-block-social-links.is-style-logos-only .wp-social-link-x{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-yelp{color:#d32422}.wp-block-social-links.is-style-logos-only .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}.wp-block-social-links.is-style-pill-shape .wp-social-link a{padding-left:.66667em;padding-right:.66667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000} \ No newline at end of file diff --git a/wp-includes/blocks/social-links/style.css b/wp-includes/blocks/social-links/style.css index 925361500..f86085dbf 100644 --- a/wp-includes/blocks/social-links/style.css +++ b/wp-includes/blocks/social-links/style.css @@ -65,9 +65,14 @@ transform:scale(1.1); } -.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited{ - fill:currentColor; +.wp-block-social-links .wp-block-social-link.wp-social-link{ + display:inline-block; + margin:0; + padding:0; +} +.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{ color:currentColor; + fill:currentColor; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link{ @@ -134,6 +139,10 @@ background-color:#ea4434; color:#fff; } +.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-gravatar{ + background-color:#1d4fc4; + color:#fff; +} .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{ background-color:#f00075; color:#fff; @@ -159,7 +168,7 @@ color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{ - background-color:#ff424d; + background-color:#000; color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{ @@ -179,9 +188,9 @@ color:#fff; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{ - stroke:#000; background-color:#fefc00; color:#fff; + stroke:#000; } .wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{ background-color:#ff5600; @@ -295,6 +304,9 @@ .wp-block-social-links.is-style-logos-only .wp-social-link-google{ color:#ea4434; } +.wp-block-social-links.is-style-logos-only .wp-social-link-gravatar{ + color:#1d4fc4; +} .wp-block-social-links.is-style-logos-only .wp-social-link-instagram{ color:#f00075; } @@ -314,7 +326,7 @@ color:#f6405f; } .wp-block-social-links.is-style-logos-only .wp-social-link-patreon{ - color:#ff424d; + color:#000; } .wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{ color:#e60122; @@ -329,8 +341,8 @@ color:#0478d7; } .wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{ - stroke:#000; color:#fff; + stroke:#000; } .wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{ color:#ff5600; diff --git a/wp-includes/blocks/social-links/style.min.css b/wp-includes/blocks/social-links/style.min.css index 050e5ef96..fdb8c92f1 100644 --- a/wp-includes/blocks/social-links/style.min.css +++ b/wp-includes/blocks/social-links/style.min.css @@ -1 +1 @@ -.wp-block-social-links{background:none;box-sizing:border-box;margin-left:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link a{padding:.25em}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block;height:auto;transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.wp-block-social-link{transition-delay:0s;transition-duration:0s}}.wp-block-social-link a{align-items:center;display:flex;line-height:0;transition:transform .1s ease}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link .wp-block-social-link-anchor:visited{fill:currentColor;color:currentColor}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link{background-color:#f0f0f0;color:#444}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-amazon{background-color:#f90;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-behance{background-color:#0757fe;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-etsy{background-color:#f45800;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-facebook{background-color:#1778f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-flickr{background-color:#0461dd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-foursquare{background-color:#e65678;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-github{background-color:#24292d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-google{background-color:#ea4434;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{background-color:#f00075;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-medium{background-color:#02ab6c;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-meetup{background-color:#f6405f;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{background-color:#ff424d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{background-color:#e60122;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pocket{background-color:#ef4155;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-reddit{background-color:#ff4500;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-skype{background-color:#0478d7;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{stroke:#000;background-color:#fefc00;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-spotify{background-color:#1bd760;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-telegram{background-color:#2aabee;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads,.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tumblr{background-color:#011835;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitch{background-color:#6440a4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vk{background-color:#4680c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-x{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-yelp{background-color:#d32422;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-youtube{background-color:red;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link{background:none}.wp-block-social-links.is-style-logos-only .wp-social-link a{padding:0}.wp-block-social-links.is-style-logos-only .wp-social-link svg{height:1.25em;width:1.25em}.wp-block-social-links.is-style-logos-only .wp-social-link-amazon{color:#f90}.wp-block-social-links.is-style-logos-only .wp-social-link-bandcamp{color:#1ea0c3}.wp-block-social-links.is-style-logos-only .wp-social-link-behance{color:#0757fe}.wp-block-social-links.is-style-logos-only .wp-social-link-codepen{color:#1e1f26}.wp-block-social-links.is-style-logos-only .wp-social-link-deviantart{color:#02e49b}.wp-block-social-links.is-style-logos-only .wp-social-link-dribbble{color:#e94c89}.wp-block-social-links.is-style-logos-only .wp-social-link-dropbox{color:#4280ff}.wp-block-social-links.is-style-logos-only .wp-social-link-etsy{color:#f45800}.wp-block-social-links.is-style-logos-only .wp-social-link-facebook{color:#1778f2}.wp-block-social-links.is-style-logos-only .wp-social-link-fivehundredpx{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-flickr{color:#0461dd}.wp-block-social-links.is-style-logos-only .wp-social-link-foursquare{color:#e65678}.wp-block-social-links.is-style-logos-only .wp-social-link-github{color:#24292d}.wp-block-social-links.is-style-logos-only .wp-social-link-goodreads{color:#382110}.wp-block-social-links.is-style-logos-only .wp-social-link-google{color:#ea4434}.wp-block-social-links.is-style-logos-only .wp-social-link-instagram{color:#f00075}.wp-block-social-links.is-style-logos-only .wp-social-link-lastfm{color:#e21b24}.wp-block-social-links.is-style-logos-only .wp-social-link-linkedin{color:#0d66c2}.wp-block-social-links.is-style-logos-only .wp-social-link-mastodon{color:#3288d4}.wp-block-social-links.is-style-logos-only .wp-social-link-medium{color:#02ab6c}.wp-block-social-links.is-style-logos-only .wp-social-link-meetup{color:#f6405f}.wp-block-social-links.is-style-logos-only .wp-social-link-patreon{color:#ff424d}.wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{color:#e60122}.wp-block-social-links.is-style-logos-only .wp-social-link-pocket{color:#ef4155}.wp-block-social-links.is-style-logos-only .wp-social-link-reddit{color:#ff4500}.wp-block-social-links.is-style-logos-only .wp-social-link-skype{color:#0478d7}.wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{stroke:#000;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{color:#ff5600}.wp-block-social-links.is-style-logos-only .wp-social-link-spotify{color:#1bd760}.wp-block-social-links.is-style-logos-only .wp-social-link-telegram{color:#2aabee}.wp-block-social-links.is-style-logos-only .wp-social-link-threads,.wp-block-social-links.is-style-logos-only .wp-social-link-tiktok{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-tumblr{color:#011835}.wp-block-social-links.is-style-logos-only .wp-social-link-twitch{color:#6440a4}.wp-block-social-links.is-style-logos-only .wp-social-link-twitter{color:#1da1f2}.wp-block-social-links.is-style-logos-only .wp-social-link-vimeo{color:#1eb7ea}.wp-block-social-links.is-style-logos-only .wp-social-link-vk{color:#4680c2}.wp-block-social-links.is-style-logos-only .wp-social-link-whatsapp{color:#25d366}.wp-block-social-links.is-style-logos-only .wp-social-link-wordpress{color:#3499cd}.wp-block-social-links.is-style-logos-only .wp-social-link-x{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-yelp{color:#d32422}.wp-block-social-links.is-style-logos-only .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}.wp-block-social-links.is-style-pill-shape .wp-social-link a{padding-left:.66667em;padding-right:.66667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000} \ No newline at end of file +.wp-block-social-links{background:none;box-sizing:border-box;margin-left:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link a{padding:.25em}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block;height:auto;transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.wp-block-social-link{transition-delay:0s;transition-duration:0s}}.wp-block-social-link a{align-items:center;display:flex;line-height:0;transition:transform .1s ease}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link.wp-social-link{display:inline-block;margin:0;padding:0}.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{color:currentColor;fill:currentColor}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link{background-color:#f0f0f0;color:#444}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-amazon{background-color:#f90;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-behance{background-color:#0757fe;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-etsy{background-color:#f45800;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-facebook{background-color:#1778f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-flickr{background-color:#0461dd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-foursquare{background-color:#e65678;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-github{background-color:#24292d;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-google{background-color:#ea4434;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-gravatar{background-color:#1d4fc4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-instagram{background-color:#f00075;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-medium{background-color:#02ab6c;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-meetup{background-color:#f6405f;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-patreon{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pinterest{background-color:#e60122;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-pocket{background-color:#ef4155;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-reddit{background-color:#ff4500;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-skype{background-color:#0478d7;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-snapchat{background-color:#fefc00;color:#fff;stroke:#000}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-spotify{background-color:#1bd760;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-telegram{background-color:#2aabee;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-threads,.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tiktok{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-tumblr{background-color:#011835;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitch{background-color:#6440a4;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-vk{background-color:#4680c2;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-x{background-color:#000;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-yelp{background-color:#d32422;color:#fff}.wp-block-social-links:not(.is-style-logos-only) .wp-social-link-youtube{background-color:red;color:#fff}.wp-block-social-links.is-style-logos-only .wp-social-link{background:none}.wp-block-social-links.is-style-logos-only .wp-social-link a{padding:0}.wp-block-social-links.is-style-logos-only .wp-social-link svg{height:1.25em;width:1.25em}.wp-block-social-links.is-style-logos-only .wp-social-link-amazon{color:#f90}.wp-block-social-links.is-style-logos-only .wp-social-link-bandcamp{color:#1ea0c3}.wp-block-social-links.is-style-logos-only .wp-social-link-behance{color:#0757fe}.wp-block-social-links.is-style-logos-only .wp-social-link-codepen{color:#1e1f26}.wp-block-social-links.is-style-logos-only .wp-social-link-deviantart{color:#02e49b}.wp-block-social-links.is-style-logos-only .wp-social-link-dribbble{color:#e94c89}.wp-block-social-links.is-style-logos-only .wp-social-link-dropbox{color:#4280ff}.wp-block-social-links.is-style-logos-only .wp-social-link-etsy{color:#f45800}.wp-block-social-links.is-style-logos-only .wp-social-link-facebook{color:#1778f2}.wp-block-social-links.is-style-logos-only .wp-social-link-fivehundredpx{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-flickr{color:#0461dd}.wp-block-social-links.is-style-logos-only .wp-social-link-foursquare{color:#e65678}.wp-block-social-links.is-style-logos-only .wp-social-link-github{color:#24292d}.wp-block-social-links.is-style-logos-only .wp-social-link-goodreads{color:#382110}.wp-block-social-links.is-style-logos-only .wp-social-link-google{color:#ea4434}.wp-block-social-links.is-style-logos-only .wp-social-link-gravatar{color:#1d4fc4}.wp-block-social-links.is-style-logos-only .wp-social-link-instagram{color:#f00075}.wp-block-social-links.is-style-logos-only .wp-social-link-lastfm{color:#e21b24}.wp-block-social-links.is-style-logos-only .wp-social-link-linkedin{color:#0d66c2}.wp-block-social-links.is-style-logos-only .wp-social-link-mastodon{color:#3288d4}.wp-block-social-links.is-style-logos-only .wp-social-link-medium{color:#02ab6c}.wp-block-social-links.is-style-logos-only .wp-social-link-meetup{color:#f6405f}.wp-block-social-links.is-style-logos-only .wp-social-link-patreon{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-pinterest{color:#e60122}.wp-block-social-links.is-style-logos-only .wp-social-link-pocket{color:#ef4155}.wp-block-social-links.is-style-logos-only .wp-social-link-reddit{color:#ff4500}.wp-block-social-links.is-style-logos-only .wp-social-link-skype{color:#0478d7}.wp-block-social-links.is-style-logos-only .wp-social-link-snapchat{color:#fff;stroke:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-soundcloud{color:#ff5600}.wp-block-social-links.is-style-logos-only .wp-social-link-spotify{color:#1bd760}.wp-block-social-links.is-style-logos-only .wp-social-link-telegram{color:#2aabee}.wp-block-social-links.is-style-logos-only .wp-social-link-threads,.wp-block-social-links.is-style-logos-only .wp-social-link-tiktok{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-tumblr{color:#011835}.wp-block-social-links.is-style-logos-only .wp-social-link-twitch{color:#6440a4}.wp-block-social-links.is-style-logos-only .wp-social-link-twitter{color:#1da1f2}.wp-block-social-links.is-style-logos-only .wp-social-link-vimeo{color:#1eb7ea}.wp-block-social-links.is-style-logos-only .wp-social-link-vk{color:#4680c2}.wp-block-social-links.is-style-logos-only .wp-social-link-whatsapp{color:#25d366}.wp-block-social-links.is-style-logos-only .wp-social-link-wordpress{color:#3499cd}.wp-block-social-links.is-style-logos-only .wp-social-link-x{color:#000}.wp-block-social-links.is-style-logos-only .wp-social-link-yelp{color:#d32422}.wp-block-social-links.is-style-logos-only .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}.wp-block-social-links.is-style-pill-shape .wp-social-link a{padding-left:.66667em;padding-right:.66667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000} \ No newline at end of file diff --git a/wp-includes/blocks/spacer/block.json b/wp-includes/blocks/spacer/block.json index a9da8d537..447ea99cc 100644 --- a/wp-includes/blocks/spacer/block.json +++ b/wp-includes/blocks/spacer/block.json @@ -23,6 +23,9 @@ "__experimentalDefaultControls": { "margin": true } + }, + "interactivity": { + "clientNavigation": true } }, "editorStyle": "wp-block-spacer-editor", diff --git a/wp-includes/blocks/spacer/editor-rtl.css b/wp-includes/blocks/spacer/editor-rtl.css index 6602e84df..0c5e70979 100644 --- a/wp-includes/blocks/spacer/editor-rtl.css +++ b/wp-includes/blocks/spacer/editor-rtl.css @@ -10,10 +10,10 @@ } .block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{ - background:rgba(0,0,0,.1); + background:#0000001a; } .is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{ - background:hsla(0,0%,100%,.15); + background:#ffffff26; } .block-library-spacer__resize-container{ @@ -27,5 +27,6 @@ content:none; } .block-library-spacer__resize-container.resize-horizontal{ + height:100% !important; margin-bottom:0; } \ No newline at end of file diff --git a/wp-includes/blocks/spacer/editor-rtl.min.css b/wp-includes/blocks/spacer/editor-rtl.min.css index 1200948e0..59d9906e5 100644 --- a/wp-includes/blocks/spacer/editor-rtl.min.css +++ b/wp-includes/blocks/spacer/editor-rtl.min.css @@ -1 +1 @@ -.block-editor-block-list__block[data-type="core/spacer"]:before{content:"";display:block;height:100%;min-height:8px;min-width:8px;position:absolute;width:100%;z-index:1}.block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{background:rgba(0,0,0,.1)}.is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{background:hsla(0,0%,100%,.15)}.block-library-spacer__resize-container{clear:both}.block-library-spacer__resize-container:not(.is-resizing){height:100%!important;width:100%!important}.block-library-spacer__resize-container .components-resizable-box__handle:before{content:none}.block-library-spacer__resize-container.resize-horizontal{margin-bottom:0} \ No newline at end of file +.block-editor-block-list__block[data-type="core/spacer"]:before{content:"";display:block;height:100%;min-height:8px;min-width:8px;position:absolute;width:100%;z-index:1}.block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{background:#0000001a}.is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{background:#ffffff26}.block-library-spacer__resize-container{clear:both}.block-library-spacer__resize-container:not(.is-resizing){height:100%!important;width:100%!important}.block-library-spacer__resize-container .components-resizable-box__handle:before{content:none}.block-library-spacer__resize-container.resize-horizontal{height:100%!important;margin-bottom:0} \ No newline at end of file diff --git a/wp-includes/blocks/spacer/editor.css b/wp-includes/blocks/spacer/editor.css index 6602e84df..0c5e70979 100644 --- a/wp-includes/blocks/spacer/editor.css +++ b/wp-includes/blocks/spacer/editor.css @@ -10,10 +10,10 @@ } .block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{ - background:rgba(0,0,0,.1); + background:#0000001a; } .is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{ - background:hsla(0,0%,100%,.15); + background:#ffffff26; } .block-library-spacer__resize-container{ @@ -27,5 +27,6 @@ content:none; } .block-library-spacer__resize-container.resize-horizontal{ + height:100% !important; margin-bottom:0; } \ No newline at end of file diff --git a/wp-includes/blocks/spacer/editor.min.css b/wp-includes/blocks/spacer/editor.min.css index 1200948e0..59d9906e5 100644 --- a/wp-includes/blocks/spacer/editor.min.css +++ b/wp-includes/blocks/spacer/editor.min.css @@ -1 +1 @@ -.block-editor-block-list__block[data-type="core/spacer"]:before{content:"";display:block;height:100%;min-height:8px;min-width:8px;position:absolute;width:100%;z-index:1}.block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{background:rgba(0,0,0,.1)}.is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{background:hsla(0,0%,100%,.15)}.block-library-spacer__resize-container{clear:both}.block-library-spacer__resize-container:not(.is-resizing){height:100%!important;width:100%!important}.block-library-spacer__resize-container .components-resizable-box__handle:before{content:none}.block-library-spacer__resize-container.resize-horizontal{margin-bottom:0} \ No newline at end of file +.block-editor-block-list__block[data-type="core/spacer"]:before{content:"";display:block;height:100%;min-height:8px;min-width:8px;position:absolute;width:100%;z-index:1}.block-library-spacer__resize-container.has-show-handle,.wp-block-spacer.is-hovered .block-library-spacer__resize-container,.wp-block-spacer.is-selected.custom-sizes-disabled{background:#0000001a}.is-dark-theme .block-library-spacer__resize-container.has-show-handle,.is-dark-theme .wp-block-spacer.is-hovered .block-library-spacer__resize-container,.is-dark-theme .wp-block-spacer.is-selected.custom-sizes-disabled{background:#ffffff26}.block-library-spacer__resize-container{clear:both}.block-library-spacer__resize-container:not(.is-resizing){height:100%!important;width:100%!important}.block-library-spacer__resize-container .components-resizable-box__handle:before{content:none}.block-library-spacer__resize-container.resize-horizontal{height:100%!important;margin-bottom:0} \ No newline at end of file diff --git a/wp-includes/blocks/table/block.json b/wp-includes/blocks/table/block.json index d1139d6c5..44177ef50 100644 --- a/wp-includes/blocks/table/block.json +++ b/wp-includes/blocks/table/block.json @@ -12,10 +12,9 @@ "default": false }, "caption": { - "type": "string", - "source": "html", - "selector": "figcaption", - "default": "" + "type": "rich-text", + "source": "rich-text", + "selector": "figcaption" }, "head": { "type": "array", @@ -30,8 +29,8 @@ "selector": "td,th", "query": { "content": { - "type": "string", - "source": "html" + "type": "rich-text", + "source": "rich-text" }, "tag": { "type": "string", @@ -75,8 +74,8 @@ "selector": "td,th", "query": { "content": { - "type": "string", - "source": "html" + "type": "rich-text", + "source": "rich-text" }, "tag": { "type": "string", @@ -120,8 +119,8 @@ "selector": "td,th", "query": { "content": { - "type": "string", - "source": "html" + "type": "rich-text", + "source": "rich-text" }, "tag": { "type": "string", @@ -196,7 +195,10 @@ "width": true } }, - "__experimentalSelector": ".wp-block-table > table" + "__experimentalSelector": ".wp-block-table > table", + "interactivity": { + "clientNavigation": true + } }, "styles": [ { diff --git a/wp-includes/blocks/table/editor-rtl.css b/wp-includes/blocks/table/editor-rtl.css index 6be0c40a3..ab8325eac 100644 --- a/wp-includes/blocks/table/editor-rtl.css +++ b/wp-includes/blocks/table/editor-rtl.css @@ -1,6 +1,3 @@ -.wp-block-table{ - margin:0; -} .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{ height:auto; } @@ -33,25 +30,15 @@ align-items:flex-start; display:flex; flex-direction:column; -} -.blocks-table__placeholder-form.blocks-table__placeholder-form>*{ - margin-bottom:8px; + gap:8px; } @media (min-width:782px){ .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-end; flex-direction:row; } - .blocks-table__placeholder-form.blocks-table__placeholder-form>*{ - margin-bottom:0; - } } .blocks-table__placeholder-input{ - margin-bottom:0; - margin-left:8px; width:112px; -} -.blocks-table__placeholder-input input{ - height:36px; } \ No newline at end of file diff --git a/wp-includes/blocks/table/editor-rtl.min.css b/wp-includes/blocks/table/editor-rtl.min.css index 09fac9c6d..f048b398c 100644 --- a/wp-includes/blocks/table/editor-rtl.min.css +++ b/wp-includes/blocks/table/editor-rtl.min.css @@ -1 +1 @@ -.wp-block-table{margin:0}.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column}.blocks-table__placeholder-form.blocks-table__placeholder-form>*{margin-bottom:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}.blocks-table__placeholder-form.blocks-table__placeholder-form>*{margin-bottom:0}}.blocks-table__placeholder-input{margin-bottom:0;margin-left:8px;width:112px}.blocks-table__placeholder-input input{height:36px} \ No newline at end of file +.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px} \ No newline at end of file diff --git a/wp-includes/blocks/table/editor.css b/wp-includes/blocks/table/editor.css index 0cdedbc9c..ab8325eac 100644 --- a/wp-includes/blocks/table/editor.css +++ b/wp-includes/blocks/table/editor.css @@ -1,6 +1,3 @@ -.wp-block-table{ - margin:0; -} .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{ height:auto; } @@ -33,25 +30,15 @@ align-items:flex-start; display:flex; flex-direction:column; -} -.blocks-table__placeholder-form.blocks-table__placeholder-form>*{ - margin-bottom:8px; + gap:8px; } @media (min-width:782px){ .blocks-table__placeholder-form.blocks-table__placeholder-form{ align-items:flex-end; flex-direction:row; } - .blocks-table__placeholder-form.blocks-table__placeholder-form>*{ - margin-bottom:0; - } } .blocks-table__placeholder-input{ - margin-bottom:0; - margin-right:8px; width:112px; -} -.blocks-table__placeholder-input input{ - height:36px; } \ No newline at end of file diff --git a/wp-includes/blocks/table/editor.min.css b/wp-includes/blocks/table/editor.min.css index 25f31c90d..f048b398c 100644 --- a/wp-includes/blocks/table/editor.min.css +++ b/wp-includes/blocks/table/editor.min.css @@ -1 +1 @@ -.wp-block-table{margin:0}.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column}.blocks-table__placeholder-form.blocks-table__placeholder-form>*{margin-bottom:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}.blocks-table__placeholder-form.blocks-table__placeholder-form>*{margin-bottom:0}}.blocks-table__placeholder-input{margin-bottom:0;margin-right:8px;width:112px}.blocks-table__placeholder-input input{height:36px} \ No newline at end of file +.wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px} \ No newline at end of file diff --git a/wp-includes/blocks/table/style-rtl.css b/wp-includes/blocks/table/style-rtl.css index 2adaeaacd..025c2edfd 100644 --- a/wp-includes/blocks/table/style-rtl.css +++ b/wp-includes/blocks/table/style-rtl.css @@ -42,7 +42,7 @@ background-color:#fcf0ef; } .wp-block-table.is-style-stripes{ - background-color:transparent; + background-color:initial; border-bottom:1px solid #f0f0f0; border-collapse:inherit; border-spacing:0; @@ -63,7 +63,7 @@ background-color:#fcf0ef; } .wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{ - border-color:transparent; + border-color:#0000; } .wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{ border-color:inherit; @@ -72,7 +72,7 @@ border-top-color:inherit; } .wp-block-table table[style*=border-top-color] tr:not(:first-child){ - border-top-color:currentColor; + border-top-color:initial; } .wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{ border-left-color:inherit; @@ -81,7 +81,7 @@ border-bottom-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:not(:last-child){ - border-bottom-color:currentColor; + border-bottom-color:initial; } .wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{ border-right-color:inherit; diff --git a/wp-includes/blocks/table/style-rtl.min.css b/wp-includes/blocks/table/style-rtl.min.css index 079ed40ff..cd4106a5c 100644 --- a/wp-includes/blocks/table/style-rtl.min.css +++ b/wp-includes/blocks/table/style-rtl.min.css @@ -1 +1 @@ -.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:transparent;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:transparent}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:currentColor}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:currentColor}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} \ No newline at end of file +.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} \ No newline at end of file diff --git a/wp-includes/blocks/table/style.css b/wp-includes/blocks/table/style.css index ce4281ade..692ab26ea 100644 --- a/wp-includes/blocks/table/style.css +++ b/wp-includes/blocks/table/style.css @@ -42,7 +42,7 @@ background-color:#fcf0ef; } .wp-block-table.is-style-stripes{ - background-color:transparent; + background-color:initial; border-bottom:1px solid #f0f0f0; border-collapse:inherit; border-spacing:0; @@ -63,7 +63,7 @@ background-color:#fcf0ef; } .wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{ - border-color:transparent; + border-color:#0000; } .wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{ border-color:inherit; @@ -72,7 +72,7 @@ border-top-color:inherit; } .wp-block-table table[style*=border-top-color] tr:not(:first-child){ - border-top-color:currentColor; + border-top-color:initial; } .wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{ border-right-color:inherit; @@ -81,7 +81,7 @@ border-bottom-color:inherit; } .wp-block-table table[style*=border-bottom-color] tr:not(:last-child){ - border-bottom-color:currentColor; + border-bottom-color:initial; } .wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{ border-left-color:inherit; diff --git a/wp-includes/blocks/table/style.min.css b/wp-includes/blocks/table/style.min.css index a4b917acf..5ebe69d47 100644 --- a/wp-includes/blocks/table/style.min.css +++ b/wp-includes/blocks/table/style.min.css @@ -1 +1 @@ -.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:transparent;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:transparent}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:currentColor}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:currentColor}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} \ No newline at end of file +.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} \ No newline at end of file diff --git a/wp-includes/blocks/table/theme-rtl.css b/wp-includes/blocks/table/theme-rtl.css index 064ae1d0f..f8b6627f5 100644 --- a/wp-includes/blocks/table/theme-rtl.css +++ b/wp-includes/blocks/table/theme-rtl.css @@ -10,5 +10,5 @@ text-align:center; } .is-dark-theme .wp-block-table figcaption{ - color:hsla(0,0%,100%,.65); + color:#ffffffa6; } \ No newline at end of file diff --git a/wp-includes/blocks/table/theme-rtl.min.css b/wp-includes/blocks/table/theme-rtl.min.css index b78100319..ca464b7f5 100644 --- a/wp-includes/blocks/table/theme-rtl.min.css +++ b/wp-includes/blocks/table/theme-rtl.min.css @@ -1 +1 @@ -.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table figcaption{color:hsla(0,0%,100%,.65)} \ No newline at end of file +.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table figcaption{color:#ffffffa6} \ No newline at end of file diff --git a/wp-includes/blocks/table/theme.css b/wp-includes/blocks/table/theme.css index 064ae1d0f..f8b6627f5 100644 --- a/wp-includes/blocks/table/theme.css +++ b/wp-includes/blocks/table/theme.css @@ -10,5 +10,5 @@ text-align:center; } .is-dark-theme .wp-block-table figcaption{ - color:hsla(0,0%,100%,.65); + color:#ffffffa6; } \ No newline at end of file diff --git a/wp-includes/blocks/table/theme.min.css b/wp-includes/blocks/table/theme.min.css index b78100319..ca464b7f5 100644 --- a/wp-includes/blocks/table/theme.min.css +++ b/wp-includes/blocks/table/theme.min.css @@ -1 +1 @@ -.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table figcaption{color:hsla(0,0%,100%,.65)} \ No newline at end of file +.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table figcaption{color:#ffffffa6} \ No newline at end of file diff --git a/wp-includes/blocks/tag-cloud/block.json b/wp-includes/blocks/tag-cloud/block.json index 9481dc945..b95e02204 100644 --- a/wp-includes/blocks/tag-cloud/block.json +++ b/wp-includes/blocks/tag-cloud/block.json @@ -48,6 +48,9 @@ "__experimentalFontStyle": true, "__experimentalTextTransform": true, "__experimentalLetterSpacing": true + }, + "interactivity": { + "clientNavigation": true } }, "editorStyle": "wp-block-tag-cloud-editor" diff --git a/wp-includes/blocks/template-part.php b/wp-includes/blocks/template-part.php index c6824e942..4332bb305 100644 --- a/wp-includes/blocks/template-part.php +++ b/wp-includes/blocks/template-part.php @@ -43,10 +43,10 @@ function render_block_core_template_part( $attributes ) { if ( $template_part_post ) { // A published post might already exist if this template part was customized elsewhere // or if it's part of a customized template. - $content = $template_part_post->post_content; - $area_terms = get_the_terms( $template_part_post, 'wp_template_part_area' ); - if ( ! is_wp_error( $area_terms ) && false !== $area_terms ) { - $area = $area_terms[0]->name; + $block_template = _build_block_template_result_from_post( $template_part_post ); + $content = $block_template->content; + if ( isset( $block_template->area ) ) { + $area = $block_template->area; } /** * Fires when a block template part is loaded from a template post stored in the database. @@ -70,6 +70,12 @@ function render_block_core_template_part( $attributes ) { if ( isset( $block_template->area ) ) { $area = $block_template->area; } + + // Needed for the `render_block_core_template_part_file` and `render_block_core_template_part_none` actions below. + $block_template_file = _get_block_template_file( 'wp_template_part', $attributes['slug'] ); + if ( $block_template_file ) { + $template_part_file_path = $block_template_file['path']; + } } if ( '' !== $content && null !== $content ) { @@ -103,16 +109,16 @@ function render_block_core_template_part( $attributes ) { // is set in `wp_debug_mode()`. $is_debug = WP_DEBUG && WP_DEBUG_DISPLAY; - if ( is_null( $content ) && $is_debug ) { - if ( ! isset( $attributes['slug'] ) ) { - // If there is no slug this is a placeholder and we dont want to return any message. - return; + if ( is_null( $content ) ) { + if ( $is_debug && isset( $attributes['slug'] ) ) { + return sprintf( + /* translators: %s: Template part slug. */ + __( 'Template part has been deleted or is unavailable: %s' ), + $attributes['slug'] + ); } - return sprintf( - /* translators: %s: Template part slug. */ - __( 'Template part has been deleted or is unavailable: %s' ), - $attributes['slug'] - ); + + return ''; } if ( isset( $seen_ids[ $template_part_id ] ) ) { @@ -275,8 +281,8 @@ function register_block_core_template_part() { register_block_type_from_metadata( __DIR__ . '/template-part', array( - 'render_callback' => 'render_block_core_template_part', - 'variations' => build_template_part_block_variations(), + 'render_callback' => 'render_block_core_template_part', + 'variation_callback' => 'build_template_part_block_variations', ) ); } diff --git a/wp-includes/blocks/template-part/block.json b/wp-includes/blocks/template-part/block.json index 9fe431150..9710bdeee 100644 --- a/wp-includes/blocks/template-part/block.json +++ b/wp-includes/blocks/template-part/block.json @@ -23,7 +23,11 @@ "supports": { "align": true, "html": false, - "reusable": false + "reusable": false, + "renaming": false, + "interactivity": { + "clientNavigation": true + } }, "editorStyle": "wp-block-template-part-editor" } diff --git a/wp-includes/blocks/term-description/block.json b/wp-includes/blocks/term-description/block.json index fc91a4aff..7a3f27c80 100644 --- a/wp-includes/blocks/term-description/block.json +++ b/wp-includes/blocks/term-description/block.json @@ -37,6 +37,9 @@ "__experimentalDefaultControls": { "fontSize": true } + }, + "interactivity": { + "clientNavigation": true } } } diff --git a/wp-includes/blocks/text-columns/block.json b/wp-includes/blocks/text-columns/block.json index 3af169fad..2599df111 100644 --- a/wp-includes/blocks/text-columns/block.json +++ b/wp-includes/blocks/text-columns/block.json @@ -29,7 +29,10 @@ } }, "supports": { - "inserter": false + "inserter": false, + "interactivity": { + "clientNavigation": true + } }, "editorStyle": "wp-block-text-columns-editor", "style": "wp-block-text-columns" diff --git a/wp-includes/blocks/verse/block.json b/wp-includes/blocks/verse/block.json index d0fffc8ae..1d6b817c0 100644 --- a/wp-includes/blocks/verse/block.json +++ b/wp-includes/blocks/verse/block.json @@ -9,10 +9,9 @@ "textdomain": "default", "attributes": { "content": { - "type": "string", - "source": "html", + "type": "rich-text", + "source": "rich-text", "selector": "pre", - "default": "", "__unstablePreserveWhiteSpace": true, "__experimentalRole": "content" }, @@ -40,8 +39,7 @@ "__experimentalTextTransform": true, "__experimentalTextDecoration": true, "__experimentalDefaultControls": { - "fontSize": true, - "fontAppearance": true + "fontSize": true } }, "spacing": { @@ -57,6 +55,9 @@ "width": true, "color": true, "style": true + }, + "interactivity": { + "clientNavigation": true } }, "style": "wp-block-verse", diff --git a/wp-includes/blocks/video/block.json b/wp-includes/blocks/video/block.json index debe6f20f..2bc153bc1 100644 --- a/wp-includes/blocks/video/block.json +++ b/wp-includes/blocks/video/block.json @@ -15,8 +15,8 @@ "attribute": "autoplay" }, "caption": { - "type": "string", - "source": "html", + "type": "rich-text", + "source": "rich-text", "selector": "figcaption", "__experimentalRole": "content" }, @@ -88,6 +88,9 @@ "margin": false, "padding": false } + }, + "interactivity": { + "clientNavigation": true } }, "editorStyle": "wp-block-video-editor", diff --git a/wp-includes/blocks/video/theme-rtl.css b/wp-includes/blocks/video/theme-rtl.css index 384cff955..457862873 100644 --- a/wp-includes/blocks/video/theme-rtl.css +++ b/wp-includes/blocks/video/theme-rtl.css @@ -4,7 +4,7 @@ text-align:center; } .is-dark-theme .wp-block-video figcaption{ - color:hsla(0,0%,100%,.65); + color:#ffffffa6; } .wp-block-video{ diff --git a/wp-includes/blocks/video/theme-rtl.min.css b/wp-includes/blocks/video/theme-rtl.min.css index 64b3a34e9..84c9cee48 100644 --- a/wp-includes/blocks/video/theme-rtl.min.css +++ b/wp-includes/blocks/video/theme-rtl.min.css @@ -1 +1 @@ -.wp-block-video figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-video figcaption{color:hsla(0,0%,100%,.65)}.wp-block-video{margin:0 0 1em} \ No newline at end of file +.wp-block-video figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-video figcaption{color:#ffffffa6}.wp-block-video{margin:0 0 1em} \ No newline at end of file diff --git a/wp-includes/blocks/video/theme.css b/wp-includes/blocks/video/theme.css index 384cff955..457862873 100644 --- a/wp-includes/blocks/video/theme.css +++ b/wp-includes/blocks/video/theme.css @@ -4,7 +4,7 @@ text-align:center; } .is-dark-theme .wp-block-video figcaption{ - color:hsla(0,0%,100%,.65); + color:#ffffffa6; } .wp-block-video{ diff --git a/wp-includes/blocks/video/theme.min.css b/wp-includes/blocks/video/theme.min.css index 64b3a34e9..84c9cee48 100644 --- a/wp-includes/blocks/video/theme.min.css +++ b/wp-includes/blocks/video/theme.min.css @@ -1 +1 @@ -.wp-block-video figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-video figcaption{color:hsla(0,0%,100%,.65)}.wp-block-video{margin:0 0 1em} \ No newline at end of file +.wp-block-video figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-video figcaption{color:#ffffffa6}.wp-block-video{margin:0 0 1em} \ No newline at end of file diff --git a/wp-includes/blocks/widget-group/block.json b/wp-includes/blocks/widget-group/block.json index c29e81155..0e59e58ac 100644 --- a/wp-includes/blocks/widget-group/block.json +++ b/wp-includes/blocks/widget-group/block.json @@ -1,4 +1,5 @@ { + "$schema": "https://schemas.wp.org/trunk/block.json", "apiVersion": 3, "name": "core/widget-group", "category": "widgets", diff --git a/wp-includes/bookmark.php b/wp-includes/bookmark.php index 47a86d865..7513a5622 100644 --- a/wp-includes/bookmark.php +++ b/wp-includes/bookmark.php @@ -11,7 +11,8 @@ * * @since 2.1.0 * - * @global wpdb $wpdb WordPress database abstraction object. + * @global object $link Current link object. + * @global wpdb $wpdb WordPress database abstraction object. * * @param int|stdClass $bookmark * @param string $output Optional. The required return type. One of OBJECT, ARRAY_A, or ARRAY_N, which diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index d97d26303..849e15ac7 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -316,7 +316,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) { $redirect['query'] = remove_query_arg( 'year', $redirect['query'] ); } } - } elseif ( is_author() && ! empty( $_GET['author'] ) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) { + } elseif ( is_author() && ! empty( $_GET['author'] ) + && is_string( $_GET['author'] ) && preg_match( '|^[0-9]+$|', $_GET['author'] ) + ) { $author = get_userdata( get_query_var( 'author' ) ); if ( false !== $author @@ -947,6 +949,9 @@ function redirect_guess_404_permalink() { } if ( get_query_var( 'name' ) ) { + $publicly_viewable_statuses = array_filter( get_post_stati(), 'is_post_status_viewable' ); + $publicly_viewable_post_types = array_filter( get_post_types( array( 'exclude_from_search' => false ) ), 'is_post_type_viewable' ); + /** * Filters whether to perform a strict guess for a 404 redirect. * @@ -967,12 +972,19 @@ function redirect_guess_404_permalink() { // If any of post_type, year, monthnum, or day are set, use them to refine the query. if ( get_query_var( 'post_type' ) ) { if ( is_array( get_query_var( 'post_type' ) ) ) { + $post_types = array_intersect( get_query_var( 'post_type' ), $publicly_viewable_post_types ); + if ( empty( $post_types ) ) { + return false; + } $where .= " AND post_type IN ('" . join( "', '", esc_sql( get_query_var( 'post_type' ) ) ) . "')"; } else { + if ( ! in_array( get_query_var( 'post_type' ), $publicly_viewable_post_types, true ) ) { + return false; + } $where .= $wpdb->prepare( ' AND post_type = %s', get_query_var( 'post_type' ) ); } } else { - $where .= " AND post_type IN ('" . implode( "', '", get_post_types( array( 'public' => true ) ) ) . "')"; + $where .= " AND post_type IN ('" . implode( "', '", esc_sql( $publicly_viewable_post_types ) ) . "')"; } if ( get_query_var( 'year' ) ) { @@ -985,7 +997,6 @@ function redirect_guess_404_permalink() { $where .= $wpdb->prepare( ' AND DAYOFMONTH(post_date) = %d', get_query_var( 'day' ) ); } - $publicly_viewable_statuses = array_filter( get_post_stati(), 'is_post_status_viewable' ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared $post_id = $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE $where AND post_status IN ('" . implode( "', '", esc_sql( $publicly_viewable_statuses ) ) . "')" ); diff --git a/wp-includes/class-avif-info.php b/wp-includes/class-avif-info.php new file mode 100644 index 000000000..10fc1b68d --- /dev/null +++ b/wp-includes/class-avif-info.php @@ -0,0 +1,781 @@ += 2^31 on 32-bit systems. + // See https://www.php.net/manual/en/function.unpack.php#106041 + return unpack( 'N', $input ) [1]; + } +} + +/** + * Reads bytes and advances the stream position by the same count. + * + * @param stream $handle Bytes will be read from this resource. + * @param int $num_bytes Number of bytes read. Must be greater than 0. + * @return binary string|false The raw bytes or false on failure. + */ +function read( $handle, $num_bytes ) { + $data = fread( $handle, $num_bytes ); + return ( $data !== false && strlen( $data ) >= $num_bytes ) ? $data : false; +} + +/** + * Advances the stream position by the given offset. + * + * @param stream $handle Bytes will be skipped from this resource. + * @param int $num_bytes Number of skipped bytes. Can be 0. + * @return bool True on success or false on failure. + */ +// Skips 'num_bytes' from the 'stream'. 'num_bytes' can be zero. +function skip( $handle, $num_bytes ) { + return ( fseek( $handle, $num_bytes, SEEK_CUR ) == 0 ); +} + +//------------------------------------------------------------------------------ +// Features are parsed into temporary property associations. + +class Tile { // Tile item id <-> parent item id associations. + public $tile_item_id; + public $parent_item_id; +} + +class Prop { // Property index <-> item id associations. + public $property_index; + public $item_id; +} + +class Dim_Prop { // Property <-> features associations. + public $property_index; + public $width; + public $height; +} + +class Chan_Prop { // Property <-> features associations. + public $property_index; + public $bit_depth; + public $num_channels; +} + +class Features { + public $has_primary_item = false; // True if "pitm" was parsed. + public $has_alpha = false; // True if an alpha "auxC" was parsed. + public $primary_item_id; + public $primary_item_features = array( // Deduced from the data below. + 'width' => UNDEFINED, // In number of pixels. + 'height' => UNDEFINED, // Ignores mirror and rotation. + 'bit_depth' => UNDEFINED, // Likely 8, 10 or 12 bits per channel per pixel. + 'num_channels' => UNDEFINED // Likely 1, 2, 3 or 4 channels: + // (1 monochrome or 3 colors) + (0 or 1 alpha) + ); + + public $tiles = array(); // Tile[] + public $props = array(); // Prop[] + public $dim_props = array(); // Dim_Prop[] + public $chan_props = array(); // Chan_Prop[] + + /** + * Binds the width, height, bit depth and number of channels from stored internal features. + * + * @param int $target_item_id Id of the item whose features will be bound. + * @param int $tile_depth Maximum recursion to search within tile-parent relations. + * @return Status FOUND on success or NOT_FOUND on failure. + */ + private function get_item_features( $target_item_id, $tile_depth ) { + foreach ( $this->props as $prop ) { + if ( $prop->item_id != $target_item_id ) { + continue; + } + + // Retrieve the width and height of the primary item if not already done. + if ( $target_item_id == $this->primary_item_id && + ( $this->primary_item_features['width'] == UNDEFINED || + $this->primary_item_features['height'] == UNDEFINED ) ) { + foreach ( $this->dim_props as $dim_prop ) { + if ( $dim_prop->property_index != $prop->property_index ) { + continue; + } + $this->primary_item_features['width'] = $dim_prop->width; + $this->primary_item_features['height'] = $dim_prop->height; + if ( $this->primary_item_features['bit_depth'] != UNDEFINED && + $this->primary_item_features['num_channels'] != UNDEFINED ) { + return FOUND; + } + break; + } + } + // Retrieve the bit depth and number of channels of the target item if not + // already done. + if ( $this->primary_item_features['bit_depth'] == UNDEFINED || + $this->primary_item_features['num_channels'] == UNDEFINED ) { + foreach ( $this->chan_props as $chan_prop ) { + if ( $chan_prop->property_index != $prop->property_index ) { + continue; + } + $this->primary_item_features['bit_depth'] = $chan_prop->bit_depth; + $this->primary_item_features['num_channels'] = $chan_prop->num_channels; + if ( $this->primary_item_features['width'] != UNDEFINED && + $this->primary_item_features['height'] != UNDEFINED ) { + return FOUND; + } + break; + } + } + } + + // Check for the bit_depth and num_channels in a tile if not yet found. + if ( $tile_depth < 3 ) { + foreach ( $this->tiles as $tile ) { + if ( $tile->parent_item_id != $target_item_id ) { + continue; + } + $status = $this->get_item_features( $tile->tile_item_id, $tile_depth + 1 ); + if ( $status != NOT_FOUND ) { + return $status; + } + } + } + return NOT_FOUND; + } + + /** + * Finds the width, height, bit depth and number of channels of the primary item. + * + * @return Status FOUND on success or NOT_FOUND on failure. + */ + public function get_primary_item_features() { + // Nothing to do without the primary item ID. + if ( !$this->has_primary_item ) { + return NOT_FOUND; + } + // Early exit. + if ( empty( $this->dim_props ) || empty( $this->chan_props ) ) { + return NOT_FOUND; + } + $status = $this->get_item_features( $this->primary_item_id, /*tile_depth=*/ 0 ); + if ( $status != FOUND ) { + return $status; + } + + // "auxC" is parsed before the "ipma" properties so it is known now, if any. + if ( $this->has_alpha ) { + ++$this->primary_item_features['num_channels']; + } + return FOUND; + } +} + +//------------------------------------------------------------------------------ + +class Box { + public $size; // In bytes. + public $type; // Four characters. + public $version; // 0 or actual version if this is a full box. + public $flags; // 0 or actual value if this is a full box. + public $content_size; // 'size' minus the header size. + + /** + * Reads the box header. + * + * @param stream $handle The resource the header will be parsed from. + * @param int $num_parsed_boxes The total number of parsed boxes. Prevents timeouts. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + public function parse( $handle, &$num_parsed_boxes, $num_remaining_bytes = MAX_SIZE ) { + // See ISO/IEC 14496-12:2012(E) 4.2 + $header_size = 8; // box 32b size + 32b type (at least) + if ( $header_size > $num_remaining_bytes ) { + return INVALID; + } + if ( !( $data = read( $handle, 8 ) ) ) { + return TRUNCATED; + } + $this->size = read_big_endian( $data, 4 ); + $this->type = substr( $data, 4, 4 ); + // 'box->size==1' means 64-bit size should be read after the box type. + // 'box->size==0' means this box extends to all remaining bytes. + if ( $this->size == 1 ) { + $header_size += 8; + if ( $header_size > $num_remaining_bytes ) { + return INVALID; + } + if ( !( $data = read( $handle, 8 ) ) ) { + return TRUNCATED; + } + // Stop the parsing if any box has a size greater than 4GB. + if ( read_big_endian( $data, 4 ) != 0 ) { + return ABORTED; + } + // Read the 32 least-significant bits. + $this->size = read_big_endian( substr( $data, 4, 4 ), 4 ); + } else if ( $this->size == 0 ) { + $this->size = $num_remaining_bytes; + } + if ( $this->size < $header_size ) { + return INVALID; + } + if ( $this->size > $num_remaining_bytes ) { + return INVALID; + } + + $has_fullbox_header = $this->type == 'meta' || $this->type == 'pitm' || + $this->type == 'ipma' || $this->type == 'ispe' || + $this->type == 'pixi' || $this->type == 'iref' || + $this->type == 'auxC'; + if ( $has_fullbox_header ) { + $header_size += 4; + } + if ( $this->size < $header_size ) { + return INVALID; + } + $this->content_size = $this->size - $header_size; + // Avoid timeouts. The maximum number of parsed boxes is arbitrary. + ++$num_parsed_boxes; + if ( $num_parsed_boxes >= MAX_NUM_BOXES ) { + return ABORTED; + } + + $this->version = 0; + $this->flags = 0; + if ( $has_fullbox_header ) { + if ( !( $data = read( $handle, 4 ) ) ) { + return TRUNCATED; + } + $this->version = read_big_endian( $data, 1 ); + $this->flags = read_big_endian( substr( $data, 1, 3 ), 3 ); + // See AV1 Image File Format (AVIF) 8.1 + // at https://aomediacodec.github.io/av1-avif/#avif-boxes (available when + // https://github.com/AOMediaCodec/av1-avif/pull/170 is merged). + $is_parsable = ( $this->type == 'meta' && $this->version <= 0 ) || + ( $this->type == 'pitm' && $this->version <= 1 ) || + ( $this->type == 'ipma' && $this->version <= 1 ) || + ( $this->type == 'ispe' && $this->version <= 0 ) || + ( $this->type == 'pixi' && $this->version <= 0 ) || + ( $this->type == 'iref' && $this->version <= 1 ) || + ( $this->type == 'auxC' && $this->version <= 0 ); + // Instead of considering this file as invalid, skip unparsable boxes. + if ( !$is_parsable ) { + $this->type = 'unknownversion'; + } + } + // print_r( $this ); // Uncomment to print all boxes. + return FOUND; + } +} + +//------------------------------------------------------------------------------ + +class Parser { + private $handle; // Input stream. + private $num_parsed_boxes = 0; + private $data_was_skipped = false; + public $features; + + function __construct( $handle ) { + $this->handle = $handle; + $this->features = new Features(); + } + + /** + * Parses an "ipco" box. + * + * "ispe" is used for width and height, "pixi" and "av1C" are used for bit depth + * and number of channels, and "auxC" is used for alpha. + * + * @param stream $handle The resource the box will be parsed from. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + private function parse_ipco( $num_remaining_bytes ) { + $box_index = 1; // 1-based index. Used for iterating over properties. + do { + $box = new Box(); + $status = $box->parse( $this->handle, $this->num_parsed_boxes, $num_remaining_bytes ); + if ( $status != FOUND ) { + return $status; + } + + if ( $box->type == 'ispe' ) { + // See ISO/IEC 23008-12:2017(E) 6.5.3.2 + if ( $box->content_size < 8 ) { + return INVALID; + } + if ( !( $data = read( $this->handle, 8 ) ) ) { + return TRUNCATED; + } + $width = read_big_endian( substr( $data, 0, 4 ), 4 ); + $height = read_big_endian( substr( $data, 4, 4 ), 4 ); + if ( $width == 0 || $height == 0 ) { + return INVALID; + } + if ( count( $this->features->dim_props ) <= MAX_FEATURES && + $box_index <= MAX_VALUE ) { + $dim_prop_count = count( $this->features->dim_props ); + $this->features->dim_props[$dim_prop_count] = new Dim_Prop(); + $this->features->dim_props[$dim_prop_count]->property_index = $box_index; + $this->features->dim_props[$dim_prop_count]->width = $width; + $this->features->dim_props[$dim_prop_count]->height = $height; + } else { + $this->data_was_skipped = true; + } + if ( !skip( $this->handle, $box->content_size - 8 ) ) { + return TRUNCATED; + } + } else if ( $box->type == 'pixi' ) { + // See ISO/IEC 23008-12:2017(E) 6.5.6.2 + if ( $box->content_size < 1 ) { + return INVALID; + } + if ( !( $data = read( $this->handle, 1 ) ) ) { + return TRUNCATED; + } + $num_channels = read_big_endian( $data, 1 ); + if ( $num_channels < 1 ) { + return INVALID; + } + if ( $box->content_size < 1 + $num_channels ) { + return INVALID; + } + if ( !( $data = read( $this->handle, 1 ) ) ) { + return TRUNCATED; + } + $bit_depth = read_big_endian( $data, 1 ); + if ( $bit_depth < 1 ) { + return INVALID; + } + for ( $i = 1; $i < $num_channels; ++$i ) { + if ( !( $data = read( $this->handle, 1 ) ) ) { + return TRUNCATED; + } + // Bit depth should be the same for all channels. + if ( read_big_endian( $data, 1 ) != $bit_depth ) { + return INVALID; + } + if ( $i > 32 ) { + return ABORTED; // Be reasonable. + } + } + if ( count( $this->features->chan_props ) <= MAX_FEATURES && + $box_index <= MAX_VALUE && $bit_depth <= MAX_VALUE && + $num_channels <= MAX_VALUE ) { + $chan_prop_count = count( $this->features->chan_props ); + $this->features->chan_props[$chan_prop_count] = new Chan_Prop(); + $this->features->chan_props[$chan_prop_count]->property_index = $box_index; + $this->features->chan_props[$chan_prop_count]->bit_depth = $bit_depth; + $this->features->chan_props[$chan_prop_count]->num_channels = $num_channels; + } else { + $this->data_was_skipped = true; + } + if ( !skip( $this->handle, $box->content_size - ( 1 + $num_channels ) ) ) { + return TRUNCATED; + } + } else if ( $box->type == 'av1C' ) { + // See AV1 Codec ISO Media File Format Binding 2.3.1 + // at https://aomediacodec.github.io/av1-isobmff/#av1c + // Only parse the necessary third byte. Assume that the others are valid. + if ( $box->content_size < 3 ) { + return INVALID; + } + if ( !( $data = read( $this->handle, 3 ) ) ) { + return TRUNCATED; + } + $byte = read_big_endian( substr( $data, 2, 1 ), 1 ); + $high_bitdepth = ( $byte & 0x40 ) != 0; + $twelve_bit = ( $byte & 0x20 ) != 0; + $monochrome = ( $byte & 0x10 ) != 0; + if ( $twelve_bit && !$high_bitdepth ) { + return INVALID; + } + if ( count( $this->features->chan_props ) <= MAX_FEATURES && + $box_index <= MAX_VALUE ) { + $chan_prop_count = count( $this->features->chan_props ); + $this->features->chan_props[$chan_prop_count] = new Chan_Prop(); + $this->features->chan_props[$chan_prop_count]->property_index = $box_index; + $this->features->chan_props[$chan_prop_count]->bit_depth = + $high_bitdepth ? $twelve_bit ? 12 : 10 : 8; + $this->features->chan_props[$chan_prop_count]->num_channels = $monochrome ? 1 : 3; + } else { + $this->data_was_skipped = true; + } + if ( !skip( $this->handle, $box->content_size - 3 ) ) { + return TRUNCATED; + } + } else if ( $box->type == 'auxC' ) { + // See AV1 Image File Format (AVIF) 4 + // at https://aomediacodec.github.io/av1-avif/#auxiliary-images + $kAlphaStr = "urn:mpeg:mpegB:cicp:systems:auxiliary:alpha\0"; + $kAlphaStrLength = 44; // Includes terminating character. + if ( $box->content_size >= $kAlphaStrLength ) { + if ( !( $data = read( $this->handle, $kAlphaStrLength ) ) ) { + return TRUNCATED; + } + if ( substr( $data, 0, $kAlphaStrLength ) == $kAlphaStr ) { + // Note: It is unlikely but it is possible that this alpha plane does + // not belong to the primary item or a tile. Ignore this issue. + $this->features->has_alpha = true; + } + if ( !skip( $this->handle, $box->content_size - $kAlphaStrLength ) ) { + return TRUNCATED; + } + } else { + if ( !skip( $this->handle, $box->content_size ) ) { + return TRUNCATED; + } + } + } else { + if ( !skip( $this->handle, $box->content_size ) ) { + return TRUNCATED; + } + } + ++$box_index; + $num_remaining_bytes -= $box->size; + } while ( $num_remaining_bytes > 0 ); + return NOT_FOUND; + } + + /** + * Parses an "iprp" box. + * + * The "ipco" box contain the properties which are linked to items by the "ipma" box. + * + * @param stream $handle The resource the box will be parsed from. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + private function parse_iprp( $num_remaining_bytes ) { + do { + $box = new Box(); + $status = $box->parse( $this->handle, $this->num_parsed_boxes, $num_remaining_bytes ); + if ( $status != FOUND ) { + return $status; + } + + if ( $box->type == 'ipco' ) { + $status = $this->parse_ipco( $box->content_size ); + if ( $status != NOT_FOUND ) { + return $status; + } + } else if ( $box->type == 'ipma' ) { + // See ISO/IEC 23008-12:2017(E) 9.3.2 + $num_read_bytes = 4; + if ( $box->content_size < $num_read_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $num_read_bytes ) ) ) { + return TRUNCATED; + } + $entry_count = read_big_endian( $data, 4 ); + $id_num_bytes = ( $box->version < 1 ) ? 2 : 4; + $index_num_bytes = ( $box->flags & 1 ) ? 2 : 1; + $essential_bit_mask = ( $box->flags & 1 ) ? 0x8000 : 0x80; + + for ( $entry = 0; $entry < $entry_count; ++$entry ) { + if ( $entry >= MAX_PROPS || + count( $this->features->props ) >= MAX_PROPS ) { + $this->data_was_skipped = true; + break; + } + $num_read_bytes += $id_num_bytes + 1; + if ( $box->content_size < $num_read_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $id_num_bytes + 1 ) ) ) { + return TRUNCATED; + } + $item_id = read_big_endian( + substr( $data, 0, $id_num_bytes ), $id_num_bytes ); + $association_count = read_big_endian( + substr( $data, $id_num_bytes, 1 ), 1 ); + + for ( $property = 0; $property < $association_count; ++$property ) { + if ( $property >= MAX_PROPS || + count( $this->features->props ) >= MAX_PROPS ) { + $this->data_was_skipped = true; + break; + } + $num_read_bytes += $index_num_bytes; + if ( $box->content_size < $num_read_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $index_num_bytes ) ) ) { + return TRUNCATED; + } + $value = read_big_endian( $data, $index_num_bytes ); + // $essential = ($value & $essential_bit_mask); // Unused. + $property_index = ( $value & ~$essential_bit_mask ); + if ( $property_index <= MAX_VALUE && $item_id <= MAX_VALUE ) { + $prop_count = count( $this->features->props ); + $this->features->props[$prop_count] = new Prop(); + $this->features->props[$prop_count]->property_index = $property_index; + $this->features->props[$prop_count]->item_id = $item_id; + } else { + $this->data_was_skipped = true; + } + } + if ( $property < $association_count ) { + break; // Do not read garbage. + } + } + + // If all features are available now, do not look further. + $status = $this->features->get_primary_item_features(); + if ( $status != NOT_FOUND ) { + return $status; + } + + // Mostly if 'data_was_skipped'. + if ( !skip( $this->handle, $box->content_size - $num_read_bytes ) ) { + return TRUNCATED; + } + } else { + if ( !skip( $this->handle, $box->content_size ) ) { + return TRUNCATED; + } + } + $num_remaining_bytes -= $box->size; + } while ( $num_remaining_bytes > 0 ); + return NOT_FOUND; + } + + /** + * Parses an "iref" box. + * + * The "dimg" boxes contain links between tiles and their parent items, which + * can be used to infer bit depth and number of channels for the primary item + * when the latter does not have these properties. + * + * @param stream $handle The resource the box will be parsed from. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + private function parse_iref( $num_remaining_bytes ) { + do { + $box = new Box(); + $status = $box->parse( $this->handle, $this->num_parsed_boxes, $num_remaining_bytes ); + if ( $status != FOUND ) { + return $status; + } + + if ( $box->type == 'dimg' ) { + // See ISO/IEC 14496-12:2015(E) 8.11.12.2 + $num_bytes_per_id = ( $box->version == 0 ) ? 2 : 4; + $num_read_bytes = $num_bytes_per_id + 2; + if ( $box->content_size < $num_read_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $num_read_bytes ) ) ) { + return TRUNCATED; + } + $from_item_id = read_big_endian( $data, $num_bytes_per_id ); + $reference_count = read_big_endian( substr( $data, $num_bytes_per_id, 2 ), 2 ); + + for ( $i = 0; $i < $reference_count; ++$i ) { + if ( $i >= MAX_TILES ) { + $this->data_was_skipped = true; + break; + } + $num_read_bytes += $num_bytes_per_id; + if ( $box->content_size < $num_read_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $num_bytes_per_id ) ) ) { + return TRUNCATED; + } + $to_item_id = read_big_endian( $data, $num_bytes_per_id ); + $tile_count = count( $this->features->tiles ); + if ( $from_item_id <= MAX_VALUE && $to_item_id <= MAX_VALUE && + $tile_count < MAX_TILES ) { + $this->features->tiles[$tile_count] = new Tile(); + $this->features->tiles[$tile_count]->tile_item_id = $to_item_id; + $this->features->tiles[$tile_count]->parent_item_id = $from_item_id; + } else { + $this->data_was_skipped = true; + } + } + + // If all features are available now, do not look further. + $status = $this->features->get_primary_item_features(); + if ( $status != NOT_FOUND ) { + return $status; + } + + // Mostly if 'data_was_skipped'. + if ( !skip( $this->handle, $box->content_size - $num_read_bytes ) ) { + return TRUNCATED; + } + } else { + if ( !skip( $this->handle, $box->content_size ) ) { + return TRUNCATED; + } + } + $num_remaining_bytes -= $box->size; + } while ( $num_remaining_bytes > 0 ); + return NOT_FOUND; + } + + /** + * Parses a "meta" box. + * + * It looks for the primary item ID in the "pitm" box and recurses into other boxes + * to find its features. + * + * @param stream $handle The resource the box will be parsed from. + * @param int $num_remaining_bytes The number of bytes that should be available from the resource. + * @return Status FOUND on success or an error on failure. + */ + private function parse_meta( $num_remaining_bytes ) { + do { + $box = new Box(); + $status = $box->parse( $this->handle, $this->num_parsed_boxes, $num_remaining_bytes ); + if ( $status != FOUND ) { + return $status; + } + + if ( $box->type == 'pitm' ) { + // See ISO/IEC 14496-12:2015(E) 8.11.4.2 + $num_bytes_per_id = ( $box->version == 0 ) ? 2 : 4; + if ( $num_bytes_per_id > $num_remaining_bytes ) { + return INVALID; + } + if ( !( $data = read( $this->handle, $num_bytes_per_id ) ) ) { + return TRUNCATED; + } + $primary_item_id = read_big_endian( $data, $num_bytes_per_id ); + if ( $primary_item_id > MAX_VALUE ) { + return ABORTED; + } + $this->features->has_primary_item = true; + $this->features->primary_item_id = $primary_item_id; + if ( !skip( $this->handle, $box->content_size - $num_bytes_per_id ) ) { + return TRUNCATED; + } + } else if ( $box->type == 'iprp' ) { + $status = $this->parse_iprp( $box->content_size ); + if ( $status != NOT_FOUND ) { + return $status; + } + } else if ( $box->type == 'iref' ) { + $status = $this->parse_iref( $box->content_size ); + if ( $status != NOT_FOUND ) { + return $status; + } + } else { + if ( !skip( $this->handle, $box->content_size ) ) { + return TRUNCATED; + } + } + $num_remaining_bytes -= $box->size; + } while ( $num_remaining_bytes != 0 ); + // According to ISO/IEC 14496-12:2012(E) 8.11.1.1 there is at most one "meta". + return INVALID; + } + + /** + * Parses a file stream. + * + * The file type is checked through the "ftyp" box. + * + * @return bool True if the input stream is an AVIF bitstream or false. + */ + public function parse_ftyp() { + $box = new Box(); + $status = $box->parse( $this->handle, $this->num_parsed_boxes ); + if ( $status != FOUND ) { + return false; + } + + if ( $box->type != 'ftyp' ) { + return false; + } + // Iterate over brands. See ISO/IEC 14496-12:2012(E) 4.3.1 + if ( $box->content_size < 8 ) { + return false; + } + for ( $i = 0; $i + 4 <= $box->content_size; $i += 4 ) { + if ( !( $data = read( $this->handle, 4 ) ) ) { + return false; + } + if ( $i == 4 ) { + continue; // Skip minor_version. + } + if ( substr( $data, 0, 4 ) == 'avif' || substr( $data, 0, 4 ) == 'avis' ) { + return skip( $this->handle, $box->content_size - ( $i + 4 ) ); + } + if ( $i > 32 * 4 ) { + return false; // Be reasonable. + } + + } + return false; // No AVIF brand no good. + } + + /** + * Parses a file stream. + * + * Features are extracted from the "meta" box. + * + * @return bool True if the main features of the primary item were parsed or false. + */ + public function parse_file() { + $box = new Box(); + while ( $box->parse( $this->handle, $this->num_parsed_boxes ) == FOUND ) { + if ( $box->type === 'meta' ) { + if ( $this->parse_meta( $box->content_size ) != FOUND ) { + return false; + } + return true; + } + if ( !skip( $this->handle, $box->content_size ) ) { + return false; + } + } + return false; // No "meta" no good. + } +} diff --git a/wp-includes/class-simplepie.php b/wp-includes/class-simplepie.php index 2bd27359e..976ce72cb 100644 --- a/wp-includes/class-simplepie.php +++ b/wp-includes/class-simplepie.php @@ -340,7 +340,6 @@ function wp_simplepie_autoload( $class ) { /** * RSS 2.0 Namespace - * (Stupid, I know, but I'm certain it will confuse people less with support.) */ define('SIMPLEPIE_NAMESPACE_RSS_20', ''); @@ -1205,12 +1204,12 @@ public function set_cache_name_function($function = 'md5') } /** - * Set options to make SP as fast as possible + * Set options to make SimplePie as fast as possible. * - * Forgoes a substantial amount of data sanitization in favor of speed. This - * turns SimplePie into a dumb parser of feeds. + * Forgoes a substantial amount of data sanitization in favor of speed. + * This turns SimplePie into a less clever parser of feeds. * - * @param bool $set Whether to set them or not + * @param bool $set Whether to set them or not. */ public function set_stupidly_fast($set = false) { diff --git a/wp-includes/class-wp-admin-bar.php b/wp-includes/class-wp-admin-bar.php index ee3888edb..093ed0187 100644 --- a/wp-includes/class-wp-admin-bar.php +++ b/wp-includes/class-wp-admin-bar.php @@ -107,6 +107,7 @@ public function remove_menu( $id ) { * * @since 3.1.0 * @since 4.5.0 Added the ability to pass 'lang' and 'dir' meta data. + * @since 6.5.0 Added the ability to pass 'menu_title' for an ARIA menu name. * * @param array $args { * Arguments for adding a node. @@ -117,7 +118,7 @@ public function remove_menu( $id ) { * @type string $href Optional. Link for the item. * @type bool $group Optional. Whether or not the node is a group. Default false. * @type array $meta Meta data including the following keys: 'html', 'class', 'rel', 'lang', 'dir', - * 'onclick', 'target', 'title', 'tabindex'. Default empty. + * 'onclick', 'target', 'title', 'tabindex', 'menu_title'. Default empty. * } */ public function add_node( $args ) { @@ -478,9 +479,6 @@ final protected function _render( $root ) { } ?> - - - type ) { $this->_render_container( $node ); return; @@ -523,7 +523,11 @@ final protected function _render_group( $node ) { $class = ''; } - echo "