wp core update 6.6
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/archives` block on server.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @see WP_Widget_Archives
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
@@ -106,6 +108,8 @@ function render_block_core_archives( $attributes ) {
|
||||
|
||||
/**
|
||||
* Register archives block.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*/
|
||||
function register_block_core_archives() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.wp-block-audio{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
.wp-block-audio figcaption{
|
||||
.wp-block-audio :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-audio{box-sizing:border-box}.wp-block-audio figcaption{margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}
|
||||
.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}
|
||||
@@ -1,7 +1,7 @@
|
||||
.wp-block-audio{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
.wp-block-audio figcaption{
|
||||
.wp-block-audio :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
|
||||
2
wp/wp-includes/blocks/audio/style.min.css
vendored
2
wp/wp-includes/blocks/audio/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-audio{box-sizing:border-box}.wp-block-audio figcaption{margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}
|
||||
.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}
|
||||
@@ -1,9 +1,9 @@
|
||||
.wp-block-audio figcaption{
|
||||
.wp-block-audio :where(figcaption){
|
||||
color:#555;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-audio figcaption{
|
||||
.is-dark-theme .wp-block-audio :where(figcaption){
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:#ffffffa6}.wp-block-audio{margin:0 0 1em}
|
||||
.wp-block-audio :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio :where(figcaption){color:#ffffffa6}.wp-block-audio{margin:0 0 1em}
|
||||
@@ -1,9 +1,9 @@
|
||||
.wp-block-audio figcaption{
|
||||
.wp-block-audio :where(figcaption){
|
||||
color:#555;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-audio figcaption{
|
||||
.is-dark-theme .wp-block-audio :where(figcaption){
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
|
||||
2
wp/wp-includes/blocks/audio/theme.min.css
vendored
2
wp/wp-includes/blocks/audio/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:#ffffffa6}.wp-block-audio{margin:0 0 1em}
|
||||
.wp-block-audio :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio :where(figcaption){color:#ffffffa6}.wp-block-audio{margin:0 0 1em}
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/avatar` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -31,7 +33,18 @@ function render_block_core_avatar( $attributes, $content, $block ) {
|
||||
: '';
|
||||
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
$author_id = isset( $attributes['userId'] ) ? $attributes['userId'] : get_post_field( 'post_author', $block->context['postId'] );
|
||||
if ( isset( $attributes['userId'] ) ) {
|
||||
$author_id = $attributes['userId'];
|
||||
} elseif ( isset( $block->context['postId'] ) ) {
|
||||
$author_id = get_post_field( 'post_author', $block->context['postId'] );
|
||||
} else {
|
||||
$author_id = get_query_var( 'author' );
|
||||
}
|
||||
|
||||
if ( empty( $author_id ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$author_name = get_the_author_meta( 'display_name', $author_id );
|
||||
// translators: %s is the Author name.
|
||||
$alt = sprintf( __( '%s Avatar' ), $author_name );
|
||||
@@ -88,6 +101,8 @@ function render_block_core_avatar( $attributes, $content, $block ) {
|
||||
* Generates class names and styles to apply the border support styles for
|
||||
* the Avatar block.
|
||||
*
|
||||
* @since 6.3.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @return array The border-related classnames and styles for the block.
|
||||
*/
|
||||
@@ -138,6 +153,8 @@ function get_block_core_avatar_border_attributes( $attributes ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/avatar` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_avatar() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,10 @@
|
||||
/**
|
||||
* Renders the `core/block` block on server.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @global WP_Embed $wp_embed
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
*
|
||||
* @return string Rendered HTML of the referenced block.
|
||||
@@ -74,7 +78,7 @@ function render_block_core_block( $attributes ) {
|
||||
* filter so that it is available when a pattern's inner blocks are
|
||||
* rendering via do_blocks given it only receives the inner content.
|
||||
*/
|
||||
$has_pattern_overrides = isset( $attributes['content'] );
|
||||
$has_pattern_overrides = isset( $attributes['content'] ) && null !== get_block_bindings_source( 'core/pattern-overrides' );
|
||||
if ( $has_pattern_overrides ) {
|
||||
$filter_block_context = static function ( $context ) use ( $attributes ) {
|
||||
$context['pattern/overrides'] = $attributes['content'];
|
||||
@@ -95,6 +99,8 @@ function render_block_core_block( $attributes ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/block` block.
|
||||
*
|
||||
* @since 5.3.0
|
||||
*/
|
||||
function register_block_core_block() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -12,9 +12,13 @@
|
||||
"type": "number"
|
||||
},
|
||||
"content": {
|
||||
"type": "object"
|
||||
"type": "object",
|
||||
"default": {}
|
||||
}
|
||||
},
|
||||
"providesContext": {
|
||||
"pattern/overrides": "content"
|
||||
},
|
||||
"supports": {
|
||||
"customClassName": false,
|
||||
"html": false,
|
||||
|
||||
@@ -207,9 +207,15 @@
|
||||
'type' => 'number'
|
||||
),
|
||||
'content' => array(
|
||||
'type' => 'object'
|
||||
'type' => 'object',
|
||||
'default' => array(
|
||||
|
||||
)
|
||||
)
|
||||
),
|
||||
'providesContext' => array(
|
||||
'pattern/overrides' => 'content'
|
||||
),
|
||||
'supports' => array(
|
||||
'customClassName' => false,
|
||||
'html' => false,
|
||||
@@ -302,6 +308,7 @@
|
||||
),
|
||||
'supports' => array(
|
||||
'anchor' => true,
|
||||
'splitting' => true,
|
||||
'align' => false,
|
||||
'alignWide' => false,
|
||||
'color' => array(
|
||||
@@ -1557,6 +1564,7 @@
|
||||
'anchor' => true,
|
||||
'align' => true,
|
||||
'html' => false,
|
||||
'shadow' => true,
|
||||
'spacing' => array(
|
||||
'padding' => true,
|
||||
'margin' => array(
|
||||
@@ -1643,6 +1651,7 @@
|
||||
)
|
||||
),
|
||||
'supports' => array(
|
||||
'__experimentalOnEnter' => true,
|
||||
'align' => array(
|
||||
'wide',
|
||||
'full'
|
||||
@@ -2240,6 +2249,7 @@
|
||||
),
|
||||
'anchor' => true,
|
||||
'className' => true,
|
||||
'splitting' => true,
|
||||
'color' => array(
|
||||
'gradients' => true,
|
||||
'link' => true,
|
||||
@@ -2770,7 +2780,7 @@
|
||||
),
|
||||
'supports' => array(
|
||||
'anchor' => true,
|
||||
'className' => false,
|
||||
'html' => false,
|
||||
'typography' => array(
|
||||
'fontSize' => true,
|
||||
'lineHeight' => true,
|
||||
@@ -2801,7 +2811,6 @@
|
||||
)
|
||||
),
|
||||
'__unstablePasteTextInline' => true,
|
||||
'__experimentalSelector' => 'ol,ul',
|
||||
'__experimentalOnMerge' => true,
|
||||
'__experimentalSlashInserter' => true,
|
||||
'interactivity' => array(
|
||||
@@ -2838,7 +2847,8 @@
|
||||
),
|
||||
'supports' => array(
|
||||
'className' => false,
|
||||
'__experimentalSelector' => 'li',
|
||||
'__experimentalSelector' => '.wp-block-list > li',
|
||||
'splitting' => true,
|
||||
'spacing' => array(
|
||||
'margin' => true,
|
||||
'padding' => true,
|
||||
@@ -3013,8 +3023,16 @@
|
||||
),
|
||||
'allowedBlocks' => array(
|
||||
'type' => 'array'
|
||||
),
|
||||
'useFeaturedImage' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
)
|
||||
),
|
||||
'usesContext' => array(
|
||||
'postId',
|
||||
'postType'
|
||||
),
|
||||
'supports' => array(
|
||||
'anchor' => true,
|
||||
'align' => array(
|
||||
@@ -3099,7 +3117,8 @@
|
||||
'textdomain' => 'default',
|
||||
'attributes' => array(
|
||||
'customText' => array(
|
||||
'type' => 'string'
|
||||
'type' => 'string',
|
||||
'default' => ''
|
||||
),
|
||||
'noTeaser' => array(
|
||||
'type' => 'boolean',
|
||||
@@ -3279,15 +3298,6 @@
|
||||
'type' => 'flex'
|
||||
)
|
||||
),
|
||||
'__experimentalStyle' => array(
|
||||
'elements' => array(
|
||||
'link' => array(
|
||||
'color' => array(
|
||||
'text' => 'inherit'
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
'interactivity' => true,
|
||||
'renaming' => false
|
||||
),
|
||||
@@ -3613,9 +3623,6 @@
|
||||
'text'
|
||||
),
|
||||
'textdomain' => 'default',
|
||||
'usesContext' => array(
|
||||
'postId'
|
||||
),
|
||||
'attributes' => array(
|
||||
'align' => array(
|
||||
'type' => 'string'
|
||||
@@ -3642,6 +3649,7 @@
|
||||
)
|
||||
),
|
||||
'supports' => array(
|
||||
'splitting' => true,
|
||||
'anchor' => true,
|
||||
'className' => false,
|
||||
'color' => array(
|
||||
@@ -4185,7 +4193,6 @@
|
||||
'full'
|
||||
),
|
||||
'color' => array(
|
||||
'__experimentalDuotone' => 'img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before',
|
||||
'text' => false,
|
||||
'background' => false
|
||||
),
|
||||
@@ -4193,7 +4200,6 @@
|
||||
'color' => true,
|
||||
'radius' => true,
|
||||
'width' => true,
|
||||
'__experimentalSelector' => 'img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay',
|
||||
'__experimentalSkipSerialization' => true,
|
||||
'__experimentalDefaultControls' => array(
|
||||
'color' => true,
|
||||
@@ -4201,6 +4207,12 @@
|
||||
'width' => true
|
||||
)
|
||||
),
|
||||
'filter' => array(
|
||||
'duotone' => true
|
||||
),
|
||||
'shadow' => array(
|
||||
'__experimentalSkipSerialization' => true
|
||||
),
|
||||
'html' => false,
|
||||
'spacing' => array(
|
||||
'margin' => true,
|
||||
@@ -4210,6 +4222,13 @@
|
||||
'clientNavigation' => true
|
||||
)
|
||||
),
|
||||
'selectors' => array(
|
||||
'border' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .block-editor-media-placeholder, .wp-block-post-featured-image .wp-block-post-featured-image__overlay',
|
||||
'shadow' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .components-placeholder',
|
||||
'filter' => array(
|
||||
'duotone' => '.wp-block-post-featured-image img, .wp-block-post-featured-image .wp-block-post-featured-image__placeholder, .wp-block-post-featured-image .components-placeholder__illustration, .wp-block-post-featured-image .components-placeholder::before'
|
||||
)
|
||||
),
|
||||
'editorStyle' => 'wp-block-post-featured-image-editor',
|
||||
'style' => 'wp-block-post-featured-image'
|
||||
),
|
||||
@@ -5035,7 +5054,7 @@
|
||||
'selector' => 'cite',
|
||||
'__experimentalRole' => 'content'
|
||||
),
|
||||
'align' => array(
|
||||
'textAlign' => array(
|
||||
'type' => 'string'
|
||||
)
|
||||
),
|
||||
@@ -5475,6 +5494,10 @@
|
||||
'attributes' => array(
|
||||
'textAlign' => array(
|
||||
'type' => 'string'
|
||||
),
|
||||
'level' => array(
|
||||
'type' => 'number',
|
||||
'default' => 0
|
||||
)
|
||||
),
|
||||
'example' => array(
|
||||
@@ -5600,7 +5623,7 @@
|
||||
'parent' => array(
|
||||
'core/social-links'
|
||||
),
|
||||
'description' => 'Display an icon linking to a social media profile or site.',
|
||||
'description' => 'Display an icon linking to a social profile or site.',
|
||||
'textdomain' => 'default',
|
||||
'attributes' => array(
|
||||
'url' => array(
|
||||
@@ -5642,7 +5665,7 @@
|
||||
'allowedBlocks' => array(
|
||||
'core/social-link'
|
||||
),
|
||||
'description' => 'Display icons linking to your social media profiles or sites.',
|
||||
'description' => 'Display icons linking to your social profiles or sites.',
|
||||
'keywords' => array(
|
||||
'links'
|
||||
),
|
||||
@@ -5802,7 +5825,7 @@
|
||||
'attributes' => array(
|
||||
'hasFixedLayout' => array(
|
||||
'type' => 'boolean',
|
||||
'default' => false
|
||||
'default' => true
|
||||
),
|
||||
'caption' => array(
|
||||
'type' => 'rich-text',
|
||||
@@ -6384,6 +6407,7 @@
|
||||
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
||||
'apiVersion' => 3,
|
||||
'name' => 'core/widget-group',
|
||||
'title' => 'Widget Group',
|
||||
'category' => 'widgets',
|
||||
'attributes' => array(
|
||||
'title' => array(
|
||||
|
||||
80
wp/wp-includes/blocks/button.php
Normal file
80
wp/wp-includes/blocks/button.php
Normal file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/button` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/button` block on the server,
|
||||
*
|
||||
* @since 6.6.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @param string $content The block content.
|
||||
* @param WP_Block $block The block object.
|
||||
*
|
||||
* @return string The block content.
|
||||
*/
|
||||
function render_block_core_button( $attributes, $content ) {
|
||||
$p = new WP_HTML_Tag_Processor( $content );
|
||||
|
||||
/*
|
||||
* The button block can render an `<a>` or `<button>` and also has a
|
||||
* `<div>` wrapper. Find the a or button tag.
|
||||
*/
|
||||
$tag = null;
|
||||
while ( $p->next_tag() ) {
|
||||
$tag = $p->get_tag();
|
||||
if ( 'A' === $tag || 'BUTTON' === $tag ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If this happens, the likelihood is there's no block content,
|
||||
* or the block has been modified by a plugin.
|
||||
*/
|
||||
if ( null === $tag ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
// If the next token is the closing tag, the button is empty.
|
||||
$is_empty = true;
|
||||
while ( $p->next_token() && $tag !== $p->get_token_name() && $is_empty ) {
|
||||
if ( '#comment' !== $p->get_token_type() ) {
|
||||
/**
|
||||
* Anything else implies this is not empty.
|
||||
* This might include any text content (including a space),
|
||||
* inline images or other HTML.
|
||||
*/
|
||||
$is_empty = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* When there's no text, render nothing for the block.
|
||||
* See https://github.com/WordPress/gutenberg/issues/17221 for the
|
||||
* reasoning behind this.
|
||||
*/
|
||||
if ( $is_empty ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/button` block on server.
|
||||
*
|
||||
* @since 6.6.0
|
||||
*/
|
||||
function register_block_core_button() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/button',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_button',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_button' );
|
||||
@@ -73,6 +73,7 @@
|
||||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"splitting": true,
|
||||
"align": false,
|
||||
"alignWide": false,
|
||||
"color": {
|
||||
|
||||
@@ -27,35 +27,4 @@ div[data-type="core/button"]{
|
||||
|
||||
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{
|
||||
text-decoration:inherit;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){
|
||||
border-width:initial;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){
|
||||
border-width:initial;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}
|
||||
@@ -27,35 +27,4 @@ div[data-type="core/button"]{
|
||||
|
||||
.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{
|
||||
text-decoration:inherit;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){
|
||||
border-width:initial;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){
|
||||
border-width:initial;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
2
wp/wp-includes/blocks/button/editor.min.css
vendored
2
wp/wp-includes/blocks/button/editor.min.css
vendored
@@ -1,2 +1,2 @@
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}
|
||||
@@ -64,47 +64,14 @@
|
||||
border-radius:0 !important;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){
|
||||
border:2px solid;
|
||||
padding:.667em 1.333em;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){
|
||||
color:currentColor;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){
|
||||
background-color:initial;
|
||||
background-image:none;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.has-border-color){
|
||||
border-width:initial;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-top-color]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-right-color]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-left-color]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-style]){
|
||||
border-width:initial;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-top-style]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-right-style]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-left-style]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){background-color:initial;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}
|
||||
@@ -64,47 +64,14 @@
|
||||
border-radius:0 !important;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){
|
||||
border:2px solid;
|
||||
padding:.667em 1.333em;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){
|
||||
color:currentColor;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){
|
||||
:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){
|
||||
background-color:initial;
|
||||
background-image:none;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link:where(.has-border-color){
|
||||
border-width:initial;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-top-color]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-right-color]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-left-color]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-style]){
|
||||
border-width:initial;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-top-style]){
|
||||
border-top-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-right-style]){
|
||||
border-right-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){
|
||||
border-bottom-width:medium;
|
||||
}
|
||||
.wp-block-button .wp-block-button__link:where([style*=border-left-style]){
|
||||
border-left-width:medium;
|
||||
}
|
||||
2
wp/wp-includes/blocks/button/style.min.css
vendored
2
wp/wp-includes/blocks/button/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){background-color:initial;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}
|
||||
@@ -8,6 +8,11 @@
|
||||
/**
|
||||
* Renders the `core/calendar` block on server.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*
|
||||
* @global int $monthnum.
|
||||
* @global int $year.
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
*
|
||||
* @return string Returns the block content.
|
||||
@@ -76,6 +81,8 @@ function render_block_core_calendar( $attributes ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/calendar` block on server.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*/
|
||||
function register_block_core_calendar() {
|
||||
register_block_type_from_metadata(
|
||||
@@ -94,6 +101,8 @@ add_action( 'init', 'register_block_core_calendar' );
|
||||
* Used to hide the calendar block when there are no published posts.
|
||||
* This compensates for a known Core bug: https://core.trac.wordpress.org/ticket/12016
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @return bool Has any published posts or not.
|
||||
*/
|
||||
function block_core_calendar_has_published_posts() {
|
||||
@@ -117,6 +126,10 @@ function block_core_calendar_has_published_posts() {
|
||||
* Queries the database for any published post and saves
|
||||
* a flag whether any published post exists or not.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @global wpdb $wpdb WordPress database abstraction object.
|
||||
*
|
||||
* @return bool Has any published posts or not.
|
||||
*/
|
||||
function block_core_calendar_update_has_published_posts() {
|
||||
@@ -132,6 +145,8 @@ if ( ! is_multisite() ) {
|
||||
/**
|
||||
* Handler for updating the has published posts flag when a post is deleted.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param int $post_id Deleted post ID.
|
||||
*/
|
||||
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
|
||||
@@ -147,6 +162,8 @@ if ( ! is_multisite() ) {
|
||||
/**
|
||||
* Handler for updating the has published posts flag when a post status changes.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param string $new_status The status the post is changing to.
|
||||
* @param string $old_status The status the post is changing from.
|
||||
* @param WP_Post $post Post object.
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/categories` block on server.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
*
|
||||
* @return string Returns the categories list/dropdown markup.
|
||||
@@ -63,6 +65,8 @@ function render_block_core_categories( $attributes ) {
|
||||
/**
|
||||
* Generates the inline script for a categories dropdown field.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*
|
||||
* @param string $dropdown_id ID of the dropdown field.
|
||||
*
|
||||
* @return string Returns the dropdown onChange redirection script.
|
||||
@@ -87,6 +91,8 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/categories` block on server.
|
||||
*
|
||||
* @since 5.0.0
|
||||
*/
|
||||
function register_block_core_categories() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comment-author-name` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -53,6 +55,8 @@ function render_block_core_comment_author_name( $attributes, $content, $block )
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-author-name` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_author_name() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comment-content` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -69,6 +71,8 @@ function render_block_core_comment_content( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-content` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_content() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comment-date` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -46,6 +48,8 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-date` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_date() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comment-edit-link` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -48,6 +50,8 @@ function render_block_core_comment_edit_link( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-edit-link` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_edit_link() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comment-reply-link` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -70,6 +72,8 @@ function render_block_core_comment_reply_link( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-reply-link` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_reply_link() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -92,6 +92,8 @@ function block_core_comment_template_render_comments( $comments, $block ) {
|
||||
/**
|
||||
* Renders the `core/comment-template` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -136,6 +138,8 @@ function render_block_core_comment_template( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-template` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comment_template() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comments-pagination-next` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -48,6 +50,8 @@ function render_block_core_comments_pagination_next( $attributes, $content, $blo
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-next` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comments_pagination_next() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comments-pagination-numbers` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -50,6 +52,8 @@ function render_block_core_comments_pagination_numbers( $attributes, $content, $
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-numbers` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comments_pagination_numbers() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comments-pagination-previous` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -40,6 +42,8 @@ function render_block_core_comments_pagination_previous( $attributes, $content,
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-previous` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comments_pagination_previous() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comments-pagination` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
*
|
||||
@@ -34,6 +36,8 @@ function render_block_core_comments_pagination( $attributes, $content ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comments_pagination() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/comments-title` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
*
|
||||
* @return string Return the post comments title.
|
||||
@@ -84,6 +86,8 @@ function render_block_core_comments_title( $attributes ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-title` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_comments_title() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
* the block is in legacy mode. If not, the HTML generated in the editor is
|
||||
* returned instead.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @global WP_Post $post Global post object.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
@@ -83,6 +87,8 @@ function render_block_core_comments( $attributes, $content, $block ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/comments` block on the server.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*/
|
||||
function register_block_core_comments() {
|
||||
register_block_type_from_metadata(
|
||||
@@ -98,6 +104,8 @@ add_action( 'init', 'register_block_core_comments' );
|
||||
/**
|
||||
* Use the button block classes for the form-submit button.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @param array $fields The default comment form arguments.
|
||||
*
|
||||
* @return array Returns the modified fields.
|
||||
@@ -116,6 +124,8 @@ add_filter( 'comment_form_defaults', 'comments_block_form_defaults' );
|
||||
* Enqueues styles from the legacy `core/post-comments` block. These styles are
|
||||
* required only by the block's fallback.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @param string $block_name Name of the new block type.
|
||||
*/
|
||||
function enqueue_legacy_post_comments_block_styles( $block_name ) {
|
||||
@@ -141,6 +151,8 @@ function enqueue_legacy_post_comments_block_styles( $block_name ) {
|
||||
* The same approach was followed when core/query-loop was renamed to
|
||||
* core/post-template.
|
||||
*
|
||||
* @since 6.1.0
|
||||
*
|
||||
* @see https://github.com/WordPress/gutenberg/pull/41807
|
||||
* @see https://github.com/WordPress/gutenberg/pull/32514
|
||||
*/
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* Renders the `core/cover` block on server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @param string $content The block rendered content.
|
||||
*
|
||||
@@ -66,6 +68,8 @@ function render_block_core_cover( $attributes, $content ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/cover` block renderer on server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*/
|
||||
function register_block_core_cover() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
"anchor": true,
|
||||
"align": true,
|
||||
"html": false,
|
||||
"shadow": true,
|
||||
"spacing": {
|
||||
"padding": true,
|
||||
"margin": [ "top", "bottom" ],
|
||||
|
||||
@@ -17,9 +17,17 @@
|
||||
.wp-block-cover.components-placeholder h2{
|
||||
color:inherit;
|
||||
}
|
||||
.wp-block-cover.is-transient{
|
||||
position:relative;
|
||||
}
|
||||
.wp-block-cover.is-transient:before{
|
||||
background-color:#fff;
|
||||
content:"";
|
||||
height:100%;
|
||||
opacity:.3;
|
||||
position:absolute;
|
||||
width:100%;
|
||||
z-index:1;
|
||||
}
|
||||
.wp-block-cover .components-spinner{
|
||||
margin:0;
|
||||
@@ -78,8 +86,4 @@
|
||||
|
||||
.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){
|
||||
margin-top:24px;
|
||||
}
|
||||
|
||||
.wp-block-cover:after{
|
||||
min-height:auto;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}.wp-block-cover:after{min-height:auto}
|
||||
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:right}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-right:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}
|
||||
@@ -17,9 +17,17 @@
|
||||
.wp-block-cover.components-placeholder h2{
|
||||
color:inherit;
|
||||
}
|
||||
.wp-block-cover.is-transient{
|
||||
position:relative;
|
||||
}
|
||||
.wp-block-cover.is-transient:before{
|
||||
background-color:#fff;
|
||||
content:"";
|
||||
height:100%;
|
||||
opacity:.3;
|
||||
position:absolute;
|
||||
width:100%;
|
||||
z-index:1;
|
||||
}
|
||||
.wp-block-cover .components-spinner{
|
||||
left:50%;
|
||||
@@ -78,8 +86,4 @@
|
||||
|
||||
.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){
|
||||
margin-top:24px;
|
||||
}
|
||||
|
||||
.wp-block-cover:after{
|
||||
min-height:auto;
|
||||
}
|
||||
2
wp/wp-includes/blocks/cover/editor.min.css
vendored
2
wp/wp-includes/blocks/cover/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient:before{background-color:#fff;opacity:.3}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}.wp-block-cover:after{min-height:auto}
|
||||
.editor-styles-wrapper .wp-block-cover{box-sizing:border-box}.wp-block-cover.is-placeholder{align-items:stretch;display:flex;min-height:240px;padding:0!important}.wp-block-cover.is-placeholder .components-placeholder.is-large{justify-content:flex-start;z-index:1}.wp-block-cover.is-placeholder:focus:after{min-height:auto}.wp-block-cover.components-placeholder h2{color:inherit}.wp-block-cover.is-transient{position:relative}.wp-block-cover.is-transient:before{background-color:#fff;content:"";height:100%;opacity:.3;position:absolute;width:100%;z-index:1}.wp-block-cover .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%);z-index:1}.wp-block-cover .wp-block-cover__inner-container{margin-left:0;margin-right:0;text-align:left}.wp-block-cover .wp-block-cover__placeholder-background-options{width:100%}.wp-block-cover .wp-block-cover__image--placeholder-image{bottom:0;left:0;position:absolute;right:0;top:0}[data-align=left]>.wp-block-cover,[data-align=right]>.wp-block-cover{max-width:420px;width:100%}.block-library-cover__reset-button{margin-left:auto}.block-library-cover__resize-container{bottom:0;left:0;min-height:50px;position:absolute!important;right:0;top:0}.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .block-library-cover__resize-container,.components-popover.block-editor-block-popover.block-library-cover__resizable-box-popover .components-popover__content>div{overflow:visible;pointer-events:none}.wp-block-cover>.components-drop-zone .components-drop-zone__content{opacity:.8!important}.block-editor-block-patterns-list__list-item .has-parallax.wp-block-cover{background-attachment:scroll}.color-block-support-panel__inner-wrapper>:not(.block-editor-tools-panel-color-gradient-settings__item){margin-top:24px}
|
||||
@@ -96,17 +96,6 @@
|
||||
max-width:420px;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-cover-image:after,.wp-block-cover:after{
|
||||
content:"";
|
||||
display:block;
|
||||
font-size:0;
|
||||
min-height:inherit;
|
||||
}
|
||||
@supports (position:sticky){
|
||||
.wp-block-cover-image:after,.wp-block-cover:after{
|
||||
content:none;
|
||||
}
|
||||
}
|
||||
.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{
|
||||
display:flex;
|
||||
}
|
||||
@@ -115,9 +104,6 @@
|
||||
width:100%;
|
||||
z-index:1;
|
||||
}
|
||||
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
|
||||
color:inherit;
|
||||
}
|
||||
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{
|
||||
align-items:flex-start;
|
||||
justify-content:flex-start;
|
||||
@@ -239,4 +225,8 @@
|
||||
|
||||
:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){
|
||||
color:#000;
|
||||
}
|
||||
|
||||
:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){
|
||||
color:inherit;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -96,17 +96,6 @@
|
||||
max-width:420px;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-cover-image:after,.wp-block-cover:after{
|
||||
content:"";
|
||||
display:block;
|
||||
font-size:0;
|
||||
min-height:inherit;
|
||||
}
|
||||
@supports (position:sticky){
|
||||
.wp-block-cover-image:after,.wp-block-cover:after{
|
||||
content:none;
|
||||
}
|
||||
}
|
||||
.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{
|
||||
display:flex;
|
||||
}
|
||||
@@ -115,9 +104,6 @@
|
||||
width:100%;
|
||||
z-index:1;
|
||||
}
|
||||
.wp-block-cover h1:where(:not(.has-text-color)),.wp-block-cover h2:where(:not(.has-text-color)),.wp-block-cover h3:where(:not(.has-text-color)),.wp-block-cover h4:where(:not(.has-text-color)),.wp-block-cover h5:where(:not(.has-text-color)),.wp-block-cover h6:where(:not(.has-text-color)),.wp-block-cover p:where(:not(.has-text-color)),.wp-block-cover-image h1:where(:not(.has-text-color)),.wp-block-cover-image h2:where(:not(.has-text-color)),.wp-block-cover-image h3:where(:not(.has-text-color)),.wp-block-cover-image h4:where(:not(.has-text-color)),.wp-block-cover-image h5:where(:not(.has-text-color)),.wp-block-cover-image h6:where(:not(.has-text-color)),.wp-block-cover-image p:where(:not(.has-text-color)){
|
||||
color:inherit;
|
||||
}
|
||||
.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{
|
||||
align-items:flex-start;
|
||||
justify-content:flex-start;
|
||||
@@ -239,4 +225,8 @@
|
||||
|
||||
:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){
|
||||
color:#000;
|
||||
}
|
||||
|
||||
:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){
|
||||
color:inherit;
|
||||
}
|
||||
2
wp/wp-includes/blocks/cover/style.min.css
vendored
2
wp/wp-includes/blocks/cover/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -19,6 +19,7 @@
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"__experimentalOnEnter": true,
|
||||
"align": [ "wide", "full" ],
|
||||
"color": {
|
||||
"gradients": true,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
.wp-block-details{
|
||||
box-sizing:border-box;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.wp-block-details summary{
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-details{box-sizing:border-box;overflow:hidden}.wp-block-details summary{cursor:pointer}
|
||||
.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}
|
||||
@@ -1,6 +1,5 @@
|
||||
.wp-block-details{
|
||||
box-sizing:border-box;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
.wp-block-details summary{
|
||||
|
||||
2
wp/wp-includes/blocks/details/style.min.css
vendored
2
wp/wp-includes/blocks/details/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-details{box-sizing:border-box;overflow:hidden}.wp-block-details summary{cursor:pointer}
|
||||
.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}
|
||||
@@ -11,9 +11,6 @@
|
||||
word-break:break-word;
|
||||
}
|
||||
|
||||
.wp-block-embed__learn-more{
|
||||
margin-top:1em;
|
||||
}
|
||||
.wp-block-post-content .wp-block-embed__learn-more a{
|
||||
color:var(--wp-admin-theme-color);
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-embed__learn-more{margin-top:1em}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}
|
||||
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}
|
||||
@@ -11,9 +11,6 @@
|
||||
word-break:break-word;
|
||||
}
|
||||
|
||||
.wp-block-embed__learn-more{
|
||||
margin-top:1em;
|
||||
}
|
||||
.wp-block-post-content .wp-block-embed__learn-more a{
|
||||
color:var(--wp-admin-theme-color);
|
||||
}
|
||||
|
||||
2
wp/wp-includes/blocks/embed/editor.min.css
vendored
2
wp/wp-includes/blocks/embed/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-embed__learn-more{margin-top:1em}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}
|
||||
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-post-content .wp-block-embed__learn-more a{color:var(--wp-admin-theme-color)}.block-library-embed__interactive-overlay{bottom:0;left:0;opacity:0;position:absolute;right:0;top:0}.wp-block[data-align=left]>.wp-block-embed,.wp-block[data-align=right]>.wp-block-embed{max-width:360px;width:100%}.wp-block[data-align=left]>.wp-block-embed .wp-block-embed__wrapper,.wp-block[data-align=right]>.wp-block-embed .wp-block-embed__wrapper{min-width:280px}
|
||||
@@ -14,7 +14,7 @@
|
||||
.wp-block-embed{
|
||||
overflow-wrap:break-word;
|
||||
}
|
||||
.wp-block-embed figcaption{
|
||||
.wp-block-embed :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed figcaption{margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}
|
||||
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}
|
||||
@@ -14,7 +14,7 @@
|
||||
.wp-block-embed{
|
||||
overflow-wrap:break-word;
|
||||
}
|
||||
.wp-block-embed figcaption{
|
||||
.wp-block-embed :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
|
||||
2
wp/wp-includes/blocks/embed/style.min.css
vendored
2
wp/wp-includes/blocks/embed/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed figcaption{margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}
|
||||
.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}
|
||||
@@ -1,9 +1,9 @@
|
||||
.wp-block-embed figcaption{
|
||||
.wp-block-embed :where(figcaption){
|
||||
color:#555;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-embed figcaption{
|
||||
.is-dark-theme .wp-block-embed :where(figcaption){
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:#ffffffa6}.wp-block-embed{margin:0 0 1em}
|
||||
.wp-block-embed :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed :where(figcaption){color:#ffffffa6}.wp-block-embed{margin:0 0 1em}
|
||||
@@ -1,9 +1,9 @@
|
||||
.wp-block-embed figcaption{
|
||||
.wp-block-embed :where(figcaption){
|
||||
color:#555;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-embed figcaption{
|
||||
.is-dark-theme .wp-block-embed :where(figcaption){
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
|
||||
2
wp/wp-includes/blocks/embed/theme.min.css
vendored
2
wp/wp-includes/blocks/embed/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:#ffffffa6}.wp-block-embed{margin:0 0 1em}
|
||||
.wp-block-embed :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed :where(figcaption){color:#ffffffa6}.wp-block-embed{margin:0 0 1em}
|
||||
@@ -8,6 +8,8 @@
|
||||
/**
|
||||
* When the `core/file` block is rendering, check if we need to enqueue the `wp-block-file-view` script.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @param string $content The block content.
|
||||
* @param WP_Block $block The parsed block.
|
||||
@@ -15,27 +17,6 @@
|
||||
* @return string Returns the block content.
|
||||
*/
|
||||
function render_block_core_file( $attributes, $content ) {
|
||||
// Update object's aria-label attribute if present in block HTML.
|
||||
// Match an aria-label attribute from an object tag.
|
||||
$pattern = '@<object.+(?<attribute>aria-label="(?<filename>[^"]+)?")@i';
|
||||
$content = preg_replace_callback(
|
||||
$pattern,
|
||||
static function ( $matches ) {
|
||||
$filename = ! empty( $matches['filename'] ) ? $matches['filename'] : '';
|
||||
$has_filename = ! empty( $filename ) && 'PDF embed' !== $filename;
|
||||
$label = $has_filename ?
|
||||
sprintf(
|
||||
/* translators: %s: filename. */
|
||||
__( 'Embed of %s.' ),
|
||||
$filename
|
||||
)
|
||||
: __( 'PDF embed' );
|
||||
|
||||
return str_replace( $matches['attribute'], sprintf( 'aria-label="%s"', $label ), $matches[0] );
|
||||
},
|
||||
$content
|
||||
);
|
||||
|
||||
// If it's interactive, enqueue the script module and add the directives.
|
||||
if ( ! empty( $attributes['displayPreview'] ) ) {
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
@@ -57,6 +38,19 @@ function render_block_core_file( $attributes, $content ) {
|
||||
$processor->next_tag( 'object' );
|
||||
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
|
||||
$processor->set_attribute( 'hidden', true );
|
||||
|
||||
$filename = $processor->get_attribute( 'aria-label' );
|
||||
$has_filename = ! empty( $filename ) && 'PDF embed' !== $filename;
|
||||
$label = $has_filename ? sprintf(
|
||||
/* translators: %s: filename. */
|
||||
__( 'Embed of %s.' ),
|
||||
$filename
|
||||
) : __( 'PDF embed' );
|
||||
|
||||
// Update object's aria-label attribute if present in block HTML.
|
||||
// Match an aria-label attribute from an object tag.
|
||||
$processor->set_attribute( 'aria-label', $label );
|
||||
|
||||
return $processor->get_updated_html();
|
||||
}
|
||||
|
||||
@@ -65,6 +59,8 @@ function render_block_core_file( $attributes, $content ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/file` block on server.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*/
|
||||
function register_block_core_file() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
|
||||
height:auto;
|
||||
}
|
||||
.wp-block[data-align=center]>.wp-block-file{
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-file .components-resizable-box__container{
|
||||
margin-bottom:1em;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-right:.75em}
|
||||
.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-right:.75em}
|
||||
@@ -8,6 +8,9 @@
|
||||
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
|
||||
height:auto;
|
||||
}
|
||||
.wp-block[data-align=center]>.wp-block-file{
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-file .components-resizable-box__container{
|
||||
margin-bottom:1em;
|
||||
}
|
||||
|
||||
2
wp/wp-includes/blocks/file/editor.min.css
vendored
2
wp/wp-includes/blocks/file/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-left:.75em}
|
||||
.wp-block-file{align-items:center;display:flex;flex-wrap:wrap;justify-content:space-between;margin-bottom:0}.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{height:auto}.wp-block[data-align=center]>.wp-block-file{text-align:center}.wp-block-file .components-resizable-box__container{margin-bottom:1em}.wp-block-file .wp-block-file__preview{height:100%;margin-bottom:1em;width:100%}.wp-block-file .wp-block-file__preview-overlay{bottom:0;left:0;position:absolute;right:0;top:0}.wp-block-file .wp-block-file__content-wrapper{flex-grow:1}.wp-block-file a{min-width:1em}.wp-block-file a:not(.wp-block-file__button){display:inline-block}.wp-block-file .wp-block-file__button-richtext-wrapper{display:inline-block;margin-left:.75em}
|
||||
@@ -13,6 +13,8 @@
|
||||
* we add a custom `data-id` attribute before rendering the gallery
|
||||
* so that the Image Block can pick it up in its render_callback.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param array $parsed_block The block being rendered.
|
||||
* @return array The migrated block object.
|
||||
*/
|
||||
@@ -35,6 +37,8 @@ add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility'
|
||||
/**
|
||||
* Renders the `core/gallery` block on the server.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes Attributes of the block being rendered.
|
||||
* @param string $content Content of the block being rendered.
|
||||
* @return string The content of the block being rendered.
|
||||
@@ -127,7 +131,7 @@ function block_core_gallery_render( $attributes, $content ) {
|
||||
* the `$parsed_block['innerBlocks']` via the `render_block_data` hook.
|
||||
* However, this hook doesn't apply inner block updates when blocks are
|
||||
* nested.
|
||||
* @todo: In the future, if this hook supports updating innerBlocks in
|
||||
* @todo In the future, if this hook supports updating innerBlocks in
|
||||
* nested blocks, it should be refactored.
|
||||
*
|
||||
* @see: https://github.com/WordPress/gutenberg/pull/58733
|
||||
@@ -164,6 +168,8 @@ function block_core_gallery_render( $attributes, $content ) {
|
||||
}
|
||||
/**
|
||||
* Registers the `core/gallery` block on server.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*/
|
||||
function register_block_core_gallery() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
figure.wp-block-gallery{
|
||||
:root :where(figure.wp-block-gallery){
|
||||
display:block;
|
||||
}
|
||||
figure.wp-block-gallery>.blocks-gallery-caption{
|
||||
:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{
|
||||
flex:0 0 100%;
|
||||
}
|
||||
figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{
|
||||
:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{
|
||||
flex-basis:100%;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice.is-error{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{
|
||||
display:block;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice__content{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{
|
||||
margin:4px 0;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice__dismiss{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{
|
||||
left:5px;
|
||||
position:absolute;
|
||||
top:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||
display:none;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||
margin-bottom:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{
|
||||
margin:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{
|
||||
display:flex;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder figcaption{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{
|
||||
z-index:2;
|
||||
}
|
||||
figure.wp-block-gallery .components-spinner{
|
||||
:root :where(figure.wp-block-gallery) .components-spinner{
|
||||
margin-right:-9px;
|
||||
margin-top:-9px;
|
||||
position:absolute;
|
||||
|
||||
@@ -1 +1 @@
|
||||
figure.wp-block-gallery{display:block}figure.wp-block-gallery>.blocks-gallery-caption{flex:0 0 100%}figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}figure.wp-block-gallery .wp-block-image .components-notice.is-error{display:block}figure.wp-block-gallery .wp-block-image .components-notice__content{margin:4px 0}figure.wp-block-gallery .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
|
||||
:root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.gallery-settings-buttons .components-button:first-child{margin-left:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 4px 0 8px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{right:-2px}.block-library-gallery-item__inline-menu.is-right{left:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
|
||||
@@ -1,39 +1,39 @@
|
||||
figure.wp-block-gallery{
|
||||
:root :where(figure.wp-block-gallery){
|
||||
display:block;
|
||||
}
|
||||
figure.wp-block-gallery>.blocks-gallery-caption{
|
||||
:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{
|
||||
flex:0 0 100%;
|
||||
}
|
||||
figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{
|
||||
:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{
|
||||
flex-basis:100%;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice.is-error{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{
|
||||
display:block;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice__content{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{
|
||||
margin:4px 0;
|
||||
}
|
||||
figure.wp-block-gallery .wp-block-image .components-notice__dismiss{
|
||||
:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{
|
||||
position:absolute;
|
||||
right:5px;
|
||||
top:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||
display:none;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||
margin-bottom:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{
|
||||
margin:0;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{
|
||||
display:flex;
|
||||
}
|
||||
figure.wp-block-gallery .block-editor-media-placeholder figcaption{
|
||||
:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{
|
||||
z-index:2;
|
||||
}
|
||||
figure.wp-block-gallery .components-spinner{
|
||||
:root :where(figure.wp-block-gallery) .components-spinner{
|
||||
left:50%;
|
||||
margin-left:-9px;
|
||||
margin-top:-9px;
|
||||
|
||||
2
wp/wp-includes/blocks/gallery/editor.min.css
vendored
2
wp/wp-includes/blocks/gallery/editor.min.css
vendored
@@ -1 +1 @@
|
||||
figure.wp-block-gallery{display:block}figure.wp-block-gallery>.blocks-gallery-caption{flex:0 0 100%}figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}figure.wp-block-gallery .wp-block-image .components-notice.is-error{display:block}figure.wp-block-gallery .wp-block-image .components-notice__content{margin:4px 0}figure.wp-block-gallery .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
|
||||
:root :where(figure.wp-block-gallery){display:block}:root :where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:root :where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:root :where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:root :where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}:root :where(figure.wp-block-gallery) .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid #0000;pointer-events:none;position:absolute;right:0;top:0;z-index:1}.blocks-gallery-item figure.is-transient img{opacity:.3}.blocks-gallery-item .is-selected .block-library-gallery-item__inline-menu{display:inline-flex}.blocks-gallery-item .block-editor-media-placeholder{height:100%;margin:0}.blocks-gallery-item .block-editor-media-placeholder .components-placeholder__label{display:flex}.block-library-gallery-item__inline-menu{background:#fff;border:1px solid #1e1e1e;border-radius:2px;display:none;margin:8px;position:absolute;top:-2px;transition:box-shadow .2s ease-out;z-index:20}@media (prefers-reduced-motion:reduce){.block-library-gallery-item__inline-menu{transition-delay:0s;transition-duration:0s}}.block-library-gallery-item__inline-menu:hover{box-shadow:0 .7px 1px #0000001a,0 1.2px 1.7px -.2px #0000001a,0 2.3px 3.3px -.5px #0000001a}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu,.columns-8 .block-library-gallery-item__inline-menu{padding:2px}}.block-library-gallery-item__inline-menu .components-button.has-icon:not(:focus){border:none;box-shadow:none}@media (min-width:600px){.columns-7 .block-library-gallery-item__inline-menu .components-button.has-icon,.columns-8 .block-library-gallery-item__inline-menu .components-button.has-icon{height:inherit;padding:0;width:inherit}}.block-library-gallery-item__inline-menu.is-left{left:-2px}.block-library-gallery-item__inline-menu.is-right{right:-2px}.wp-block-gallery ul.blocks-gallery-grid{margin:0;padding:0}@media (min-width:600px){.wp-block-update-gallery-modal{max-width:480px}}.wp-block-update-gallery-modal-buttons{display:flex;gap:12px;justify-content:flex-end}
|
||||
@@ -42,49 +42,6 @@
|
||||
right:0;
|
||||
top:0;
|
||||
}
|
||||
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
|
||||
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
|
||||
pointer-events:all;
|
||||
}
|
||||
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations{
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
flex-wrap:wrap;
|
||||
justify-content:center;
|
||||
list-style:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-group__placeholder .components-placeholder__instructions{
|
||||
margin-bottom:18px;
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{
|
||||
fill:#ccc !important;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{
|
||||
fill:var(--wp-admin-theme-color) !important;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin:0 12px 12px;
|
||||
width:auto;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{
|
||||
height:32px;
|
||||
padding:0;
|
||||
width:44px;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{
|
||||
box-shadow:none;
|
||||
}
|
||||
.wp-block-group__placeholder .components-placeholder{
|
||||
min-height:auto;
|
||||
padding:24px;
|
||||
}
|
||||
.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{
|
||||
margin:12px;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}.wp-block-group__placeholder .wp-block-group-placeholder__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:0;width:100%}.wp-block-group__placeholder .components-placeholder__instructions{margin-bottom:18px;text-align:center}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{fill:#ccc!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{fill:var(--wp-admin-theme-color)!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{align-items:center;display:flex;flex-direction:column;margin:0 12px 12px;width:auto}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{height:32px;padding:0;width:44px}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{box-shadow:none}.wp-block-group__placeholder .components-placeholder{min-height:auto;padding:24px}.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{margin:12px}
|
||||
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}
|
||||
@@ -42,49 +42,6 @@
|
||||
right:0;
|
||||
top:0;
|
||||
}
|
||||
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
|
||||
.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{
|
||||
pointer-events:all;
|
||||
}
|
||||
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations{
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
flex-wrap:wrap;
|
||||
justify-content:center;
|
||||
list-style:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-group__placeholder .components-placeholder__instructions{
|
||||
margin-bottom:18px;
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{
|
||||
fill:#ccc !important;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{
|
||||
fill:var(--wp-admin-theme-color) !important;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
margin:0 12px 12px;
|
||||
width:auto;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{
|
||||
height:32px;
|
||||
padding:0;
|
||||
width:44px;
|
||||
}
|
||||
.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{
|
||||
box-shadow:none;
|
||||
}
|
||||
.wp-block-group__placeholder .components-placeholder{
|
||||
min-height:auto;
|
||||
padding:24px;
|
||||
}
|
||||
.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{
|
||||
margin:12px;
|
||||
}
|
||||
2
wp/wp-includes/blocks/group/editor.min.css
vendored
2
wp/wp-includes/blocks/group/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}.wp-block-group__placeholder .wp-block-group-placeholder__variations{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;list-style:none;margin:0;padding:0;width:100%}.wp-block-group__placeholder .components-placeholder__instructions{margin-bottom:18px;text-align:center}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg{fill:#ccc!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations svg:hover{fill:var(--wp-admin-theme-color)!important}.wp-block-group__placeholder .wp-block-group-placeholder__variations>li{align-items:center;display:flex;flex-direction:column;margin:0 12px 12px;width:auto}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button{height:32px;padding:0;width:44px}.wp-block-group__placeholder .wp-block-group-placeholder__variations li>.wp-block-group-placeholder__variation-button:hover{box-shadow:none}.wp-block-group__placeholder .components-placeholder{min-height:auto;padding:24px}.wp-block-group__placeholder .is-medium .wp-block-group-placeholder__variations>li,.wp-block-group__placeholder .is-small .wp-block-group-placeholder__variations>li{margin:12px}
|
||||
.wp-block-group .block-editor-block-list__insertion-point{left:0;right:0}[data-type="core/group"].is-selected .block-list-appender{margin-left:0;margin-right:0}[data-type="core/group"].is-selected .has-background .block-list-appender{margin-bottom:18px;margin-top:18px}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child{gap:inherit;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-default-block-appender__content,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{display:inherit;flex:1;flex-direction:inherit;width:100%}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after{border:1px dashed;border-radius:2px;content:"";display:flex;flex:1 0 48px;min-height:46px;pointer-events:none}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child:after:before{background:currentColor;bottom:0;content:"";left:0;opacity:.1;pointer-events:none;position:absolute;right:0;top:0}.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-button-block-appender,.wp-block-group.is-layout-flex.block-editor-block-list__block>.block-list-appender:only-child .block-editor-inserter{pointer-events:all}
|
||||
@@ -1,3 +1,7 @@
|
||||
.wp-block-group{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
:where(.wp-block-group.wp-block-group-is-layout-constrained){
|
||||
position:relative;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block-group{box-sizing:border-box}
|
||||
.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}
|
||||
@@ -1,3 +1,7 @@
|
||||
.wp-block-group{
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
:where(.wp-block-group.wp-block-group-is-layout-constrained){
|
||||
position:relative;
|
||||
}
|
||||
2
wp/wp-includes/blocks/group/style.min.css
vendored
2
wp/wp-includes/blocks/group/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-group{box-sizing:border-box}
|
||||
.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}
|
||||
@@ -14,6 +14,8 @@
|
||||
* Would be transformed to:
|
||||
* <h2 class="align-left wp-block-heading">Hello World</h2>
|
||||
*
|
||||
* @since 6.2.0
|
||||
*
|
||||
* @param array $attributes Attributes of the block being rendered.
|
||||
* @param string $content Content of the block being rendered.
|
||||
*
|
||||
@@ -39,6 +41,8 @@ function block_core_heading_render( $attributes, $content ) {
|
||||
|
||||
/**
|
||||
* Registers the `core/heading` block on server.
|
||||
*
|
||||
* @since 6.2.0
|
||||
*/
|
||||
function register_block_core_heading() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
"align": [ "wide", "full" ],
|
||||
"anchor": true,
|
||||
"className": true,
|
||||
"splitting": true,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
* Build an array with CSS classes and inline styles defining the colors
|
||||
* which will be applied to the home link markup in the front-end.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $context home link block context.
|
||||
* @return array Colors CSS classes and inline styles.
|
||||
*/
|
||||
@@ -61,6 +63,8 @@ function block_core_home_link_build_css_colors( $context ) {
|
||||
* Build an array with CSS classes and inline styles defining the font sizes
|
||||
* which will be applied to the home link markup in the front-end.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $context Home link block context.
|
||||
* @return array Font size CSS classes and inline styles.
|
||||
*/
|
||||
@@ -88,6 +92,8 @@ function block_core_home_link_build_css_font_sizes( $context ) {
|
||||
/**
|
||||
* Builds an array with classes and style for the li wrapper
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $context Home link block context.
|
||||
* @return string The li wrapper attributes.
|
||||
*/
|
||||
@@ -121,6 +127,8 @@ function block_core_home_link_build_li_wrapper_attributes( $context ) {
|
||||
/**
|
||||
* Renders the `core/home-link` block.
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @param string $content The saved content.
|
||||
* @param WP_Block $block The parsed block.
|
||||
@@ -155,6 +163,8 @@ function render_block_core_home_link( $attributes, $content, $block ) {
|
||||
/**
|
||||
* Register the home block
|
||||
*
|
||||
* @since 6.0.0
|
||||
*
|
||||
* @uses render_block_core_home_link()
|
||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
box-shadow:none !important;
|
||||
box-sizing:border-box;
|
||||
color:#1e1e1e !important;
|
||||
direction:ltr;
|
||||
font-family:Menlo,Consolas,monaco,monospace !important;
|
||||
font-size:16px !important;
|
||||
max-height:250px;
|
||||
|
||||
@@ -1 +1 @@
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;position:absolute;right:0;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{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}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text: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}
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;position:absolute;right:0;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;direction:ltr;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text: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}
|
||||
@@ -12,6 +12,7 @@
|
||||
box-shadow:none !important;
|
||||
box-sizing:border-box;
|
||||
color:#1e1e1e !important;
|
||||
direction:ltr;
|
||||
font-family:Menlo,Consolas,monaco,monospace !important;
|
||||
font-size:16px !important;
|
||||
max-height:250px;
|
||||
|
||||
2
wp/wp-includes/blocks/html/editor.min.css
vendored
2
wp/wp-includes/blocks/html/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;left:0;position:absolute;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{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}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text: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}
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;left:0;position:absolute;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;direction:ltr;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text: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}
|
||||
@@ -9,6 +9,8 @@
|
||||
* Renders the `core/image` block on the server,
|
||||
* adding a data-id attribute to the element if core/gallery has added on pre-render.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*
|
||||
* @param array $attributes The block attributes.
|
||||
* @param string $content The block content.
|
||||
* @param WP_Block $block The block object.
|
||||
@@ -26,12 +28,33 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$has_id_binding = isset( $attributes['metadata']['bindings']['id'] ) && isset( $attributes['id'] );
|
||||
|
||||
// Ensure the `wp-image-id` classname on the image block supports block bindings.
|
||||
if ( $has_id_binding ) {
|
||||
// If there's a mismatch with the 'wp-image-' class and the actual id, the id was
|
||||
// probably overridden by block bindings. Update it to the correct value.
|
||||
// See https://github.com/WordPress/gutenberg/issues/62886 for why this is needed.
|
||||
$id = $attributes['id'];
|
||||
$image_classnames = $p->get_attribute( 'class' );
|
||||
$class_with_binding_value = "wp-image-$id";
|
||||
if ( is_string( $image_classnames ) && ! str_contains( $image_classnames, $class_with_binding_value ) ) {
|
||||
$image_classnames = preg_replace( '/wp-image-(\d+)/', $class_with_binding_value, $image_classnames );
|
||||
$p->set_attribute( 'class', $image_classnames );
|
||||
}
|
||||
}
|
||||
|
||||
// For backwards compatibility, the data-id html attribute is only set for
|
||||
// image blocks nested in a gallery. Detect if the image is in a gallery by
|
||||
// checking the data-id attribute.
|
||||
// See the `block_core_gallery_data_id_backcompatibility` function.
|
||||
if ( isset( $attributes['data-id'] ) ) {
|
||||
// Adds the data-id="$id" attribute to the img element to provide backwards
|
||||
// compatibility for the Gallery Block, which now wraps Image Blocks within
|
||||
// innerBlocks. The data-id attribute is added in a core/gallery
|
||||
// `render_block_data` hook.
|
||||
$p->set_attribute( 'data-id', $attributes['data-id'] );
|
||||
// If there's a binding for the `id`, the `id` attribute is used for the
|
||||
// value, since `data-id` does not support block bindings.
|
||||
// Else the `data-id` is used for backwards compatibility, since
|
||||
// third parties may be filtering its value.
|
||||
$data_id = $has_id_binding ? $attributes['id'] : $attributes['data-id'];
|
||||
$p->set_attribute( 'data-id', $data_id );
|
||||
}
|
||||
|
||||
$link_destination = isset( $attributes['linkDestination'] ) ? $attributes['linkDestination'] : 'none';
|
||||
@@ -85,6 +108,8 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||
*
|
||||
* This is used to determine whether the lightbox should be rendered or not.
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @param array $block Block data.
|
||||
*
|
||||
* @return array Filtered block data.
|
||||
@@ -115,6 +140,8 @@ function block_core_image_get_lightbox_settings( $block ) {
|
||||
/**
|
||||
* Adds the directives and layout needed for the lightbox behavior.
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @param string $block_content Rendered block content.
|
||||
* @param array $block Block object.
|
||||
*
|
||||
@@ -182,12 +209,12 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
// Image.
|
||||
$p->next_tag( 'img' );
|
||||
$p->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on--load', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on-window--resize', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on-async--load', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on-async-window--resize', 'callbacks.setButtonStyles' );
|
||||
// Sets an event callback on the `img` because the `figure` element can also
|
||||
// contain a caption, and we don't want to trigger the lightbox when the
|
||||
// caption is clicked.
|
||||
$p->set_attribute( 'data-wp-on--click', 'actions.showLightbox' );
|
||||
$p->set_attribute( 'data-wp-on-async--click', 'actions.showLightbox' );
|
||||
|
||||
$body_content = $p->get_updated_html();
|
||||
|
||||
@@ -203,7 +230,7 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
aria-haspopup="dialog"
|
||||
aria-label="' . esc_attr( $aria_label ) . '"
|
||||
data-wp-init="callbacks.initTriggerButton"
|
||||
data-wp-on--click="actions.showLightbox"
|
||||
data-wp-on-async--click="actions.showLightbox"
|
||||
data-wp-style--right="context.imageButtonRight"
|
||||
data-wp-style--top="context.imageButtonTop"
|
||||
>
|
||||
@@ -219,6 +246,9 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
return $body_content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 6.5.0
|
||||
*/
|
||||
function block_core_image_print_lightbox_overlay() {
|
||||
$close_button_label = esc_attr__( 'Close' );
|
||||
|
||||
@@ -238,7 +268,7 @@ function block_core_image_print_lightbox_overlay() {
|
||||
}
|
||||
|
||||
echo <<<HTML
|
||||
<div
|
||||
<div
|
||||
class="wp-lightbox-overlay zoom"
|
||||
data-wp-interactive="core/image"
|
||||
data-wp-context='{}'
|
||||
@@ -249,12 +279,12 @@ function block_core_image_print_lightbox_overlay() {
|
||||
data-wp-class--show-closing-animation="state.showClosingAnimation"
|
||||
data-wp-watch="callbacks.setOverlayFocus"
|
||||
data-wp-on--keydown="actions.handleKeydown"
|
||||
data-wp-on--touchstart="actions.handleTouchStart"
|
||||
data-wp-on-async--touchstart="actions.handleTouchStart"
|
||||
data-wp-on--touchmove="actions.handleTouchMove"
|
||||
data-wp-on--touchend="actions.handleTouchEnd"
|
||||
data-wp-on--click="actions.hideLightbox"
|
||||
data-wp-on-window--resize="callbacks.setOverlayStyles"
|
||||
data-wp-on-window--scroll="actions.handleScroll"
|
||||
data-wp-on-async--touchend="actions.handleTouchEnd"
|
||||
data-wp-on-async--click="actions.hideLightbox"
|
||||
data-wp-on-async-window--resize="callbacks.setOverlayStyles"
|
||||
data-wp-on-async-window--scroll="actions.handleScroll"
|
||||
tabindex="-1"
|
||||
>
|
||||
<button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button">
|
||||
@@ -278,6 +308,8 @@ HTML;
|
||||
|
||||
/**
|
||||
* Registers the `core/image` block on server.
|
||||
*
|
||||
* @since 5.9.0
|
||||
*/
|
||||
function register_block_core_image() {
|
||||
register_block_type_from_metadata(
|
||||
|
||||
@@ -96,6 +96,9 @@ figure.wp-block-image:not(.wp-block){
|
||||
position:relative;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-image__crop-area .reactEasyCrop_Container{
|
||||
pointer-events:auto;
|
||||
}
|
||||
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
||||
border:none;
|
||||
border-radius:0;
|
||||
@@ -117,18 +120,6 @@ figure.wp-block-image:not(.wp-block){
|
||||
overflow:visible !important;
|
||||
}
|
||||
|
||||
.wp-block-image__aspect-ratio{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
height:46px;
|
||||
margin-bottom:-8px;
|
||||
}
|
||||
.wp-block-image__aspect-ratio .components-button{
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
width:36px;
|
||||
}
|
||||
|
||||
.wp-block-image__toolbar_content_textarea{
|
||||
width:250px;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}.wp-block-image__toolbar_content_textarea{width:250px}
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px}
|
||||
@@ -96,6 +96,9 @@ figure.wp-block-image:not(.wp-block){
|
||||
position:relative;
|
||||
width:100%;
|
||||
}
|
||||
.wp-block-image__crop-area .reactEasyCrop_Container{
|
||||
pointer-events:auto;
|
||||
}
|
||||
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
||||
border:none;
|
||||
border-radius:0;
|
||||
@@ -117,18 +120,6 @@ figure.wp-block-image:not(.wp-block){
|
||||
overflow:visible !important;
|
||||
}
|
||||
|
||||
.wp-block-image__aspect-ratio{
|
||||
align-items:center;
|
||||
display:flex;
|
||||
height:46px;
|
||||
margin-bottom:-8px;
|
||||
}
|
||||
.wp-block-image__aspect-ratio .components-button{
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
width:36px;
|
||||
}
|
||||
|
||||
.wp-block-image__toolbar_content_textarea{
|
||||
width:250px;
|
||||
}
|
||||
2
wp/wp-includes/blocks/image/editor.min.css
vendored
2
wp/wp-includes/blocks/image/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__aspect-ratio{align-items:center;display:flex;height:46px;margin-bottom:-8px}.wp-block-image__aspect-ratio .components-button{padding-left:0;padding-right:0;width:36px}.wp-block-image__toolbar_content_textarea{width:250px}
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image .block-bindings-media-placeholder-message,.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.wp-block-image.wp-block-image.is-selected .block-bindings-media-placeholder-message{opacity:1}.wp-block-image.wp-block-image .components-button,.wp-block-image.wp-block-image .components-placeholder__instructions,.wp-block-image.wp-block-image .components-placeholder__label{transition:none}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px}
|
||||
@@ -36,11 +36,11 @@
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.wp-block-image figcaption{
|
||||
.wp-block-image :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
.wp-block-image .is-style-rounded img,.wp-block-image.is-style-circle-mask img,.wp-block-image.is-style-rounded img{
|
||||
.wp-block-image.is-style-circle-mask img{
|
||||
border-radius:9999px;
|
||||
}
|
||||
@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){
|
||||
@@ -57,35 +57,9 @@
|
||||
mask-size:contain;
|
||||
}
|
||||
}
|
||||
.wp-block-image :where(.has-border-color){
|
||||
border-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-top-color]){
|
||||
border-top-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-right-color]){
|
||||
border-left-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-bottom-color]){
|
||||
border-bottom-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-left-color]){
|
||||
border-right-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-width]){
|
||||
border-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-top-width]){
|
||||
border-top-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-right-width]){
|
||||
border-left-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-bottom-width]){
|
||||
border-bottom-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-left-width]){
|
||||
border-right-style:solid;
|
||||
|
||||
:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){
|
||||
border-radius:9999px;
|
||||
}
|
||||
|
||||
.wp-block-image figure{
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -36,11 +36,11 @@
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
}
|
||||
.wp-block-image figcaption{
|
||||
.wp-block-image :where(figcaption){
|
||||
margin-bottom:1em;
|
||||
margin-top:.5em;
|
||||
}
|
||||
.wp-block-image .is-style-rounded img,.wp-block-image.is-style-circle-mask img,.wp-block-image.is-style-rounded img{
|
||||
.wp-block-image.is-style-circle-mask img{
|
||||
border-radius:9999px;
|
||||
}
|
||||
@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){
|
||||
@@ -57,35 +57,9 @@
|
||||
mask-size:contain;
|
||||
}
|
||||
}
|
||||
.wp-block-image :where(.has-border-color){
|
||||
border-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-top-color]){
|
||||
border-top-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-right-color]){
|
||||
border-right-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-bottom-color]){
|
||||
border-bottom-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-left-color]){
|
||||
border-left-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-width]){
|
||||
border-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-top-width]){
|
||||
border-top-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-right-width]){
|
||||
border-right-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-bottom-width]){
|
||||
border-bottom-style:solid;
|
||||
}
|
||||
.wp-block-image :where([style*=border-left-width]){
|
||||
border-left-style:solid;
|
||||
|
||||
:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){
|
||||
border-radius:9999px;
|
||||
}
|
||||
|
||||
.wp-block-image figure{
|
||||
|
||||
2
wp/wp-includes/blocks/image/style.min.css
vendored
2
wp/wp-includes/blocks/image/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
.wp-block-image figcaption{
|
||||
:root :where(.wp-block-image figcaption){
|
||||
color:#555;
|
||||
font-size:13px;
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-image figcaption{
|
||||
.is-dark-theme :root :where(.wp-block-image figcaption){
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-image figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-image figcaption{color:#ffffffa6}.wp-block-image{margin:0 0 1em}
|
||||
:root :where(.wp-block-image figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme :root :where(.wp-block-image figcaption){color:#ffffffa6}.wp-block-image{margin:0 0 1em}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user