Editor: Update WordPress packages based based on Gutenberg v13.0 RC3
This is the last step of backports from the Gutenberg plugin for WordPress 6.0 Beta 1 release. It includes all updates WordPress packages published to npm based on the Gutenberg plugin v13.0 RC3 release. This patch also includes all the necessary changes applied to core blocks. New blocks included: - Avatar - Comment Author Name - Comment Content - Comment Date - Comment Edit Link - Comment Rely Link - Comment Template - Comments Pagination - Comments Pagination Next - Comments Pagination Previous - Comments Query Loop - Home Link - Post Author Biography - Query No Results - Read More See more details in https://github.com/WordPress/wordpress-develop/pull/2564. Props zieladam, ramonopoly, ocean90. Fixes #55505. Built from https://develop.svn.wordpress.org/trunk@53157 git-svn-id: http://core.svn.wordpress.org/trunk@52746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bc0f186599
commit
ab8a964858
File diff suppressed because one or more lines are too long
|
@ -16,21 +16,21 @@
|
|||
*/
|
||||
function render_block_core_archives( $attributes ) {
|
||||
$show_post_count = ! empty( $attributes['showPostCounts'] );
|
||||
|
||||
$type = isset( $attributes['type'] ) ? $attributes['type'] : 'monthly';
|
||||
$class = '';
|
||||
|
||||
if ( ! empty( $attributes['displayAsDropdown'] ) ) {
|
||||
|
||||
$class .= ' wp-block-archives-dropdown';
|
||||
|
||||
$dropdown_id = esc_attr( uniqid( 'wp-block-archives-' ) );
|
||||
$dropdown_id = wp_unique_id( 'wp-block-archives-' );
|
||||
$title = __( 'Archives' );
|
||||
|
||||
/** This filter is documented in wp-includes/widgets/class-wp-widget-archives.php */
|
||||
$dropdown_args = apply_filters(
|
||||
'widget_archives_dropdown_args',
|
||||
array(
|
||||
'type' => 'monthly',
|
||||
'type' => $type,
|
||||
'format' => 'option',
|
||||
'show_post_count' => $show_post_count,
|
||||
)
|
||||
|
@ -62,11 +62,9 @@ function render_block_core_archives( $attributes ) {
|
|||
break;
|
||||
}
|
||||
|
||||
$label = esc_html( $label );
|
||||
|
||||
$block_content = '<label for="' . $dropdown_id . '">' . $title . '</label>
|
||||
<select id="' . $dropdown_id . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
|
||||
<option value="">' . $label . '</option>' . $archives . '</select>';
|
||||
$block_content = '<label for="' . esc_attr( $dropdown_id ) . '">' . esc_html( $title ) . '</label>
|
||||
<select id="' . esc_attr( $dropdown_id ) . '" name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
|
||||
<option value="">' . esc_html( $label ) . '</option>' . $archives . '</select>';
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
|
@ -81,7 +79,7 @@ function render_block_core_archives( $attributes ) {
|
|||
$archives_args = apply_filters(
|
||||
'widget_archives_args',
|
||||
array(
|
||||
'type' => 'monthly',
|
||||
'type' => $type,
|
||||
'show_post_count' => $show_post_count,
|
||||
)
|
||||
);
|
||||
|
@ -90,9 +88,7 @@ function render_block_core_archives( $attributes ) {
|
|||
|
||||
$archives = wp_get_archives( $archives_args );
|
||||
|
||||
$classnames = esc_attr( $class );
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classnames ) );
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $class ) );
|
||||
|
||||
if ( empty( $archives ) ) {
|
||||
return sprintf(
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/archives",
|
||||
"title": "Archives",
|
||||
"category": "widgets",
|
||||
"description": "Display a monthly archive of your posts.",
|
||||
"description": "Display a date archive of your posts.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"displayAsDropdown": {
|
||||
|
@ -13,6 +14,10 @@
|
|||
"showPostCounts": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"default": "monthly"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/audio",
|
||||
"title": "Audio",
|
||||
|
|
|
@ -77,4 +77,15 @@
|
|||
.wp-block-audio {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
position: relative;
|
||||
}
|
||||
.wp-block-audio.is-transient audio {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-audio .components-spinner {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 50%;
|
||||
margin-top: -9px;
|
||||
margin-right: -9px;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-audio{margin-right:0;margin-left:0}
|
||||
.wp-block-audio{margin-right:0;margin-left:0;position:relative}.wp-block-audio.is-transient audio{opacity:.3}.wp-block-audio .components-spinner{position:absolute;top:50%;right:50%;margin-top:-9px;margin-right:-9px}
|
|
@ -77,4 +77,15 @@
|
|||
.wp-block-audio {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
position: relative;
|
||||
}
|
||||
.wp-block-audio.is-transient audio {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-audio .components-spinner {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-top: -9px;
|
||||
margin-left: -9px;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-audio{margin-left:0;margin-right:0}
|
||||
.wp-block-audio{margin-left:0;margin-right:0;position:relative}.wp-block-audio.is-transient audio{opacity:.3}.wp-block-audio .components-spinner{position:absolute;top:50%;left:50%;margin-top:-9px;margin-left:-9px}
|
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/avatar` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/avatar` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string Return the avatar.
|
||||
*/
|
||||
function render_block_core_avatar( $attributes, $content, $block ) {
|
||||
$size = isset( $attributes['size'] ) ? $attributes['size'] : 96;
|
||||
$wrapper_attributes = get_block_wrapper_attributes();
|
||||
|
||||
$image_styles = array();
|
||||
|
||||
// Add border width styles.
|
||||
$has_border_width = ! empty( $attributes['style']['border']['width'] );
|
||||
|
||||
if ( $has_border_width ) {
|
||||
$border_width = $attributes['style']['border']['width'];
|
||||
$image_styles[] = sprintf( 'border-width: %s;', esc_attr( $border_width ) );
|
||||
}
|
||||
|
||||
// Add border radius styles.
|
||||
$has_border_radius = ! empty( $attributes['style']['border']['radius'] );
|
||||
|
||||
if ( $has_border_radius ) {
|
||||
$border_radius = $attributes['style']['border']['radius'];
|
||||
|
||||
if ( is_array( $border_radius ) ) {
|
||||
// Apply styles for individual corner border radii.
|
||||
foreach ( $border_radius as $key => $value ) {
|
||||
if ( null !== $value ) {
|
||||
$name = _wp_to_kebab_case( $key );
|
||||
// Add shared styles for individual border radii.
|
||||
$border_style = sprintf(
|
||||
'border-%s-radius: %s;',
|
||||
esc_attr( $name ),
|
||||
esc_attr( $value )
|
||||
);
|
||||
$image_styles[] = $border_style;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$border_style = sprintf( 'border-radius: %s;', esc_attr( $border_radius ) );
|
||||
$image_styles[] = $border_style;
|
||||
}
|
||||
}
|
||||
|
||||
// Add border color styles.
|
||||
$has_border_color = ! empty( $attributes['style']['border']['color'] );
|
||||
|
||||
if ( $has_border_color ) {
|
||||
$border_color = $attributes['style']['border']['color'];
|
||||
$image_styles[] = sprintf( 'border-color: %s;', esc_attr( $border_color ) );
|
||||
}
|
||||
|
||||
// Add border style (solid, dashed, dotted ).
|
||||
$has_border_style = ! empty( $attributes['style']['border']['style'] );
|
||||
|
||||
if ( $has_border_style ) {
|
||||
$border_style = $attributes['style']['border']['style'];
|
||||
$image_styles[] = sprintf( 'border-style: %s;', esc_attr( $border_style ) );
|
||||
}
|
||||
|
||||
// Add border classes to the avatar image for both custom colors and palette colors.
|
||||
$image_classes = '';
|
||||
if ( $has_border_color || isset( $attributes['borderColor'] ) ) {
|
||||
$image_classes .= 'has-border-color';
|
||||
}
|
||||
if ( isset( $attributes['borderColor'] ) ) {
|
||||
$image_classes .= ' has-' . $attributes['borderColor'] . '-border-color';
|
||||
}
|
||||
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
$author_id = isset( $attributes['userId'] ) ? $attributes['userId'] : get_post_field( 'post_author', $block->context['postId'] );
|
||||
$author_name = get_the_author_meta( 'display_name', $author_id );
|
||||
// translators: %s is the Author name.
|
||||
$alt = sprintf( __( '%s Avatar' ), $author_name );
|
||||
$avatar_block = get_avatar(
|
||||
$author_id,
|
||||
$size,
|
||||
'',
|
||||
$alt,
|
||||
array(
|
||||
'extra_attr' => isset( $image_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $image_styles ) ) ) : '',
|
||||
'class' => "wp-block-avatar__image $image_classes ",
|
||||
)
|
||||
);
|
||||
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
|
||||
$label = '';
|
||||
if ( '_blank' === $attributes['linkTarget'] ) {
|
||||
// translators: %s is the Author name.
|
||||
$label = 'aria-label="' . sprintf( esc_attr__( '(%s author archive, opens in a new tab)' ), $author_name ) . '"';
|
||||
}
|
||||
// translators: %1$s: Author archive link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
|
||||
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
|
||||
}
|
||||
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
|
||||
}
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
/* translators: %s is the Comment Author name */
|
||||
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
|
||||
if ( ! $comment ) {
|
||||
return '';
|
||||
}
|
||||
$avatar_block = get_avatar(
|
||||
$comment,
|
||||
$size,
|
||||
'',
|
||||
$alt,
|
||||
array(
|
||||
'extra_attr' => isset( $image_styles ) ? sprintf( ' style="%s"', safecss_filter_attr( implode( ' ', $image_styles ) ) ) : '',
|
||||
'class' => "wp-block-avatar__image $image_classes",
|
||||
)
|
||||
);
|
||||
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $comment->comment_author_url ) && '' !== $comment->comment_author_url ) {
|
||||
$label = '';
|
||||
if ( '_blank' === $attributes['linkTarget'] ) {
|
||||
// translators: %s is the Comment Author name.
|
||||
$label = 'aria-label="' . sprintf( esc_attr__( '(%s website link, opens in a new tab)' ), $comment->comment_author ) . '"';
|
||||
}
|
||||
// translators: %1$s: Comment Author website link. %2$s: Link target. %3$s Aria label. %4$s Avatar image.
|
||||
$avatar_block = sprintf( '<a href="%1$s" target="%2$s" %3$s class="wp-block-avatar__link">%4$s</a>', $comment->comment_author_url, esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
|
||||
}
|
||||
return sprintf( '<div %1s>%2s</div>', $wrapper_attributes, $avatar_block );
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/avatar` block on the server.
|
||||
*/
|
||||
function register_block_core_avatar() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/avatar',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_avatar',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_avatar' );
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/avatar",
|
||||
"title": "Avatar",
|
||||
"category": "theme",
|
||||
"description": "Add a user's avatar.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"userId": {
|
||||
"type": "number"
|
||||
},
|
||||
"size": {
|
||||
"type": "number",
|
||||
"default": 96
|
||||
},
|
||||
"isLink": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"linkTarget": {
|
||||
"type": "string",
|
||||
"default": "_self"
|
||||
}
|
||||
|
||||
},
|
||||
"usesContext": [ "postType", "postId", "commentId" ],
|
||||
"supports": {
|
||||
"html": false,
|
||||
"align": true,
|
||||
"alignWide": false,
|
||||
"spacing": {
|
||||
"margin": true
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
"__experimentalSkipSerialization": true,
|
||||
"radius": true,
|
||||
"width": true,
|
||||
"color": true,
|
||||
"style": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"radius": true
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"text": false,
|
||||
"background": false,
|
||||
"__experimentalDuotone": "img"
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-avatar",
|
||||
"style": "wp-block-avatar"
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-avatar__image img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-block-avatar.aligncenter .components-resizable-box__container {
|
||||
margin: 0 auto;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-avatar__image img{width:100%}.wp-block-avatar.aligncenter .components-resizable-box__container{margin:0 auto}
|
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-avatar__image img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wp-block-avatar.aligncenter .components-resizable-box__container {
|
||||
margin: 0 auto;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-avatar__image img{width:100%}.wp-block-avatar.aligncenter .components-resizable-box__container{margin:0 auto}
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-avatar.aligncenter {
|
||||
text-align: center;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-avatar.aligncenter{text-align:center}
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-avatar.aligncenter {
|
||||
text-align: center;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-avatar.aligncenter{text-align:center}
|
|
@ -42,9 +42,14 @@ function render_block_core_block( $attributes ) {
|
|||
|
||||
$seen_refs[ $attributes['ref'] ] = true;
|
||||
|
||||
$result = do_blocks( $reusable_block->post_content );
|
||||
// Handle embeds for reusable blocks.
|
||||
global $wp_embed;
|
||||
$content = $wp_embed->run_shortcode( $reusable_block->post_content );
|
||||
$content = $wp_embed->autoembed( $content );
|
||||
|
||||
$content = do_blocks( $content );
|
||||
unset( $seen_refs[ $attributes['ref'] ] );
|
||||
return $result;
|
||||
return $content;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/block",
|
||||
"title": "Reusable block",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/button",
|
||||
"title": "Button",
|
||||
|
@ -59,7 +60,11 @@
|
|||
"alignWide": false,
|
||||
"color": {
|
||||
"__experimentalSkipSerialization": true,
|
||||
"gradients": true
|
||||
"gradients": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
|
@ -78,7 +83,10 @@
|
|||
},
|
||||
"__experimentalBorder": {
|
||||
"radius": true,
|
||||
"__experimentalSkipSerialization": true
|
||||
"__experimentalSkipSerialization": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"radius": true
|
||||
}
|
||||
},
|
||||
"__experimentalSelector": ".wp-block-button__link"
|
||||
},
|
||||
|
|
|
@ -88,9 +88,6 @@
|
|||
position: relative;
|
||||
cursor: text;
|
||||
}
|
||||
.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]::after {
|
||||
color: #fff;
|
||||
}
|
||||
.wp-block-button:focus {
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
outline: 2px solid transparent;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block[data-align=center]>.wp-block-button{text-align:center;margin-right:auto;margin-left:auto}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.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;overflow:hidden;max-width:290px}.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}
|
||||
.wp-block[data-align=center]>.wp-block-button{text-align:center;margin-right:auto;margin-left:auto}.wp-block[data-align=right]>.wp-block-button{text-align:right}.wp-block-button{position:relative;cursor:text}.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;overflow:hidden;max-width:290px}.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}
|
|
@ -89,9 +89,6 @@
|
|||
position: relative;
|
||||
cursor: text;
|
||||
}
|
||||
.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]::after {
|
||||
color: #fff;
|
||||
}
|
||||
.wp-block-button:focus {
|
||||
box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--wp-admin-theme-color);
|
||||
outline: 2px solid transparent;
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.wp-block[data-align=center]>.wp-block-button{text-align:center;margin-left:auto;margin-right:auto}.wp-block[data-align=right]>.wp-block-button{
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{position:relative;cursor:text}.wp-block-button:not(.has-text-color):not(.is-style-outline) [data-rich-text-placeholder]:after{color:#fff}.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;overflow:hidden;max-width:290px}.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}
|
||||
/*!rtl:ignore*/text-align:right}.wp-block-button{position:relative;cursor:text}.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;overflow:hidden;max-width:290px}.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,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/buttons",
|
||||
"title": "Buttons",
|
||||
|
@ -12,7 +13,7 @@
|
|||
"__experimentalExposeControlsToChildren": true,
|
||||
"spacing": {
|
||||
"blockGap": true,
|
||||
"margin": ["top", "bottom" ],
|
||||
"margin": [ "top", "bottom" ],
|
||||
"__experimentalDefaultControls": {
|
||||
"blockGap": true
|
||||
}
|
||||
|
|
|
@ -107,16 +107,15 @@ function block_core_calendar_update_has_published_posts() {
|
|||
return $has_published_posts;
|
||||
}
|
||||
|
||||
/**
|
||||
// We only want to register these functions and actions when
|
||||
// we are on single sites. On multi sites we use `post_count` option.
|
||||
if ( ! is_multisite() ) {
|
||||
/**
|
||||
* Handler for updating the has published posts flag when a post is deleted.
|
||||
*
|
||||
* @param int $post_id Deleted post ID.
|
||||
*/
|
||||
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
|
||||
if ( is_multisite() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
|
||||
$post = get_post( $post_id );
|
||||
|
||||
if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {
|
||||
|
@ -124,20 +123,16 @@ function block_core_calendar_update_has_published_post_on_delete( $post_id ) {
|
|||
}
|
||||
|
||||
block_core_calendar_update_has_published_posts();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Handler for updating the has published posts flag when a post status changes.
|
||||
*
|
||||
* @param string $new_status The status the post is changing to.
|
||||
* @param string $old_status The status the post is changing from.
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
|
||||
if ( is_multisite() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) {
|
||||
if ( $new_status === $old_status ) {
|
||||
return;
|
||||
}
|
||||
|
@ -151,7 +146,8 @@ function block_core_calendar_update_has_published_post_on_transition_post_status
|
|||
}
|
||||
|
||||
block_core_calendar_update_has_published_posts();
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'delete_post', 'block_core_calendar_update_has_published_post_on_delete' );
|
||||
add_action( 'transition_post_status', 'block_core_calendar_update_has_published_post_on_transition_post_status', 10, 3 );
|
||||
add_action( 'delete_post', 'block_core_calendar_update_has_published_post_on_delete' );
|
||||
add_action( 'transition_post_status', 'block_core_calendar_update_has_published_post_on_transition_post_status', 10, 3 );
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/calendar",
|
||||
"title": "Calendar",
|
||||
|
|
|
@ -31,7 +31,7 @@ function render_block_core_categories( $attributes ) {
|
|||
$id = 'wp-block-categories-' . $block_id;
|
||||
$args['id'] = $id;
|
||||
$args['show_option_none'] = __( 'Select Category' );
|
||||
$wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . $id . '">' . __( 'Categories' ) . '</label>%2$s</div>';
|
||||
$wrapper_markup = '<div %1$s><label class="screen-reader-text" for="' . esc_attr( $id ) . '">' . __( 'Categories' ) . '</label>%2$s</div>';
|
||||
$items_markup = wp_dropdown_categories( $args );
|
||||
$type = 'dropdown';
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/categories",
|
||||
"title": "Categories",
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/code",
|
||||
"title": "Code",
|
||||
|
@ -14,7 +15,6 @@
|
|||
},
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"__experimentalSelector": ".wp-block-code > code",
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
|
@ -34,12 +34,20 @@
|
|||
"radius": true,
|
||||
"color": true,
|
||||
"width": true,
|
||||
"style": true
|
||||
"style": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"width": true,
|
||||
"color": true
|
||||
}
|
||||
},
|
||||
"color": {
|
||||
"text": true,
|
||||
"background": true,
|
||||
"gradients": true
|
||||
"gradients": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"style": "wp-block-code"
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
*/
|
||||
.wp-block-code code {
|
||||
display: block;
|
||||
white-space: pre-wrap;
|
||||
font-family: inherit;
|
||||
overflow-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-code code{display:block;white-space:pre-wrap;overflow-wrap:break-word}
|
||||
.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}
|
|
@ -76,6 +76,7 @@
|
|||
*/
|
||||
.wp-block-code code {
|
||||
display: block;
|
||||
white-space: pre-wrap;
|
||||
font-family: inherit;
|
||||
overflow-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-code code{display:block;white-space:pre-wrap;overflow-wrap:break-word}
|
||||
.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}
|
|
@ -74,10 +74,9 @@
|
|||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-code > code {
|
||||
font-family: Menlo, Consolas, monaco, monospace;
|
||||
color: #1e1e1e;
|
||||
padding: 0.8em 1em;
|
||||
border: 1px solid #ddd;
|
||||
.wp-block-code {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-family: Menlo, Consolas, monaco, monospace;
|
||||
padding: 0.8em 1em;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-code>code{font-family:Menlo,Consolas,monaco,monospace;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}
|
||||
.wp-block-code{border:1px solid #ccc;border-radius:4px;font-family:Menlo,Consolas,monaco,monospace;padding:.8em 1em}
|
|
@ -74,10 +74,9 @@
|
|||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-code > code {
|
||||
font-family: Menlo, Consolas, monaco, monospace;
|
||||
color: #1e1e1e;
|
||||
padding: 0.8em 1em;
|
||||
border: 1px solid #ddd;
|
||||
.wp-block-code {
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
font-family: Menlo, Consolas, monaco, monospace;
|
||||
padding: 0.8em 1em;
|
||||
}
|
|
@ -1 +1 @@
|
|||
.wp-block-code>code{font-family:Menlo,Consolas,monaco,monospace;color:#1e1e1e;padding:.8em 1em;border:1px solid #ddd;border-radius:4px}
|
||||
.wp-block-code{border:1px solid #ccc;border-radius:4px;font-family:Menlo,Consolas,monaco,monospace;padding:.8em 1em}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/column",
|
||||
"title": "Column",
|
||||
|
@ -27,13 +28,19 @@
|
|||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"blockGap": true,
|
||||
"padding": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"padding": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"__experimentalLayout": true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/columns",
|
||||
"title": "Columns",
|
||||
|
@ -20,14 +21,40 @@
|
|||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"spacing": {
|
||||
"blockGap": true,
|
||||
"margin": [ "top", "bottom" ],
|
||||
"padding": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"padding": true
|
||||
}
|
||||
},
|
||||
"__experimentalLayout": {
|
||||
"allowSwitching": false,
|
||||
"allowInheriting": false,
|
||||
"allowEditing": false,
|
||||
"default": {
|
||||
"type": "flex",
|
||||
"flexWrap": "nowrap"
|
||||
}
|
||||
},
|
||||
"__experimentalBorder": {
|
||||
"color": true,
|
||||
"radius": true,
|
||||
"style": true,
|
||||
"width": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"color": true,
|
||||
"radius": true,
|
||||
"style": true,
|
||||
"width": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-columns-editor",
|
||||
|
|
|
@ -80,16 +80,6 @@
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) {
|
||||
margin-right: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) {
|
||||
margin-right: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
html :where(.wp-block-column) {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-columns :where(.wp-block){max-width:none;margin-right:0;margin-left:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-right:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}}html :where(.wp-block-column){margin-top:0;margin-bottom:0}
|
||||
.wp-block-columns :where(.wp-block){max-width:none;margin-right:0;margin-left:0}html :where(.wp-block-column){margin-top:0;margin-bottom:0}
|
|
@ -80,16 +80,6 @@
|
|||
margin-right: 0;
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(even) {
|
||||
margin-left: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child) {
|
||||
margin-left: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
html :where(.wp-block-column) {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-columns :where(.wp-block){max-width:none;margin-left:0;margin-right:0}@media (min-width:600px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.editor-styles-wrapper .block-editor-block-list__block.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}}html :where(.wp-block-column){margin-top:0;margin-bottom:0}
|
||||
.wp-block-columns :where(.wp-block){max-width:none;margin-left:0;margin-right:0}html :where(.wp-block-column){margin-top:0;margin-bottom:0}
|
|
@ -78,19 +78,17 @@
|
|||
display: flex;
|
||||
margin-bottom: 1.75em;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: wrap !important;
|
||||
align-items: initial !important;
|
||||
/**
|
||||
* All Columns Alignment
|
||||
*/
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.wp-block-columns {
|
||||
flex-wrap: nowrap;
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
}
|
||||
.wp-block-columns:where(.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
.wp-block-columns.are-vertically-aligned-top {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
@ -100,20 +98,11 @@
|
|||
.wp-block-columns.are-vertically-aligned-bottom {
|
||||
align-items: flex-end;
|
||||
}
|
||||
@media (max-width: 599px) {
|
||||
@media (max-width: 781px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
||||
flex-basis: 100% !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 600px) and (max-width: 781px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:only-child) {
|
||||
flex-basis: calc(50% - calc(var(--wp--style--block-gap, 2em) / 2)) !important;
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(even) {
|
||||
margin-right: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
||||
flex-basis: 0;
|
||||
|
@ -122,12 +111,9 @@
|
|||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*=flex-basis] {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:first-child) {
|
||||
margin-right: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile {
|
||||
flex-wrap: nowrap;
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
|
||||
flex-basis: 0;
|
||||
|
@ -136,8 +122,9 @@
|
|||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column[style*=flex-basis] {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column:not(:first-child) {
|
||||
margin-right: var(--wp--style--block-gap, 2em);
|
||||
|
||||
:where(.wp-block-columns.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
|
||||
.wp-block-column {
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns:where(.has-background){padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:599px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:only-child){flex-basis:calc(50% - var(--wp--style--block-gap, 2em)/2)!important;flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-right:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column:not(:first-child){margin-right:var(--wp--style--block-gap,2em)}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}
|
||||
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap!important;align-items:normal!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}
|
|
@ -78,19 +78,17 @@
|
|||
display: flex;
|
||||
margin-bottom: 1.75em;
|
||||
box-sizing: border-box;
|
||||
flex-wrap: wrap;
|
||||
flex-wrap: wrap !important;
|
||||
align-items: initial !important;
|
||||
/**
|
||||
* All Columns Alignment
|
||||
*/
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.wp-block-columns {
|
||||
flex-wrap: nowrap;
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
}
|
||||
.wp-block-columns:where(.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
.wp-block-columns.are-vertically-aligned-top {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
@ -100,20 +98,11 @@
|
|||
.wp-block-columns.are-vertically-aligned-bottom {
|
||||
align-items: flex-end;
|
||||
}
|
||||
@media (max-width: 599px) {
|
||||
@media (max-width: 781px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
||||
flex-basis: 100% !important;
|
||||
}
|
||||
}
|
||||
@media (min-width: 600px) and (max-width: 781px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:only-child) {
|
||||
flex-basis: calc(50% - calc(var(--wp--style--block-gap, 2em) / 2)) !important;
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:nth-child(even) {
|
||||
margin-left: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
@media (min-width: 782px) {
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
|
||||
flex-basis: 0;
|
||||
|
@ -122,12 +111,9 @@
|
|||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column[style*=flex-basis] {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column:not(:first-child) {
|
||||
margin-left: var(--wp--style--block-gap, 2em);
|
||||
}
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile {
|
||||
flex-wrap: nowrap;
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
|
||||
flex-basis: 0;
|
||||
|
@ -136,8 +122,9 @@
|
|||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column[style*=flex-basis] {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.wp-block-columns.is-not-stacked-on-mobile > .wp-block-column:not(:first-child) {
|
||||
margin-left: var(--wp--style--block-gap, 2em);
|
||||
|
||||
:where(.wp-block-columns.has-background) {
|
||||
padding: 1.25em 2.375em;
|
||||
}
|
||||
|
||||
.wp-block-column {
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap}}.wp-block-columns:where(.has-background){padding:1.25em 2.375em}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:599px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:600px) and (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:only-child){flex-basis:calc(50% - var(--wp--style--block-gap, 2em)/2)!important;flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:nth-child(2n){margin-left:var(--wp--style--block-gap,2em)}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column:not(:first-child){margin-left:var(--wp--style--block-gap,2em)}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}
|
||||
.wp-block-columns{display:flex;margin-bottom:1.75em;box-sizing:border-box;flex-wrap:wrap!important;align-items:normal!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;word-break:break-word;overflow-wrap:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-author-name` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-author-name` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string Return the post comment's author.
|
||||
*/
|
||||
function render_block_core_comment_author_name( $attributes, $content, $block ) {
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] );
|
||||
}
|
||||
if ( isset( $attributes['fontSize'] ) ) {
|
||||
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
$comment_author = get_comment_author( $comment );
|
||||
$link = get_comment_author_url( $comment );
|
||||
|
||||
if ( ! empty( $attributes['isLink'] ) && ! empty( $attributes['linkTarget'] ) ) {
|
||||
$comment_author = sprintf( '<a rel="external nofollow ugc" href="%1s" target="%2s" >%3s</a>', esc_url( $link ), esc_attr( $attributes['linkTarget'] ), $comment_author );
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
$wrapper_attributes,
|
||||
$comment_author
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-author-name` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_author_name() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-author-name',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_author_name',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comment_author_name' );
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-author-name",
|
||||
"title": "Comment Author Name",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comment-template" ],
|
||||
"description": "Displays the name of the author of the comment.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"isLink": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"linkTarget": {
|
||||
"type": "string",
|
||||
"default": "_self"
|
||||
},
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
},
|
||||
"fontSize": {
|
||||
"type": "string",
|
||||
"default": "small"
|
||||
}
|
||||
},
|
||||
"usesContext": [ "commentId" ],
|
||||
"supports": {
|
||||
"html": false,
|
||||
"spacing": {
|
||||
"margin": true,
|
||||
"padding": true
|
||||
},
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalLetterSpacing": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-content` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-content` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string Return the post comment's content.
|
||||
*/
|
||||
function render_block_core_comment_content( $attributes, $content, $block ) {
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_text = get_comment_text( $comment );
|
||||
if ( ! $comment_text ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . $attributes['textAlign'];
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
$wrapper_attributes,
|
||||
$comment_text
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-content` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_content() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-content',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_content',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comment_content' );
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-content",
|
||||
"title": "Comment Content",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comment-template" ],
|
||||
"description": "Displays the contents of a comment.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "commentId" ],
|
||||
"attributes": {
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalLetterSpacing": true
|
||||
},
|
||||
"spacing": {
|
||||
"padding": [ "horizontal", "vertical" ],
|
||||
"__experimentalDefaultControls": {
|
||||
"padding": true
|
||||
}
|
||||
},
|
||||
"html": false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-date` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-date` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string Return the post comment's date.
|
||||
*/
|
||||
function render_block_core_comment_date( $attributes, $content, $block ) {
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['fontSize'] ) ) {
|
||||
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
$formatted_date = get_comment_date(
|
||||
isset( $attributes['format'] ) ? $attributes['format'] : '',
|
||||
$comment
|
||||
);
|
||||
$link = get_comment_link( $comment );
|
||||
|
||||
if ( ! empty( $attributes['isLink'] ) ) {
|
||||
$formatted_date = sprintf( '<a href="%1s">%2s</a>', esc_url( $link ), $formatted_date );
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s><time datetime="%2$s">%3$s</time></div>',
|
||||
$wrapper_attributes,
|
||||
esc_attr( get_comment_date( 'c', $comment ) ),
|
||||
$formatted_date
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-date` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_date() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-date',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_date',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comment_date' );
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-date",
|
||||
"title": "Comment Date",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comment-template" ],
|
||||
"description": "Displays the date on which the comment was posted.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"format": {
|
||||
"type": "string"
|
||||
},
|
||||
"isLink": {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"fontSize": {
|
||||
"type": "string",
|
||||
"default": "small"
|
||||
}
|
||||
},
|
||||
"usesContext": [ "commentId" ],
|
||||
"supports": {
|
||||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalLetterSpacing": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-edit-link` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-edit-link` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
*
|
||||
* @return string Return the post comment's date.
|
||||
*/
|
||||
function render_block_core_comment_edit_link( $attributes, $content, $block ) {
|
||||
if ( ! isset( $block->context['commentId'] ) || ! current_user_can( 'edit_comment', $block->context['commentId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$edit_comment_link = get_edit_comment_link( $block->context['commentId'] );
|
||||
|
||||
$link_atts = '';
|
||||
|
||||
if ( ! empty( $attributes['linkTarget'] ) ) {
|
||||
$link_atts .= sprintf( 'target="%s"', esc_attr( $attributes['linkTarget'] ) );
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] );
|
||||
}
|
||||
if ( isset( $attributes['fontSize'] ) ) {
|
||||
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s><a href="%2$s" %3$s>%4$s</a></div>',
|
||||
$wrapper_attributes,
|
||||
esc_url( $edit_comment_link ),
|
||||
$link_atts,
|
||||
esc_html__( 'Edit' )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-edit-link` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_edit_link() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-edit-link',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_edit_link',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action( 'init', 'register_block_core_comment_edit_link' );
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-edit-link",
|
||||
"title": "Comment Edit Link",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comment-template" ],
|
||||
"description": "Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "commentId" ],
|
||||
"attributes": {
|
||||
"linkTarget": {
|
||||
"type": "string",
|
||||
"default": "_self"
|
||||
},
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
},
|
||||
"fontSize": {
|
||||
"type": "string",
|
||||
"default": "small"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"html": false,
|
||||
"color": {
|
||||
"link": true,
|
||||
"gradients": true,
|
||||
"text": false,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalLetterSpacing": true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-reply-link` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-reply-link` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string Return the post comment's reply link.
|
||||
*/
|
||||
function render_block_core_comment_reply_link( $attributes, $content, $block ) {
|
||||
if ( ! isset( $block->context['commentId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$thread_comments = get_option( 'thread_comments' );
|
||||
if ( ! $thread_comments ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment = get_comment( $block->context['commentId'] );
|
||||
if ( empty( $comment ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$depth = 1;
|
||||
$max_depth = get_option( 'thread_comments_depth' );
|
||||
$parent_id = $comment->comment_parent;
|
||||
|
||||
// Compute comment's depth iterating over its ancestors.
|
||||
while ( ! empty( $parent_id ) ) {
|
||||
$depth++;
|
||||
$parent_id = get_comment( $parent_id )->comment_parent;
|
||||
}
|
||||
|
||||
$comment_reply_link = get_comment_reply_link(
|
||||
array(
|
||||
'depth' => $depth,
|
||||
'max_depth' => $max_depth,
|
||||
),
|
||||
$comment
|
||||
);
|
||||
|
||||
// Render nothing if the generated reply link is empty.
|
||||
if ( empty( $comment_reply_link ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$classes = '';
|
||||
if ( isset( $attributes['textAlign'] ) ) {
|
||||
$classes .= 'has-text-align-' . esc_attr( $attributes['textAlign'] );
|
||||
}
|
||||
if ( isset( $attributes['fontSize'] ) ) {
|
||||
$classes .= 'has-' . esc_attr( $attributes['fontSize'] ) . '-font-size';
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
$wrapper_attributes,
|
||||
$comment_reply_link
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-reply-link` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_reply_link() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-reply-link',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_reply_link',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
add_action( 'init', 'register_block_core_comment_reply_link' );
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-reply-link",
|
||||
"title": "Comment Reply Link",
|
||||
"category": "theme",
|
||||
"ancestor": [ "core/comment-template" ],
|
||||
"description": "Displays a link to reply to a comment.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "commentId" ],
|
||||
"attributes": {
|
||||
"textAlign": {
|
||||
"type": "string"
|
||||
},
|
||||
"fontSize": {
|
||||
"type": "string",
|
||||
"default": "small"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"text": false,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontFamily": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalLetterSpacing": true
|
||||
},
|
||||
"html": false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comment-template` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Function that recursively renders a list of nested comments.
|
||||
*
|
||||
* @param WP_Comment[] $comments The array of comments.
|
||||
* @param WP_Block $block Block instance.
|
||||
* @return string
|
||||
*/
|
||||
function block_core_comment_template_render_comments( $comments, $block ) {
|
||||
$content = '';
|
||||
foreach ( $comments as $comment ) {
|
||||
|
||||
$block_content = ( new WP_Block(
|
||||
$block->parsed_block,
|
||||
array(
|
||||
'commentId' => $comment->comment_ID,
|
||||
)
|
||||
) )->render( array( 'dynamic' => false ) );
|
||||
|
||||
$children = $comment->get_children();
|
||||
|
||||
// If the comment has children, recurse to create the HTML for the nested
|
||||
// comments.
|
||||
if ( ! empty( $children ) ) {
|
||||
$inner_content = block_core_comment_template_render_comments(
|
||||
$children,
|
||||
$block
|
||||
);
|
||||
$block_content .= sprintf( '<ol>%1$s</ol>', $inner_content );
|
||||
}
|
||||
|
||||
$content .= '<li>' . $block_content . '</li>';
|
||||
}
|
||||
|
||||
return $content;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the `core/comment-template` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
*
|
||||
* @return string Returns the HTML representing the comments using the layout
|
||||
* defined by the block's inner blocks.
|
||||
*/
|
||||
function render_block_core_comment_template( $attributes, $content, $block ) {
|
||||
// Bail out early if the post ID is not set for some reason.
|
||||
if ( empty( $block->context['postId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_query = new WP_Comment_Query(
|
||||
build_comment_query_vars_from_block( $block )
|
||||
);
|
||||
|
||||
// Get an array of comments for the current post.
|
||||
$comments = $comment_query->get_comments();
|
||||
if ( count( $comments ) === 0 ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_order = get_option( 'comment_order' );
|
||||
|
||||
if ( 'desc' === $comment_order ) {
|
||||
$comments = array_reverse( $comments );
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes();
|
||||
|
||||
return sprintf(
|
||||
'<ol %1$s>%2$s</ol>',
|
||||
$wrapper_attributes,
|
||||
block_core_comment_template_render_comments( $comments, $block )
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comment-template` block on the server.
|
||||
*/
|
||||
function register_block_core_comment_template() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comment-template',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comment_template',
|
||||
'skip_inner_blocks' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comment_template' );
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comment-template",
|
||||
"title": "Comment Template",
|
||||
"category": "design",
|
||||
"parent": [ "core/comments-query-loop" ],
|
||||
"description": "Contains the block elements used to display a comment, like the title, date, author, avatar and more.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "postId" ],
|
||||
"supports": {
|
||||
"reusable": false,
|
||||
"html": false,
|
||||
"align": true
|
||||
},
|
||||
"style": "wp-block-comment-template"
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comment-template {
|
||||
margin-bottom: 0;
|
||||
max-width: 100%;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.wp-block-comment-template li {
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-comment-template ol {
|
||||
margin-bottom: 0;
|
||||
max-width: 100%;
|
||||
list-style: none;
|
||||
padding-right: 2rem;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comment-template{margin-bottom:0;max-width:100%;list-style:none;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{margin-bottom:0;max-width:100%;list-style:none;padding-right:2rem}
|
|
@ -0,0 +1,91 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comment-template {
|
||||
margin-bottom: 0;
|
||||
max-width: 100%;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.wp-block-comment-template li {
|
||||
clear: both;
|
||||
}
|
||||
.wp-block-comment-template ol {
|
||||
margin-bottom: 0;
|
||||
max-width: 100%;
|
||||
list-style: none;
|
||||
padding-left: 2rem;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comment-template{margin-bottom:0;max-width:100%;list-style:none;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{margin-bottom:0;max-width:100%;list-style:none;padding-left:2rem}
|
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comments-pagination-next` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comments-pagination-next` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
*
|
||||
* @return string Returns the next comments link for the query pagination.
|
||||
*/
|
||||
function render_block_core_comments_pagination_next( $attributes, $content, $block ) {
|
||||
// Bail out early if the post ID is not set for some reason.
|
||||
if ( empty( $block->context['postId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_vars = build_comment_query_vars_from_block( $block );
|
||||
$max_page = ( new WP_Comment_Query( $comment_vars ) )->max_num_pages;
|
||||
$default_label = __( 'Newer Comments' );
|
||||
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
||||
$pagination_arrow = get_comments_pagination_arrow( $block, 'next' );
|
||||
|
||||
$filter_link_attributes = function() {
|
||||
return get_block_wrapper_attributes();
|
||||
};
|
||||
add_filter( 'next_comments_link_attributes', $filter_link_attributes );
|
||||
|
||||
if ( $pagination_arrow ) {
|
||||
$label .= $pagination_arrow;
|
||||
}
|
||||
|
||||
$next_comments_link = get_next_comments_link( $label, $max_page );
|
||||
|
||||
remove_filter( 'next_posts_link_attributes', $filter_link_attributes );
|
||||
|
||||
if ( ! isset( $next_comments_link ) ) {
|
||||
return '';
|
||||
}
|
||||
return $next_comments_link;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-next` block on the server.
|
||||
*/
|
||||
function register_block_core_comments_pagination_next() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comments-pagination-next',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comments_pagination_next',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comments_pagination_next' );
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comments-pagination-next",
|
||||
"title": "Next Page",
|
||||
"category": "theme",
|
||||
"parent": [ "core/comments-pagination" ],
|
||||
"description": "Displays the next comment's page link.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"usesContext": [ "postId", "comments/paginationArrow" ],
|
||||
"supports": {
|
||||
"reusable": false,
|
||||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"text": false,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalLetterSpacing": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comments-pagination-numbers` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comments-pagination-numbers` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
*
|
||||
* @return string Returns the pagination numbers for the comments.
|
||||
*/
|
||||
function render_block_core_comments_pagination_numbers( $attributes, $content, $block ) {
|
||||
// Bail out early if the post ID is not set for some reason.
|
||||
if ( empty( $block->context['postId'] ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$comment_vars = build_comment_query_vars_from_block( $block );
|
||||
|
||||
$total = ( new WP_Comment_Query( $comment_vars ) )->max_num_pages;
|
||||
$current = ! empty( $comment_vars['paged'] ) ? $comment_vars['paged'] : null;
|
||||
|
||||
// Render links.
|
||||
$content = paginate_comments_links(
|
||||
array(
|
||||
'total' => $total,
|
||||
'current' => $current,
|
||||
'prev_next' => false,
|
||||
'echo' => false,
|
||||
)
|
||||
);
|
||||
|
||||
if ( empty( $content ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes();
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
$wrapper_attributes,
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-numbers` block on the server.
|
||||
*/
|
||||
function register_block_core_comments_pagination_numbers() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comments-pagination-numbers',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comments_pagination_numbers',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comments_pagination_numbers' );
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comments-pagination-numbers",
|
||||
"title": "Page Numbers",
|
||||
"category": "theme",
|
||||
"parent": [ "core/comments-pagination" ],
|
||||
"description": "Displays a list of page numbers for comments pagination.",
|
||||
"textdomain": "default",
|
||||
"usesContext": [ "postId" ],
|
||||
"supports": {
|
||||
"reusable": false,
|
||||
"html": false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comments-pagination-numbers a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.wp-block-comments-pagination-numbers .page-numbers {
|
||||
margin-left: 2px;
|
||||
}
|
||||
.wp-block-comments-pagination-numbers .page-numbers:last-child {
|
||||
margin-right: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comments-pagination-numbers a{text-decoration:underline}.wp-block-comments-pagination-numbers .page-numbers{margin-left:2px}.wp-block-comments-pagination-numbers .page-numbers:last-child{margin-right:0}
|
|
@ -0,0 +1,86 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comments-pagination-numbers a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.wp-block-comments-pagination-numbers .page-numbers {
|
||||
margin-right: 2px;
|
||||
}
|
||||
.wp-block-comments-pagination-numbers .page-numbers:last-child {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comments-pagination-numbers a{text-decoration:underline}.wp-block-comments-pagination-numbers .page-numbers{margin-right:2px}.wp-block-comments-pagination-numbers .page-numbers:last-child{margin-right:0}
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comments-pagination-previous` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comments-pagination-previous` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
* @param WP_Block $block Block instance.
|
||||
*
|
||||
* @return string Returns the previous posts link for the comments pagination.
|
||||
*/
|
||||
function render_block_core_comments_pagination_previous( $attributes, $content, $block ) {
|
||||
$default_label = __( 'Older Comments' );
|
||||
$label = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? $attributes['label'] : $default_label;
|
||||
$pagination_arrow = get_comments_pagination_arrow( $block, 'previous' );
|
||||
if ( $pagination_arrow ) {
|
||||
$label = $pagination_arrow . $label;
|
||||
}
|
||||
|
||||
$filter_link_attributes = function() {
|
||||
return get_block_wrapper_attributes();
|
||||
};
|
||||
add_filter( 'previous_comments_link_attributes', $filter_link_attributes );
|
||||
|
||||
$previous_comments_link = get_previous_comments_link( $label );
|
||||
|
||||
remove_filter( 'previous_comments_link_attributes', $filter_link_attributes );
|
||||
|
||||
if ( ! isset( $previous_comments_link ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $previous_comments_link;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination-previous` block on the server.
|
||||
*/
|
||||
function register_block_core_comments_pagination_previous() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comments-pagination-previous',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comments_pagination_previous',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comments_pagination_previous' );
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comments-pagination-previous",
|
||||
"title": "Previous Page",
|
||||
"category": "theme",
|
||||
"parent": [ "core/comments-pagination" ],
|
||||
"description": "Displays the previous comment's page link.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"label": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"usesContext": [ "postId", "comments/paginationArrow" ],
|
||||
"supports": {
|
||||
"reusable": false,
|
||||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"text": false,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true
|
||||
}
|
||||
},
|
||||
"typography": {
|
||||
"fontSize": true,
|
||||
"lineHeight": true,
|
||||
"__experimentalFontStyle": true,
|
||||
"__experimentalFontWeight": true,
|
||||
"__experimentalLetterSpacing": true,
|
||||
"__experimentalTextTransform": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"fontSize": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Server-side rendering of the `core/comments-pagination` block.
|
||||
*
|
||||
* @package WordPress
|
||||
*/
|
||||
|
||||
/**
|
||||
* Renders the `core/comments-pagination` block on the server.
|
||||
*
|
||||
* @param array $attributes Block attributes.
|
||||
* @param string $content Block default content.
|
||||
*
|
||||
* @return string Returns the wrapper for the Comments pagination.
|
||||
*/
|
||||
function render_block_core_comments_pagination( $attributes, $content ) {
|
||||
if ( empty( trim( $content ) ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return sprintf(
|
||||
'<div %1$s>%2$s</div>',
|
||||
get_block_wrapper_attributes(),
|
||||
$content
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the `core/comments-pagination` block on the server.
|
||||
*/
|
||||
function register_block_core_comments_pagination() {
|
||||
register_block_type_from_metadata(
|
||||
__DIR__ . '/comments-pagination',
|
||||
array(
|
||||
'render_callback' => 'render_block_core_comments_pagination',
|
||||
)
|
||||
);
|
||||
}
|
||||
add_action( 'init', 'register_block_core_comments_pagination' );
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comments-pagination",
|
||||
"title": "Comments Pagination",
|
||||
"category": "theme",
|
||||
"parent": [ "core/comments-query-loop" ],
|
||||
"description": "Displays a paginated navigation to next/previous set of comments, when applicable.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"paginationArrow": {
|
||||
"type": "string",
|
||||
"default": "none"
|
||||
}
|
||||
},
|
||||
"providesContext": {
|
||||
"comments/paginationArrow": "paginationArrow"
|
||||
},
|
||||
"supports": {
|
||||
"align": true,
|
||||
"reusable": false,
|
||||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true,
|
||||
"link": true
|
||||
}
|
||||
},
|
||||
"__experimentalLayout": {
|
||||
"allowSwitching": false,
|
||||
"allowInheriting": false,
|
||||
"default": {
|
||||
"type": "flex"
|
||||
}
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-comments-pagination-editor",
|
||||
"style": "wp-block-comments-pagination"
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block[data-align=center] > .wp-block-comments-pagination {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block-comments-pagination {
|
||||
max-width: 100%;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
||||
margin-right: 0;
|
||||
margin-top: 0.5em;
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
||||
margin-right: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}.editor-styles-wrapper .wp-block-comments-pagination{max-width:100%}.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-top:.5em;margin-right:.5em;margin-bottom:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}
|
|
@ -0,0 +1,102 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block[data-align=center] > .wp-block-comments-pagination {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.editor-styles-wrapper .wp-block-comments-pagination {
|
||||
max-width: 100%;
|
||||
}
|
||||
.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
||||
margin-left: 0;
|
||||
margin-top: 0.5em;
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block[data-align=center]>.wp-block-comments-pagination{justify-content:center}.editor-styles-wrapper .wp-block-comments-pagination{max-width:100%}.editor-styles-wrapper .wp-block-comments-pagination.block-editor-block-list__layout{margin:0}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin:.5em .5em .5em 0}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow {
|
||||
margin-left: 1ch;
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron) {
|
||||
transform: scaleX(-1);;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow {
|
||||
margin-right: 1ch;
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron) {
|
||||
transform: scaleX(-1);;
|
||||
}
|
||||
.wp-block-comments-pagination.aligncenter {
|
||||
justify-content: center;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-right:.5em;margin-bottom:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{margin-left:1ch;display:inline-block}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{margin-right:1ch;display:inline-block}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-comments-pagination.aligncenter{justify-content:center}
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-next:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-previous:last-child,
|
||||
.wp-block-comments-pagination > .wp-block-comments-pagination-numbers:last-child {
|
||||
/*rtl:ignore*/
|
||||
margin-right: 0;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow {
|
||||
margin-right: 1ch;
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron) {
|
||||
transform: scaleX(1) /*rtl:scaleX(-1);*/;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow {
|
||||
margin-left: 1ch;
|
||||
display: inline-block;
|
||||
}
|
||||
.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron) {
|
||||
transform: scaleX(1) /*rtl:scaleX(-1);*/;
|
||||
}
|
||||
.wp-block-comments-pagination.aligncenter {
|
||||
justify-content: center;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-right:.5em;margin-bottom:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{margin-right:1ch;display:inline-block}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{margin-left:1ch;display:inline-block}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination.aligncenter{justify-content:center}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/comments-query-loop",
|
||||
"title": "Comments Query Loop",
|
||||
"category": "theme",
|
||||
"description": "An advanced block that allows displaying post comments using different visual configurations.",
|
||||
"textdomain": "default",
|
||||
"attributes": {
|
||||
"tagName": {
|
||||
"type": "string",
|
||||
"default": "div"
|
||||
}
|
||||
},
|
||||
"supports": {
|
||||
"align": [ "wide", "full" ],
|
||||
"html": false,
|
||||
"color": {
|
||||
"gradients": true,
|
||||
"link": true,
|
||||
"__experimentalDefaultControls": {
|
||||
"background": true,
|
||||
"text": true,
|
||||
"link": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"editorStyle": "wp-block-comments-editor"
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.block-library-comments-toolbar__popover .components-popover__content {
|
||||
min-width: 230px;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}
|
|
@ -0,0 +1,79 @@
|
|||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Breakpoints & Media Queries
|
||||
*/
|
||||
/**
|
||||
* SCSS Variables.
|
||||
*
|
||||
* Please use variables from this sheet to ensure consistency across the UI.
|
||||
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
|
||||
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
|
||||
*/
|
||||
/**
|
||||
* Colors
|
||||
*/
|
||||
/**
|
||||
* Fonts & basic variables.
|
||||
*/
|
||||
/**
|
||||
* Grid System.
|
||||
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
||||
*/
|
||||
/**
|
||||
* Dimensions.
|
||||
*/
|
||||
/**
|
||||
* Shadows.
|
||||
*/
|
||||
/**
|
||||
* Editor widths.
|
||||
*/
|
||||
/**
|
||||
* Block & Editor UI.
|
||||
*/
|
||||
/**
|
||||
* Block paddings.
|
||||
*/
|
||||
/**
|
||||
* React Native specific.
|
||||
* These variables do not appear to be used anywhere else.
|
||||
*/
|
||||
/**
|
||||
* Converts a hex value into the rgb equivalent.
|
||||
*
|
||||
* @param {string} hex - the hexadecimal value to convert
|
||||
* @return {string} comma separated rgb values
|
||||
*/
|
||||
/**
|
||||
* Breakpoint mixins
|
||||
*/
|
||||
/**
|
||||
* Long content fade mixin
|
||||
*
|
||||
* Creates a fading overlay to signify that the content is longer
|
||||
* than the space allows.
|
||||
*/
|
||||
/**
|
||||
* Focus styles.
|
||||
*/
|
||||
/**
|
||||
* Applies editor left position to the selector passed as argument
|
||||
*/
|
||||
/**
|
||||
* Styles that are reused verbatim in a few places
|
||||
*/
|
||||
/**
|
||||
* Allows users to opt-out of animations via OS-level preferences.
|
||||
*/
|
||||
/**
|
||||
* Reset default styles for JavaScript UI based pages.
|
||||
* This is a WP-admin agnostic reset
|
||||
*/
|
||||
/**
|
||||
* Reset the WP Admin page styles for Gutenberg-like pages.
|
||||
*/
|
||||
.block-library-comments-toolbar__popover .components-popover__content {
|
||||
min-width: 230px;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
.block-library-comments-toolbar__popover .components-popover__content{min-width:230px}
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/cover",
|
||||
"title": "Cover",
|
||||
|
@ -9,6 +10,10 @@
|
|||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"useFeaturedImage": {
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
|
@ -71,6 +76,7 @@
|
|||
"enum": [ "all", "insert", false ]
|
||||
}
|
||||
},
|
||||
"usesContext": [ "postId", "postType" ],
|
||||
"supports": {
|
||||
"anchor": true,
|
||||
"align": true,
|
||||
|
|
|
@ -124,18 +124,20 @@
|
|||
.wp-block-cover .has-background-dim:not([class*=-background-color]) {
|
||||
background-color: #000;
|
||||
}
|
||||
.wp-block-cover-image .has-background-dim.has-background-gradient,
|
||||
.wp-block-cover .has-background-dim.has-background-gradient {
|
||||
background-color: transparent;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim::before,
|
||||
.wp-block-cover-image .has-background-dim::before,
|
||||
.wp-block-cover.has-background-dim::before,
|
||||
.wp-block-cover .has-background-dim::before {
|
||||
.wp-block-cover.has-background-dim::before {
|
||||
content: "";
|
||||
background-color: inherit;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image .has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image .wp-block-cover__background,
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover .has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover .wp-block-cover__background,
|
||||
.wp-block-cover .wp-block-cover__gradient-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -146,109 +148,155 @@
|
|||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background {
|
||||
opacity: 0.1;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
|
||||
opacity: 1;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0 {
|
||||
opacity: 0;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10 {
|
||||
opacity: 0.1;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20 {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30 {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40 {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50 {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60 {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70 {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80 {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90 {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100 {
|
||||
opacity: 1;
|
||||
}
|
||||
.wp-block-cover-image .block-library-cover__padding-visualizer,
|
||||
.wp-block-cover .block-library-cover__padding-visualizer {
|
||||
z-index: 2;
|
||||
}
|
||||
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
|
||||
.wp-block-cover.alignleft,
|
||||
.wp-block-cover.alignright {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -124,18 +124,20 @@
|
|||
.wp-block-cover .has-background-dim:not([class*=-background-color]) {
|
||||
background-color: #000;
|
||||
}
|
||||
.wp-block-cover-image .has-background-dim.has-background-gradient,
|
||||
.wp-block-cover .has-background-dim.has-background-gradient {
|
||||
background-color: transparent;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim::before,
|
||||
.wp-block-cover-image .has-background-dim::before,
|
||||
.wp-block-cover.has-background-dim::before,
|
||||
.wp-block-cover .has-background-dim::before {
|
||||
.wp-block-cover.has-background-dim::before {
|
||||
content: "";
|
||||
background-color: inherit;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image .has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image .wp-block-cover__background,
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover .has-background-dim:not(.has-background-gradient)::before,
|
||||
.wp-block-cover .wp-block-cover__background,
|
||||
.wp-block-cover .wp-block-cover__gradient-background {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
|
@ -146,109 +148,155 @@
|
|||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background {
|
||||
opacity: 0.1;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,
|
||||
.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient)::before,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,
|
||||
.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background {
|
||||
opacity: 1;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0 {
|
||||
opacity: 0;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10 {
|
||||
opacity: 0.1;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20 {
|
||||
opacity: 0.2;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30 {
|
||||
opacity: 0.3;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40 {
|
||||
opacity: 0.4;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50 {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60 {
|
||||
opacity: 0.6;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70 {
|
||||
opacity: 0.7;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80 {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90 {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100 {
|
||||
.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,
|
||||
.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100 {
|
||||
opacity: 1;
|
||||
}
|
||||
.wp-block-cover-image .block-library-cover__padding-visualizer,
|
||||
.wp-block-cover .block-library-cover__padding-visualizer {
|
||||
z-index: 2;
|
||||
}
|
||||
.wp-block-cover-image.alignleft, .wp-block-cover-image.alignright,
|
||||
.wp-block-cover.alignleft,
|
||||
.wp-block-cover.alignright {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"$schema": "https://schemas.wp.org/trunk/block.json",
|
||||
"apiVersion": 2,
|
||||
"name": "core/embed",
|
||||
"title": "Embed",
|
||||
|
|
|
@ -81,19 +81,7 @@
|
|||
}
|
||||
.wp-block-embed.is-loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1em;
|
||||
min-height: 200px;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
background-color: #fff;
|
||||
box-shadow: inset 0 0 0 1px #1e1e1e;
|
||||
}
|
||||
.wp-block-embed.is-loading p {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
.wp-block-embed .components-placeholder__error {
|
||||
word-break: break-word;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-embed{margin-right:0;margin-left:0;clear:both}.wp-block-embed.is-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1em;min-height:200px;text-align:center;border-radius:2px;background-color:#fff;box-shadow:inset 0 0 0 1px #1e1e1e}.wp-block-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.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{position:absolute;top:0;right:0;left:0;bottom:0;opacity: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{margin-right:0;margin-left:0;clear:both}.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{position:absolute;top:0;right:0;left:0;bottom:0;opacity: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}
|
|
@ -81,19 +81,7 @@
|
|||
}
|
||||
.wp-block-embed.is-loading {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1em;
|
||||
min-height: 200px;
|
||||
text-align: center;
|
||||
border-radius: 2px;
|
||||
background-color: #fff;
|
||||
box-shadow: inset 0 0 0 1px #1e1e1e;
|
||||
}
|
||||
.wp-block-embed.is-loading p {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
.wp-block-embed .components-placeholder__error {
|
||||
word-break: break-word;
|
||||
|
|
|
@ -1 +1 @@
|
|||
.wp-block-embed{margin-left:0;margin-right:0;clear:both}.wp-block-embed.is-loading{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1em;min-height:200px;text-align:center;border-radius:2px;background-color:#fff;box-shadow:inset 0 0 0 1px #1e1e1e}.wp-block-embed.is-loading p{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px}.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{position:absolute;top:0;left:0;right:0;bottom:0;opacity: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{margin-left:0;margin-right:0;clear:both}.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{position:absolute;top:0;left:0;right:0;bottom:0;opacity: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}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue