Editor: Update npm packages.
Updates the editor npm packages to latest versions. See https://github.com/WordPress/wordpress-develop/pull/6612. Props ellatrix, mukesh27, youknowriad, mamaduka. Built from https://develop.svn.wordpress.org/trunk@58187 git-svn-id: http://core.svn.wordpress.org/trunk@57650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
031dbe0b4d
commit
1fbf5fa51d
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/archives` block on server.
|
* Renders the `core/archives` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*
|
||||||
* @see WP_Widget_Archives
|
* @see WP_Widget_Archives
|
||||||
*
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
|
@ -106,6 +108,8 @@ function render_block_core_archives( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register archives block.
|
* Register archives block.
|
||||||
|
*
|
||||||
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_archives() {
|
function register_block_core_archives() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-audio{
|
:where(.wp-block-audio){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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 figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:#ffffffa6}:where(.wp-block-audio){margin:0 0 1em}
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-audio{
|
:where(.wp-block-audio){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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 figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:#ffffffa6}:where(.wp-block-audio){margin:0 0 1em}
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/avatar` block on the server.
|
* Renders the `core/avatar` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @param WP_Block $block Block instance.
|
||||||
|
@ -31,7 +33,18 @@ function render_block_core_avatar( $attributes, $content, $block ) {
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
if ( ! isset( $block->context['commentId'] ) ) {
|
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 );
|
$author_name = get_the_author_meta( 'display_name', $author_id );
|
||||||
// translators: %s is the Author name.
|
// translators: %s is the Author name.
|
||||||
$alt = sprintf( __( '%s Avatar' ), $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
|
* Generates class names and styles to apply the border support styles for
|
||||||
* the Avatar block.
|
* the Avatar block.
|
||||||
*
|
*
|
||||||
|
* @since 6.3.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return array The border-related classnames and styles for the block.
|
* @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.
|
* Registers the `core/avatar` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_avatar() {
|
function register_block_core_avatar() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/block` block on server.
|
* Renders the `core/block` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*
|
||||||
|
* @global WP_Embed $wp_embed
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Rendered HTML of the referenced block.
|
* @return string Rendered HTML of the referenced block.
|
||||||
|
@ -95,6 +99,8 @@ function render_block_core_block( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/block` block.
|
* Registers the `core/block` block.
|
||||||
|
*
|
||||||
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_block() {
|
function register_block_core_block() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,13 +8,9 @@
|
||||||
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
|
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected:after{
|
||||||
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{
|
outline-color:var(--wp-block-synced-color);
|
||||||
box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
|
|
||||||
}
|
|
||||||
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
|
||||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
|
|
||||||
}
|
}
|
||||||
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
||||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
|
outline-color:#fff;
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}
|
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected:after{outline-color:var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{outline-color:#fff}
|
|
@ -8,13 +8,9 @@
|
||||||
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
|
.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
|
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected:after{
|
||||||
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{
|
outline-color:var(--wp-block-synced-color);
|
||||||
box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
|
|
||||||
}
|
|
||||||
.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
|
||||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color);
|
|
||||||
}
|
}
|
||||||
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{
|
||||||
box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff;
|
outline-color:#fff;
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected{box-shadow:inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{box-shadow:0 0 0 var(--wp-admin-border-width-focus) #fff}
|
.edit-post-visual-editor .block-library-block__reusable-block-container .is-root-container{padding-left:0;padding-right:0}.edit-post-visual-editor .block-library-block__reusable-block-container .block-editor-writing-flow{display:block}.edit-post-visual-editor .block-library-block__reusable-block-container .components-disabled .block-list-appender{display:none}.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-highlighted:after,.edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.is-selected:after{outline-color:var(--wp-block-synced-color)}.is-dark-theme .edit-post-visual-editor .block-editor-block-list__block:not(.remove-outline).is-reusable.block-editor-block-list__block:not([contenteditable]):focus:after{outline-color:#fff}
|
|
@ -302,6 +302,7 @@
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
'anchor' => true,
|
'anchor' => true,
|
||||||
|
'splitting' => true,
|
||||||
'align' => false,
|
'align' => false,
|
||||||
'alignWide' => false,
|
'alignWide' => false,
|
||||||
'color' => array(
|
'color' => array(
|
||||||
|
@ -1643,6 +1644,7 @@
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
|
'__experimentalOnEnter' => true,
|
||||||
'align' => array(
|
'align' => array(
|
||||||
'wide',
|
'wide',
|
||||||
'full'
|
'full'
|
||||||
|
@ -2240,6 +2242,7 @@
|
||||||
),
|
),
|
||||||
'anchor' => true,
|
'anchor' => true,
|
||||||
'className' => true,
|
'className' => true,
|
||||||
|
'splitting' => true,
|
||||||
'color' => array(
|
'color' => array(
|
||||||
'gradients' => true,
|
'gradients' => true,
|
||||||
'link' => true,
|
'link' => true,
|
||||||
|
@ -2770,7 +2773,7 @@
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
'anchor' => true,
|
'anchor' => true,
|
||||||
'className' => false,
|
'html' => false,
|
||||||
'typography' => array(
|
'typography' => array(
|
||||||
'fontSize' => true,
|
'fontSize' => true,
|
||||||
'lineHeight' => true,
|
'lineHeight' => true,
|
||||||
|
@ -2801,7 +2804,6 @@
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'__unstablePasteTextInline' => true,
|
'__unstablePasteTextInline' => true,
|
||||||
'__experimentalSelector' => 'ol,ul',
|
|
||||||
'__experimentalOnMerge' => true,
|
'__experimentalOnMerge' => true,
|
||||||
'__experimentalSlashInserter' => true,
|
'__experimentalSlashInserter' => true,
|
||||||
'interactivity' => array(
|
'interactivity' => array(
|
||||||
|
@ -2838,7 +2840,8 @@
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
'className' => false,
|
'className' => false,
|
||||||
'__experimentalSelector' => 'li',
|
'__experimentalSelector' => '.wp-block-list > li',
|
||||||
|
'splitting' => true,
|
||||||
'spacing' => array(
|
'spacing' => array(
|
||||||
'margin' => true,
|
'margin' => true,
|
||||||
'padding' => true,
|
'padding' => true,
|
||||||
|
@ -3013,8 +3016,16 @@
|
||||||
),
|
),
|
||||||
'allowedBlocks' => array(
|
'allowedBlocks' => array(
|
||||||
'type' => 'array'
|
'type' => 'array'
|
||||||
|
),
|
||||||
|
'useFeaturedImage' => array(
|
||||||
|
'type' => 'boolean',
|
||||||
|
'default' => false
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'usesContext' => array(
|
||||||
|
'postId',
|
||||||
|
'postType'
|
||||||
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
'anchor' => true,
|
'anchor' => true,
|
||||||
'align' => array(
|
'align' => array(
|
||||||
|
@ -3279,15 +3290,6 @@
|
||||||
'type' => 'flex'
|
'type' => 'flex'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'__experimentalStyle' => array(
|
|
||||||
'elements' => array(
|
|
||||||
'link' => array(
|
|
||||||
'color' => array(
|
|
||||||
'text' => 'inherit'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
'interactivity' => true,
|
'interactivity' => true,
|
||||||
'renaming' => false
|
'renaming' => false
|
||||||
),
|
),
|
||||||
|
@ -3613,9 +3615,6 @@
|
||||||
'text'
|
'text'
|
||||||
),
|
),
|
||||||
'textdomain' => 'default',
|
'textdomain' => 'default',
|
||||||
'usesContext' => array(
|
|
||||||
'postId'
|
|
||||||
),
|
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'align' => array(
|
'align' => array(
|
||||||
'type' => 'string'
|
'type' => 'string'
|
||||||
|
@ -3642,6 +3641,7 @@
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'supports' => array(
|
'supports' => array(
|
||||||
|
'splitting' => true,
|
||||||
'anchor' => true,
|
'anchor' => true,
|
||||||
'className' => false,
|
'className' => false,
|
||||||
'color' => array(
|
'color' => array(
|
||||||
|
@ -4185,7 +4185,6 @@
|
||||||
'full'
|
'full'
|
||||||
),
|
),
|
||||||
'color' => array(
|
'color' => array(
|
||||||
'__experimentalDuotone' => 'img, .wp-block-post-featured-image__placeholder, .components-placeholder__illustration, .components-placeholder::before',
|
|
||||||
'text' => false,
|
'text' => false,
|
||||||
'background' => false
|
'background' => false
|
||||||
),
|
),
|
||||||
|
@ -4193,7 +4192,6 @@
|
||||||
'color' => true,
|
'color' => true,
|
||||||
'radius' => true,
|
'radius' => true,
|
||||||
'width' => true,
|
'width' => true,
|
||||||
'__experimentalSelector' => 'img, .block-editor-media-placeholder, .wp-block-post-featured-image__overlay',
|
|
||||||
'__experimentalSkipSerialization' => true,
|
'__experimentalSkipSerialization' => true,
|
||||||
'__experimentalDefaultControls' => array(
|
'__experimentalDefaultControls' => array(
|
||||||
'color' => true,
|
'color' => true,
|
||||||
|
@ -4201,6 +4199,12 @@
|
||||||
'width' => true
|
'width' => true
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
'filter' => array(
|
||||||
|
'duotone' => true
|
||||||
|
),
|
||||||
|
'shadow' => array(
|
||||||
|
'__experimentalSkipSerialization' => true
|
||||||
|
),
|
||||||
'html' => false,
|
'html' => false,
|
||||||
'spacing' => array(
|
'spacing' => array(
|
||||||
'margin' => true,
|
'margin' => true,
|
||||||
|
@ -4210,6 +4214,13 @@
|
||||||
'clientNavigation' => true
|
'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',
|
'editorStyle' => 'wp-block-post-featured-image-editor',
|
||||||
'style' => 'wp-block-post-featured-image'
|
'style' => 'wp-block-post-featured-image'
|
||||||
),
|
),
|
||||||
|
@ -5035,7 +5046,7 @@
|
||||||
'selector' => 'cite',
|
'selector' => 'cite',
|
||||||
'__experimentalRole' => 'content'
|
'__experimentalRole' => 'content'
|
||||||
),
|
),
|
||||||
'align' => array(
|
'textAlign' => array(
|
||||||
'type' => 'string'
|
'type' => 'string'
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
@ -5475,6 +5486,10 @@
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'textAlign' => array(
|
'textAlign' => array(
|
||||||
'type' => 'string'
|
'type' => 'string'
|
||||||
|
),
|
||||||
|
'level' => array(
|
||||||
|
'type' => 'number',
|
||||||
|
'default' => 0
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'example' => array(
|
'example' => array(
|
||||||
|
@ -5600,7 +5615,7 @@
|
||||||
'parent' => array(
|
'parent' => array(
|
||||||
'core/social-links'
|
'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',
|
'textdomain' => 'default',
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'url' => array(
|
'url' => array(
|
||||||
|
@ -5642,7 +5657,7 @@
|
||||||
'allowedBlocks' => array(
|
'allowedBlocks' => array(
|
||||||
'core/social-link'
|
'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(
|
'keywords' => array(
|
||||||
'links'
|
'links'
|
||||||
),
|
),
|
||||||
|
@ -5802,7 +5817,7 @@
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'hasFixedLayout' => array(
|
'hasFixedLayout' => array(
|
||||||
'type' => 'boolean',
|
'type' => 'boolean',
|
||||||
'default' => false
|
'default' => true
|
||||||
),
|
),
|
||||||
'caption' => array(
|
'caption' => array(
|
||||||
'type' => 'rich-text',
|
'type' => 'rich-text',
|
||||||
|
@ -6384,6 +6399,7 @@
|
||||||
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
'$schema' => 'https://schemas.wp.org/trunk/block.json',
|
||||||
'apiVersion' => 3,
|
'apiVersion' => 3,
|
||||||
'name' => 'core/widget-group',
|
'name' => 'core/widget-group',
|
||||||
|
'title' => 'Widget Group',
|
||||||
'category' => 'widgets',
|
'category' => 'widgets',
|
||||||
'attributes' => array(
|
'attributes' => array(
|
||||||
'title' => array(
|
'title' => array(
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
},
|
},
|
||||||
"supports": {
|
"supports": {
|
||||||
"anchor": true,
|
"anchor": true,
|
||||||
|
"splitting": true,
|
||||||
"align": false,
|
"align": false,
|
||||||
"alignWide": false,
|
"alignWide": false,
|
||||||
"color": {
|
"color": {
|
||||||
|
|
|
@ -8,6 +8,11 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/calendar` block on server.
|
* Renders the `core/calendar` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.2.0
|
||||||
|
*
|
||||||
|
* @global int $monthnum.
|
||||||
|
* @global int $year.
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Returns the block content.
|
* @return string Returns the block content.
|
||||||
|
@ -76,6 +81,8 @@ function render_block_core_calendar( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/calendar` block on server.
|
* Registers the `core/calendar` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.2.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_calendar() {
|
function register_block_core_calendar() {
|
||||||
register_block_type_from_metadata(
|
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.
|
* 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
|
* 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.
|
* @return bool Has any published posts or not.
|
||||||
*/
|
*/
|
||||||
function block_core_calendar_has_published_posts() {
|
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
|
* Queries the database for any published post and saves
|
||||||
* a flag whether any published post exists or not.
|
* 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.
|
* @return bool Has any published posts or not.
|
||||||
*/
|
*/
|
||||||
function block_core_calendar_update_has_published_posts() {
|
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.
|
* Handler for updating the has published posts flag when a post is deleted.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param int $post_id Deleted post ID.
|
* @param int $post_id Deleted post ID.
|
||||||
*/
|
*/
|
||||||
function block_core_calendar_update_has_published_post_on_delete( $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.
|
* 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 $new_status The status the post is changing to.
|
||||||
* @param string $old_status The status the post is changing from.
|
* @param string $old_status The status the post is changing from.
|
||||||
* @param WP_Post $post Post object.
|
* @param WP_Post $post Post object.
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/categories` block on server.
|
* Renders the `core/categories` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Returns the categories list/dropdown markup.
|
* @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.
|
* Generates the inline script for a categories dropdown field.
|
||||||
*
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*
|
||||||
* @param string $dropdown_id ID of the dropdown field.
|
* @param string $dropdown_id ID of the dropdown field.
|
||||||
*
|
*
|
||||||
* @return string Returns the dropdown onChange redirection script.
|
* @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.
|
* Registers the `core/categories` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_categories() {
|
function register_block_core_categories() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comment-author-name` block on the server.
|
* Renders the `core/comment-author-name` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-author-name` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_author_name() {
|
function register_block_core_comment_author_name() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comment-content` block on the server.
|
* Renders the `core/comment-content` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-content` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_content() {
|
function register_block_core_comment_content() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comment-date` block on the server.
|
* Renders the `core/comment-date` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-date` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_date() {
|
function register_block_core_comment_date() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comment-edit-link` block on the server.
|
* Renders the `core/comment-edit-link` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-edit-link` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_edit_link() {
|
function register_block_core_comment_edit_link() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comment-reply-link` block on the server.
|
* Renders the `core/comment-reply-link` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-reply-link` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_reply_link() {
|
function register_block_core_comment_reply_link() {
|
||||||
register_block_type_from_metadata(
|
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.
|
* Renders the `core/comment-template` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comment-template` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comment_template() {
|
function register_block_core_comment_template() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comments-pagination-next` block on the server.
|
* Renders the `core/comments-pagination-next` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comments-pagination-next` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments_pagination_next() {
|
function register_block_core_comments_pagination_next() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comments-pagination-numbers` block on the server.
|
* Renders the `core/comments-pagination-numbers` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comments-pagination-numbers` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments_pagination_numbers() {
|
function register_block_core_comments_pagination_numbers() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comments-pagination-previous` block on the server.
|
* Renders the `core/comments-pagination-previous` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comments-pagination-previous` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments_pagination_previous() {
|
function register_block_core_comments_pagination_previous() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comments-pagination` block on the server.
|
* Renders the `core/comments-pagination` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @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.
|
* Registers the `core/comments-pagination` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments_pagination() {
|
function register_block_core_comments_pagination() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/comments-title` block on the server.
|
* Renders the `core/comments-title` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
*
|
*
|
||||||
* @return string Return the post comments title.
|
* @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.
|
* Registers the `core/comments-title` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments_title() {
|
function register_block_core_comments_title() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
* the block is in legacy mode. If not, the HTML generated in the editor is
|
* the block is in legacy mode. If not, the HTML generated in the editor is
|
||||||
* returned instead.
|
* returned instead.
|
||||||
*
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*
|
||||||
|
* @global WP_Post $post Global post object.
|
||||||
|
*
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param string $content Block default content.
|
* @param string $content Block default content.
|
||||||
* @param WP_Block $block Block instance.
|
* @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.
|
* Registers the `core/comments` block on the server.
|
||||||
|
*
|
||||||
|
* @since 6.1.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_comments() {
|
function register_block_core_comments() {
|
||||||
register_block_type_from_metadata(
|
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.
|
* Use the button block classes for the form-submit button.
|
||||||
*
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*
|
||||||
* @param array $fields The default comment form arguments.
|
* @param array $fields The default comment form arguments.
|
||||||
*
|
*
|
||||||
* @return array Returns the modified fields.
|
* @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
|
* Enqueues styles from the legacy `core/post-comments` block. These styles are
|
||||||
* required only by the block's fallback.
|
* required only by the block's fallback.
|
||||||
*
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*
|
||||||
* @param string $block_name Name of the new block type.
|
* @param string $block_name Name of the new block type.
|
||||||
*/
|
*/
|
||||||
function enqueue_legacy_post_comments_block_styles( $block_name ) {
|
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
|
* The same approach was followed when core/query-loop was renamed to
|
||||||
* core/post-template.
|
* core/post-template.
|
||||||
*
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*
|
||||||
* @see https://github.com/WordPress/gutenberg/pull/41807
|
* @see https://github.com/WordPress/gutenberg/pull/41807
|
||||||
* @see https://github.com/WordPress/gutenberg/pull/32514
|
* @see https://github.com/WordPress/gutenberg/pull/32514
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/cover` block on server.
|
* Renders the `core/cover` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The block rendered content.
|
* @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.
|
* Registers the `core/cover` block renderer on server.
|
||||||
|
*
|
||||||
|
* @since 6.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_cover() {
|
function register_block_core_cover() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -17,9 +17,17 @@
|
||||||
.wp-block-cover.components-placeholder h2{
|
.wp-block-cover.components-placeholder h2{
|
||||||
color:inherit;
|
color:inherit;
|
||||||
}
|
}
|
||||||
|
.wp-block-cover.is-transient{
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
.wp-block-cover.is-transient:before{
|
.wp-block-cover.is-transient:before{
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
|
content:"";
|
||||||
|
height:100%;
|
||||||
opacity:.3;
|
opacity:.3;
|
||||||
|
position:absolute;
|
||||||
|
width:100%;
|
||||||
|
z-index:1;
|
||||||
}
|
}
|
||||||
.wp-block-cover .components-spinner{
|
.wp-block-cover .components-spinner{
|
||||||
margin:0;
|
margin:0;
|
||||||
|
|
|
@ -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}.wp-block-cover:after{min-height:auto}
|
|
@ -17,9 +17,17 @@
|
||||||
.wp-block-cover.components-placeholder h2{
|
.wp-block-cover.components-placeholder h2{
|
||||||
color:inherit;
|
color:inherit;
|
||||||
}
|
}
|
||||||
|
.wp-block-cover.is-transient{
|
||||||
|
position:relative;
|
||||||
|
}
|
||||||
.wp-block-cover.is-transient:before{
|
.wp-block-cover.is-transient:before{
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
|
content:"";
|
||||||
|
height:100%;
|
||||||
opacity:.3;
|
opacity:.3;
|
||||||
|
position:absolute;
|
||||||
|
width:100%;
|
||||||
|
z-index:1;
|
||||||
}
|
}
|
||||||
.wp-block-cover .components-spinner{
|
.wp-block-cover .components-spinner{
|
||||||
left:50%;
|
left:50%;
|
||||||
|
|
|
@ -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}.wp-block-cover:after{min-height:auto}
|
|
@ -1,13 +1,16 @@
|
||||||
|
:where(.wp-block-cover-image,.wp-block-cover){
|
||||||
|
min-height:430px;
|
||||||
|
padding:1em;
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-cover,.wp-block-cover-image{
|
.wp-block-cover,.wp-block-cover-image{
|
||||||
align-items:center;
|
align-items:center;
|
||||||
background-position:50%;
|
background-position:50%;
|
||||||
box-sizing:border-box; direction:ltr;
|
box-sizing:border-box; direction:ltr;
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content:center;
|
justify-content:center;
|
||||||
min-height:430px;
|
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
overflow:clip;
|
overflow:clip;
|
||||||
padding:1em;
|
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){
|
.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,16 @@
|
||||||
|
:where(.wp-block-cover-image,.wp-block-cover){
|
||||||
|
min-height:430px;
|
||||||
|
padding:1em;
|
||||||
|
}
|
||||||
|
|
||||||
.wp-block-cover,.wp-block-cover-image{
|
.wp-block-cover,.wp-block-cover-image{
|
||||||
align-items:center;
|
align-items:center;
|
||||||
background-position:50%;
|
background-position:50%;
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
display:flex;
|
display:flex;
|
||||||
justify-content:center;
|
justify-content:center;
|
||||||
min-height:430px;
|
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
overflow:clip;
|
overflow:clip;
|
||||||
padding:1em;
|
|
||||||
position:relative;
|
position:relative;
|
||||||
}
|
}
|
||||||
.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){
|
.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -19,6 +19,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"supports": {
|
"supports": {
|
||||||
|
"__experimentalOnEnter": true,
|
||||||
"align": [ "wide", "full" ],
|
"align": [ "wide", "full" ],
|
||||||
"color": {
|
"color": {
|
||||||
"gradients": true,
|
"gradients": true,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
.wp-block-details{
|
.wp-block-details{
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
overflow:hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-details summary{
|
.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{
|
.wp-block-details{
|
||||||
box-sizing:border-box;
|
box-sizing:border-box;
|
||||||
overflow:hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-details summary{
|
.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}
|
|
@ -11,9 +11,6 @@
|
||||||
word-break:break-word;
|
word-break:break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-embed__learn-more{
|
|
||||||
margin-top:1em;
|
|
||||||
}
|
|
||||||
.wp-block-post-content .wp-block-embed__learn-more a{
|
.wp-block-post-content .wp-block-embed__learn-more a{
|
||||||
color:var(--wp-admin-theme-color);
|
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;
|
word-break:break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-embed__learn-more{
|
|
||||||
margin-top:1em;
|
|
||||||
}
|
|
||||||
.wp-block-post-content .wp-block-embed__learn-more a{
|
.wp-block-post-content .wp-block-embed__learn-more a{
|
||||||
color:var(--wp-admin-theme-color);
|
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}
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-embed{
|
:where(.wp-block-embed){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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 figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:#ffffffa6}:where(.wp-block-embed){margin:0 0 1em}
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-embed{
|
:where(.wp-block-embed){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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 figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:#ffffffa6}:where(.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.
|
* 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 array $attributes The block attributes.
|
||||||
* @param string $content The block content.
|
* @param string $content The block content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -15,27 +17,6 @@
|
||||||
* @return string Returns the block content.
|
* @return string Returns the block content.
|
||||||
*/
|
*/
|
||||||
function render_block_core_file( $attributes, $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 it's interactive, enqueue the script module and add the directives.
|
||||||
if ( ! empty( $attributes['displayPreview'] ) ) {
|
if ( ! empty( $attributes['displayPreview'] ) ) {
|
||||||
$suffix = wp_scripts_get_suffix();
|
$suffix = wp_scripts_get_suffix();
|
||||||
|
@ -57,6 +38,19 @@ function render_block_core_file( $attributes, $content ) {
|
||||||
$processor->next_tag( 'object' );
|
$processor->next_tag( 'object' );
|
||||||
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
|
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
|
||||||
$processor->set_attribute( 'hidden', true );
|
$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();
|
return $processor->get_updated_html();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,6 +59,8 @@ function render_block_core_file( $attributes, $content ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/file` block on server.
|
* Registers the `core/file` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_file() {
|
function register_block_core_file() {
|
||||||
register_block_type_from_metadata(
|
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{
|
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
|
||||||
height:auto;
|
height:auto;
|
||||||
}
|
}
|
||||||
|
.wp-block[data-align=center]>.wp-block-file{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
.wp-block-file .components-resizable-box__container{
|
.wp-block-file .components-resizable-box__container{
|
||||||
margin-bottom:1em;
|
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{
|
.wp-block[data-align=left]>.wp-block-file,.wp-block[data-align=right]>.wp-block-file{
|
||||||
height:auto;
|
height:auto;
|
||||||
}
|
}
|
||||||
|
.wp-block[data-align=center]>.wp-block-file{
|
||||||
|
text-align:center;
|
||||||
|
}
|
||||||
.wp-block-file .components-resizable-box__container{
|
.wp-block-file .components-resizable-box__container{
|
||||||
margin-bottom:1em;
|
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-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
|
* we add a custom `data-id` attribute before rendering the gallery
|
||||||
* so that the Image Block can pick it up in its render_callback.
|
* 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.
|
* @param array $parsed_block The block being rendered.
|
||||||
* @return array The migrated block object.
|
* @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.
|
* Renders the `core/gallery` block on the server.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes Attributes of the block being rendered.
|
* @param array $attributes Attributes of the block being rendered.
|
||||||
* @param string $content Content of the block being rendered.
|
* @param string $content Content of the block being rendered.
|
||||||
* @return string The 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.
|
* the `$parsed_block['innerBlocks']` via the `render_block_data` hook.
|
||||||
* However, this hook doesn't apply inner block updates when blocks are
|
* However, this hook doesn't apply inner block updates when blocks are
|
||||||
* nested.
|
* 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.
|
* nested blocks, it should be refactored.
|
||||||
*
|
*
|
||||||
* @see: https://github.com/WordPress/gutenberg/pull/58733
|
* @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.
|
* Registers the `core/gallery` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.9.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_gallery() {
|
function register_block_core_gallery() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
figure.wp-block-gallery{
|
:where(figure.wp-block-gallery){
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery>.blocks-gallery-caption{
|
:where(figure.wp-block-gallery)>.blocks-gallery-caption{
|
||||||
flex:0 0 100%;
|
flex:0 0 100%;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{
|
:where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{
|
||||||
flex-basis:100%;
|
flex-basis:100%;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice.is-error{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice__content{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice__content{
|
||||||
margin:4px 0;
|
margin:4px 0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice__dismiss{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{
|
||||||
left:5px;
|
left:5px;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0;
|
top:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder{
|
||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{
|
||||||
display:flex;
|
display:flex;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder figcaption{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{
|
||||||
z-index:2;
|
z-index:2;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .components-spinner{
|
:where(figure.wp-block-gallery) .components-spinner{
|
||||||
margin-right:-9px;
|
margin-right:-9px;
|
||||||
margin-top:-9px;
|
margin-top:-9px;
|
||||||
position:absolute;
|
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}
|
:where(figure.wp-block-gallery){display:block}:where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{left:5px;position:absolute;top:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}: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{
|
:where(figure.wp-block-gallery){
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery>.blocks-gallery-caption{
|
:where(figure.wp-block-gallery)>.blocks-gallery-caption{
|
||||||
flex:0 0 100%;
|
flex:0 0 100%;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{
|
:where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{
|
||||||
flex-basis:100%;
|
flex-basis:100%;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice.is-error{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{
|
||||||
display:block;
|
display:block;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice__content{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice__content{
|
||||||
margin:4px 0;
|
margin:4px 0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .wp-block-image .components-notice__dismiss{
|
:where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
right:5px;
|
right:5px;
|
||||||
top:0;
|
top:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{
|
||||||
margin-bottom:0;
|
margin-bottom:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder{
|
||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{
|
||||||
display:flex;
|
display:flex;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .block-editor-media-placeholder figcaption{
|
:where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{
|
||||||
z-index:2;
|
z-index:2;
|
||||||
}
|
}
|
||||||
figure.wp-block-gallery .components-spinner{
|
:where(figure.wp-block-gallery) .components-spinner{
|
||||||
left:50%;
|
left:50%;
|
||||||
margin-left:-9px;
|
margin-left:-9px;
|
||||||
margin-top:-9px;
|
margin-top:-9px;
|
||||||
|
|
|
@ -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}
|
:where(figure.wp-block-gallery){display:block}:where(figure.wp-block-gallery)>.blocks-gallery-caption{flex:0 0 100%}:where(figure.wp-block-gallery)>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}:where(figure.wp-block-gallery) .wp-block-image .components-notice.is-error{display:block}:where(figure.wp-block-gallery) .wp-block-image .components-notice__content{margin:4px 0}:where(figure.wp-block-gallery) .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}:where(figure.wp-block-gallery) .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder{margin:0}:where(figure.wp-block-gallery) .block-editor-media-placeholder .components-placeholder__label{display:flex}:where(figure.wp-block-gallery) .block-editor-media-placeholder figcaption{z-index:2}: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;
|
right:0;
|
||||||
top: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;
|
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;
|
right:0;
|
||||||
top: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;
|
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}
|
|
@ -1,3 +1,7 @@
|
||||||
.wp-block-group{
|
.wp-block-group{
|
||||||
box-sizing:border-box;
|
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{
|
.wp-block-group{
|
||||||
box-sizing:border-box;
|
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}
|
|
@ -14,6 +14,8 @@
|
||||||
* Would be transformed to:
|
* Would be transformed to:
|
||||||
* <h2 class="align-left wp-block-heading">Hello World</h2>
|
* <h2 class="align-left wp-block-heading">Hello World</h2>
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @param array $attributes Attributes of the block being rendered.
|
* @param array $attributes Attributes of the block being rendered.
|
||||||
* @param string $content Content 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.
|
* Registers the `core/heading` block on server.
|
||||||
|
*
|
||||||
|
* @since 6.2.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_heading() {
|
function register_block_core_heading() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
"align": [ "wide", "full" ],
|
"align": [ "wide", "full" ],
|
||||||
"anchor": true,
|
"anchor": true,
|
||||||
"className": true,
|
"className": true,
|
||||||
|
"splitting": true,
|
||||||
"color": {
|
"color": {
|
||||||
"gradients": true,
|
"gradients": true,
|
||||||
"link": true,
|
"link": true,
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
* Build an array with CSS classes and inline styles defining the colors
|
* 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.
|
* which will be applied to the home link markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $context home link block context.
|
* @param array $context home link block context.
|
||||||
* @return array Colors CSS classes and inline styles.
|
* @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
|
* 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.
|
* which will be applied to the home link markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $context Home link block context.
|
* @param array $context Home link block context.
|
||||||
* @return array Font size CSS classes and inline styles.
|
* @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
|
* Builds an array with classes and style for the li wrapper
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $context Home link block context.
|
* @param array $context Home link block context.
|
||||||
* @return string The li wrapper attributes.
|
* @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.
|
* Renders the `core/home-link` block.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The saved content.
|
* @param string $content The saved content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -155,6 +163,8 @@ function render_block_core_home_link( $attributes, $content, $block ) {
|
||||||
/**
|
/**
|
||||||
* Register the home block
|
* Register the home block
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @uses render_block_core_home_link()
|
* @uses render_block_core_home_link()
|
||||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
* Renders the `core/image` block on the server,
|
* Renders the `core/image` block on the server,
|
||||||
* adding a data-id attribute to the element if core/gallery has added on pre-render.
|
* 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 array $attributes The block attributes.
|
||||||
* @param string $content The block content.
|
* @param string $content The block content.
|
||||||
* @param WP_Block $block The block object.
|
* @param WP_Block $block The block object.
|
||||||
|
@ -85,6 +87,8 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||||
*
|
*
|
||||||
* This is used to determine whether the lightbox should be rendered or not.
|
* This is used to determine whether the lightbox should be rendered or not.
|
||||||
*
|
*
|
||||||
|
* @since 6.4.0
|
||||||
|
*
|
||||||
* @param array $block Block data.
|
* @param array $block Block data.
|
||||||
*
|
*
|
||||||
* @return array Filtered block data.
|
* @return array Filtered block data.
|
||||||
|
@ -115,6 +119,8 @@ function block_core_image_get_lightbox_settings( $block ) {
|
||||||
/**
|
/**
|
||||||
* Adds the directives and layout needed for the lightbox behavior.
|
* Adds the directives and layout needed for the lightbox behavior.
|
||||||
*
|
*
|
||||||
|
* @since 6.4.0
|
||||||
|
*
|
||||||
* @param string $block_content Rendered block content.
|
* @param string $block_content Rendered block content.
|
||||||
* @param array $block Block object.
|
* @param array $block Block object.
|
||||||
*
|
*
|
||||||
|
@ -219,6 +225,9 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||||
return $body_content;
|
return $body_content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 6.5.0
|
||||||
|
*/
|
||||||
function block_core_image_print_lightbox_overlay() {
|
function block_core_image_print_lightbox_overlay() {
|
||||||
$close_button_label = esc_attr__( 'Close' );
|
$close_button_label = esc_attr__( 'Close' );
|
||||||
|
|
||||||
|
@ -238,7 +247,7 @@ function block_core_image_print_lightbox_overlay() {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
<div
|
<div
|
||||||
class="wp-lightbox-overlay zoom"
|
class="wp-lightbox-overlay zoom"
|
||||||
data-wp-interactive="core/image"
|
data-wp-interactive="core/image"
|
||||||
data-wp-context='{}'
|
data-wp-context='{}'
|
||||||
|
@ -278,6 +287,8 @@ HTML;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/image` block on server.
|
* Registers the `core/image` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.9.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_image() {
|
function register_block_core_image() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -96,6 +96,9 @@ figure.wp-block-image:not(.wp-block){
|
||||||
position:relative;
|
position:relative;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
.wp-block-image__crop-area .reactEasyCrop_Container{
|
||||||
|
pointer-events:auto;
|
||||||
|
}
|
||||||
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
||||||
border:none;
|
border:none;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
|
|
|
@ -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__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}
|
|
@ -96,6 +96,9 @@ figure.wp-block-image:not(.wp-block){
|
||||||
position:relative;
|
position:relative;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
.wp-block-image__crop-area .reactEasyCrop_Container{
|
||||||
|
pointer-events:auto;
|
||||||
|
}
|
||||||
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
|
||||||
border:none;
|
border:none;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
|
|
|
@ -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__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}
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-image{
|
:where(.wp-block-image){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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}
|
.wp-block-image figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-image figcaption{color:#ffffffa6}:where(.wp-block-image){margin:0 0 1em}
|
|
@ -7,6 +7,6 @@
|
||||||
color:#ffffffa6;
|
color:#ffffffa6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-image{
|
:where(.wp-block-image){
|
||||||
margin:0 0 1em;
|
margin:0 0 1em;
|
||||||
}
|
}
|
|
@ -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}
|
.wp-block-image figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-image figcaption{color:#ffffffa6}:where(.wp-block-image){margin:0 0 1em}
|
|
@ -197,7 +197,9 @@ const {
|
||||||
},
|
},
|
||||||
callbacks: {
|
callbacks: {
|
||||||
setOverlayStyles() {
|
setOverlayStyles() {
|
||||||
if (!imageRef) return;
|
if (!imageRef) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let {
|
let {
|
||||||
naturalWidth,
|
naturalWidth,
|
||||||
naturalHeight,
|
naturalHeight,
|
||||||
|
|
|
@ -36,6 +36,8 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) {
|
||||||
/**
|
/**
|
||||||
* Renders the `core/latest-comments` block on server.
|
* Renders the `core/latest-comments` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.1.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Returns the post content with latest comments added.
|
* @return string Returns the post content with latest comments added.
|
||||||
|
@ -145,6 +147,8 @@ function render_block_core_latest_comments( $attributes = array() ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/latest-comments` block.
|
* Registers the `core/latest-comments` block.
|
||||||
|
*
|
||||||
|
* @since 5.3.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_latest_comments() {
|
function register_block_core_latest_comments() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -18,6 +18,8 @@ $block_core_latest_posts_excerpt_length = 0;
|
||||||
* Callback for the excerpt_length filter used by
|
* Callback for the excerpt_length filter used by
|
||||||
* the Latest Posts block at render time.
|
* the Latest Posts block at render time.
|
||||||
*
|
*
|
||||||
|
* @since 5.4.0
|
||||||
|
*
|
||||||
* @return int Returns the global $block_core_latest_posts_excerpt_length variable
|
* @return int Returns the global $block_core_latest_posts_excerpt_length variable
|
||||||
* to allow the excerpt_length filter respect the Latest Block setting.
|
* to allow the excerpt_length filter respect the Latest Block setting.
|
||||||
*/
|
*/
|
||||||
|
@ -29,6 +31,8 @@ function block_core_latest_posts_get_excerpt_length() {
|
||||||
/**
|
/**
|
||||||
* Renders the `core/latest-posts` block on server.
|
* Renders the `core/latest-posts` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.0.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Returns the post content with latest posts added.
|
* @return string Returns the post content with latest posts added.
|
||||||
|
@ -148,12 +152,13 @@ function render_block_core_latest_posts( $attributes ) {
|
||||||
* […] is the default excerpt ending from wp_trim_excerpt() in Core.
|
* […] is the default excerpt ending from wp_trim_excerpt() in Core.
|
||||||
*/
|
*/
|
||||||
if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) {
|
if ( str_ends_with( $trimmed_excerpt, ' […]' ) ) {
|
||||||
|
/** This filter is documented in wp-includes/formatting.php */
|
||||||
$excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length );
|
$excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length );
|
||||||
if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
|
if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
|
||||||
$trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 );
|
$trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 );
|
||||||
$trimmed_excerpt .= sprintf(
|
$trimmed_excerpt .= sprintf(
|
||||||
/* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
|
/* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
|
||||||
__( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
|
__( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
|
||||||
esc_url( $post_link ),
|
esc_url( $post_link ),
|
||||||
esc_html( $title )
|
esc_html( $title )
|
||||||
);
|
);
|
||||||
|
@ -218,6 +223,8 @@ function render_block_core_latest_posts( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/latest-posts` block on server.
|
* Registers the `core/latest-posts` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.0.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_latest_posts() {
|
function register_block_core_latest_posts() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
@ -241,6 +248,8 @@ add_action( 'init', 'register_block_core_latest_posts' );
|
||||||
* TODO: Remove when and if the bottom client-side deprecation for this block
|
* TODO: Remove when and if the bottom client-side deprecation for this block
|
||||||
* is removed.
|
* is removed.
|
||||||
*
|
*
|
||||||
|
* @since 5.5.0
|
||||||
|
*
|
||||||
* @param array $block A single parsed block object.
|
* @param array $block A single parsed block object.
|
||||||
*
|
*
|
||||||
* @return array The migrated block object.
|
* @return array The migrated block object.
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
/**
|
/**
|
||||||
* Renders the 'core/legacy-widget' block.
|
* Renders the 'core/legacy-widget' block.
|
||||||
*
|
*
|
||||||
|
* @since 5.8.0
|
||||||
|
*
|
||||||
|
* @global int $wp_widget_factory.
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Rendered block.
|
* @return string Rendered block.
|
||||||
|
@ -54,6 +58,8 @@ function render_block_core_legacy_widget( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the 'core/legacy-widget' block.
|
* Registers the 'core/legacy-widget' block.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_legacy_widget() {
|
function register_block_core_legacy_widget() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
@ -70,6 +76,8 @@ add_action( 'init', 'register_block_core_legacy_widget' );
|
||||||
* Intercepts any request with legacy-widget-preview in the query param and, if
|
* Intercepts any request with legacy-widget-preview in the query param and, if
|
||||||
* set, renders a page containing a preview of the requested Legacy Widget
|
* set, renders a page containing a preview of the requested Legacy Widget
|
||||||
* block.
|
* block.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
*/
|
*/
|
||||||
function handle_legacy_widget_preview_iframe() {
|
function handle_legacy_widget_preview_iframe() {
|
||||||
if ( empty( $_GET['legacy-widget-preview'] ) ) {
|
if ( empty( $_GET['legacy-widget-preview'] ) ) {
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
},
|
},
|
||||||
"supports": {
|
"supports": {
|
||||||
"className": false,
|
"className": false,
|
||||||
"__experimentalSelector": "li",
|
"__experimentalSelector": ".wp-block-list > li",
|
||||||
|
"splitting": true,
|
||||||
"spacing": {
|
"spacing": {
|
||||||
"margin": true,
|
"margin": true,
|
||||||
"padding": true,
|
"padding": true,
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
},
|
},
|
||||||
"supports": {
|
"supports": {
|
||||||
"anchor": true,
|
"anchor": true,
|
||||||
"className": false,
|
"html": false,
|
||||||
"typography": {
|
"typography": {
|
||||||
"fontSize": true,
|
"fontSize": true,
|
||||||
"lineHeight": true,
|
"lineHeight": true,
|
||||||
|
@ -69,7 +69,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"__unstablePasteTextInline": true,
|
"__unstablePasteTextInline": true,
|
||||||
"__experimentalSelector": "ol,ul",
|
|
||||||
"__experimentalOnMerge": true,
|
"__experimentalOnMerge": true,
|
||||||
"__experimentalSlashInserter": true,
|
"__experimentalSlashInserter": true,
|
||||||
"interactivity": {
|
"interactivity": {
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
/**
|
/**
|
||||||
* Renders the `core/loginout` block on server.
|
* Renders the `core/loginout` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.8.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
*
|
*
|
||||||
* @return string Returns the login-out link or form.
|
* @return string Returns the login-out link or form.
|
||||||
|
@ -39,6 +41,8 @@ function render_block_core_loginout( $attributes ) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers the `core/loginout` block on server.
|
* Registers the `core/loginout` block on server.
|
||||||
|
*
|
||||||
|
* @since 5.8.0
|
||||||
*/
|
*/
|
||||||
function register_block_core_loginout() {
|
function register_block_core_loginout() {
|
||||||
register_block_type_from_metadata(
|
register_block_type_from_metadata(
|
||||||
|
|
|
@ -92,8 +92,13 @@
|
||||||
},
|
},
|
||||||
"allowedBlocks": {
|
"allowedBlocks": {
|
||||||
"type": "array"
|
"type": "array"
|
||||||
|
},
|
||||||
|
"useFeaturedImage": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"usesContext": [ "postId", "postType" ],
|
||||||
"supports": {
|
"supports": {
|
||||||
"anchor": true,
|
"anchor": true,
|
||||||
"align": [ "wide", "full" ],
|
"align": [ "wide", "full" ],
|
||||||
|
|
|
@ -21,10 +21,13 @@
|
||||||
width:100% !important;
|
width:100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-media-text.is-image-fill .editor-media-container__resizer{
|
.wp-block-media-text.is-image-fill .components-placeholder.has-illustration,.wp-block-media-text.is-image-fill .editor-media-container__resizer{
|
||||||
height:100% !important;
|
height:100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{
|
.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{
|
||||||
max-width:unset;
|
max-width:unset;
|
||||||
|
}
|
||||||
|
.wp-block-media-text--placeholder-image{
|
||||||
|
min-height:205px;
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-media-text__media{position:relative}.wp-block-media-text__media.is-transient img{opacity:.3}.wp-block-media-text__media .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.wp-block-media-text .__resizable_base__{grid-column:1/span 2;grid-row:2}.wp-block-media-text .editor-media-container__resizer{width:100%!important}.wp-block-media-text.is-image-fill .editor-media-container__resizer{height:100%!important}.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{max-width:unset}
|
.wp-block-media-text__media{position:relative}.wp-block-media-text__media.is-transient img{opacity:.3}.wp-block-media-text__media .components-spinner{margin-right:-9px;margin-top:-9px;position:absolute;right:50%;top:50%}.wp-block-media-text .__resizable_base__{grid-column:1/span 2;grid-row:2}.wp-block-media-text .editor-media-container__resizer{width:100%!important}.wp-block-media-text.is-image-fill .components-placeholder.has-illustration,.wp-block-media-text.is-image-fill .editor-media-container__resizer{height:100%!important}.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{max-width:unset}.wp-block-media-text--placeholder-image{min-height:205px}
|
|
@ -21,10 +21,13 @@
|
||||||
width:100% !important;
|
width:100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-media-text.is-image-fill .editor-media-container__resizer{
|
.wp-block-media-text.is-image-fill .components-placeholder.has-illustration,.wp-block-media-text.is-image-fill .editor-media-container__resizer{
|
||||||
height:100% !important;
|
height:100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{
|
.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{
|
||||||
max-width:unset;
|
max-width:unset;
|
||||||
|
}
|
||||||
|
.wp-block-media-text--placeholder-image{
|
||||||
|
min-height:205px;
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-media-text__media{position:relative}.wp-block-media-text__media.is-transient img{opacity:.3}.wp-block-media-text__media .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.wp-block-media-text .__resizable_base__{grid-column:1/span 2;grid-row:2}.wp-block-media-text .editor-media-container__resizer{width:100%!important}.wp-block-media-text.is-image-fill .editor-media-container__resizer{height:100%!important}.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{max-width:unset}
|
.wp-block-media-text__media{position:relative}.wp-block-media-text__media.is-transient img{opacity:.3}.wp-block-media-text__media .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.wp-block-media-text .__resizable_base__{grid-column:1/span 2;grid-row:2}.wp-block-media-text .editor-media-container__resizer{width:100%!important}.wp-block-media-text.is-image-fill .components-placeholder.has-illustration,.wp-block-media-text.is-image-fill .editor-media-container__resizer{height:100%!important}.wp-block-media-text>.block-editor-block-list__layout>.block-editor-block-list__block{max-width:unset}.wp-block-media-text--placeholder-image{min-height:205px}
|
|
@ -9,6 +9,8 @@
|
||||||
* Build an array with CSS classes and inline styles defining the colors
|
* Build an array with CSS classes and inline styles defining the colors
|
||||||
* which will be applied to the navigation markup in the front-end.
|
* which will be applied to the navigation markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $context Navigation block context.
|
* @param array $context Navigation block context.
|
||||||
* @param array $attributes Block attributes.
|
* @param array $attributes Block attributes.
|
||||||
* @param bool $is_sub_menu Whether the link is part of a sub-menu.
|
* @param bool $is_sub_menu Whether the link is part of a sub-menu.
|
||||||
|
@ -79,6 +81,8 @@ function block_core_navigation_link_build_css_colors( $context, $attributes, $is
|
||||||
* Build an array with CSS classes and inline styles defining the font sizes
|
* Build an array with CSS classes and inline styles defining the font sizes
|
||||||
* which will be applied to the navigation markup in the front-end.
|
* which will be applied to the navigation markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $context Navigation block context.
|
* @param array $context Navigation block context.
|
||||||
* @return array Font size CSS classes and inline styles.
|
* @return array Font size CSS classes and inline styles.
|
||||||
*/
|
*/
|
||||||
|
@ -113,6 +117,8 @@ function block_core_navigation_link_build_css_font_sizes( $context ) {
|
||||||
/**
|
/**
|
||||||
* Returns the top-level submenu SVG chevron icon.
|
* Returns the top-level submenu SVG chevron icon.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_link_render_submenu_icon() {
|
function block_core_navigation_link_render_submenu_icon() {
|
||||||
|
@ -122,6 +128,8 @@ function block_core_navigation_link_render_submenu_icon() {
|
||||||
/**
|
/**
|
||||||
* Decodes a url if it's encoded, returning the same url if not.
|
* Decodes a url if it's encoded, returning the same url if not.
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @param string $url The url to decode.
|
* @param string $url The url to decode.
|
||||||
*
|
*
|
||||||
* @return string $url Returns the decoded url.
|
* @return string $url Returns the decoded url.
|
||||||
|
@ -153,6 +161,8 @@ function block_core_navigation_link_maybe_urldecode( $url ) {
|
||||||
/**
|
/**
|
||||||
* Renders the `core/navigation-link` block.
|
* Renders the `core/navigation-link` block.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The saved content.
|
* @param string $content The saved content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -188,6 +198,13 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
|
||||||
$kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
|
$kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
|
||||||
$is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
|
$is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
|
||||||
|
|
||||||
|
if ( is_post_type_archive() ) {
|
||||||
|
$queried_archive_link = get_post_type_archive_link( get_queried_object()->name );
|
||||||
|
if ( $attributes['url'] === $queried_archive_link ) {
|
||||||
|
$is_active = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$wrapper_attributes = get_block_wrapper_attributes(
|
$wrapper_attributes = get_block_wrapper_attributes(
|
||||||
array(
|
array(
|
||||||
'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
|
'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
|
||||||
|
@ -269,6 +286,8 @@ function render_block_core_navigation_link( $attributes, $content, $block ) {
|
||||||
/**
|
/**
|
||||||
* Returns a navigation link variation
|
* Returns a navigation link variation
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
|
* @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
|
||||||
* @param string $kind string of value 'taxonomy' or 'post-type'.
|
* @param string $kind string of value 'taxonomy' or 'post-type'.
|
||||||
*
|
*
|
||||||
|
@ -391,6 +410,8 @@ function block_core_navigation_link_build_variations() {
|
||||||
/**
|
/**
|
||||||
* Registers the navigation link block.
|
* Registers the navigation link block.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @uses render_block_core_navigation_link()
|
* @uses render_block_core_navigation_link()
|
||||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,12 +17,4 @@
|
||||||
.link-ui-block-inserter__back{
|
.link-ui-block-inserter__back{
|
||||||
margin-right:8px;
|
margin-right:8px;
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
|
||||||
|
|
||||||
.components-popover-pointer-events-trap{
|
|
||||||
background-color:initial;
|
|
||||||
cursor:pointer;
|
|
||||||
inset:0;
|
|
||||||
position:fixed;
|
|
||||||
z-index:1000000;
|
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-right:8px;text-transform:uppercase}.components-popover-pointer-events-trap{background-color:initial;cursor:pointer;inset:0;position:fixed;z-index:1000000}
|
.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-right:8px;text-transform:uppercase}
|
|
@ -17,12 +17,4 @@
|
||||||
.link-ui-block-inserter__back{
|
.link-ui-block-inserter__back{
|
||||||
margin-left:8px;
|
margin-left:8px;
|
||||||
text-transform:uppercase;
|
text-transform:uppercase;
|
||||||
}
|
|
||||||
|
|
||||||
.components-popover-pointer-events-trap{
|
|
||||||
background-color:initial;
|
|
||||||
cursor:pointer;
|
|
||||||
inset:0;
|
|
||||||
position:fixed;
|
|
||||||
z-index:1000000;
|
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-left:8px;text-transform:uppercase}.components-popover-pointer-events-trap{background-color:initial;cursor:pointer;inset:0;position:fixed;z-index:1000000}
|
.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-left:8px;text-transform:uppercase}
|
|
@ -9,6 +9,8 @@
|
||||||
* Build an array with CSS classes and inline styles defining the font sizes
|
* Build an array with CSS classes and inline styles defining the font sizes
|
||||||
* which will be applied to the navigation markup in the front-end.
|
* which will be applied to the navigation markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $context Navigation block context.
|
* @param array $context Navigation block context.
|
||||||
* @return array Font size CSS classes and inline styles.
|
* @return array Font size CSS classes and inline styles.
|
||||||
*/
|
*/
|
||||||
|
@ -43,6 +45,8 @@ function block_core_navigation_submenu_build_css_font_sizes( $context ) {
|
||||||
/**
|
/**
|
||||||
* Returns the top-level submenu SVG chevron icon.
|
* Returns the top-level submenu SVG chevron icon.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_submenu_render_submenu_icon() {
|
function block_core_navigation_submenu_render_submenu_icon() {
|
||||||
|
@ -52,6 +56,8 @@ function block_core_navigation_submenu_render_submenu_icon() {
|
||||||
/**
|
/**
|
||||||
* Renders the `core/navigation-submenu` block.
|
* Renders the `core/navigation-submenu` block.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The saved content.
|
* @param string $content The saved content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -81,6 +87,13 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
|
||||||
$kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
|
$kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
|
||||||
$is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
|
$is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
|
||||||
|
|
||||||
|
if ( is_post_type_archive() ) {
|
||||||
|
$queried_archive_link = get_post_type_archive_link( get_queried_object()->name );
|
||||||
|
if ( $attributes['url'] === $queried_archive_link ) {
|
||||||
|
$is_active = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$show_submenu_indicators = isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon'];
|
$show_submenu_indicators = isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon'];
|
||||||
$open_on_click = isset( $block->context['openSubmenusOnClick'] ) && $block->context['openSubmenusOnClick'];
|
$open_on_click = isset( $block->context['openSubmenusOnClick'] ) && $block->context['openSubmenusOnClick'];
|
||||||
$open_on_hover_and_click = isset( $block->context['openSubmenusOnClick'] ) && ! $block->context['openSubmenusOnClick'] &&
|
$open_on_hover_and_click = isset( $block->context['openSubmenusOnClick'] ) && ! $block->context['openSubmenusOnClick'] &&
|
||||||
|
@ -238,6 +251,8 @@ function render_block_core_navigation_submenu( $attributes, $content, $block ) {
|
||||||
/**
|
/**
|
||||||
* Register the navigation submenu block.
|
* Register the navigation submenu block.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @uses render_block_core_navigation_submenu()
|
* @uses render_block_core_navigation_submenu()
|
||||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,27 +7,36 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper functions used to render the navigation block.
|
* Helper functions used to render the navigation block.
|
||||||
|
*
|
||||||
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
class WP_Navigation_Block_Renderer {
|
class WP_Navigation_Block_Renderer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to determine whether or not a navigation has submenus.
|
* Used to determine whether or not a navigation has submenus.
|
||||||
|
*
|
||||||
|
* @since 6.5.0
|
||||||
*/
|
*/
|
||||||
private static $has_submenus = false;
|
private static $has_submenus = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to determine which blocks need an <li> wrapper.
|
* Used to determine which blocks need an <li> wrapper.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $needs_list_item_wrapper = array(
|
private static $needs_list_item_wrapper = array(
|
||||||
'core/site-title',
|
'core/site-title',
|
||||||
'core/site-logo',
|
'core/site-logo',
|
||||||
|
'core/social-links',
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Keeps track of all the navigation names that have been seen.
|
* Keeps track of all the navigation names that have been seen.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
private static $seen_menu_names = array();
|
private static $seen_menu_names = array();
|
||||||
|
@ -35,6 +44,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns whether or not this is responsive navigation.
|
* Returns whether or not this is responsive navigation.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return bool Returns whether or not this is responsive navigation.
|
* @return bool Returns whether or not this is responsive navigation.
|
||||||
*/
|
*/
|
||||||
|
@ -50,6 +61,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns whether or not a navigation has a submenu.
|
* Returns whether or not a navigation has a submenu.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
* @return bool Returns whether or not a navigation has a submenu and also sets the member variable.
|
* @return bool Returns whether or not a navigation has a submenu and also sets the member variable.
|
||||||
*/
|
*/
|
||||||
|
@ -87,6 +100,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Determine whether the navigation blocks is interactive.
|
* Determine whether the navigation blocks is interactive.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
* @return bool Returns whether or not to load the view script.
|
* @return bool Returns whether or not to load the view script.
|
||||||
|
@ -100,6 +115,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns whether or not a block needs a list item wrapper.
|
* Returns whether or not a block needs a list item wrapper.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param WP_Block $block The block.
|
* @param WP_Block $block The block.
|
||||||
* @return bool Returns whether or not a block needs a list item wrapper.
|
* @return bool Returns whether or not a block needs a list item wrapper.
|
||||||
*/
|
*/
|
||||||
|
@ -126,6 +143,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns the markup for a single inner block.
|
* Returns the markup for a single inner block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param WP_Block $inner_block The inner block.
|
* @param WP_Block $inner_block The inner block.
|
||||||
* @return string Returns the markup for a single inner block.
|
* @return string Returns the markup for a single inner block.
|
||||||
*/
|
*/
|
||||||
|
@ -143,6 +162,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns the html for the inner blocks of the navigation block.
|
* Returns the html for the inner blocks of the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
* @return string Returns the html for the inner blocks of the navigation block.
|
* @return string Returns the html for the inner blocks of the navigation block.
|
||||||
|
@ -200,6 +221,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Gets the inner blocks for the navigation block from the navigation post.
|
* Gets the inner blocks for the navigation block from the navigation post.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -235,6 +258,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Gets the inner blocks for the navigation block from the fallback.
|
* Gets the inner blocks for the navigation block from the fallback.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -252,6 +277,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Gets the inner blocks for the navigation block.
|
* Gets the inner blocks for the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
||||||
|
@ -310,6 +337,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Gets the name of the current navigation, if it has one.
|
* Gets the name of the current navigation, if it has one.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string Returns the name of the navigation.
|
* @return string Returns the name of the navigation.
|
||||||
*/
|
*/
|
||||||
|
@ -345,6 +374,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns the layout class for the navigation block.
|
* Returns the layout class for the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string Returns the layout class for the navigation block.
|
* @return string Returns the layout class for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -376,6 +407,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Return classes for the navigation block.
|
* Return classes for the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string Returns the classes for the navigation block.
|
* @return string Returns the classes for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -403,6 +436,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Get styles for the navigation block.
|
* Get styles for the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string Returns the styles for the navigation block.
|
* @return string Returns the styles for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -416,6 +451,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Get the responsive container markup
|
* Get the responsive container markup
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
* @param string $inner_blocks_html The markup for the inner blocks.
|
* @param string $inner_blocks_html The markup for the inner blocks.
|
||||||
|
@ -514,6 +551,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Get the wrapper attributes
|
* Get the wrapper attributes
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block_List $inner_blocks A list of inner blocks.
|
* @param WP_Block_List $inner_blocks A list of inner blocks.
|
||||||
* @return string Returns the navigation block markup.
|
* @return string Returns the navigation block markup.
|
||||||
|
@ -543,6 +582,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Gets the nav element directives.
|
* Gets the nav element directives.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param bool $is_interactive Whether the block is interactive.
|
* @param bool $is_interactive Whether the block is interactive.
|
||||||
* @return string the directives for the navigation element.
|
* @return string the directives for the navigation element.
|
||||||
*/
|
*/
|
||||||
|
@ -573,6 +614,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Handle view script module loading.
|
* Handle view script module loading.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
|
@ -597,6 +640,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns the markup for the navigation block.
|
* Returns the markup for the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
* @param WP_Block_List $inner_blocks The list of inner blocks.
|
||||||
* @return string Returns the navigation wrapper markup.
|
* @return string Returns the navigation wrapper markup.
|
||||||
|
@ -612,6 +657,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Returns a unique name for the navigation.
|
* Returns a unique name for the navigation.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return string Returns a unique name for the navigation.
|
* @return string Returns a unique name for the navigation.
|
||||||
*/
|
*/
|
||||||
|
@ -631,6 +678,8 @@ class WP_Navigation_Block_Renderer {
|
||||||
/**
|
/**
|
||||||
* Renders the navigation block.
|
* Renders the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The saved content.
|
* @param string $content The saved content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -676,6 +725,8 @@ if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||||
/**
|
/**
|
||||||
* Returns the menu items for a WordPress menu location.
|
* Returns the menu items for a WordPress menu location.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param string $location The menu location.
|
* @param string $location The menu location.
|
||||||
* @return array Menu items for the location.
|
* @return array Menu items for the location.
|
||||||
*/
|
*/
|
||||||
|
@ -712,6 +763,8 @@ if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||||
* Sorts a standard array of menu items into a nested structure keyed by the
|
* Sorts a standard array of menu items into a nested structure keyed by the
|
||||||
* id of the parent menu.
|
* id of the parent menu.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $menu_items Menu items to sort.
|
* @param array $menu_items Menu items to sort.
|
||||||
* @return array An array keyed by the id of the parent menu where each element
|
* @return array An array keyed by the id of the parent menu where each element
|
||||||
* is an array of menu items that belong to that parent.
|
* is an array of menu items that belong to that parent.
|
||||||
|
@ -734,6 +787,8 @@ if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||||
/**
|
/**
|
||||||
* Gets the inner blocks for the navigation block from the unstable location attribute.
|
* Gets the inner blocks for the navigation block from the unstable location attribute.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
* @return WP_Block_List Returns the inner blocks for the navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -753,6 +808,8 @@ if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||||
* Add Interactivity API directives to the navigation-submenu and page-list
|
* Add Interactivity API directives to the navigation-submenu and page-list
|
||||||
* blocks markup using the Tag Processor.
|
* blocks markup using the Tag Processor.
|
||||||
*
|
*
|
||||||
|
* @since 6.3.0
|
||||||
|
*
|
||||||
* @param WP_HTML_Tag_Processor $tags Markup of the navigation block.
|
* @param WP_HTML_Tag_Processor $tags Markup of the navigation block.
|
||||||
* @param array $block_attributes Block attributes.
|
* @param array $block_attributes Block attributes.
|
||||||
*
|
*
|
||||||
|
@ -814,6 +871,8 @@ function block_core_navigation_add_directives_to_submenu( $tags, $block_attribut
|
||||||
* Build an array with CSS classes and inline styles defining the colors
|
* Build an array with CSS classes and inline styles defining the colors
|
||||||
* which will be applied to the navigation markup in the front-end.
|
* which will be applied to the navigation markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $attributes Navigation block attributes.
|
* @param array $attributes Navigation block attributes.
|
||||||
*
|
*
|
||||||
* @return array Colors CSS classes and inline styles.
|
* @return array Colors CSS classes and inline styles.
|
||||||
|
@ -905,6 +964,8 @@ function block_core_navigation_build_css_colors( $attributes ) {
|
||||||
* Build an array with CSS classes and inline styles defining the font sizes
|
* Build an array with CSS classes and inline styles defining the font sizes
|
||||||
* which will be applied to the navigation markup in the front-end.
|
* which will be applied to the navigation markup in the front-end.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $attributes Navigation block attributes.
|
* @param array $attributes Navigation block attributes.
|
||||||
*
|
*
|
||||||
* @return array Font size CSS classes and inline styles.
|
* @return array Font size CSS classes and inline styles.
|
||||||
|
@ -933,6 +994,8 @@ function block_core_navigation_build_css_font_sizes( $attributes ) {
|
||||||
/**
|
/**
|
||||||
* Returns the top-level submenu SVG chevron icon.
|
* Returns the top-level submenu SVG chevron icon.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_render_submenu_icon() {
|
function block_core_navigation_render_submenu_icon() {
|
||||||
|
@ -945,6 +1008,8 @@ function block_core_navigation_render_submenu_icon() {
|
||||||
* it encounters whitespace. This is not a bug but rather how the parser
|
* it encounters whitespace. This is not a bug but rather how the parser
|
||||||
* is designed.
|
* is designed.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $parsed_blocks the parsed blocks to be normalized.
|
* @param array $parsed_blocks the parsed blocks to be normalized.
|
||||||
* @return array the normalized parsed blocks.
|
* @return array the normalized parsed blocks.
|
||||||
*/
|
*/
|
||||||
|
@ -963,6 +1028,8 @@ function block_core_navigation_filter_out_empty_blocks( $parsed_blocks ) {
|
||||||
/**
|
/**
|
||||||
* Returns true if the navigation block contains a nested navigation block.
|
* Returns true if the navigation block contains a nested navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @param WP_Block_List $inner_blocks Inner block instance to be normalized.
|
* @param WP_Block_List $inner_blocks Inner block instance to be normalized.
|
||||||
* @return bool true if the navigation block contains a nested navigation block.
|
* @return bool true if the navigation block contains a nested navigation block.
|
||||||
*/
|
*/
|
||||||
|
@ -986,6 +1053,8 @@ function block_core_navigation_block_contains_core_navigation( $inner_blocks ) {
|
||||||
* This aims to mirror how the fallback mechanic for wp_nav_menu works.
|
* This aims to mirror how the fallback mechanic for wp_nav_menu works.
|
||||||
* See https://developer.wordpress.org/reference/functions/wp_nav_menu/#more-information.
|
* See https://developer.wordpress.org/reference/functions/wp_nav_menu/#more-information.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @return array the array of blocks to be used as a fallback.
|
* @return array the array of blocks to be used as a fallback.
|
||||||
*/
|
*/
|
||||||
function block_core_navigation_get_fallback_blocks() {
|
function block_core_navigation_get_fallback_blocks() {
|
||||||
|
@ -1041,6 +1110,8 @@ function block_core_navigation_get_fallback_blocks() {
|
||||||
/**
|
/**
|
||||||
* Iterate through all inner blocks recursively and get navigation link block's post IDs.
|
* Iterate through all inner blocks recursively and get navigation link block's post IDs.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param WP_Block_List $inner_blocks Block list class instance.
|
* @param WP_Block_List $inner_blocks Block list class instance.
|
||||||
*
|
*
|
||||||
* @return array Array of post IDs.
|
* @return array Array of post IDs.
|
||||||
|
@ -1053,6 +1124,8 @@ function block_core_navigation_get_post_ids( $inner_blocks ) {
|
||||||
/**
|
/**
|
||||||
* Get post IDs from a navigation link block instance.
|
* Get post IDs from a navigation link block instance.
|
||||||
*
|
*
|
||||||
|
* @since 6.0.0
|
||||||
|
*
|
||||||
* @param WP_Block $block Instance of a block.
|
* @param WP_Block $block Instance of a block.
|
||||||
*
|
*
|
||||||
* @return array Array of post IDs.
|
* @return array Array of post IDs.
|
||||||
|
@ -1076,6 +1149,8 @@ function block_core_navigation_from_block_get_post_ids( $block ) {
|
||||||
/**
|
/**
|
||||||
* Renders the `core/navigation` block on server.
|
* Renders the `core/navigation` block on server.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $attributes The block attributes.
|
* @param array $attributes The block attributes.
|
||||||
* @param string $content The saved content.
|
* @param string $content The saved content.
|
||||||
* @param WP_Block $block The parsed block.
|
* @param WP_Block $block The parsed block.
|
||||||
|
@ -1089,6 +1164,8 @@ function render_block_core_navigation( $attributes, $content, $block ) {
|
||||||
/**
|
/**
|
||||||
* Register the navigation block.
|
* Register the navigation block.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @uses render_block_core_navigation()
|
* @uses render_block_core_navigation()
|
||||||
* @throws WP_Error An WP_Error exception parsing the block definition.
|
* @throws WP_Error An WP_Error exception parsing the block definition.
|
||||||
*/
|
*/
|
||||||
|
@ -1106,6 +1183,8 @@ add_action( 'init', 'register_block_core_navigation' );
|
||||||
/**
|
/**
|
||||||
* Filter that changes the parsed attribute values of navigation blocks contain typographic presets to contain the values directly.
|
* Filter that changes the parsed attribute values of navigation blocks contain typographic presets to contain the values directly.
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @param array $parsed_block The block being rendered.
|
* @param array $parsed_block The block being rendered.
|
||||||
*
|
*
|
||||||
* @return array The block being rendered without typographic presets.
|
* @return array The block being rendered without typographic presets.
|
||||||
|
@ -1140,6 +1219,8 @@ add_filter( 'render_block_data', 'block_core_navigation_typographic_presets_back
|
||||||
/**
|
/**
|
||||||
* Turns menu item data into a nested array of parsed blocks
|
* Turns menu item data into a nested array of parsed blocks
|
||||||
*
|
*
|
||||||
|
* @since 5.9.0
|
||||||
|
*
|
||||||
* @deprecated 6.3.0 Use WP_Navigation_Fallback::parse_blocks_from_menu_items() instead.
|
* @deprecated 6.3.0 Use WP_Navigation_Fallback::parse_blocks_from_menu_items() instead.
|
||||||
*
|
*
|
||||||
* @param array $menu_items An array of menu items that represent
|
* @param array $menu_items An array of menu items that represent
|
||||||
|
@ -1197,6 +1278,8 @@ function block_core_navigation_parse_blocks_from_menu_items( $menu_items, $menu_
|
||||||
/**
|
/**
|
||||||
* Get the classic navigation menu to use as a fallback.
|
* Get the classic navigation menu to use as a fallback.
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_classic_menu_fallback() instead.
|
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_classic_menu_fallback() instead.
|
||||||
*
|
*
|
||||||
* @return object WP_Term The classic navigation.
|
* @return object WP_Term The classic navigation.
|
||||||
|
@ -1241,6 +1324,8 @@ function block_core_navigation_get_classic_menu_fallback() {
|
||||||
/**
|
/**
|
||||||
* Converts a classic navigation to blocks.
|
* Converts a classic navigation to blocks.
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_classic_menu_fallback_blocks() instead.
|
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_classic_menu_fallback_blocks() instead.
|
||||||
*
|
*
|
||||||
* @param object $classic_nav_menu WP_Term The classic navigation object to convert.
|
* @param object $classic_nav_menu WP_Term The classic navigation object to convert.
|
||||||
|
@ -1283,6 +1368,8 @@ function block_core_navigation_get_classic_menu_fallback_blocks( $classic_nav_me
|
||||||
/**
|
/**
|
||||||
* If there's a classic menu then use it as a fallback.
|
* If there's a classic menu then use it as a fallback.
|
||||||
*
|
*
|
||||||
|
* @since 6.2.0
|
||||||
|
*
|
||||||
* @deprecated 6.3.0 Use WP_Navigation_Fallback::create_classic_menu_fallback() instead.
|
* @deprecated 6.3.0 Use WP_Navigation_Fallback::create_classic_menu_fallback() instead.
|
||||||
*
|
*
|
||||||
* @return array the normalized parsed blocks.
|
* @return array the normalized parsed blocks.
|
||||||
|
@ -1328,6 +1415,8 @@ function block_core_navigation_maybe_use_classic_menu_fallback() {
|
||||||
/**
|
/**
|
||||||
* Finds the most recently published `wp_navigation` Post.
|
* Finds the most recently published `wp_navigation` Post.
|
||||||
*
|
*
|
||||||
|
* @since 6.1.0
|
||||||
|
*
|
||||||
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_most_recently_published_navigation() instead.
|
* @deprecated 6.3.0 Use WP_Navigation_Fallback::get_most_recently_published_navigation() instead.
|
||||||
*
|
*
|
||||||
* @return WP_Post|null the first non-empty Navigation or null.
|
* @return WP_Post|null the first non-empty Navigation or null.
|
||||||
|
@ -1359,6 +1448,8 @@ function block_core_navigation_get_most_recently_published_navigation() {
|
||||||
/**
|
/**
|
||||||
* Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.
|
* Accepts the serialized markup of a block and its inner blocks, and returns serialized markup of the inner blocks.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param string $serialized_block The serialized markup of a block and its inner blocks.
|
* @param string $serialized_block The serialized markup of a block and its inner blocks.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
@ -1372,6 +1463,8 @@ function block_core_navigation_remove_serialized_parent_block( $serialized_block
|
||||||
* Mock a parsed block for the Navigation block given its inner blocks and the `wp_navigation` post object.
|
* Mock a parsed block for the Navigation block given its inner blocks and the `wp_navigation` post object.
|
||||||
* The `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is queried to add the `metadata.ignoredHookedBlocks` attribute.
|
* The `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is queried to add the `metadata.ignoredHookedBlocks` attribute.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
*
|
*
|
||||||
|
@ -1411,6 +1504,8 @@ function block_core_navigation_mock_parsed_block( $inner_blocks, $post ) {
|
||||||
* children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any
|
* children, the `wp_navigation` post's `_wp_ignored_hooked_blocks` meta is checked to see if any
|
||||||
* of those hooked blocks should be exempted from insertion.
|
* of those hooked blocks should be exempted from insertion.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
||||||
|
@ -1436,6 +1531,8 @@ function block_core_navigation_insert_hooked_blocks( $inner_blocks, $post ) {
|
||||||
* this function inserts ignoredHookedBlocks meta into it, and returns the serialized inner blocks in a
|
* this function inserts ignoredHookedBlocks meta into it, and returns the serialized inner blocks in a
|
||||||
* mock Navigation block wrapper.
|
* mock Navigation block wrapper.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
* @param array $inner_blocks Parsed inner blocks of a Navigation block.
|
||||||
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
* @param WP_Post $post `wp_navigation` post object corresponding to the block.
|
||||||
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
* @return string Serialized inner blocks in mock Navigation block wrapper, with hooked blocks inserted, if any.
|
||||||
|
@ -1539,6 +1636,8 @@ if ( has_filter( 'rest_insert_wp_navigation', $rest_insert_wp_navigation_core_ca
|
||||||
/**
|
/**
|
||||||
* Hooks into the REST API response for the core/navigation block and adds the first and last inner blocks.
|
* Hooks into the REST API response for the core/navigation block and adds the first and last inner blocks.
|
||||||
*
|
*
|
||||||
|
* @since 6.5.0
|
||||||
|
*
|
||||||
* @param WP_REST_Response $response The response object.
|
* @param WP_REST_Response $response The response object.
|
||||||
* @param WP_Post $post Post object.
|
* @param WP_Post $post Post object.
|
||||||
* @return WP_REST_Response The response object.
|
* @return WP_REST_Response The response object.
|
||||||
|
@ -1553,7 +1652,9 @@ function block_core_navigation_insert_hooked_blocks_into_rest_response( $respons
|
||||||
// Remove mock Navigation block wrapper.
|
// Remove mock Navigation block wrapper.
|
||||||
$content = block_core_navigation_remove_serialized_parent_block( $content );
|
$content = block_core_navigation_remove_serialized_parent_block( $content );
|
||||||
|
|
||||||
$response->data['content']['raw'] = $content;
|
$response->data['content']['raw'] = $content;
|
||||||
|
|
||||||
|
/** This filter is documented in wp-includes/post-template.php */
|
||||||
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
|
$response->data['content']['rendered'] = apply_filters( 'the_content', $content );
|
||||||
|
|
||||||
return $response;
|
return $response;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue