Plugin Updates
This commit is contained in:
@@ -47,6 +47,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-archives-editor"
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
@@ -54,6 +54,9 @@
|
||||
"margin": false,
|
||||
"padding": false
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-audio-editor",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-audio figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-audio{
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-audio{margin:0 0 1em}
|
||||
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-audio figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-audio{
|
||||
|
||||
2
wp/wp-includes/blocks/audio/theme.min.css
vendored
2
wp/wp-includes/blocks/audio/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-audio figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-audio{margin:0 0 1em}
|
||||
@@ -30,7 +30,11 @@
|
||||
"alignWide": false,
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true
|
||||
"padding": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"margin": false,
|
||||
"padding": false
|
||||
}
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
"__experimentalSkipSerialization": true,
|
||||
@@ -46,6 +50,9 @@
|
||||
"text": false,
|
||||
"background": false,
|
||||
"__experimentalDuotone": "img"
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"selectors": {
|
||||
|
||||
@@ -46,8 +46,50 @@ function render_block_core_block( $attributes ) {
|
||||
$content = $wp_embed->run_shortcode( $reusable_block->post_content );
|
||||
$content = $wp_embed->autoembed( $content );
|
||||
|
||||
// Back compat.
|
||||
// For blocks that have not been migrated in the editor, add some back compat
|
||||
// so that front-end rendering continues to work.
|
||||
|
||||
// This matches the `v2` deprecation. Removes the inner `values` property
|
||||
// from every item.
|
||||
if ( isset( $attributes['content'] ) ) {
|
||||
foreach ( $attributes['content'] as &$content_data ) {
|
||||
if ( isset( $content_data['values'] ) ) {
|
||||
$is_assoc_array = is_array( $content_data['values'] ) && ! wp_is_numeric_array( $content_data['values'] );
|
||||
|
||||
if ( $is_assoc_array ) {
|
||||
$content_data = $content_data['values'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This matches the `v1` deprecation. Rename `overrides` to `content`.
|
||||
if ( isset( $attributes['overrides'] ) && ! isset( $attributes['content'] ) ) {
|
||||
$attributes['content'] = $attributes['overrides'];
|
||||
}
|
||||
|
||||
/**
|
||||
* We set the `pattern/overrides` context through the `render_block_context`
|
||||
* filter so that it is available when a pattern's inner blocks are
|
||||
* rendering via do_blocks given it only receives the inner content.
|
||||
*/
|
||||
$has_pattern_overrides = isset( $attributes['content'] );
|
||||
if ( $has_pattern_overrides ) {
|
||||
$filter_block_context = static function ( $context ) use ( $attributes ) {
|
||||
$context['pattern/overrides'] = $attributes['content'];
|
||||
return $context;
|
||||
};
|
||||
add_filter( 'render_block_context', $filter_block_context, 1 );
|
||||
}
|
||||
|
||||
$content = do_blocks( $content );
|
||||
unset( $seen_refs[ $attributes['ref'] ] );
|
||||
|
||||
if ( $has_pattern_overrides ) {
|
||||
remove_filter( 'render_block_context', $filter_block_context, 1 );
|
||||
}
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,17 +4,24 @@
|
||||
"name": "core/block",
|
||||
"title": "Pattern",
|
||||
"category": "reusable",
|
||||
"description": "Create and save content to reuse across your site. Update the pattern, and the changes apply everywhere it’s used.",
|
||||
"description": "Reuse this design across your site.",
|
||||
"keywords": [ "reusable" ],
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"ref": {
|
||||
"type": "number"
|
||||
},
|
||||
"content": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"customClassName": false,
|
||||
"html": false,
|
||||
"inserter": false
|
||||
"inserter": false,
|
||||
"renaming": false,
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -36,8 +36,8 @@
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a,button",
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
@@ -97,7 +97,9 @@
|
||||
}
|
||||
},
|
||||
"reusable": false,
|
||||
"shadow": true,
|
||||
"shadow": {
|
||||
"__experimentalSkipSerialization": true
|
||||
},
|
||||
"spacing": {
|
||||
"__experimentalSkipSerialization": true,
|
||||
"padding": [ "horizontal", "vertical" ],
|
||||
@@ -118,7 +120,10 @@
|
||||
"width": true
|
||||
}
|
||||
},
|
||||
"__experimentalSelector": ".wp-block-button .wp-block-button__link"
|
||||
"__experimentalSelector": ".wp-block-button .wp-block-button__link",
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"styles": [
|
||||
{ "name": "fill", "label": "Fill", "isDefault": true },
|
||||
|
||||
@@ -14,44 +14,13 @@
|
||||
}
|
||||
.wp-block-button:focus{
|
||||
box-shadow:0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
outline:2px solid transparent;
|
||||
outline:2px solid #0000;
|
||||
outline-offset:-2px;
|
||||
}
|
||||
.wp-block-button[data-rich-text-placeholder]:after{
|
||||
opacity:.8;
|
||||
}
|
||||
|
||||
.wp-block-button__inline-link{
|
||||
color:#757575;
|
||||
height:0;
|
||||
max-width:290px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:290px;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:260px;
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:290px;
|
||||
}
|
||||
}
|
||||
.is-selected .wp-block-button__inline-link{
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
}
|
||||
|
||||
.wp-button-label__width .components-button-group{
|
||||
display:block;
|
||||
}
|
||||
.wp-button-label__width .components-base-control__field{
|
||||
margin-bottom:12px;
|
||||
}
|
||||
|
||||
div[data-type="core/button"]{
|
||||
display:table;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;max-width:290px;overflow:hidden}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
@@ -14,44 +14,13 @@
|
||||
}
|
||||
.wp-block-button:focus{
|
||||
box-shadow:0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
outline:2px solid transparent;
|
||||
outline:2px solid #0000;
|
||||
outline-offset:-2px;
|
||||
}
|
||||
.wp-block-button[data-rich-text-placeholder]:after{
|
||||
opacity:.8;
|
||||
}
|
||||
|
||||
.wp-block-button__inline-link{
|
||||
color:#757575;
|
||||
height:0;
|
||||
max-width:290px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:290px;
|
||||
}
|
||||
@media (min-width:782px){
|
||||
.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:260px;
|
||||
}
|
||||
}
|
||||
@media (min-width:960px){
|
||||
.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{
|
||||
max-width:290px;
|
||||
}
|
||||
}
|
||||
.is-selected .wp-block-button__inline-link{
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
}
|
||||
|
||||
.wp-button-label__width .components-button-group{
|
||||
display:block;
|
||||
}
|
||||
.wp-button-label__width .components-base-control__field{
|
||||
margin-bottom:12px;
|
||||
}
|
||||
|
||||
div[data-type="core/button"]{
|
||||
display:table;
|
||||
}
|
||||
|
||||
2
wp/wp-includes/blocks/button/editor.min.css
vendored
2
wp/wp-includes/blocks/button/editor.min.css
vendored
@@ -1,2 +1,2 @@
|
||||
.wp-block[data-align=center]>.wp-block-button{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align=right]>.wp-block-button{
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid transparent;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}.wp-block-button__inline-link{color:#757575;height:0;max-width:290px;overflow:hidden}.wp-block-button__inline-link-input__suggestions{max-width:290px}@media (min-width:782px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:260px}}@media (min-width:960px){.wp-block-button__inline-link,.wp-block-button__inline-link-input__suggestions{max-width:290px}}.is-selected .wp-block-button__inline-link{height:auto;overflow:visible}.wp-button-label__width .components-button-group{display:block}.wp-button-label__width .components-base-control__field{margin-bottom:12px}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{cursor:text;position:relative}.wp-block-button:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color);outline:2px solid #0000;outline-offset:-2px}.wp-block-button[data-rich-text-placeholder]:after{opacity:.8}div[data-type="core/button"]{display:table}.editor-styles-wrapper .wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.editor-styles-wrapper .wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
@@ -64,17 +64,17 @@
|
||||
border-radius:0 !important;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline,.wp-block-button.is-style-outline>.wp-block-button__link{
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{
|
||||
border:2px solid;
|
||||
padding:.667em 1.333em;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color){
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){
|
||||
color:currentColor;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background){
|
||||
background-color:transparent;
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){
|
||||
background-color:initial;
|
||||
background-image:none;
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link.is-style-outline,.wp-block-button.is-style-outline>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background){background-color:transparent;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){background-color:initial;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-right-width:medium}
|
||||
@@ -64,17 +64,17 @@
|
||||
border-radius:0 !important;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline,.wp-block-button.is-style-outline>.wp-block-button__link{
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{
|
||||
border:2px solid;
|
||||
padding:.667em 1.333em;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color){
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){
|
||||
color:currentColor;
|
||||
}
|
||||
|
||||
.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background){
|
||||
background-color:transparent;
|
||||
.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){
|
||||
background-color:initial;
|
||||
background-image:none;
|
||||
}
|
||||
|
||||
|
||||
2
wp/wp-includes/blocks/button/style.min.css
vendored
2
wp/wp-includes/blocks/button/style.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link.is-style-outline,.wp-block-button.is-style-outline>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background),.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background){background-color:transparent;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}.wp-block-button .wp-block-button__link:where(.is-style-outline),.wp-block-button:where(.is-style-outline)>.wp-block-button__link{border:2px solid;padding:.667em 1.333em}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-text-color),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-text-color){color:currentColor}.wp-block-button .wp-block-button__link:where(.is-style-outline):not(.has-background),.wp-block-button:where(.is-style-outline)>.wp-block-button__link:not(.has-background){background-color:initial;background-image:none}.wp-block-button .wp-block-button__link:where(.has-border-color){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-color]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-color]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-color]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-color]){border-left-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-style]){border-width:initial}.wp-block-button .wp-block-button__link:where([style*=border-top-style]){border-top-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-right-style]){border-right-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-bottom-style]){border-bottom-width:medium}.wp-block-button .wp-block-button__link:where([style*=border-left-style]){border-left-width:medium}
|
||||
@@ -4,6 +4,7 @@
|
||||
"name": "core/buttons",
|
||||
"title": "Buttons",
|
||||
"category": "design",
|
||||
"allowedBlocks": [ "core/button" ],
|
||||
"description": "Prompt visitors to take action with a group of button-style links.",
|
||||
"keywords": [ "link" ],
|
||||
"textdomain": "default",
|
||||
@@ -38,6 +39,9 @@
|
||||
"default": {
|
||||
"type": "flex"
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-buttons-editor",
|
||||
|
||||
@@ -33,10 +33,8 @@ function render_block_core_calendar( $attributes ) {
|
||||
str_contains( $permalink_structure, '%monthnum%' ) &&
|
||||
str_contains( $permalink_structure, '%year%' )
|
||||
) {
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$monthnum = $attributes['month'];
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$year = $attributes['year'];
|
||||
$year = $attributes['year'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +68,8 @@ function render_block_core_calendar( $attributes ) {
|
||||
$calendar
|
||||
);
|
||||
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$monthnum = $previous_monthnum;
|
||||
// phpcs:ignore WordPress.WP.GlobalVariablesOverride.OverrideProhibited
|
||||
$year = $previous_year;
|
||||
$year = $previous_year;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"style": "wp-block-calendar"
|
||||
|
||||
@@ -70,8 +70,7 @@ function render_block_core_categories( $attributes ) {
|
||||
function build_dropdown_script_block_core_categories( $dropdown_id ) {
|
||||
ob_start();
|
||||
?>
|
||||
<script type='text/javascript'>
|
||||
/* <![CDATA[ */
|
||||
<script>
|
||||
( function() {
|
||||
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
|
||||
function onCatChange() {
|
||||
@@ -81,10 +80,9 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
|
||||
}
|
||||
dropdown.onchange = onCatChange;
|
||||
})();
|
||||
/* ]]> */
|
||||
</script>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
return wp_get_inline_script_tag( str_replace( array( '<script>', '</script>' ), '', ob_get_clean() ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-categories-editor",
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "code",
|
||||
"__unstablePreserveWhiteSpace": true
|
||||
}
|
||||
@@ -56,6 +56,9 @@
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"style": "wp-block-code"
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"shadow": true,
|
||||
"spacing": {
|
||||
"blockGap": true,
|
||||
"padding": true,
|
||||
@@ -68,6 +69,9 @@
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"layout": true
|
||||
"layout": true,
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"name": "core/columns",
|
||||
"title": "Columns",
|
||||
"category": "design",
|
||||
"allowedBlocks": [ "core/column" ],
|
||||
"description": "Display content in multiple columns, with blocks added to each column.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
@@ -78,7 +79,11 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
},
|
||||
"shadow": true
|
||||
},
|
||||
"editorStyle": "wp-block-columns-editor",
|
||||
"style": "wp-block-columns"
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"style": "wp-block-comment-template"
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
"title": "Comments Pagination",
|
||||
"category": "theme",
|
||||
"parent": [ "core/comments" ],
|
||||
"allowedBlocks": [
|
||||
"core/comments-pagination-previous",
|
||||
"core/comments-pagination-numbers",
|
||||
"core/comments-pagination-next"
|
||||
],
|
||||
"description": "Displays a paginated navigation to next/previous set of comments, when applicable.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
@@ -48,6 +53,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-comments-pagination-editor",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"title": "Comments Title",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comments" ],
|
||||
"description": "Displays a title with the number of comments",
|
||||
"description": "Displays a title with the number of comments.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "postId", "postType" ],
|
||||
"attributes": {
|
||||
@@ -61,6 +61,9 @@
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalFontWeight": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
},
|
||||
"alt": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
"selector": "img",
|
||||
"attribute": "alt",
|
||||
"default": ""
|
||||
},
|
||||
"hasParallax": {
|
||||
@@ -42,6 +39,9 @@
|
||||
"customOverlayColor": {
|
||||
"type": "string"
|
||||
},
|
||||
"isUserOverlayColor": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"backgroundType": {
|
||||
"type": "string",
|
||||
"default": "image"
|
||||
@@ -114,6 +114,9 @@
|
||||
"__experimentalSkipSerialization": [ "gradients" ],
|
||||
"enableContrastChecker": false
|
||||
},
|
||||
"dimensions": {
|
||||
"aspectRatio": true
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
@@ -129,6 +132,9 @@
|
||||
},
|
||||
"layout": {
|
||||
"allowJustification": false
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-cover-editor",
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
background-color:#000;
|
||||
}
|
||||
.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{
|
||||
background-color:transparent;
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{
|
||||
background-color:inherit;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -14,7 +14,7 @@
|
||||
background-color:#000;
|
||||
}
|
||||
.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{
|
||||
background-color:transparent;
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{
|
||||
background-color:inherit;
|
||||
|
||||
2
wp/wp-includes/blocks/cover/style.min.css
vendored
2
wp/wp-includes/blocks/cover/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -13,8 +13,8 @@
|
||||
"default": false
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "summary"
|
||||
}
|
||||
},
|
||||
@@ -58,6 +58,9 @@
|
||||
},
|
||||
"layout": {
|
||||
"allowEditing": false
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-details-editor",
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
@@ -44,6 +44,9 @@
|
||||
"align": true,
|
||||
"spacing": {
|
||||
"margin": true
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-embed-editor",
|
||||
|
||||
@@ -10,9 +10,13 @@
|
||||
.wp-block-embed .components-placeholder__error{
|
||||
word-break:break-word;
|
||||
}
|
||||
.wp-block-embed .components-placeholder__learn-more{
|
||||
|
||||
.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;
|
||||
|
||||
@@ -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 .components-placeholder__learn-more{margin-top:1em}.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-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}
|
||||
@@ -10,9 +10,13 @@
|
||||
.wp-block-embed .components-placeholder__error{
|
||||
word-break:break-word;
|
||||
}
|
||||
.wp-block-embed .components-placeholder__learn-more{
|
||||
|
||||
.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;
|
||||
|
||||
2
wp/wp-includes/blocks/embed/editor.min.css
vendored
2
wp/wp-includes/blocks/embed/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-embed{clear:both;margin-left:0;margin-right:0}.wp-block-embed.is-loading{display:flex;justify-content:center}.wp-block-embed .components-placeholder__error{word-break:break-word}.wp-block-embed .components-placeholder__learn-more{margin-top:1em}.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-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}
|
||||
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-embed figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-embed{
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-embed{margin:0 0 1em}
|
||||
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-embed figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-embed{
|
||||
|
||||
2
wp/wp-includes/blocks/embed/theme.min.css
vendored
2
wp/wp-includes/blocks/embed/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-embed figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-embed{margin:0 0 1em}
|
||||
@@ -14,25 +14,8 @@
|
||||
*
|
||||
* @return string Returns the block content.
|
||||
*/
|
||||
function render_block_core_file( $attributes, $content, $block ) {
|
||||
$should_load_view_script = ! empty( $attributes['displayPreview'] );
|
||||
$view_js_file = 'wp-block-file-view';
|
||||
// If the script already exists, there is no point in removing it from viewScript.
|
||||
if ( ! wp_script_is( $view_js_file ) ) {
|
||||
$script_handles = $block->block_type->view_script_handles;
|
||||
|
||||
// If the script is not needed, and it is still in the `view_script_handles`, remove it.
|
||||
if ( ! $should_load_view_script && in_array( $view_js_file, $script_handles, true ) ) {
|
||||
$block->block_type->view_script_handles = array_diff( $script_handles, array( $view_js_file ) );
|
||||
}
|
||||
// If the script is needed, but it was previously removed, add it again.
|
||||
if ( $should_load_view_script && ! in_array( $view_js_file, $script_handles, true ) ) {
|
||||
$block->block_type->view_script_handles = array_merge( $script_handles, array( $view_js_file ) );
|
||||
}
|
||||
}
|
||||
|
||||
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(
|
||||
@@ -53,13 +36,26 @@ function render_block_core_file( $attributes, $content, $block ) {
|
||||
$content
|
||||
);
|
||||
|
||||
// If it uses the Interactivity API, add the directives.
|
||||
if ( $should_load_view_script ) {
|
||||
// If it's interactive, enqueue the script module and add the directives.
|
||||
if ( ! empty( $attributes['displayPreview'] ) ) {
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||
$module_url = gutenberg_url( '/build/interactivity/file.min.js' );
|
||||
}
|
||||
|
||||
wp_register_script_module(
|
||||
'@wordpress/block-library/file',
|
||||
isset( $module_url ) ? $module_url : includes_url( "blocks/file/view{$suffix}.js" ),
|
||||
array( '@wordpress/interactivity' ),
|
||||
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
||||
);
|
||||
wp_enqueue_script_module( '@wordpress/block-library/file' );
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( $content );
|
||||
$processor->next_tag();
|
||||
$processor->set_attribute( 'data-wp-interactive', '' );
|
||||
$processor->set_attribute( 'data-wp-interactive', 'core/file' );
|
||||
$processor->next_tag( 'object' );
|
||||
$processor->set_attribute( 'data-wp-bind--hidden', '!selectors.core.file.hasPdfPreview' );
|
||||
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
|
||||
$processor->set_attribute( 'hidden', true );
|
||||
return $processor->get_updated_html();
|
||||
}
|
||||
@@ -67,25 +63,6 @@ function render_block_core_file( $attributes, $content, $block ) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the view script has the `wp-interactivity` dependency.
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*/
|
||||
function block_core_file_ensure_interactivity_dependency() {
|
||||
global $wp_scripts;
|
||||
if (
|
||||
isset( $wp_scripts->registered['wp-block-file-view'] ) &&
|
||||
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-file-view']->deps, true )
|
||||
) {
|
||||
$wp_scripts->registered['wp-block-file-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_print_scripts', 'block_core_file_ensure_interactivity_dependency' );
|
||||
|
||||
/**
|
||||
* Registers the `core/file` block on server.
|
||||
*/
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
"attribute": "id"
|
||||
},
|
||||
"fileName": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a:not([download])"
|
||||
},
|
||||
"textLinkHref": {
|
||||
@@ -42,8 +42,8 @@
|
||||
"default": true
|
||||
},
|
||||
"downloadButtonText": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "a[download]"
|
||||
},
|
||||
"displayPreview": {
|
||||
@@ -72,7 +72,6 @@
|
||||
},
|
||||
"interactivity": true
|
||||
},
|
||||
"viewScript": "file:./view.min.js",
|
||||
"editorStyle": "wp-block-file-editor",
|
||||
"style": "wp-block-file"
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '3fd0154de23a0ecc28af');
|
||||
<?php return array('dependencies' => array(), 'version' => '498971a8a9512421f3b5');
|
||||
|
||||
@@ -1,12 +1,34 @@
|
||||
"use strict";
|
||||
(self["__WordPressPrivateInteractivityAPI__"] = self["__WordPressPrivateInteractivityAPI__"] || []).push([[81],{
|
||||
import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity";
|
||||
/******/ // The require scope
|
||||
/******/ var __webpack_require__ = {};
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/define property getters */
|
||||
/******/ (() => {
|
||||
/******/ // define getter functions for harmony exports
|
||||
/******/ __webpack_require__.d = (exports, definition) => {
|
||||
/******/ for(var key in definition) {
|
||||
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||||
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
||||
/******/ })();
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
|
||||
/***/ 149:
|
||||
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
||||
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@wordpress/interactivity/src/index.js + 15 modules
|
||||
var src = __webpack_require__(754);
|
||||
;// CONCATENATED MODULE: external "@wordpress/interactivity"
|
||||
var x = (y) => {
|
||||
var x = {}; __webpack_require__.d(x, y); return x
|
||||
}
|
||||
var y = (x) => (() => (x))
|
||||
const interactivity_namespaceObject = x({ ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/utils/index.js
|
||||
/**
|
||||
* Uses a combination of user agent matching and feature detection to determine whether
|
||||
@@ -53,6 +75,7 @@ const createActiveXObject = type => {
|
||||
}
|
||||
return ax;
|
||||
};
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/file/view.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
@@ -62,21 +85,13 @@ const createActiveXObject = type => {
|
||||
* Internal dependencies
|
||||
*/
|
||||
|
||||
(0,src/* store */.h)({
|
||||
selectors: {
|
||||
core: {
|
||||
file: {
|
||||
hasPdfPreview: browserSupportsPdfs
|
||||
}
|
||||
(0,interactivity_namespaceObject.store)('core/file', {
|
||||
state: {
|
||||
get hasPdfPreview() {
|
||||
return browserSupportsPdfs();
|
||||
}
|
||||
}
|
||||
}, {
|
||||
lock: true
|
||||
});
|
||||
|
||||
/***/ })
|
||||
|
||||
},
|
||||
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
||||
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
||||
/******/ var __webpack_exports__ = (__webpack_exec__(149));
|
||||
/******/ }
|
||||
]);
|
||||
@@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '8a0237493a27c0d781aa');
|
||||
<?php return array('dependencies' => array(), 'version' => '9c04187f1796859989c3');
|
||||
|
||||
2
wp/wp-includes/blocks/file/view.min.js
vendored
2
wp/wp-includes/blocks/file/view.min.js
vendored
@@ -1 +1 @@
|
||||
"use strict";(self.__WordPressPrivateInteractivityAPI__=self.__WordPressPrivateInteractivityAPI__||[]).push([[81],{149:function(i,t,e){var n=e(754);const o=i=>{let t;try{t=new window.ActiveXObject(i)}catch(i){t=void 0}return t};(0,n.h)({selectors:{core:{file:{hasPdfPreview:()=>!(window.navigator.userAgent.indexOf("Mobi")>-1)&&(!(window.navigator.userAgent.indexOf("Android")>-1)&&(!(window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2)&&!((window.ActiveXObject||"ActiveXObject"in window)&&!o("AcroPDF.PDF")&&!o("PDF.PdfCtrl"))))}}}})}},function(i){var t;t=149,i(i.s=t)}]);
|
||||
import*as e from"@wordpress/interactivity";var t={d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const o=(e=>{var o={};return t.d(o,e),o})({store:()=>e.store}),r=e=>{let t;try{t=new window.ActiveXObject(e)}catch(e){t=void 0}return t};(0,o.store)("core/file",{state:{get hasPdfPreview(){return!(window.navigator.userAgent.indexOf("Mobi")>-1||window.navigator.userAgent.indexOf("Android")>-1||window.navigator.userAgent.indexOf("Macintosh")>-1&&window.navigator.maxTouchPoints&&window.navigator.maxTouchPoints>2||(window.ActiveXObject||"ActiveXObject"in window)&&!r("AcroPDF.PDF")&&!r("PDF.PdfCtrl"))}}},{lock:!0});
|
||||
@@ -68,18 +68,6 @@ function render_block_core_footnotes( $attributes, $content, $block ) {
|
||||
* @since 6.3.0
|
||||
*/
|
||||
function register_block_core_footnotes() {
|
||||
foreach ( array( 'post', 'page' ) as $post_type ) {
|
||||
register_post_meta(
|
||||
$post_type,
|
||||
'footnotes',
|
||||
array(
|
||||
'show_in_rest' => true,
|
||||
'single' => true,
|
||||
'type' => 'string',
|
||||
'revisions_enabled' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/footnotes',
|
||||
array(
|
||||
@@ -89,6 +77,40 @@ function register_block_core_footnotes() {
|
||||
}
|
||||
add_action( 'init', 'register_block_core_footnotes' );
|
||||
|
||||
|
||||
/**
|
||||
* Registers the footnotes meta field required for footnotes to work.
|
||||
*
|
||||
* @since 6.5.0
|
||||
*/
|
||||
function register_block_core_footnotes_post_meta() {
|
||||
$post_types = get_post_types( array( 'show_in_rest' => true ) );
|
||||
foreach ( $post_types as $post_type ) {
|
||||
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
|
||||
if (
|
||||
post_type_supports( $post_type, 'editor' ) &&
|
||||
post_type_supports( $post_type, 'custom-fields' ) &&
|
||||
post_type_supports( $post_type, 'revisions' )
|
||||
) {
|
||||
register_post_meta(
|
||||
$post_type,
|
||||
'footnotes',
|
||||
array(
|
||||
'show_in_rest' => true,
|
||||
'single' => true,
|
||||
'type' => 'string',
|
||||
'revisions_enabled' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Most post types are registered at priority 10, so use priority 20 here in
|
||||
* order to catch them.
|
||||
*/
|
||||
add_action( 'init', 'register_block_core_footnotes_post_meta', 20 );
|
||||
|
||||
/**
|
||||
* Adds the footnotes field to the revisions display.
|
||||
*
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"name": "core/footnotes",
|
||||
"title": "Footnotes",
|
||||
"category": "text",
|
||||
"description": "",
|
||||
"description": "Display footnotes added to the page.",
|
||||
"keywords": [ "references" ],
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "postId", "postType" ],
|
||||
@@ -33,6 +33,7 @@
|
||||
"html": false,
|
||||
"multiple": false,
|
||||
"reusable": false,
|
||||
"inserter": false,
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true,
|
||||
@@ -54,6 +55,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"style": "wp-block-footnotes"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
width:96%;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce img::selection{
|
||||
background-color:transparent;
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce div.mceTemp{
|
||||
-ms-user-select:element;
|
||||
@@ -96,14 +96,14 @@
|
||||
padding-top:.5em;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview{
|
||||
border:1px solid transparent;
|
||||
border:1px solid #0000;
|
||||
clear:both;
|
||||
margin-bottom:16px;
|
||||
position:relative;
|
||||
width:99.99%;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview iframe{
|
||||
background:transparent;
|
||||
background:#0000;
|
||||
display:block;
|
||||
max-width:100%;
|
||||
}
|
||||
@@ -122,17 +122,17 @@
|
||||
padding:10px;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .wpview-error{
|
||||
word-wrap:break-word;
|
||||
border:1px solid #ddd;
|
||||
margin:0;
|
||||
padding:1em 0;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .wpview-error p{
|
||||
margin:0;
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview[data-mce-selected] .loading-placeholder,.wp-block-freeform.block-library-rich-text__tinymce .wpview[data-mce-selected] .wpview-error{
|
||||
border-color:transparent;
|
||||
border-color:#0000;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .dashicons{
|
||||
display:block;
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
div[data-type="core/freeform"]:before{
|
||||
border:1px solid #ddd;
|
||||
outline:1px solid transparent;
|
||||
outline:1px solid #0000;
|
||||
transition:border-color .1s linear,box-shadow .1s linear;
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce){
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -76,7 +76,7 @@
|
||||
width:96%;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce img::selection{
|
||||
background-color:transparent;
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce div.mceTemp{
|
||||
-ms-user-select:element;
|
||||
@@ -96,14 +96,14 @@
|
||||
padding-top:.5em;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview{
|
||||
border:1px solid transparent;
|
||||
border:1px solid #0000;
|
||||
clear:both;
|
||||
margin-bottom:16px;
|
||||
position:relative;
|
||||
width:99.99%;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview iframe{
|
||||
background:transparent;
|
||||
background:#0000;
|
||||
display:block;
|
||||
max-width:100%;
|
||||
}
|
||||
@@ -122,17 +122,17 @@
|
||||
padding:10px;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .wpview-error{
|
||||
word-wrap:break-word;
|
||||
border:1px solid #ddd;
|
||||
margin:0;
|
||||
padding:1em 0;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .wpview-error p{
|
||||
margin:0;
|
||||
text-align:center;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview[data-mce-selected] .loading-placeholder,.wp-block-freeform.block-library-rich-text__tinymce .wpview[data-mce-selected] .wpview-error{
|
||||
border-color:transparent;
|
||||
border-color:#0000;
|
||||
}
|
||||
.wp-block-freeform.block-library-rich-text__tinymce .wpview .dashicons{
|
||||
display:block;
|
||||
@@ -208,7 +208,7 @@
|
||||
|
||||
div[data-type="core/freeform"]:before{
|
||||
border:1px solid #ddd;
|
||||
outline:1px solid transparent;
|
||||
outline:1px solid #0000;
|
||||
transition:border-color .1s linear,box-shadow .1s linear;
|
||||
}
|
||||
@media (prefers-reduced-motion:reduce){
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,17 +33,18 @@ function block_core_gallery_data_id_backcompatibility( $parsed_block ) {
|
||||
add_filter( 'render_block_data', 'block_core_gallery_data_id_backcompatibility' );
|
||||
|
||||
/**
|
||||
* Adds a style tag for the --wp--style--unstable-gallery-gap var.
|
||||
*
|
||||
* The Gallery block needs to recalculate Image block width based on
|
||||
* the current gap setting in order to maintain the number of flex columns
|
||||
* so a css var is added to allow this.
|
||||
* Renders the `core/gallery` block on the server.
|
||||
*
|
||||
* @param array $attributes Attributes of the block being rendered.
|
||||
* @param string $content Content of the block being rendered.
|
||||
* @return string The content of the block being rendered.
|
||||
*/
|
||||
function block_core_gallery_render( $attributes, $content ) {
|
||||
// Adds a style tag for the --wp--style--unstable-gallery-gap var.
|
||||
// The Gallery block needs to recalculate Image block width based on
|
||||
// the current gap setting in order to maintain the number of flex columns
|
||||
// so a css var is added to allow this.
|
||||
|
||||
$gap = $attributes['style']['spacing']['blockGap'] ?? null;
|
||||
// Skip if gap value contains unsupported characters.
|
||||
// Regex for CSS value borrowed from `safecss_filter_attr`, and used here
|
||||
@@ -115,7 +116,51 @@ function block_core_gallery_render( $attributes, $content ) {
|
||||
'context' => 'block-supports',
|
||||
)
|
||||
);
|
||||
return (string) $processed_content;
|
||||
|
||||
// The WP_HTML_Tag_Processor class calls get_updated_html() internally
|
||||
// when the instance is treated as a string, but here we explicitly
|
||||
// convert it to a string.
|
||||
$updated_content = $processed_content->get_updated_html();
|
||||
|
||||
/*
|
||||
* Randomize the order of image blocks. Ideally we should shuffle
|
||||
* the `$parsed_block['innerBlocks']` via the `render_block_data` hook.
|
||||
* However, this hook doesn't apply inner block updates when blocks are
|
||||
* nested.
|
||||
* @todo: In the future, if this hook supports updating innerBlocks in
|
||||
* nested blocks, it should be refactored.
|
||||
*
|
||||
* @see: https://github.com/WordPress/gutenberg/pull/58733
|
||||
*/
|
||||
if ( empty( $attributes['randomOrder'] ) ) {
|
||||
return $updated_content;
|
||||
}
|
||||
|
||||
// This pattern matches figure elements with the `wp-block-image` class to
|
||||
// avoid the gallery's wrapping `figure` element and extract images only.
|
||||
$pattern = '/<figure[^>]*\bwp-block-image\b[^>]*>.*?<\/figure>/';
|
||||
|
||||
// Find all Image blocks.
|
||||
preg_match_all( $pattern, $updated_content, $matches );
|
||||
if ( ! $matches ) {
|
||||
return $updated_content;
|
||||
}
|
||||
$image_blocks = $matches[0];
|
||||
|
||||
// Randomize the order of Image blocks.
|
||||
shuffle( $image_blocks );
|
||||
$i = 0;
|
||||
$content = preg_replace_callback(
|
||||
$pattern,
|
||||
static function () use ( $image_blocks, &$i ) {
|
||||
$new_image_block = $image_blocks[ $i ];
|
||||
++$i;
|
||||
return $new_image_block;
|
||||
},
|
||||
$updated_content
|
||||
);
|
||||
|
||||
return $content;
|
||||
}
|
||||
/**
|
||||
* Registers the `core/gallery` block on server.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"name": "core/gallery",
|
||||
"title": "Gallery",
|
||||
"category": "media",
|
||||
"allowedBlocks": [ "core/image" ],
|
||||
"description": "Display multiple images in a rich gallery.",
|
||||
"keywords": [ "images", "photos" ],
|
||||
"textdomain": "default",
|
||||
@@ -46,8 +47,8 @@
|
||||
"attribute": "data-id"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": ".blocks-gallery-item__caption"
|
||||
}
|
||||
}
|
||||
@@ -72,14 +73,18 @@
|
||||
"maximum": 8
|
||||
},
|
||||
"caption": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": ".blocks-gallery-caption"
|
||||
},
|
||||
"imageCrop": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"randomOrder": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"fixedHeight": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
@@ -132,6 +137,9 @@
|
||||
"default": {
|
||||
"type": "flex"
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-gallery-editor",
|
||||
|
||||
@@ -65,7 +65,7 @@ figure.wp-block-gallery .components-spinner{
|
||||
box-shadow:0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset;
|
||||
content:"";
|
||||
left:0;
|
||||
outline:2px solid transparent;
|
||||
outline:2px solid #0000;
|
||||
pointer-events:none;
|
||||
position:absolute;
|
||||
right:0;
|
||||
@@ -104,7 +104,7 @@ figure.wp-block-gallery .components-spinner{
|
||||
}
|
||||
}
|
||||
.block-library-gallery-item__inline-menu:hover{
|
||||
box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1);
|
||||
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{
|
||||
|
||||
@@ -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 transparent;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 rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@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}
|
||||
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}
|
||||
@@ -65,7 +65,7 @@ figure.wp-block-gallery .components-spinner{
|
||||
box-shadow:0 0 0 1px #fff inset, 0 0 0 3px var(--wp-admin-theme-color) inset;
|
||||
content:"";
|
||||
left:0;
|
||||
outline:2px solid transparent;
|
||||
outline:2px solid #0000;
|
||||
pointer-events:none;
|
||||
position:absolute;
|
||||
right:0;
|
||||
@@ -104,7 +104,7 @@ figure.wp-block-gallery .components-spinner{
|
||||
}
|
||||
}
|
||||
.block-library-gallery-item__inline-menu:hover{
|
||||
box-shadow:0 .7px 1px rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1);
|
||||
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{
|
||||
|
||||
2
wp/wp-includes/blocks/gallery/editor.min.css
vendored
2
wp/wp-includes/blocks/gallery/editor.min.css
vendored
@@ -1 +1 @@
|
||||
figure.wp-block-gallery{display:block}figure.wp-block-gallery>.blocks-gallery-caption{flex:0 0 100%}figure.wp-block-gallery>.blocks-gallery-media-placeholder-wrapper{flex-basis:100%}figure.wp-block-gallery .wp-block-image .components-notice.is-error{display:block}figure.wp-block-gallery .wp-block-image .components-notice__content{margin:4px 0}figure.wp-block-gallery .wp-block-image .components-notice__dismiss{position:absolute;right:5px;top:0}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .components-placeholder__label{display:none}figure.wp-block-gallery .block-editor-media-placeholder.is-appender .block-editor-media-placeholder__button{margin-bottom:0}figure.wp-block-gallery .block-editor-media-placeholder{margin:0}figure.wp-block-gallery .block-editor-media-placeholder .components-placeholder__label{display:flex}figure.wp-block-gallery .block-editor-media-placeholder figcaption{z-index:2}figure.wp-block-gallery .components-spinner{left:50%;margin-left:-9px;margin-top:-9px;position:absolute;top:50%}.gallery-settings-buttons .components-button:first-child{margin-right:8px}.gallery-image-sizes .components-base-control__label{display:block;margin-bottom:4px}.gallery-image-sizes .gallery-image-sizes__loading{align-items:center;color:#757575;display:flex;font-size:12px}.gallery-image-sizes .components-spinner{margin:0 8px 0 4px}.blocks-gallery-item figure:not(.is-selected):focus,.blocks-gallery-item img:focus{outline:none}.blocks-gallery-item figure.is-selected:before{bottom:0;box-shadow:0 0 0 1px #fff inset,0 0 0 3px var(--wp-admin-theme-color) inset;content:"";left:0;outline:2px solid transparent;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 rgba(0,0,0,.1),0 1.2px 1.7px -.2px rgba(0,0,0,.1),0 2.3px 3.3px -.5px rgba(0,0,0,.1)}@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}
|
||||
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}
|
||||
@@ -31,7 +31,7 @@
|
||||
width:auto;
|
||||
}
|
||||
.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{
|
||||
background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent);
|
||||
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
|
||||
bottom:0;
|
||||
box-sizing:border-box;
|
||||
color:#fff;
|
||||
@@ -134,7 +134,7 @@ figure.wp-block-gallery.has-nested-images{
|
||||
width:auto;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
|
||||
background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent);
|
||||
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
|
||||
bottom:0;
|
||||
box-sizing:border-box;
|
||||
color:#fff;
|
||||
@@ -145,8 +145,36 @@ figure.wp-block-gallery.has-nested-images{
|
||||
padding:0 8px 8px;
|
||||
position:absolute;
|
||||
right:0;
|
||||
scrollbar-color:#0000 #0000;
|
||||
scrollbar-gutter:stable both-edges;
|
||||
scrollbar-width:thin;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
will-change:transform;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{
|
||||
height:12px;
|
||||
width:12px;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{
|
||||
background-clip:padding-box;
|
||||
background-color:initial;
|
||||
border:3px solid #0000;
|
||||
border-radius:8px;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{
|
||||
background-color:#fffc;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{
|
||||
scrollbar-color:#fffc #0000;
|
||||
}
|
||||
@media (hover:none){
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
|
||||
scrollbar-color:#fffc #0000;
|
||||
}
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{
|
||||
display:inline;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -31,7 +31,7 @@
|
||||
width:auto;
|
||||
}
|
||||
.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{
|
||||
background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent);
|
||||
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
|
||||
bottom:0;
|
||||
box-sizing:border-box;
|
||||
color:#fff;
|
||||
@@ -134,7 +134,7 @@ figure.wp-block-gallery.has-nested-images{
|
||||
width:auto;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
|
||||
background:linear-gradient(0deg, rgba(0,0,0,.7), rgba(0,0,0,.3) 70%, transparent);
|
||||
background:linear-gradient(0deg, #000000b3, #0000004d 70%, #0000);
|
||||
bottom:0;
|
||||
box-sizing:border-box;
|
||||
color:#fff;
|
||||
@@ -145,8 +145,36 @@ figure.wp-block-gallery.has-nested-images{
|
||||
overflow:auto;
|
||||
padding:0 8px 8px;
|
||||
position:absolute;
|
||||
scrollbar-color:#0000 #0000;
|
||||
scrollbar-gutter:stable both-edges;
|
||||
scrollbar-width:thin;
|
||||
text-align:center;
|
||||
width:100%;
|
||||
will-change:transform;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{
|
||||
height:12px;
|
||||
width:12px;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{
|
||||
background-color:initial;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{
|
||||
background-clip:padding-box;
|
||||
background-color:initial;
|
||||
border:3px solid #0000;
|
||||
border-radius:8px;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{
|
||||
background-color:#fffc;
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{
|
||||
scrollbar-color:#fffc #0000;
|
||||
}
|
||||
@media (hover:none){
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{
|
||||
scrollbar-color:#fffc #0000;
|
||||
}
|
||||
}
|
||||
.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{
|
||||
display:inline;
|
||||
|
||||
2
wp/wp-includes/blocks/gallery/style.min.css
vendored
2
wp/wp-includes/blocks/gallery/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -4,5 +4,5 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .blocks-gallery-caption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:hsla(0,0%,100%,.65)}
|
||||
.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:#ffffffa6}
|
||||
@@ -4,5 +4,5 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .blocks-gallery-caption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
2
wp/wp-includes/blocks/gallery/theme.min.css
vendored
2
wp/wp-includes/blocks/gallery/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:hsla(0,0%,100%,.65)}
|
||||
.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:#ffffffa6}
|
||||
@@ -24,13 +24,16 @@
|
||||
"__experimentalOnEnter": true,
|
||||
"__experimentalOnMerge": true,
|
||||
"__experimentalSettings": true,
|
||||
"__experimentalMetadata": true,
|
||||
"align": [ "wide", "full" ],
|
||||
"anchor": true,
|
||||
"ariaLabel": true,
|
||||
"html": false,
|
||||
"background": {
|
||||
"backgroundImage": true
|
||||
"backgroundImage": true,
|
||||
"backgroundSize": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"backgroundImage": true
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"gradients": true,
|
||||
@@ -84,6 +87,9 @@
|
||||
},
|
||||
"layout": {
|
||||
"allowSizingOnChildren": true
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-group-editor",
|
||||
|
||||
@@ -12,10 +12,9 @@
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "h1,h2,h3,h4,h5,h6",
|
||||
"default": "",
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
"level": {
|
||||
@@ -57,13 +56,14 @@
|
||||
"__experimentalTextDecoration": true,
|
||||
"__experimentalWritingMode": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true,
|
||||
"fontAppearance": true,
|
||||
"textTransform": true
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"__unstablePasteTextInline": true,
|
||||
"__experimentalSlashInserter": true
|
||||
"__experimentalSlashInserter": true,
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-heading-editor",
|
||||
"style": "wp-block-heading"
|
||||
|
||||
@@ -129,7 +129,10 @@ function block_core_home_link_build_li_wrapper_attributes( $context ) {
|
||||
*/
|
||||
function render_block_core_home_link( $attributes, $content, $block ) {
|
||||
if ( empty( $attributes['label'] ) ) {
|
||||
return '';
|
||||
// Using a fallback for the label attribute allows rendering the block even if no attributes have been set,
|
||||
// e.g. when using the block as a hooked block.
|
||||
// Note that the fallback value needs to be kept in sync with the one set in `edit.js` (upon first loading the block in the editor).
|
||||
$attributes['label'] = __( 'Home' );
|
||||
}
|
||||
$aria_current = '';
|
||||
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
},
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-home-link-editor",
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
"supports": {
|
||||
"customClassName": false,
|
||||
"className": false,
|
||||
"html": false
|
||||
"html": false,
|
||||
"interactivity": {
|
||||
"clientNavigation": true
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-html-editor"
|
||||
}
|
||||
|
||||
@@ -25,5 +25,5 @@
|
||||
.block-library-html__edit .block-editor-plain-text:focus{
|
||||
border-color:var(--wp-admin-theme-color) !important;
|
||||
box-shadow:0 0 0 1px var(--wp-admin-theme-color) !important;
|
||||
outline:2px solid transparent !important;
|
||||
outline:2px solid #0000 !important;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;position:absolute;right:0;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important}
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;position:absolute;right:0;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid #0000!important}
|
||||
@@ -25,5 +25,5 @@
|
||||
.block-library-html__edit .block-editor-plain-text:focus{
|
||||
border-color:var(--wp-admin-theme-color) !important;
|
||||
box-shadow:0 0 0 1px var(--wp-admin-theme-color) !important;
|
||||
outline:2px solid transparent !important;
|
||||
outline:2px solid #0000 !important;
|
||||
}
|
||||
2
wp/wp-includes/blocks/html/editor.min.css
vendored
2
wp/wp-includes/blocks/html/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;left:0;position:absolute;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid transparent!important}
|
||||
.block-library-html__edit .block-library-html__preview-overlay{height:100%;left:0;position:absolute;top:0;width:100%}.block-library-html__edit .block-editor-plain-text{background:#fff!important;border:1px solid #1e1e1e!important;border-radius:2px!important;box-shadow:none!important;box-sizing:border-box;color:#1e1e1e!important;font-family:Menlo,Consolas,monaco,monospace!important;font-size:16px!important;max-height:250px;padding:12px!important}@media (min-width:600px){.block-library-html__edit .block-editor-plain-text{font-size:13px!important}}.block-library-html__edit .block-editor-plain-text:focus{border-color:var(--wp-admin-theme-color)!important;box-shadow:0 0 0 1px var(--wp-admin-theme-color)!important;outline:2px solid #0000!important}
|
||||
@@ -20,29 +20,26 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( $content );
|
||||
$p = new WP_HTML_Tag_Processor( $content );
|
||||
|
||||
if ( ! $processor->next_tag( 'img' ) || null === $processor->get_attribute( 'src' ) ) {
|
||||
if ( ! $p->next_tag( 'img' ) || null === $p->get_attribute( 'src' ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if ( isset( $attributes['data-id'] ) ) {
|
||||
// Add the data-id="$id" attribute to the img element
|
||||
// to provide backwards compatibility for the Gallery Block,
|
||||
// which now wraps Image Blocks within innerBlocks.
|
||||
// The data-id attribute is added in a core/gallery `render_block_data` hook.
|
||||
$processor->set_attribute( 'data-id', $attributes['data-id'] );
|
||||
// Adds the data-id="$id" attribute to the img element to provide backwards
|
||||
// compatibility for the Gallery Block, which now wraps Image Blocks within
|
||||
// innerBlocks. The data-id attribute is added in a core/gallery
|
||||
// `render_block_data` hook.
|
||||
$p->set_attribute( 'data-id', $attributes['data-id'] );
|
||||
}
|
||||
|
||||
$link_destination = isset( $attributes['linkDestination'] ) ? $attributes['linkDestination'] : 'none';
|
||||
$lightbox_settings = block_core_image_get_lightbox_settings( $block->parsed_block );
|
||||
|
||||
$view_js_file_handle = 'wp-block-image-view';
|
||||
$script_handles = $block->block_type->view_script_handles;
|
||||
|
||||
/*
|
||||
* If the lightbox is enabled and the image is not linked, add the filter
|
||||
* and the JavaScript view file.
|
||||
* If the lightbox is enabled and the image is not linked, adds the filter and
|
||||
* the JavaScript view file.
|
||||
*/
|
||||
if (
|
||||
isset( $lightbox_settings ) &&
|
||||
@@ -50,34 +47,37 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||
isset( $lightbox_settings['enabled'] ) &&
|
||||
true === $lightbox_settings['enabled']
|
||||
) {
|
||||
$block->block_type->supports['interactivity'] = true;
|
||||
|
||||
if ( ! in_array( $view_js_file_handle, $script_handles, true ) ) {
|
||||
$block->block_type->view_script_handles = array_merge( $script_handles, array( $view_js_file_handle ) );
|
||||
$suffix = wp_scripts_get_suffix();
|
||||
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN ) {
|
||||
$module_url = gutenberg_url( '/build/interactivity/image.min.js' );
|
||||
}
|
||||
|
||||
wp_register_script_module(
|
||||
'@wordpress/block-library/image',
|
||||
isset( $module_url ) ? $module_url : includes_url( "blocks/image/view{$suffix}.js" ),
|
||||
array( '@wordpress/interactivity' ),
|
||||
defined( 'GUTENBERG_VERSION' ) ? GUTENBERG_VERSION : get_bloginfo( 'version' )
|
||||
);
|
||||
|
||||
wp_enqueue_script_module( '@wordpress/block-library/image' );
|
||||
|
||||
/*
|
||||
* This render needs to happen in a filter with priority 15 to ensure
|
||||
* that it runs after the duotone filter and that duotone styles are
|
||||
* applied to the image in the lightbox. We also need to ensure that the
|
||||
* lightbox works with any plugins that might use filters as well. We
|
||||
* can consider removing this in the future if the way the blocks are
|
||||
* rendered changes, or if a new kind of filter is introduced.
|
||||
* This render needs to happen in a filter with priority 15 to ensure that
|
||||
* it runs after the duotone filter and that duotone styles are applied to
|
||||
* the image in the lightbox. Lightbox has to work with any plugins that
|
||||
* might use filters as well. Removing this can be considered in the future
|
||||
* if the way the blocks are rendered changes, or if a new kind of filter is
|
||||
* introduced.
|
||||
*/
|
||||
add_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15, 2 );
|
||||
} else {
|
||||
/*
|
||||
* Remove the filter and the JavaScript view file if previously added by
|
||||
* other Image blocks.
|
||||
* Remove the filter if previously added by other Image blocks.
|
||||
*/
|
||||
remove_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15 );
|
||||
// If the script is not needed, and it is still in the `view_script_handles`, remove it.
|
||||
if ( in_array( $view_js_file_handle, $script_handles, true ) ) {
|
||||
$block->block_type->view_script_handles = array_diff( $script_handles, array( $view_js_file_handle ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $processor->get_updated_html();
|
||||
return $p->get_updated_html();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,15 +90,9 @@ function render_block_core_image( $attributes, $content, $block ) {
|
||||
* @return array Filtered block data.
|
||||
*/
|
||||
function block_core_image_get_lightbox_settings( $block ) {
|
||||
// Get the lightbox setting from the block attributes.
|
||||
// Gets the lightbox setting from the block attributes.
|
||||
if ( isset( $block['attrs']['lightbox'] ) ) {
|
||||
$lightbox_settings = $block['attrs']['lightbox'];
|
||||
// If the lightbox setting is not set in the block attributes,
|
||||
// check the legacy lightbox settings that are set using the
|
||||
// `gutenberg_should_render_lightbox` filter.
|
||||
// We can remove this elseif statement when the legacy lightbox settings are removed.
|
||||
} elseif ( isset( $block['legacyLightboxSettings'] ) ) {
|
||||
$lightbox_settings = $block['legacyLightboxSettings'];
|
||||
}
|
||||
|
||||
if ( ! isset( $lightbox_settings ) ) {
|
||||
@@ -107,9 +101,9 @@ function block_core_image_get_lightbox_settings( $block ) {
|
||||
// If not present in global settings, check the top-level global settings.
|
||||
//
|
||||
// NOTE: If no block-level settings are found, the previous call to
|
||||
// `wp_get_global_settings` will return the whole `theme.json`
|
||||
// structure in which case we can check if the "lightbox" key is present at
|
||||
// the top-level of the global settings and use its value.
|
||||
// `wp_get_global_settings` will return the whole `theme.json` structure in
|
||||
// which case we can check if the "lightbox" key is present at the top-level
|
||||
// of the global settings and use its value.
|
||||
if ( isset( $lightbox_settings['lightbox'] ) ) {
|
||||
$lightbox_settings = wp_get_global_settings( array( 'lightbox' ) );
|
||||
}
|
||||
@@ -128,107 +122,76 @@ function block_core_image_get_lightbox_settings( $block ) {
|
||||
*/
|
||||
function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
/*
|
||||
* If it's not possible that an IMG element exists then return the given
|
||||
* block content as-is. It may be that there's no actual image in the block
|
||||
* or it could be that another plugin already modified this HTML.
|
||||
* If there's no IMG tag in the block then return the given block content
|
||||
* as-is. There's nothing that this code can knowingly modify to add the
|
||||
* lightbox behavior.
|
||||
*/
|
||||
if ( false === stripos( $block_content, '<img' ) ) {
|
||||
$p = new WP_HTML_Tag_Processor( $block_content );
|
||||
if ( $p->next_tag( 'figure' ) ) {
|
||||
$p->set_bookmark( 'figure' );
|
||||
}
|
||||
if ( ! $p->next_tag( 'img' ) ) {
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( $block_content );
|
||||
$alt = $p->get_attribute( 'alt' );
|
||||
$img_uploaded_src = $p->get_attribute( 'src' );
|
||||
$img_class_names = $p->get_attribute( 'class' );
|
||||
$img_styles = $p->get_attribute( 'style' );
|
||||
$img_width = 'none';
|
||||
$img_height = 'none';
|
||||
$aria_label = __( 'Enlarge image' );
|
||||
|
||||
$aria_label = __( 'Enlarge image' );
|
||||
|
||||
/*
|
||||
* If there's definitely no IMG element in the block then return the given
|
||||
* block content as-is. There's nothing that this code can knowingly modify
|
||||
* to add the lightbox behavior.
|
||||
*/
|
||||
if ( ! $processor->next_tag( 'img' ) ) {
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
$alt_attribute = $processor->get_attribute( 'alt' );
|
||||
|
||||
// An empty alt attribute `alt=""` is valid for decorative images.
|
||||
if ( is_string( $alt_attribute ) ) {
|
||||
$alt_attribute = trim( $alt_attribute );
|
||||
}
|
||||
|
||||
// It only makes sense to append the alt text to the button aria-label when the alt text is non-empty.
|
||||
if ( $alt_attribute ) {
|
||||
if ( $alt ) {
|
||||
/* translators: %s: Image alt text. */
|
||||
$aria_label = sprintf( __( 'Enlarge image: %s' ), $alt_attribute );
|
||||
$aria_label = sprintf( __( 'Enlarge image: %s' ), $alt );
|
||||
}
|
||||
|
||||
// Currently, we are only enabling the zoom animation.
|
||||
$lightbox_animation = 'zoom';
|
||||
|
||||
// Note: We want to store the `src` in the context so we
|
||||
// can set it dynamically when the lightbox is opened.
|
||||
if ( isset( $block['attrs']['id'] ) ) {
|
||||
$img_uploaded_src = wp_get_attachment_url( $block['attrs']['id'] );
|
||||
$img_metadata = wp_get_attachment_metadata( $block['attrs']['id'] );
|
||||
$img_width = $img_metadata['width'] ?? 'none';
|
||||
$img_height = $img_metadata['height'] ?? 'none';
|
||||
} else {
|
||||
$img_uploaded_src = $processor->get_attribute( 'src' );
|
||||
$img_width = 'none';
|
||||
$img_height = 'none';
|
||||
}
|
||||
|
||||
if ( isset( $block['attrs']['scale'] ) ) {
|
||||
$scale_attr = $block['attrs']['scale'];
|
||||
} else {
|
||||
$scale_attr = false;
|
||||
}
|
||||
|
||||
$w = new WP_HTML_Tag_Processor( $block_content );
|
||||
$w->next_tag( 'figure' );
|
||||
$w->add_class( 'wp-lightbox-container' );
|
||||
$w->set_attribute( 'data-wp-interactive', true );
|
||||
|
||||
$w->set_attribute(
|
||||
// Figure.
|
||||
$p->seek( 'figure' );
|
||||
$figure_class_names = $p->get_attribute( 'class' );
|
||||
$figure_styles = $p->get_attribute( 'style' );
|
||||
$p->add_class( 'wp-lightbox-container' );
|
||||
$p->set_attribute( 'data-wp-interactive', 'core/image' );
|
||||
$p->set_attribute(
|
||||
'data-wp-context',
|
||||
sprintf(
|
||||
'{ "core":
|
||||
{ "image":
|
||||
{ "imageLoaded": false,
|
||||
"initialized": false,
|
||||
"lightboxEnabled": false,
|
||||
"hideAnimationEnabled": false,
|
||||
"preloadInitialized": false,
|
||||
"lightboxAnimation": "%s",
|
||||
"imageUploadedSrc": "%s",
|
||||
"imageCurrentSrc": "",
|
||||
"targetWidth": "%s",
|
||||
"targetHeight": "%s",
|
||||
"scaleAttr": "%s",
|
||||
"dialogLabel": "%s"
|
||||
}
|
||||
}
|
||||
}',
|
||||
$lightbox_animation,
|
||||
$img_uploaded_src,
|
||||
$img_width,
|
||||
$img_height,
|
||||
$scale_attr,
|
||||
__( 'Enlarged image' )
|
||||
wp_json_encode(
|
||||
array(
|
||||
'uploadedSrc' => $img_uploaded_src,
|
||||
'figureClassNames' => $figure_class_names,
|
||||
'figureStyles' => $figure_styles,
|
||||
'imgClassNames' => $img_class_names,
|
||||
'imgStyles' => $img_styles,
|
||||
'targetWidth' => $img_width,
|
||||
'targetHeight' => $img_height,
|
||||
'scaleAttr' => $block['attrs']['scale'] ?? false,
|
||||
'ariaLabel' => $aria_label,
|
||||
'alt' => $alt,
|
||||
),
|
||||
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
|
||||
)
|
||||
);
|
||||
$w->next_tag( 'img' );
|
||||
$w->set_attribute( 'data-wp-init', 'effects.core.image.initOriginImage' );
|
||||
$w->set_attribute( 'data-wp-on--load', 'actions.core.image.handleLoad' );
|
||||
$w->set_attribute( 'data-wp-effect', 'effects.core.image.setButtonStyles' );
|
||||
// We need to set an event callback on the `img` specifically
|
||||
// because the `figure` element can also contain a caption, and
|
||||
// we don't want to trigger the lightbox when the caption is clicked.
|
||||
$w->set_attribute( 'data-wp-on--click', 'actions.core.image.showLightbox' );
|
||||
$w->set_attribute( 'data-wp-effect--setStylesOnResize', 'effects.core.image.setStylesOnResize' );
|
||||
$body_content = $w->get_updated_html();
|
||||
|
||||
// Add a button alongside image in the body content.
|
||||
// Image.
|
||||
$p->next_tag( 'img' );
|
||||
$p->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on--load', 'callbacks.setButtonStyles' );
|
||||
$p->set_attribute( 'data-wp-on-window--resize', 'callbacks.setButtonStyles' );
|
||||
// Sets an event callback on the `img` because the `figure` element can also
|
||||
// contain a caption, and we don't want to trigger the lightbox when the
|
||||
// caption is clicked.
|
||||
$p->set_attribute( 'data-wp-on--click', 'actions.showLightbox' );
|
||||
|
||||
$body_content = $p->get_updated_html();
|
||||
|
||||
// Adds a button alongside image in the body content.
|
||||
$img = null;
|
||||
preg_match( '/<img[^>]+>/', $body_content, $img );
|
||||
|
||||
@@ -239,9 +202,10 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
type="button"
|
||||
aria-haspopup="dialog"
|
||||
aria-label="' . esc_attr( $aria_label ) . '"
|
||||
data-wp-on--click="actions.core.image.showLightbox"
|
||||
data-wp-style--right="context.core.image.imageButtonRight"
|
||||
data-wp-style--top="context.core.image.imageButtonTop"
|
||||
data-wp-init="callbacks.initTriggerButton"
|
||||
data-wp-on--click="actions.showLightbox"
|
||||
data-wp-style--right="context.imageButtonRight"
|
||||
data-wp-style--top="context.imageButtonTop"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
|
||||
<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
|
||||
@@ -250,46 +214,17 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
|
||||
$body_content = preg_replace( '/<img[^>]+>/', $button, $body_content );
|
||||
|
||||
// We need both a responsive image and an enlarged image to animate
|
||||
// the zoom seamlessly on slow internet connections; the responsive
|
||||
// image is a copy of the one in the body, which animates immediately
|
||||
// as the lightbox is opened, while the enlarged one is a full-sized
|
||||
// version that will likely still be loading as the animation begins.
|
||||
$m = new WP_HTML_Tag_Processor( $block_content );
|
||||
$m->next_tag( 'figure' );
|
||||
$m->add_class( 'responsive-image' );
|
||||
$m->next_tag( 'img' );
|
||||
// We want to set the 'src' attribute to an empty string in the responsive image
|
||||
// because otherwise, as of this writing, the wp_filter_content_tags() function in
|
||||
// WordPress will automatically add a 'srcset' attribute to the image, which will at
|
||||
// times cause the incorrectly sized image to be loaded in the lightbox on Firefox.
|
||||
// Because of this, we bind the 'src' attribute explicitly the current src to reliably
|
||||
// use the exact same image as in the content when the lightbox is first opened while
|
||||
// we wait for the larger image to load.
|
||||
$m->set_attribute( 'src', '' );
|
||||
$m->set_attribute( 'data-wp-bind--src', 'context.core.image.imageCurrentSrc' );
|
||||
$m->set_attribute( 'data-wp-style--object-fit', 'selectors.core.image.lightboxObjectFit' );
|
||||
$initial_image_content = $m->get_updated_html();
|
||||
add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' );
|
||||
|
||||
$q = new WP_HTML_Tag_Processor( $block_content );
|
||||
$q->next_tag( 'figure' );
|
||||
$q->add_class( 'enlarged-image' );
|
||||
$q->next_tag( 'img' );
|
||||
return $body_content;
|
||||
}
|
||||
|
||||
// We set the 'src' attribute to an empty string to prevent the browser from loading the image
|
||||
// on initial page load, then bind the attribute to a selector that returns the full-sized image src when
|
||||
// the lightbox is opened. We could use 'loading=lazy' in combination with the 'hidden' attribute to
|
||||
// accomplish the same behavior, but that approach breaks progressive loading of the image in Safari
|
||||
// and Chrome (see https://github.com/WordPress/gutenberg/pull/52765#issuecomment-1674008151). Until that
|
||||
// is resolved, manually setting the 'src' seems to be the best solution to load the large image on demand.
|
||||
$q->set_attribute( 'src', '' );
|
||||
$q->set_attribute( 'data-wp-bind--src', 'selectors.core.image.enlargedImgSrc' );
|
||||
$q->set_attribute( 'data-wp-style--object-fit', 'selectors.core.image.lightboxObjectFit' );
|
||||
$enlarged_image_content = $q->get_updated_html();
|
||||
function block_core_image_print_lightbox_overlay() {
|
||||
$close_button_label = esc_attr__( 'Close' );
|
||||
|
||||
// If the current theme does NOT have a `theme.json`, or the colors are not defined,
|
||||
// we need to set the background color & close button color to some default values
|
||||
// because we can't get them from the Global Styles.
|
||||
// If the current theme does NOT have a `theme.json`, or the colors are not
|
||||
// defined, it needs to set the background color & close button color to some
|
||||
// default values because it can't get them from the Global Styles.
|
||||
$background_color = '#fff';
|
||||
$close_button_color = '#000';
|
||||
if ( wp_theme_has_theme_json() ) {
|
||||
@@ -302,56 +237,45 @@ function block_core_image_render_lightbox( $block_content, $block ) {
|
||||
}
|
||||
}
|
||||
|
||||
$close_button_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>';
|
||||
$close_button_label = esc_attr__( 'Close' );
|
||||
|
||||
$lightbox_html = <<<HTML
|
||||
<div data-wp-body="" class="wp-lightbox-overlay $lightbox_animation"
|
||||
data-wp-bind--role="selectors.core.image.roleAttribute"
|
||||
data-wp-bind--aria-label="selectors.core.image.dialogLabel"
|
||||
data-wp-class--initialized="context.core.image.initialized"
|
||||
data-wp-class--active="context.core.image.lightboxEnabled"
|
||||
data-wp-class--hideAnimationEnabled="context.core.image.hideAnimationEnabled"
|
||||
data-wp-bind--aria-modal="selectors.core.image.ariaModal"
|
||||
data-wp-effect="effects.core.image.initLightbox"
|
||||
data-wp-on--keydown="actions.core.image.handleKeydown"
|
||||
data-wp-on--touchstart="actions.core.image.handleTouchStart"
|
||||
data-wp-on--touchmove="actions.core.image.handleTouchMove"
|
||||
data-wp-on--touchend="actions.core.image.handleTouchEnd"
|
||||
data-wp-on--click="actions.core.image.hideLightbox"
|
||||
tabindex="-1"
|
||||
>
|
||||
<button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button" data-wp-on--click="actions.core.image.hideLightbox">
|
||||
$close_button_icon
|
||||
</button>
|
||||
<div class="lightbox-image-container">$initial_image_content</div>
|
||||
<div class="lightbox-image-container">$enlarged_image_content</div>
|
||||
<div class="scrim" style="background-color: $background_color" aria-hidden="true"></div>
|
||||
</div>
|
||||
echo <<<HTML
|
||||
<div
|
||||
class="wp-lightbox-overlay zoom"
|
||||
data-wp-interactive="core/image"
|
||||
data-wp-context='{}'
|
||||
data-wp-bind--role="state.roleAttribute"
|
||||
data-wp-bind--aria-label="state.currentImage.ariaLabel"
|
||||
data-wp-bind--aria-modal="state.ariaModal"
|
||||
data-wp-class--active="state.overlayEnabled"
|
||||
data-wp-class--show-closing-animation="state.showClosingAnimation"
|
||||
data-wp-watch="callbacks.setOverlayFocus"
|
||||
data-wp-on--keydown="actions.handleKeydown"
|
||||
data-wp-on--touchstart="actions.handleTouchStart"
|
||||
data-wp-on--touchmove="actions.handleTouchMove"
|
||||
data-wp-on--touchend="actions.handleTouchEnd"
|
||||
data-wp-on--click="actions.hideLightbox"
|
||||
data-wp-on-window--resize="callbacks.setOverlayStyles"
|
||||
data-wp-on-window--scroll="actions.handleScroll"
|
||||
tabindex="-1"
|
||||
>
|
||||
<button type="button" aria-label="$close_button_label" style="fill: $close_button_color" class="close-button">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" focusable="false"><path d="M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"></path></svg>
|
||||
</button>
|
||||
<div class="lightbox-image-container">
|
||||
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
|
||||
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.currentImage.currentSrc">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="lightbox-image-container">
|
||||
<figure data-wp-bind--class="state.currentImage.figureClassNames" data-wp-bind--style="state.currentImage.figureStyles">
|
||||
<img data-wp-bind--alt="state.currentImage.alt" data-wp-bind--class="state.currentImage.imgClassNames" data-wp-bind--style="state.imgStyles" data-wp-bind--src="state.enlargedSrc">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="scrim" style="background-color: $background_color" aria-hidden="true"></div>
|
||||
<style data-wp-text="state.overlayStyles"></style>
|
||||
</div>
|
||||
HTML;
|
||||
|
||||
return str_replace( '</figure>', $lightbox_html . '</figure>', $body_content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the view script has the `wp-interactivity` dependency.
|
||||
*
|
||||
* @since 6.4.0
|
||||
*
|
||||
* @global WP_Scripts $wp_scripts
|
||||
*/
|
||||
function block_core_image_ensure_interactivity_dependency() {
|
||||
global $wp_scripts;
|
||||
if (
|
||||
isset( $wp_scripts->registered['wp-block-image-view'] ) &&
|
||||
! in_array( 'wp-interactivity', $wp_scripts->registered['wp-block-image-view']->deps, true )
|
||||
) {
|
||||
$wp_scripts->registered['wp-block-image-view']->deps[] = 'wp-interactivity';
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_print_scripts', 'block_core_image_ensure_interactivity_dependency' );
|
||||
|
||||
/**
|
||||
* Registers the `core/image` block on server.
|
||||
*/
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
"keywords": [ "img", "photo", "picture" ],
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"align": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"source": "attribute",
|
||||
@@ -28,8 +25,8 @@
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string",
|
||||
"source": "html",
|
||||
"type": "rich-text",
|
||||
"source": "rich-text",
|
||||
"selector": "figcaption",
|
||||
"__experimentalRole": "content"
|
||||
},
|
||||
@@ -95,6 +92,8 @@
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"interactivity": true,
|
||||
"align": [ "left", "center", "right", "wide", "full" ],
|
||||
"anchor": true,
|
||||
"color": {
|
||||
"text": false,
|
||||
@@ -113,10 +112,14 @@
|
||||
"radius": true,
|
||||
"width": true
|
||||
}
|
||||
},
|
||||
"shadow": {
|
||||
"__experimentalSkipSerialization": true
|
||||
}
|
||||
},
|
||||
"selectors": {
|
||||
"border": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
|
||||
"shadow": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
|
||||
"filter": {
|
||||
"duotone": ".wp-block-image img, .wp-block-image .components-placeholder"
|
||||
}
|
||||
@@ -130,6 +133,5 @@
|
||||
{ "name": "rounded", "label": "Rounded" }
|
||||
],
|
||||
"editorStyle": "wp-block-image-editor",
|
||||
"style": "wp-block-image",
|
||||
"viewScript": "file:./view.min.js"
|
||||
"style": "wp-block-image"
|
||||
}
|
||||
|
||||
@@ -12,9 +12,12 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
|
||||
display:none;
|
||||
}
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
|
||||
.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;
|
||||
}
|
||||
@@ -124,4 +127,8 @@ figure.wp-block-image:not(.wp-block){
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
width:36px;
|
||||
}
|
||||
|
||||
.wp-block-image__toolbar_content_textarea{
|
||||
width:250px;
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.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.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}
|
||||
@@ -12,9 +12,12 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{
|
||||
display:none;
|
||||
}
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder:before{
|
||||
.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;
|
||||
}
|
||||
@@ -124,4 +127,8 @@ figure.wp-block-image:not(.wp-block){
|
||||
padding-left:0;
|
||||
padding-right:0;
|
||||
width:36px;
|
||||
}
|
||||
|
||||
.wp-block-image__toolbar_content_textarea{
|
||||
width:250px;
|
||||
}
|
||||
2
wp/wp-includes/blocks/image/editor.min.css
vendored
2
wp/wp-includes/blocks/image/editor.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-image.wp-block-image.is-selected .components-placeholder{background-color:#fff;border:none;border-radius:2px;box-shadow:inset 0 0 0 1px #1e1e1e;color:#1e1e1e;filter:none!important}.wp-block-image.wp-block-image.is-selected .components-placeholder>svg{opacity:0}.wp-block-image.wp-block-image.is-selected .components-placeholder .components-placeholder__illustration{display:none}.wp-block-image.wp-block-image.is-selected .components-placeholder:before{opacity:0}.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.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}
|
||||
@@ -107,7 +107,7 @@
|
||||
align-items:center;
|
||||
-webkit-backdrop-filter:blur(16px) saturate(180%);
|
||||
backdrop-filter:blur(16px) saturate(180%);
|
||||
background-color:rgba(90,90,90,.25);
|
||||
background-color:#5a5a5a40;
|
||||
border:none;
|
||||
border-radius:4px;
|
||||
cursor:zoom-in;
|
||||
@@ -125,7 +125,7 @@
|
||||
z-index:100;
|
||||
}
|
||||
.wp-lightbox-container button:focus-visible{
|
||||
outline:3px auto rgba(90,90,90,.25);
|
||||
outline:3px auto #5a5a5a40;
|
||||
outline:3px auto -webkit-focus-ring-color;
|
||||
outline-offset:3px;
|
||||
}
|
||||
@@ -137,7 +137,7 @@
|
||||
opacity:1;
|
||||
}
|
||||
.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){
|
||||
background-color:rgba(90,90,90,.25);
|
||||
background-color:#5a5a5a40;
|
||||
border:none;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
right:0;
|
||||
top:0;
|
||||
visibility:hidden;
|
||||
width:100vw;
|
||||
width:100%;
|
||||
z-index:100000;
|
||||
}
|
||||
.wp-lightbox-overlay .close-button{
|
||||
@@ -221,10 +221,10 @@
|
||||
.wp-lightbox-overlay.active img{
|
||||
animation:turn-on-visibility .35s both;
|
||||
}
|
||||
.wp-lightbox-overlay.hideanimationenabled:not(.active){
|
||||
.wp-lightbox-overlay.show-closing-animation:not(.active){
|
||||
animation:turn-off-visibility .35s both;
|
||||
}
|
||||
.wp-lightbox-overlay.hideanimationenabled:not(.active) img{
|
||||
.wp-lightbox-overlay.show-closing-animation:not(.active) img{
|
||||
animation:turn-off-visibility .25s both;
|
||||
}
|
||||
@media (prefers-reduced-motion:no-preference){
|
||||
@@ -242,16 +242,16 @@
|
||||
.wp-lightbox-overlay.zoom.active .scrim{
|
||||
animation:turn-on-visibility .4s forwards;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active){
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){
|
||||
animation:none;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .lightbox-image-container{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{
|
||||
animation:lightbox-zoom-out .4s;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .lightbox-image-container img{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{
|
||||
animation:none;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .scrim{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{
|
||||
animation:turn-off-visibility .4s forwards;
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@
|
||||
}
|
||||
@keyframes lightbox-zoom-in{
|
||||
0%{
|
||||
transform:translate(calc((-50vw + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
}
|
||||
to{
|
||||
transform:translate(50%, -50%) scale(1);
|
||||
@@ -295,7 +295,7 @@
|
||||
visibility:visible;
|
||||
}
|
||||
to{
|
||||
transform:translate(calc((-50vw + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
visibility:hidden;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -107,7 +107,7 @@
|
||||
align-items:center;
|
||||
-webkit-backdrop-filter:blur(16px) saturate(180%);
|
||||
backdrop-filter:blur(16px) saturate(180%);
|
||||
background-color:rgba(90,90,90,.25);
|
||||
background-color:#5a5a5a40;
|
||||
border:none;
|
||||
border-radius:4px;
|
||||
cursor:zoom-in;
|
||||
@@ -125,7 +125,7 @@
|
||||
z-index:100;
|
||||
}
|
||||
.wp-lightbox-container button:focus-visible{
|
||||
outline:3px auto rgba(90,90,90,.25);
|
||||
outline:3px auto #5a5a5a40;
|
||||
outline:3px auto -webkit-focus-ring-color;
|
||||
outline-offset:3px;
|
||||
}
|
||||
@@ -137,7 +137,7 @@
|
||||
opacity:1;
|
||||
}
|
||||
.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){
|
||||
background-color:rgba(90,90,90,.25);
|
||||
background-color:#5a5a5a40;
|
||||
border:none;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
position:fixed;
|
||||
top:0;
|
||||
visibility:hidden;
|
||||
width:100vw;
|
||||
width:100%;
|
||||
z-index:100000;
|
||||
}
|
||||
.wp-lightbox-overlay .close-button{
|
||||
@@ -221,10 +221,10 @@
|
||||
.wp-lightbox-overlay.active img{
|
||||
animation:turn-on-visibility .35s both;
|
||||
}
|
||||
.wp-lightbox-overlay.hideanimationenabled:not(.active){
|
||||
.wp-lightbox-overlay.show-closing-animation:not(.active){
|
||||
animation:turn-off-visibility .35s both;
|
||||
}
|
||||
.wp-lightbox-overlay.hideanimationenabled:not(.active) img{
|
||||
.wp-lightbox-overlay.show-closing-animation:not(.active) img{
|
||||
animation:turn-off-visibility .25s both;
|
||||
}
|
||||
@media (prefers-reduced-motion:no-preference){
|
||||
@@ -242,16 +242,16 @@
|
||||
.wp-lightbox-overlay.zoom.active .scrim{
|
||||
animation:turn-on-visibility .4s forwards;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active){
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){
|
||||
animation:none;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .lightbox-image-container{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{
|
||||
animation:lightbox-zoom-out .4s;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .lightbox-image-container img{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{
|
||||
animation:none;
|
||||
}
|
||||
.wp-lightbox-overlay.zoom.hideanimationenabled:not(.active) .scrim{
|
||||
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{
|
||||
animation:turn-off-visibility .4s forwards;
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@
|
||||
}
|
||||
@keyframes lightbox-zoom-in{
|
||||
0%{
|
||||
transform:translate(calc(-50vw + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
}
|
||||
to{
|
||||
transform:translate(-50%, -50%) scale(1);
|
||||
@@ -295,7 +295,7 @@
|
||||
visibility:visible;
|
||||
}
|
||||
to{
|
||||
transform:translate(calc(-50vw + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
|
||||
visibility:hidden;
|
||||
}
|
||||
}
|
||||
2
wp/wp-includes/blocks/image/style.min.css
vendored
2
wp/wp-includes/blocks/image/style.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-image figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-image{
|
||||
|
||||
@@ -1 +1 @@
|
||||
.wp-block-image figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-image figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-image{margin:0 0 1em}
|
||||
@@ -4,7 +4,7 @@
|
||||
text-align:center;
|
||||
}
|
||||
.is-dark-theme .wp-block-image figcaption{
|
||||
color:hsla(0,0%,100%,.65);
|
||||
color:#ffffffa6;
|
||||
}
|
||||
|
||||
.wp-block-image{
|
||||
|
||||
2
wp/wp-includes/blocks/image/theme.min.css
vendored
2
wp/wp-includes/blocks/image/theme.min.css
vendored
@@ -1 +1 @@
|
||||
.wp-block-image figcaption{color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-image figcaption{color:hsla(0,0%,100%,.65)}.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}.wp-block-image{margin:0 0 1em}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user