` wrapper. Find the a or button tag.
*/
$tag = null;
while ( $p->next_tag() ) {
$tag = $p->get_tag();
if ( 'A' === $tag || 'BUTTON' === $tag ) {
break;
}
}
/*
* If this happens, the likelihood is there's no block content,
* or the block has been modified by a plugin.
*/
if ( null === $tag ) {
return $content;
}
// If the next token is the closing tag, the button is empty.
$is_empty = true;
while ( $p->next_token() && $tag !== $p->get_token_name() && $is_empty ) {
if ( '#comment' !== $p->get_token_type() ) {
/**
* Anything else implies this is not empty.
* This might include any text content (including a space),
* inline images or other HTML.
*/
$is_empty = false;
}
}
/*
* When there's no text, render nothing for the block.
* See https://github.com/WordPress/gutenberg/issues/17221 for the
* reasoning behind this.
*/
if ( $is_empty ) {
return '';
}
return $content;
}
/**
* Registers the `core/button` block on server.
*
* @since 6.6.0
*/
function register_block_core_button() {
register_block_type_from_metadata(
__DIR__ . '/button',
array(
'render_callback' => 'render_block_core_button',
)
);
}
add_action( 'init', 'register_block_core_button' );
avatar/editor-rtl.min.css 0000644 00000000167 14720634132 0011411 0 ustar 00 .wp-block-avatar__image img{width:100%}.wp-block-avatar.aligncenter .components-resizable-box__container{margin:0 auto} avatar/style.css 0000644 00000000233 14720634132 0007674 0 ustar 00 .wp-block-avatar{
line-height:0;
}
.wp-block-avatar,.wp-block-avatar img{
box-sizing:border-box;
}
.wp-block-avatar.aligncenter{
text-align:center;
} avatar/style.min.css 0000644 00000000212 14720634132 0010453 0 ustar 00 .wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center} avatar/editor-rtl.css 0000644 00000000203 14720634132 0010616 0 ustar 00 .wp-block-avatar__image img{
width:100%;
}
.wp-block-avatar.aligncenter .components-resizable-box__container{
margin:0 auto;
} avatar/editor.min.css 0000644 00000000167 14720634132 0010612 0 ustar 00 .wp-block-avatar__image img{width:100%}.wp-block-avatar.aligncenter .components-resizable-box__container{margin:0 auto} avatar/editor.css 0000644 00000000203 14720634132 0010017 0 ustar 00 .wp-block-avatar__image img{
width:100%;
}
.wp-block-avatar.aligncenter .components-resizable-box__container{
margin:0 auto;
} avatar/block.json 0000644 00000002272 14720634132 0010014 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"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,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,
"radius": true,
"width": true,
"color": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true
}
},
"color": {
"text": false,
"background": false,
"__experimentalDuotone": "img"
},
"interactivity": {
"clientNavigation": true
}
},
"selectors": {
"border": ".wp-block-avatar img"
},
"editorStyle": "wp-block-avatar-editor",
"style": "wp-block-avatar"
}
avatar/style-rtl.css 0000644 00000000233 14720634132 0010473 0 ustar 00 .wp-block-avatar{
line-height:0;
}
.wp-block-avatar,.wp-block-avatar img{
box-sizing:border-box;
}
.wp-block-avatar.aligncenter{
text-align:center;
} avatar/style-rtl.min.css 0000644 00000000212 14720634132 0011252 0 ustar 00 .wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center} post-navigation-link/style.css 0000644 00000001261 14720634132 0012475 0 ustar 00 .wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{
display:inline-block;
margin-right:1ch;
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){
transform:scaleX(1);
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{
display:inline-block;
margin-left:1ch;
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){
transform:scaleX(1);
}
.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{
rotate:180deg;
} post-navigation-link/style.min.css 0000644 00000001216 14720634132 0013257 0 ustar 00 .wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{display:inline-block;margin-right:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{display:inline-block;margin-left:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg} post-navigation-link/block.json 0000644 00000002446 14720634132 0012616 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-navigation-link",
"title": "Post Navigation Link",
"category": "theme",
"description": "Displays the next or previous post link that is adjacent to the current post.",
"textdomain": "default",
"attributes": {
"textAlign": {
"type": "string"
},
"type": {
"type": "string",
"default": "next"
},
"label": {
"type": "string"
},
"showTitle": {
"type": "boolean",
"default": false
},
"linkLabel": {
"type": "boolean",
"default": false
},
"arrow": {
"type": "string",
"default": "none"
},
"taxonomy": {
"type": "string",
"default": ""
}
},
"usesContext": [ "postType" ],
"supports": {
"reusable": false,
"html": false,
"color": {
"link": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalWritingMode": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
},
"style": "wp-block-post-navigation-link"
}
post-navigation-link/style-rtl.css 0000644 00000001265 14720634132 0013300 0 ustar 00 .wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{
display:inline-block;
margin-left:1ch;
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){
transform:scaleX(-1);;
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{
display:inline-block;
margin-right:1ch;
}
.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){
transform:scaleX(-1);;
}
.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{
rotate:180deg;
} post-navigation-link/style-rtl.min.css 0000644 00000001220 14720634132 0014051 0 ustar 00 .wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{display:inline-block;margin-left:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{display:inline-block;margin-right:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){transform:scaleX(-1)}.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg} tag-cloud/editor-rtl.min.css 0000644 00000000372 14720634132 0012010 0 ustar 00 .wp-block-tag-cloud .wp-block-tag-cloud{border:none;border-radius:inherit;margin:0;padding:0}.wp-block-tag-cloud__inspector-settings .components-base-control,.wp-block-tag-cloud__inspector-settings .components-base-control:last-child{margin-bottom:0} tag-cloud/style.css 0000644 00000001206 14720634132 0010276 0 ustar 00 .wp-block-tag-cloud{
box-sizing:border-box;
}
.wp-block-tag-cloud.aligncenter{
justify-content:center;
text-align:center;
}
.wp-block-tag-cloud.alignfull{
padding-left:1em;
padding-right:1em;
}
.wp-block-tag-cloud a{
display:inline-block;
margin-right:5px;
}
.wp-block-tag-cloud span{
display:inline-block;
margin-left:5px;
text-decoration:none;
}
:root :where(.wp-block-tag-cloud.is-style-outline){
display:flex;
flex-wrap:wrap;
gap:1ch;
}
:root :where(.wp-block-tag-cloud.is-style-outline a){
border:1px solid;
font-size:unset !important;
margin-right:0;
padding:1ch 2ch;
text-decoration:none !important;
} tag-cloud/style.min.css 0000644 00000001070 14720634132 0011057 0 ustar 00 .wp-block-tag-cloud{box-sizing:border-box}.wp-block-tag-cloud.aligncenter{justify-content:center;text-align:center}.wp-block-tag-cloud.alignfull{padding-left:1em;padding-right:1em}.wp-block-tag-cloud a{display:inline-block;margin-right:5px}.wp-block-tag-cloud span{display:inline-block;margin-left:5px;text-decoration:none}:root :where(.wp-block-tag-cloud.is-style-outline){display:flex;flex-wrap:wrap;gap:1ch}:root :where(.wp-block-tag-cloud.is-style-outline a){border:1px solid;font-size:unset!important;margin-right:0;padding:1ch 2ch;text-decoration:none!important} tag-cloud/editor-rtl.css 0000644 00000000417 14720634132 0011226 0 ustar 00 .wp-block-tag-cloud .wp-block-tag-cloud{
border:none;
border-radius:inherit;
margin:0;
padding:0;
}
.wp-block-tag-cloud__inspector-settings .components-base-control,.wp-block-tag-cloud__inspector-settings .components-base-control:last-child{
margin-bottom:0;
} tag-cloud/editor.min.css 0000644 00000000372 14720634132 0011211 0 ustar 00 .wp-block-tag-cloud .wp-block-tag-cloud{border:none;border-radius:inherit;margin:0;padding:0}.wp-block-tag-cloud__inspector-settings .components-base-control,.wp-block-tag-cloud__inspector-settings .components-base-control:last-child{margin-bottom:0} tag-cloud/editor.css 0000644 00000000417 14720634132 0010427 0 ustar 00 .wp-block-tag-cloud .wp-block-tag-cloud{
border:none;
border-radius:inherit;
margin:0;
padding:0;
}
.wp-block-tag-cloud__inspector-settings .components-base-control,.wp-block-tag-cloud__inspector-settings .components-base-control:last-child{
margin-bottom:0;
} tag-cloud/block.json 0000644 00000002650 14720634132 0010415 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/tag-cloud",
"title": "Tag Cloud",
"category": "widgets",
"description": "A cloud of popular keywords, each sized by how often it appears.",
"textdomain": "default",
"attributes": {
"numberOfTags": {
"type": "number",
"default": 45,
"minimum": 1,
"maximum": 100
},
"taxonomy": {
"type": "string",
"default": "post_tag"
},
"showTagCounts": {
"type": "boolean",
"default": false
},
"smallestFontSize": {
"type": "string",
"default": "8pt"
},
"largestFontSize": {
"type": "string",
"default": "22pt"
}
},
"styles": [
{ "name": "default", "label": "Default", "isDefault": true },
{ "name": "outline", "label": "Outline" }
],
"supports": {
"html": false,
"align": true,
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalLetterSpacing": true
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"editorStyle": "wp-block-tag-cloud-editor"
}
tag-cloud/style-rtl.css 0000644 00000001205 14720634132 0011074 0 ustar 00 .wp-block-tag-cloud{
box-sizing:border-box;
}
.wp-block-tag-cloud.aligncenter{
justify-content:center;
text-align:center;
}
.wp-block-tag-cloud.alignfull{
padding-left:1em;
padding-right:1em;
}
.wp-block-tag-cloud a{
display:inline-block;
margin-left:5px;
}
.wp-block-tag-cloud span{
display:inline-block;
margin-right:5px;
text-decoration:none;
}
:root :where(.wp-block-tag-cloud.is-style-outline){
display:flex;
flex-wrap:wrap;
gap:1ch;
}
:root :where(.wp-block-tag-cloud.is-style-outline a){
border:1px solid;
font-size:unset !important;
margin-left:0;
padding:1ch 2ch;
text-decoration:none !important;
} tag-cloud/style-rtl.min.css 0000644 00000001067 14720634132 0011664 0 ustar 00 .wp-block-tag-cloud{box-sizing:border-box}.wp-block-tag-cloud.aligncenter{justify-content:center;text-align:center}.wp-block-tag-cloud.alignfull{padding-left:1em;padding-right:1em}.wp-block-tag-cloud a{display:inline-block;margin-left:5px}.wp-block-tag-cloud span{display:inline-block;margin-right:5px;text-decoration:none}:root :where(.wp-block-tag-cloud.is-style-outline){display:flex;flex-wrap:wrap;gap:1ch}:root :where(.wp-block-tag-cloud.is-style-outline a){border:1px solid;font-size:unset!important;margin-left:0;padding:1ch 2ch;text-decoration:none!important} navigation-link.php 0000644 00000032325 14720634132 0010356 0 ustar 00 array(),
'inline_styles' => '',
);
// Text color.
$named_text_color = null;
$custom_text_color = null;
if ( $is_sub_menu && array_key_exists( 'customOverlayTextColor', $context ) ) {
$custom_text_color = $context['customOverlayTextColor'];
} elseif ( $is_sub_menu && array_key_exists( 'overlayTextColor', $context ) ) {
$named_text_color = $context['overlayTextColor'];
} elseif ( array_key_exists( 'customTextColor', $context ) ) {
$custom_text_color = $context['customTextColor'];
} elseif ( array_key_exists( 'textColor', $context ) ) {
$named_text_color = $context['textColor'];
} elseif ( isset( $context['style']['color']['text'] ) ) {
$custom_text_color = $context['style']['color']['text'];
}
// If has text color.
if ( ! is_null( $named_text_color ) ) {
// Add the color class.
array_push( $colors['css_classes'], 'has-text-color', sprintf( 'has-%s-color', $named_text_color ) );
} elseif ( ! is_null( $custom_text_color ) ) {
// Add the custom color inline style.
$colors['css_classes'][] = 'has-text-color';
$colors['inline_styles'] .= sprintf( 'color: %s;', $custom_text_color );
}
// Background color.
$named_background_color = null;
$custom_background_color = null;
if ( $is_sub_menu && array_key_exists( 'customOverlayBackgroundColor', $context ) ) {
$custom_background_color = $context['customOverlayBackgroundColor'];
} elseif ( $is_sub_menu && array_key_exists( 'overlayBackgroundColor', $context ) ) {
$named_background_color = $context['overlayBackgroundColor'];
} elseif ( array_key_exists( 'customBackgroundColor', $context ) ) {
$custom_background_color = $context['customBackgroundColor'];
} elseif ( array_key_exists( 'backgroundColor', $context ) ) {
$named_background_color = $context['backgroundColor'];
} elseif ( isset( $context['style']['color']['background'] ) ) {
$custom_background_color = $context['style']['color']['background'];
}
// If has background color.
if ( ! is_null( $named_background_color ) ) {
// Add the background-color class.
array_push( $colors['css_classes'], 'has-background', sprintf( 'has-%s-background-color', $named_background_color ) );
} elseif ( ! is_null( $custom_background_color ) ) {
// Add the custom background-color inline style.
$colors['css_classes'][] = 'has-background';
$colors['inline_styles'] .= sprintf( 'background-color: %s;', $custom_background_color );
}
return $colors;
}
/**
* Build an array with CSS classes and inline styles defining the font sizes
* which will be applied to the navigation markup in the front-end.
*
* @since 5.9.0
*
* @param array $context Navigation block context.
* @return array Font size CSS classes and inline styles.
*/
function block_core_navigation_link_build_css_font_sizes( $context ) {
// CSS classes.
$font_sizes = array(
'css_classes' => array(),
'inline_styles' => '',
);
$has_named_font_size = array_key_exists( 'fontSize', $context );
$has_custom_font_size = isset( $context['style']['typography']['fontSize'] );
if ( $has_named_font_size ) {
// Add the font size class.
$font_sizes['css_classes'][] = sprintf( 'has-%s-font-size', $context['fontSize'] );
} elseif ( $has_custom_font_size ) {
// Add the custom font size inline style.
$font_sizes['inline_styles'] = sprintf(
'font-size: %s;',
wp_get_typography_font_size_value(
array(
'size' => $context['style']['typography']['fontSize'],
)
)
);
}
return $font_sizes;
}
/**
* Returns the top-level submenu SVG chevron icon.
*
* @since 5.9.0
*
* @return string
*/
function block_core_navigation_link_render_submenu_icon() {
return '
';
}
/**
* Decodes a url if it's encoded, returning the same url if not.
*
* @since 6.2.0
*
* @param string $url The url to decode.
*
* @return string $url Returns the decoded url.
*/
function block_core_navigation_link_maybe_urldecode( $url ) {
$is_url_encoded = false;
$query = parse_url( $url, PHP_URL_QUERY );
$query_params = wp_parse_args( $query );
foreach ( $query_params as $query_param ) {
$can_query_param_be_encoded = is_string( $query_param ) && ! empty( $query_param );
if ( ! $can_query_param_be_encoded ) {
continue;
}
if ( rawurldecode( $query_param ) !== $query_param ) {
$is_url_encoded = true;
break;
}
}
if ( $is_url_encoded ) {
return rawurldecode( $url );
}
return $url;
}
/**
* Renders the `core/navigation-link` block.
*
* @since 5.9.0
*
* @param array $attributes The block attributes.
* @param string $content The saved content.
* @param WP_Block $block The parsed block.
*
* @return string Returns the post content with the legacy widget added.
*/
function render_block_core_navigation_link( $attributes, $content, $block ) {
$navigation_link_has_id = isset( $attributes['id'] ) && is_numeric( $attributes['id'] );
$is_post_type = isset( $attributes['kind'] ) && 'post-type' === $attributes['kind'];
$is_post_type = $is_post_type || isset( $attributes['type'] ) && ( 'post' === $attributes['type'] || 'page' === $attributes['type'] );
// Don't render the block's subtree if it is a draft or if the ID does not exist.
if ( $is_post_type && $navigation_link_has_id ) {
$post = get_post( $attributes['id'] );
if ( ! $post || 'publish' !== $post->post_status ) {
return '';
}
}
// Don't render the block's subtree if it has no label.
if ( empty( $attributes['label'] ) ) {
return '';
}
$font_sizes = block_core_navigation_link_build_css_font_sizes( $block->context );
$classes = array_merge(
$font_sizes['css_classes']
);
$style_attribute = $font_sizes['inline_styles'];
$css_classes = trim( implode( ' ', $classes ) );
$has_submenu = count( $block->inner_blocks ) > 0;
$kind = empty( $attributes['kind'] ) ? 'post_type' : str_replace( '-', '_', $attributes['kind'] );
$is_active = ! empty( $attributes['id'] ) && get_queried_object_id() === (int) $attributes['id'] && ! empty( get_queried_object()->$kind );
if ( is_post_type_archive() ) {
$queried_archive_link = get_post_type_archive_link( get_queried_object()->name );
if ( $attributes['url'] === $queried_archive_link ) {
$is_active = true;
}
}
$wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => $css_classes . ' wp-block-navigation-item' . ( $has_submenu ? ' has-child' : '' ) .
( $is_active ? ' current-menu-item' : '' ),
'style' => $style_attribute,
)
);
$html = '
' .
'';
if ( isset( $attributes['label'] ) ) {
$html .= wp_kses_post( $attributes['label'] );
}
$html .= '';
// Add description if available.
if ( ! empty( $attributes['description'] ) ) {
$html .= '';
$html .= wp_kses_post( $attributes['description'] );
$html .= '';
}
$html .= '';
// End anchor tag content.
if ( isset( $block->context['showSubmenuIcon'] ) && $block->context['showSubmenuIcon'] && $has_submenu ) {
// The submenu icon can be hidden by a CSS rule on the Navigation Block.
$html .= '';
}
if ( $has_submenu ) {
$inner_blocks_html = '';
foreach ( $block->inner_blocks as $inner_block ) {
$inner_blocks_html .= $inner_block->render();
}
$html .= sprintf(
'',
$inner_blocks_html
);
}
$html .= '';
return $html;
}
/**
* Returns a navigation link variation
*
* @since 5.9.0
*
* @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
* @param string $kind string of value 'taxonomy' or 'post-type'.
*
* @return array
*/
function build_variation_for_navigation_link( $entity, $kind ) {
$title = '';
$description = '';
if ( property_exists( $entity->labels, 'item_link' ) ) {
$title = $entity->labels->item_link;
}
if ( property_exists( $entity->labels, 'item_link_description' ) ) {
$description = $entity->labels->item_link_description;
}
$variation = array(
'name' => $entity->name,
'title' => $title,
'description' => $description,
'attributes' => array(
'type' => $entity->name,
'kind' => $kind,
),
);
// Tweak some value for the variations.
$variation_overrides = array(
'post_tag' => array(
'name' => 'tag',
'attributes' => array(
'type' => 'tag',
'kind' => $kind,
),
),
'post_format' => array(
// The item_link and item_link_description for post formats is the
// same as for tags, so need to be overridden.
'title' => __( 'Post Format Link' ),
'description' => __( 'A link to a post format' ),
'attributes' => array(
'type' => 'post_format',
'kind' => $kind,
),
),
);
if ( array_key_exists( $entity->name, $variation_overrides ) ) {
$variation = array_merge(
$variation,
$variation_overrides[ $entity->name ]
);
}
return $variation;
}
/**
* Filters the registered variations for a block type.
* Returns the dynamically built variations for all post-types and taxonomies.
*
* @since 6.5.0
*
* @param array $variations Array of registered variations for a block type.
* @param WP_Block_Type $block_type The full block type object.
*/
function block_core_navigation_link_filter_variations( $variations, $block_type ) {
if ( 'core/navigation-link' !== $block_type->name ) {
return $variations;
}
$generated_variations = block_core_navigation_link_build_variations();
return array_merge( $variations, $generated_variations );
}
/**
* Returns an array of variations for the navigation link block.
*
* @since 6.5.0
*
* @return array
*/
function block_core_navigation_link_build_variations() {
$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' );
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'objects' );
/*
* Use two separate arrays as a way to order the variations in the UI.
* Known variations (like Post Link and Page Link) are added to the
* `built_ins` array. Variations for custom post types and taxonomies are
* added to the `variations` array and will always appear after `built-ins.
*/
$built_ins = array();
$variations = array();
if ( $post_types ) {
foreach ( $post_types as $post_type ) {
$variation = build_variation_for_navigation_link( $post_type, 'post-type' );
if ( $post_type->_builtin ) {
$built_ins[] = $variation;
} else {
$variations[] = $variation;
}
}
}
if ( $taxonomies ) {
foreach ( $taxonomies as $taxonomy ) {
$variation = build_variation_for_navigation_link( $taxonomy, 'taxonomy' );
if ( $taxonomy->_builtin ) {
$built_ins[] = $variation;
} else {
$variations[] = $variation;
}
}
}
return array_merge( $built_ins, $variations );
}
/**
* Registers the navigation link block.
*
* @since 5.9.0
*
* @uses render_block_core_navigation_link()
* @throws WP_Error An WP_Error exception parsing the block definition.
*/
function register_block_core_navigation_link() {
register_block_type_from_metadata(
__DIR__ . '/navigation-link',
array(
'render_callback' => 'render_block_core_navigation_link',
)
);
}
add_action( 'init', 'register_block_core_navigation_link' );
/**
* Creates all variations for post types / taxonomies dynamically (= each time when variations are requested).
* Do not use variation_callback, to also account for unregistering post types/taxonomies later on.
*/
add_action( 'get_block_type_variations', 'block_core_navigation_link_filter_variations', 10, 2 );
post-content/editor-rtl.min.css 0000644 00000000127 14720634132 0012564 0 ustar 00 .wp-block-post-content.wp-block-post-content{-webkit-user-select:none;user-select:none} post-content/style.css 0000644 00000000056 14720634132 0011056 0 ustar 00 .wp-block-post-content{
display:flow-root;
} post-content/style.min.css 0000644 00000000051 14720634132 0011633 0 ustar 00 .wp-block-post-content{display:flow-root} post-content/editor-rtl.css 0000644 00000000147 14720634132 0012004 0 ustar 00 .wp-block-post-content.wp-block-post-content{
-webkit-user-select:none;
user-select:none;
} post-content/editor.min.css 0000644 00000000127 14720634132 0011765 0 ustar 00 .wp-block-post-content.wp-block-post-content{-webkit-user-select:none;user-select:none} post-content/editor.css 0000644 00000000147 14720634132 0011205 0 ustar 00 .wp-block-post-content.wp-block-post-content{
-webkit-user-select:none;
user-select:none;
} post-content/block.json 0000644 00000002474 14720634132 0011177 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-content",
"title": "Content",
"category": "theme",
"description": "Displays the contents of a post or page.",
"textdomain": "default",
"usesContext": [ "postId", "postType", "queryId" ],
"example": {
"viewportWidth": 350
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"layout": true,
"background": {
"backgroundImage": true,
"backgroundSize": true,
"__experimentalDefaultControls": {
"backgroundImage": true
}
},
"dimensions": {
"minHeight": true
},
"spacing": {
"blockGap": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": false,
"text": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
}
},
"style": "wp-block-post-content",
"editorStyle": "wp-block-post-content-editor"
}
post-content/style-rtl.css 0000644 00000000056 14720634132 0011655 0 ustar 00 .wp-block-post-content{
display:flow-root;
} post-content/style-rtl.min.css 0000644 00000000051 14720634132 0012432 0 ustar 00 .wp-block-post-content{display:flow-root} index.php 0000644 00000011767 14720634132 0006402 0 ustar 00 'style',
'editorStyle' => 'editor',
);
static $core_blocks_meta;
if ( ! $core_blocks_meta ) {
$core_blocks_meta = require BLOCKS_PATH . 'blocks-json.php';
}
$files = false;
$transient_name = 'wp_core_block_css_files';
/*
* Ignore transient cache when the development mode is set to 'core'. Why? To avoid interfering with
* the core developer's workflow.
*/
$can_use_cached = ! wp_is_development_mode( 'core' );
if ( $can_use_cached ) {
$cached_files = get_transient( $transient_name );
// Check the validity of cached values by checking against the current WordPress version.
if (
is_array( $cached_files )
&& isset( $cached_files['version'] )
&& $cached_files['version'] === $wp_version
&& isset( $cached_files['files'] )
) {
$files = $cached_files['files'];
}
}
if ( ! $files ) {
$files = glob( wp_normalize_path( BLOCKS_PATH . '**/**.css' ) );
// Normalize BLOCKS_PATH prior to substitution for Windows environments.
$normalized_blocks_path = wp_normalize_path( BLOCKS_PATH );
$files = array_map(
static function ( $file ) use ( $normalized_blocks_path ) {
return str_replace( $normalized_blocks_path, '', $file );
},
$files
);
// Save core block style paths in cache when not in development mode.
if ( $can_use_cached ) {
set_transient(
$transient_name,
array(
'version' => $wp_version,
'files' => $files,
)
);
}
}
$register_style = static function ( $name, $filename, $style_handle ) use ( $blocks_url, $suffix, $wp_styles, $files ) {
$style_path = "{$name}/{$filename}{$suffix}.css";
$path = wp_normalize_path( BLOCKS_PATH . $style_path );
if ( ! in_array( $style_path, $files, true ) ) {
$wp_styles->add(
$style_handle,
false
);
return;
}
$wp_styles->add( $style_handle, $blocks_url . $style_path );
$wp_styles->add_data( $style_handle, 'path', $path );
$rtl_file = "{$name}/{$filename}-rtl{$suffix}.css";
if ( is_rtl() && in_array( $rtl_file, $files, true ) ) {
$wp_styles->add_data( $style_handle, 'rtl', 'replace' );
$wp_styles->add_data( $style_handle, 'suffix', $suffix );
$wp_styles->add_data( $style_handle, 'path', str_replace( "{$suffix}.css", "-rtl{$suffix}.css", $path ) );
}
};
foreach ( $core_blocks_meta as $name => $schema ) {
/** This filter is documented in wp-includes/blocks.php */
$schema = apply_filters( 'block_type_metadata', $schema );
// Backfill these properties similar to `register_block_type_from_metadata()`.
if ( ! isset( $schema['style'] ) ) {
$schema['style'] = "wp-block-{$name}";
}
if ( ! isset( $schema['editorStyle'] ) ) {
$schema['editorStyle'] = "wp-block-{$name}-editor";
}
// Register block theme styles.
$register_style( $name, 'theme', "wp-block-{$name}-theme" );
foreach ( $style_fields as $style_field => $filename ) {
$style_handle = $schema[ $style_field ];
if ( is_array( $style_handle ) ) {
continue;
}
$register_style( $name, $filename, $style_handle );
}
}
}
add_action( 'init', 'register_core_block_style_handles', 9 );
/**
* Registers core block types using metadata files.
* Dynamic core blocks are registered separately.
*
* @since 5.5.0
*/
function register_core_block_types_from_metadata() {
$block_folders = require BLOCKS_PATH . 'require-static-blocks.php';
foreach ( $block_folders as $block_folder ) {
register_block_type_from_metadata(
BLOCKS_PATH . $block_folder
);
}
}
add_action( 'init', 'register_core_block_types_from_metadata' );
/**
* Registers the core block metadata collection.
*
* This function is hooked into the 'init' action with a priority of 9,
* ensuring that the core block metadata is registered before the regular
* block initialization that happens at priority 10.
*
* @since 6.7.0
*/
function wp_register_core_block_metadata_collection() {
wp_register_block_metadata_collection(
BLOCKS_PATH,
BLOCKS_PATH . 'blocks-json.php'
);
}
add_action( 'init', 'wp_register_core_block_metadata_collection', 9 );
comment-reply-link.php 0000644 00000004033 14720634132 0011005 0 ustar 00 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 = array();
if ( isset( $attributes['textAlign'] ) ) {
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
return sprintf(
'
%2$s
',
$wrapper_attributes,
$comment_reply_link
);
}
/**
* Registers the `core/comment-reply-link` block on the server.
*
* @since 6.0.0
*/
function register_block_core_comment_reply_link() {
register_block_type_from_metadata(
__DIR__ . '/comment-reply-link',
array(
'render_callback' => 'render_block_core_comment_reply_link',
)
);
}
add_action( 'init', 'register_block_core_comment_reply_link' );
widget-group/block.json 0000644 00000000620 14720634132 0011146 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/widget-group",
"title": "Widget Group",
"category": "widgets",
"attributes": {
"title": {
"type": "string"
}
},
"supports": {
"html": false,
"inserter": true,
"customClassName": true,
"reusable": false
},
"editorStyle": "wp-block-widget-group-editor",
"style": "wp-block-widget-group"
}
list-item/block.json 0000644 00000002677 14720634132 0010456 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/list-item",
"title": "List item",
"category": "text",
"parent": [ "core/list" ],
"allowedBlocks": [ "core/list" ],
"description": "An individual item within a list.",
"textdomain": "default",
"attributes": {
"placeholder": {
"type": "string"
},
"content": {
"type": "rich-text",
"source": "rich-text",
"selector": "li",
"role": "content"
}
},
"supports": {
"anchor": true,
"className": false,
"splitting": true,
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true
},
"color": {
"gradients": true,
"link": true,
"background": true,
"__experimentalDefaultControls": {
"text": true
}
},
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
},
"selectors": {
"root": ".wp-block-list > li",
"border": ".wp-block-list:not(.wp-block-list .wp-block-list) > li"
}
}
loginout/style.css 0000644 00000000056 14720634132 0010261 0 ustar 00 .wp-block-loginout{
box-sizing:border-box;
} loginout/style.min.css 0000644 00000000051 14720634132 0011036 0 ustar 00 .wp-block-loginout{box-sizing:border-box} loginout/block.json 0000644 00000002424 14720634132 0010375 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/loginout",
"title": "Login/out",
"category": "theme",
"description": "Show login & logout links.",
"keywords": [ "login", "logout", "form" ],
"textdomain": "default",
"attributes": {
"displayLoginAsForm": {
"type": "boolean",
"default": false
},
"redirectToCurrent": {
"type": "boolean",
"default": true
}
},
"example": {
"viewportWidth": 350
},
"supports": {
"className": true,
"color": {
"background": true,
"text": false,
"gradients": true,
"link": true
},
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
},
"interactivity": {
"clientNavigation": true
}
},
"style": "wp-block-loginout"
}
loginout/style-rtl.css 0000644 00000000056 14720634132 0011060 0 ustar 00 .wp-block-loginout{
box-sizing:border-box;
} loginout/style-rtl.min.css 0000644 00000000051 14720634132 0011635 0 ustar 00 .wp-block-loginout{box-sizing:border-box} buttons/editor-rtl.min.css 0000644 00000001756 14720634132 0011636 0 ustar 00 .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} buttons/style.css 0000644 00000002572 14720634132 0010124 0 ustar 00 .wp-block-buttons.is-vertical{
flex-direction:column;
}
.wp-block-buttons.is-vertical>.wp-block-button:last-child{
margin-bottom:0;
}
.wp-block-buttons>.wp-block-button{
display:inline-block;
margin:0;
}
.wp-block-buttons.is-content-justification-left{
justify-content:flex-start;
}
.wp-block-buttons.is-content-justification-left.is-vertical{
align-items:flex-start;
}
.wp-block-buttons.is-content-justification-center{
justify-content:center;
}
.wp-block-buttons.is-content-justification-center.is-vertical{
align-items:center;
}
.wp-block-buttons.is-content-justification-right{
justify-content:flex-end;
}
.wp-block-buttons.is-content-justification-right.is-vertical{
align-items:flex-end;
}
.wp-block-buttons.is-content-justification-space-between{
justify-content:space-between;
}
.wp-block-buttons.aligncenter{
text-align:center;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{
margin-left:auto;
margin-right:auto;
width:100%;
}
.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{
text-decoration:inherit;
}
.wp-block-buttons.has-custom-font-size .wp-block-button__link{
font-size:inherit;
}
.wp-block-button.aligncenter{
text-align:center;
} buttons/style.min.css 0000644 00000002427 14720634132 0010705 0 ustar 00 .wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-button.aligncenter{text-align:center} buttons/editor-rtl.css 0000644 00000002056 14720634132 0011046 0 ustar 00 .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{
margin:0;
}
.wp-block-buttons>.block-list-appender{
align-items:center;
display:inline-flex;
}
.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{
justify-content:flex-start;
}
.wp-block-buttons>.wp-block-button:focus{
box-shadow:none;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{
margin-left:auto;
margin-right:auto;
margin-top:0;
width:100%;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{
margin-bottom:0;
}
.wp-block[data-align=center]>.wp-block-buttons{
align-items:center;
justify-content:center;
}
.wp-block[data-align=right]>.wp-block-buttons{
justify-content:flex-end;
} buttons/editor.min.css 0000644 00000001756 14720634132 0011037 0 ustar 00 .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{margin:0}.wp-block-buttons>.block-list-appender{align-items:center;display:inline-flex}.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{justify-content:flex-start}.wp-block-buttons>.wp-block-button:focus{box-shadow:none}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{margin-left:auto;margin-right:auto;margin-top:0;width:100%}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{margin-bottom:0}.wp-block[data-align=center]>.wp-block-buttons{align-items:center;justify-content:center}.wp-block[data-align=right]>.wp-block-buttons{justify-content:flex-end} buttons/editor.css 0000644 00000002056 14720634132 0010247 0 ustar 00 .wp-block-buttons>.wp-block,.wp-block-buttons>.wp-block-button.wp-block-button.wp-block-button.wp-block-button.wp-block-button{
margin:0;
}
.wp-block-buttons>.block-list-appender{
align-items:center;
display:inline-flex;
}
.wp-block-buttons.is-vertical>.block-list-appender .block-list-appender__toggle{
justify-content:flex-start;
}
.wp-block-buttons>.wp-block-button:focus{
box-shadow:none;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center]{
margin-left:auto;
margin-right:auto;
margin-top:0;
width:100%;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block[data-align=center] .wp-block-button{
margin-bottom:0;
}
.wp-block[data-align=center]>.wp-block-buttons{
align-items:center;
justify-content:center;
}
.wp-block[data-align=right]>.wp-block-buttons{
justify-content:flex-end;
} buttons/block.json 0000644 00000003066 14720634132 0010236 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/buttons",
"title": "Buttons",
"category": "design",
"allowedBlocks": [ "core/button" ],
"description": "Prompt visitors to take action with a group of button-style links.",
"keywords": [ "link" ],
"textdomain": "default",
"supports": {
"anchor": true,
"align": [ "wide", "full" ],
"html": false,
"__experimentalExposeControlsToChildren": true,
"color": {
"gradients": true,
"text": false,
"__experimentalDefaultControls": {
"background": true
}
},
"spacing": {
"blockGap": [ "horizontal", "vertical" ],
"padding": true,
"margin": [ "top", "bottom" ],
"__experimentalDefaultControls": {
"blockGap": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
},
"layout": {
"allowSwitching": false,
"allowInheriting": false,
"default": {
"type": "flex"
}
},
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-buttons-editor",
"style": "wp-block-buttons"
}
buttons/style-rtl.css 0000644 00000002572 14720634132 0010723 0 ustar 00 .wp-block-buttons.is-vertical{
flex-direction:column;
}
.wp-block-buttons.is-vertical>.wp-block-button:last-child{
margin-bottom:0;
}
.wp-block-buttons>.wp-block-button{
display:inline-block;
margin:0;
}
.wp-block-buttons.is-content-justification-left{
justify-content:flex-start;
}
.wp-block-buttons.is-content-justification-left.is-vertical{
align-items:flex-start;
}
.wp-block-buttons.is-content-justification-center{
justify-content:center;
}
.wp-block-buttons.is-content-justification-center.is-vertical{
align-items:center;
}
.wp-block-buttons.is-content-justification-right{
justify-content:flex-end;
}
.wp-block-buttons.is-content-justification-right.is-vertical{
align-items:flex-end;
}
.wp-block-buttons.is-content-justification-space-between{
justify-content:space-between;
}
.wp-block-buttons.aligncenter{
text-align:center;
}
.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{
margin-left:auto;
margin-right:auto;
width:100%;
}
.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{
text-decoration:inherit;
}
.wp-block-buttons.has-custom-font-size .wp-block-button__link{
font-size:inherit;
}
.wp-block-button.aligncenter{
text-align:center;
} buttons/style-rtl.min.css 0000644 00000002427 14720634132 0011504 0 ustar 00 .wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-button.aligncenter{text-align:center} archives/editor-rtl.min.css 0000644 00000000051 14720634132 0011727 0 ustar 00 ul.wp-block-archives{padding-right:2.5em} archives/style.css 0000644 00000000145 14720634132 0010224 0 ustar 00 .wp-block-archives{
box-sizing:border-box;
}
.wp-block-archives-dropdown label{
display:block;
} archives/style.min.css 0000644 00000000131 14720634132 0011001 0 ustar 00 .wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block} archives/editor-rtl.css 0000644 00000000056 14720634132 0011152 0 ustar 00 ul.wp-block-archives{
padding-right:2.5em;
} archives/editor.min.css 0000644 00000000050 14720634132 0011127 0 ustar 00 ul.wp-block-archives{padding-left:2.5em} archives/editor.css 0000644 00000000055 14720634132 0010352 0 ustar 00 ul.wp-block-archives{
padding-left:2.5em;
} archives/block.json 0000644 00000002225 14720634132 0010340 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/archives",
"title": "Archives",
"category": "widgets",
"description": "Display a date archive of your posts.",
"textdomain": "default",
"attributes": {
"displayAsDropdown": {
"type": "boolean",
"default": false
},
"showLabel": {
"type": "boolean",
"default": true
},
"showPostCounts": {
"type": "boolean",
"default": false
},
"type": {
"type": "string",
"default": "monthly"
}
},
"supports": {
"align": true,
"html": false,
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-archives-editor"
}
archives/style-rtl.css 0000644 00000000145 14720634132 0011023 0 ustar 00 .wp-block-archives{
box-sizing:border-box;
}
.wp-block-archives-dropdown label{
display:block;
} archives/style-rtl.min.css 0000644 00000000131 14720634132 0011600 0 ustar 00 .wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block} comments-pagination-previous/block.json 0000644 00000001777 14720634132 0014375 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/comments-pagination-previous",
"title": "Comments 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,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
}
}
post-author-biography/style.css 0000644 00000000073 14720634132 0012667 0 ustar 00 .wp-block-post-author-biography{
box-sizing:border-box;
} post-author-biography/style.min.css 0000644 00000000066 14720634132 0013453 0 ustar 00 .wp-block-post-author-biography{box-sizing:border-box} post-author-biography/block.json 0000644 00000002401 14720634132 0012777 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-author-biography",
"title": "Author Biography",
"category": "theme",
"description": "The author biography.",
"textdomain": "default",
"attributes": {
"textAlign": {
"type": "string"
}
},
"usesContext": [ "postType", "postId" ],
"example": {
"viewportWidth": 350
},
"supports": {
"spacing": {
"margin": true,
"padding": true
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"style": "wp-block-post-author-biography"
}
post-author-biography/style-rtl.css 0000644 00000000073 14720634132 0013466 0 ustar 00 .wp-block-post-author-biography{
box-sizing:border-box;
} post-author-biography/style-rtl.min.css 0000644 00000000066 14720634132 0014252 0 ustar 00 .wp-block-post-author-biography{box-sizing:border-box} post-navigation-link.php 0000644 00000011345 14720634132 0011340 0 ustar 00 $classes,
)
);
// Set default values.
$format = '%link';
$link = 'next' === $navigation_type ? _x( 'Next', 'label for next post link' ) : _x( 'Previous', 'label for previous post link' );
$label = '';
// Only use hardcoded values here, otherwise we need to add escaping where these values are used.
$arrow_map = array(
'none' => '',
'arrow' => array(
'next' => '→',
'previous' => '←',
),
'chevron' => array(
'next' => '»',
'previous' => '«',
),
);
// If a custom label is provided, make this a link.
// `$label` is used to prepend the provided label, if we want to show the page title as well.
if ( isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ) {
$label = "{$attributes['label']}";
$link = $label;
}
// If we want to also show the page title, make the page title a link and prepend the label.
if ( isset( $attributes['showTitle'] ) && $attributes['showTitle'] ) {
/*
* If the label link option is not enabled but there is a custom label,
* display the custom label as text before the linked title.
*/
if ( ! $attributes['linkLabel'] ) {
if ( $label ) {
$format = '
' . wp_kses_post( $label ) . ' %link';
}
$link = '%title';
} elseif ( isset( $attributes['linkLabel'] ) && $attributes['linkLabel'] ) {
// If the label link option is enabled and there is a custom label, display it before the title.
if ( $label ) {
$link = '
' . wp_kses_post( $label ) . ' %title';
} else {
/*
* If the label link option is enabled and there is no custom label,
* add a colon between the label and the post title.
*/
$label = 'next' === $navigation_type ? _x( 'Next:', 'label before the title of the next post' ) : _x( 'Previous:', 'label before the title of the previous post' );
$link = sprintf(
'
%1$s %2$s',
wp_kses_post( $label ),
'%title'
);
}
}
}
// Display arrows.
if ( isset( $attributes['arrow'] ) && 'none' !== $attributes['arrow'] && isset( $arrow_map[ $attributes['arrow'] ] ) ) {
$arrow = $arrow_map[ $attributes['arrow'] ][ $navigation_type ];
if ( 'next' === $navigation_type ) {
$format = '%link
' . $arrow . '';
} else {
$format = '
' . $arrow . '%link';
}
}
/*
* The dynamic portion of the function name, `$navigation_type`,
* Refers to the type of adjacency, 'next' or 'previous'.
*
* @see https://developer.wordpress.org/reference/functions/get_previous_post_link/
* @see https://developer.wordpress.org/reference/functions/get_next_post_link/
*/
$get_link_function = "get_{$navigation_type}_post_link";
if ( ! empty( $attributes['taxonomy'] ) ) {
$content = $get_link_function( $format, $link, true, '', $attributes['taxonomy'] );
} else {
$content = $get_link_function( $format, $link );
}
return sprintf(
'
%2$s
',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/post-navigation-link` block on the server.
*
* @since 5.9.0
*/
function register_block_core_post_navigation_link() {
register_block_type_from_metadata(
__DIR__ . '/post-navigation-link',
array(
'render_callback' => 'render_block_core_post_navigation_link',
)
);
}
add_action( 'init', 'register_block_core_post_navigation_link' );
query-pagination-numbers/editor-rtl.min.css 0000644 00000000313 14720634132 0015071 0 ustar 00 .wp-block-query-pagination-numbers a{text-decoration:underline}.wp-block-query-pagination-numbers .page-numbers{margin-left:2px}.wp-block-query-pagination-numbers .page-numbers:last-child{margin-right:0} query-pagination-numbers/editor-rtl.css 0000644 00000000334 14720634132 0014312 0 ustar 00 .wp-block-query-pagination-numbers a{
text-decoration:underline;
}
.wp-block-query-pagination-numbers .page-numbers{
margin-left:2px;
}
.wp-block-query-pagination-numbers .page-numbers:last-child{
margin-right:0;
} query-pagination-numbers/editor.min.css 0000644 00000000314 14720634132 0014273 0 ustar 00 .wp-block-query-pagination-numbers a{text-decoration:underline}.wp-block-query-pagination-numbers .page-numbers{margin-right:2px}.wp-block-query-pagination-numbers .page-numbers:last-child{margin-right:0} query-pagination-numbers/editor.css 0000644 00000000335 14720634132 0013514 0 ustar 00 .wp-block-query-pagination-numbers a{
text-decoration:underline;
}
.wp-block-query-pagination-numbers .page-numbers{
margin-right:2px;
}
.wp-block-query-pagination-numbers .page-numbers:last-child{
margin-right:0;
} query-pagination-numbers/block.json 0000644 00000002106 14720634132 0013477 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/query-pagination-numbers",
"title": "Page Numbers",
"category": "theme",
"parent": [ "core/query-pagination" ],
"description": "Displays a list of page numbers for pagination.",
"textdomain": "default",
"attributes": {
"midSize": {
"type": "number",
"default": 2
}
},
"usesContext": [ "queryId", "query", "enhancedPagination" ],
"supports": {
"reusable": false,
"html": false,
"color": {
"gradients": true,
"text": false,
"__experimentalDefaultControls": {
"background": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-query-pagination-numbers-editor"
}
post-author-biography.php 0000644 00000002764 14720634132 0011537 0 ustar 00 context['postId'] ) ) {
$author_id = get_post_field( 'post_author', $block->context['postId'] );
} else {
$author_id = get_query_var( 'author' );
}
if ( empty( $author_id ) ) {
return '';
}
$author_biography = get_the_author_meta( 'description', $author_id );
if ( empty( $author_biography ) ) {
return '';
}
$align_class_name = empty( $attributes['textAlign'] ) ? '' : "has-text-align-{$attributes['textAlign']}";
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $align_class_name ) );
return sprintf( '
', $wrapper_attributes ) . $author_biography . '
';
}
/**
* Registers the `core/post-author-biography` block on the server.
*
* @since 6.0.0
*/
function register_block_core_post_author_biography() {
register_block_type_from_metadata(
__DIR__ . '/post-author-biography',
array(
'render_callback' => 'render_block_core_post_author_biography',
)
);
}
add_action( 'init', 'register_block_core_post_author_biography' );
comments-pagination.php 0000644 00000002257 14720634132 0011241 0 ustar 00 $classes ) );
return sprintf(
'
%2$s
',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/comments-pagination` block on the server.
*
* @since 6.0.0
*/
function register_block_core_comments_pagination() {
register_block_type_from_metadata(
__DIR__ . '/comments-pagination',
array(
'render_callback' => 'render_block_core_comments_pagination',
)
);
}
add_action( 'init', 'register_block_core_comments_pagination' );
comments-pagination-previous.php 0000644 00000003376 14720634132 0013116 0 ustar 00 'render_block_core_comments_pagination_previous',
)
);
}
add_action( 'init', 'register_block_core_comments_pagination_previous' );
post-terms.php 0000644 00000007153 14720634132 0007402 0 ustar 00 context['postId'] ) || ! isset( $attributes['term'] ) ) {
return '';
}
if ( ! is_taxonomy_viewable( $attributes['term'] ) ) {
return '';
}
$post_terms = get_the_terms( $block->context['postId'], $attributes['term'] );
if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) {
return '';
}
$classes = array( 'taxonomy-' . $attributes['term'] );
if ( isset( $attributes['textAlign'] ) ) {
$classes[] = 'has-text-align-' . $attributes['textAlign'];
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classes[] = 'has-link-color';
}
$separator = empty( $attributes['separator'] ) ? ' ' : $attributes['separator'];
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classes ) ) );
$prefix = "
";
if ( isset( $attributes['prefix'] ) && $attributes['prefix'] ) {
$prefix .= '' . $attributes['prefix'] . '';
}
$suffix = '
';
if ( isset( $attributes['suffix'] ) && $attributes['suffix'] ) {
$suffix = '
' . $attributes['suffix'] . '' . $suffix;
}
return get_the_term_list(
$block->context['postId'],
$attributes['term'],
wp_kses_post( $prefix ),
'
' . esc_html( $separator ) . '',
wp_kses_post( $suffix )
);
}
/**
* Returns the available variations for the `core/post-terms` block.
*
* @since 6.5.0
*
* @return array The available variations for the block.
*/
function block_core_post_terms_build_variations() {
$taxonomies = get_taxonomies(
array(
'publicly_queryable' => true,
'show_in_rest' => true,
),
'objects'
);
// Split the available taxonomies to `built_in` and custom ones,
// in order to prioritize the `built_in` taxonomies at the
// search results.
$built_ins = array();
$custom_variations = array();
// Create and register the eligible taxonomies variations.
foreach ( $taxonomies as $taxonomy ) {
$variation = array(
'name' => $taxonomy->name,
'title' => $taxonomy->label,
'description' => sprintf(
/* translators: %s: taxonomy's label */
__( 'Display a list of assigned terms from the taxonomy: %s' ),
$taxonomy->label
),
'attributes' => array(
'term' => $taxonomy->name,
),
'isActive' => array( 'term' ),
'scope' => array( 'inserter', 'transform' ),
);
// Set the category variation as the default one.
if ( 'category' === $taxonomy->name ) {
$variation['isDefault'] = true;
}
if ( $taxonomy->_builtin ) {
$built_ins[] = $variation;
} else {
$custom_variations[] = $variation;
}
}
return array_merge( $built_ins, $custom_variations );
}
/**
* Registers the `core/post-terms` block on the server.
*
* @since 5.8.0
*/
function register_block_core_post_terms() {
register_block_type_from_metadata(
__DIR__ . '/post-terms',
array(
'render_callback' => 'render_block_core_post_terms',
'variation_callback' => 'block_core_post_terms_build_variations',
)
);
}
add_action( 'init', 'register_block_core_post_terms' );
image/theme.css 0000644 00000000324 14720634132 0007443 0 ustar 00 :root :where(.wp-block-image figcaption){
color:#555;
font-size:13px;
text-align:center;
}
.is-dark-theme :root :where(.wp-block-image figcaption){
color:#ffffffa6;
}
.wp-block-image{
margin:0 0 1em;
} image/editor-rtl.min.css 0000644 00000004557 14720634132 0011224 0 ustar 00 .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{min-height:60px}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{margin:0;position:absolute;right:50%;top:50%;transform:translate(50%,-50%)}.wp-block-image__placeholder{aspect-ratio:4/3}.wp-block-image__placeholder.has-illustration:before{background:#fff;opacity:.8}.wp-block-image__placeholder .components-placeholder__illustration{opacity:.1}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=right]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align]:has(>.wp-block-image){position:relative}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px} image/theme-rtl.css 0000644 00000000324 14720634132 0010242 0 ustar 00 :root :where(.wp-block-image figcaption){
color:#555;
font-size:13px;
text-align:center;
}
.is-dark-theme :root :where(.wp-block-image figcaption){
color:#ffffffa6;
}
.wp-block-image{
margin:0 0 1em;
} image/style.css 0000644 00000016663 14720634132 0007516 0 ustar 00 .wp-block-image a{
display:inline-block;
}
.wp-block-image img{
box-sizing:border-box;
height:auto;
max-width:100%;
vertical-align:bottom;
}
@media (prefers-reduced-motion:no-preference){
.wp-block-image img.hide{
visibility:hidden;
}
.wp-block-image img.show{
animation:show-content-image .4s;
}
}
.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{
border-radius:inherit;
}
.wp-block-image.has-custom-border img{
box-sizing:border-box;
}
.wp-block-image.aligncenter{
text-align:center;
}
.wp-block-image.alignfull a,.wp-block-image.alignwide a{
width:100%;
}
.wp-block-image.alignfull img,.wp-block-image.alignwide img{
height:auto;
width:100%;
}
.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{
display:table;
}
.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{
caption-side:bottom;
display:table-caption;
}
.wp-block-image .alignleft{
float:left;
margin:.5em 1em .5em 0;
}
.wp-block-image .alignright{
float:right;
margin:.5em 0 .5em 1em;
}
.wp-block-image .aligncenter{
margin-left:auto;
margin-right:auto;
}
.wp-block-image :where(figcaption){
margin-bottom:1em;
margin-top:.5em;
}
.wp-block-image.is-style-circle-mask img{
border-radius:9999px;
}
@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){
.wp-block-image.is-style-circle-mask img{
border-radius:0;
-webkit-mask-image:url('data:image/svg+xml;utf8,
');
mask-image:url('data:image/svg+xml;utf8,
');
mask-mode:alpha;
-webkit-mask-position:center;
mask-position:center;
-webkit-mask-repeat:no-repeat;
mask-repeat:no-repeat;
-webkit-mask-size:contain;
mask-size:contain;
}
}
:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){
border-radius:9999px;
}
.wp-block-image figure{
margin:0;
}
.wp-lightbox-container{
display:flex;
flex-direction:column;
position:relative;
}
.wp-lightbox-container img{
cursor:zoom-in;
}
.wp-lightbox-container img:hover+button{
opacity:1;
}
.wp-lightbox-container button{
align-items:center;
-webkit-backdrop-filter:blur(16px) saturate(180%);
backdrop-filter:blur(16px) saturate(180%);
background-color:#5a5a5a40;
border:none;
border-radius:4px;
cursor:zoom-in;
display:flex;
height:20px;
justify-content:center;
opacity:0;
padding:0;
position:absolute;
right:16px;
text-align:center;
top:16px;
transition:opacity .2s ease;
width:20px;
z-index:100;
}
.wp-lightbox-container button:focus-visible{
outline:3px auto #5a5a5a40;
outline:3px auto -webkit-focus-ring-color;
outline-offset:3px;
}
.wp-lightbox-container button:hover{
cursor:pointer;
opacity:1;
}
.wp-lightbox-container button:focus{
opacity:1;
}
.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){
background-color:#5a5a5a40;
border:none;
}
.wp-lightbox-overlay{
box-sizing:border-box;
cursor:zoom-out;
height:100vh;
left:0;
overflow:hidden;
position:fixed;
top:0;
visibility:hidden;
width:100%;
z-index:100000;
}
.wp-lightbox-overlay .close-button{
align-items:center;
cursor:pointer;
display:flex;
justify-content:center;
min-height:40px;
min-width:40px;
padding:0;
position:absolute;
right:calc(env(safe-area-inset-right) + 16px);
top:calc(env(safe-area-inset-top) + 16px);
z-index:5000000;
}
.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){
background:none;
border:none;
}
.wp-lightbox-overlay .lightbox-image-container{
height:var(--wp--lightbox-container-height);
left:50%;
overflow:hidden;
position:absolute;
top:50%;
transform:translate(-50%, -50%);
transform-origin:top left;
width:var(--wp--lightbox-container-width);
z-index:9999999999;
}
.wp-lightbox-overlay .wp-block-image{
align-items:center;
box-sizing:border-box;
display:flex;
height:100%;
justify-content:center;
margin:0;
position:relative;
transform-origin:0 0;
width:100%;
z-index:3000000;
}
.wp-lightbox-overlay .wp-block-image img{
height:var(--wp--lightbox-image-height);
min-height:var(--wp--lightbox-image-height);
min-width:var(--wp--lightbox-image-width);
width:var(--wp--lightbox-image-width);
}
.wp-lightbox-overlay .wp-block-image figcaption{
display:none;
}
.wp-lightbox-overlay button{
background:none;
border:none;
}
.wp-lightbox-overlay .scrim{
background-color:#fff;
height:100%;
opacity:.9;
position:absolute;
width:100%;
z-index:2000000;
}
.wp-lightbox-overlay.active{
animation:turn-on-visibility .25s both;
visibility:visible;
}
.wp-lightbox-overlay.active img{
animation:turn-on-visibility .35s both;
}
.wp-lightbox-overlay.show-closing-animation:not(.active){
animation:turn-off-visibility .35s both;
}
.wp-lightbox-overlay.show-closing-animation:not(.active) img{
animation:turn-off-visibility .25s both;
}
@media (prefers-reduced-motion:no-preference){
.wp-lightbox-overlay.zoom.active{
animation:none;
opacity:1;
visibility:visible;
}
.wp-lightbox-overlay.zoom.active .lightbox-image-container{
animation:lightbox-zoom-in .4s;
}
.wp-lightbox-overlay.zoom.active .lightbox-image-container img{
animation:none;
}
.wp-lightbox-overlay.zoom.active .scrim{
animation:turn-on-visibility .4s forwards;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){
animation:none;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{
animation:lightbox-zoom-out .4s;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{
animation:none;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{
animation:turn-off-visibility .4s forwards;
}
}
@keyframes show-content-image{
0%{
visibility:hidden;
}
99%{
visibility:hidden;
}
to{
visibility:visible;
}
}
@keyframes turn-on-visibility{
0%{
opacity:0;
}
to{
opacity:1;
}
}
@keyframes turn-off-visibility{
0%{
opacity:1;
visibility:visible;
}
99%{
opacity:0;
visibility:visible;
}
to{
opacity:0;
visibility:hidden;
}
}
@keyframes lightbox-zoom-in{
0%{
transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
}
to{
transform:translate(-50%, -50%) scale(1);
}
}
@keyframes lightbox-zoom-out{
0%{
transform:translate(-50%, -50%) scale(1);
visibility:visible;
}
99%{
visibility:visible;
}
to{
transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
visibility:hidden;
}
} image/style.min.css 0000644 00000015064 14720634132 0010272 0 ustar 00 .wp-block-image a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media (prefers-reduced-motion:no-preference){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull a,.wp-block-image.alignwide a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,
');mask-image:url('data:image/svg+xml;utf8,
');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;-webkit-backdrop-filter:blur(16px) saturate(180%);backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;opacity:0;padding:0;position:absolute;right:16px;text-align:center;top:16px;transition:opacity .2s ease;width:20px;z-index:100}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;left:0;overflow:hidden;position:fixed;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;min-height:40px;min-width:40px;padding:0;position:absolute;right:calc(env(safe-area-inset-right) + 16px);top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);left:50%;overflow:hidden;position:absolute;top:50%;transform:translate(-50%,-50%);transform-origin:top left;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:0 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both;visibility:visible}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}@media (prefers-reduced-motion:no-preference){.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(-50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(-50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}} image/view.asset.php 0000644 00000000124 14720634132 0010426 0 ustar 00 array(), 'version' => '7500eb032759d407a71d');
image/view.js 0000644 00000043201 14720634132 0007140 0 ustar 00 import * as __WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__ from "@wordpress/interactivity";
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/define property getters */
/******/ (() => {
/******/ // define getter functions for harmony exports
/******/ __webpack_require__.d = (exports, definition) => {
/******/ for(var key in definition) {
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
/******/ }
/******/ }
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */
/******/ (() => {
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
/******/ })();
/******/
/************************************************************************/
var __webpack_exports__ = {};
;// CONCATENATED MODULE: external "@wordpress/interactivity"
var x = (y) => {
var x = {}; __webpack_require__.d(x, y); return x
}
var y = (x) => (() => (x))
const interactivity_namespaceObject = x({ ["getContext"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getContext), ["getElement"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.getElement), ["store"]: () => (__WEBPACK_EXTERNAL_MODULE__wordpress_interactivity_8e89b257__.store) });
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-library/build-module/image/view.js
/**
* WordPress dependencies
*/
/**
* Tracks whether user is touching screen; used to differentiate behavior for
* touch and mouse input.
*
* @type {boolean}
*/
let isTouching = false;
/**
* Tracks the last time the screen was touched; used to differentiate behavior
* for touch and mouse input.
*
* @type {number}
*/
let lastTouchTime = 0;
const {
state,
actions,
callbacks
} = (0,interactivity_namespaceObject.store)('core/image', {
state: {
currentImageId: null,
get currentImage() {
return state.metadata[state.currentImageId];
},
get overlayOpened() {
return state.currentImageId !== null;
},
get roleAttribute() {
return state.overlayOpened ? 'dialog' : null;
},
get ariaModal() {
return state.overlayOpened ? 'true' : null;
},
get enlargedSrc() {
return state.currentImage.uploadedSrc || 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
},
get figureStyles() {
return state.overlayOpened && `${state.currentImage.figureStyles?.replace(/margin[^;]*;?/g, '')};`;
},
get imgStyles() {
return state.overlayOpened && `${state.currentImage.imgStyles?.replace(/;$/, '')}; object-fit:cover;`;
},
get imageButtonRight() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
return state.metadata[imageId].imageButtonRight;
},
get imageButtonTop() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
return state.metadata[imageId].imageButtonTop;
},
get isContentHidden() {
const ctx = (0,interactivity_namespaceObject.getContext)();
return state.overlayEnabled && state.currentImageId === ctx.imageId;
},
get isContentVisible() {
const ctx = (0,interactivity_namespaceObject.getContext)();
return !state.overlayEnabled && state.currentImageId === ctx.imageId;
}
},
actions: {
showLightbox() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
// Bails out if the image has not loaded yet.
if (!state.metadata[imageId].imageRef?.complete) {
return;
}
// Stores the positions of the scroll to fix it until the overlay is
// closed.
state.scrollTopReset = document.documentElement.scrollTop;
state.scrollLeftReset = document.documentElement.scrollLeft;
// Sets the current expanded image in the state and enables the overlay.
state.overlayEnabled = true;
state.currentImageId = imageId;
// Computes the styles of the overlay for the animation.
callbacks.setOverlayStyles();
},
hideLightbox() {
if (state.overlayEnabled) {
// Starts the overlay closing animation. The showClosingAnimation
// class is used to avoid showing it on page load.
state.showClosingAnimation = true;
state.overlayEnabled = false;
// Waits until the close animation has completed before allowing a
// user to scroll again. The duration of this animation is defined in
// the `styles.scss` file, but in any case we should wait a few
// milliseconds longer than the duration, otherwise a user may scroll
// too soon and cause the animation to look sloppy.
setTimeout(function () {
// Delays before changing the focus. Otherwise the focus ring will
// appear on Firefox before the image has finished animating, which
// looks broken.
state.currentImage.buttonRef.focus({
preventScroll: true
});
// Resets the current image id to mark the overlay as closed.
state.currentImageId = null;
}, 450);
}
},
handleKeydown(event) {
if (state.overlayEnabled) {
// Focuses the close button when the user presses the tab key.
if (event.key === 'Tab') {
event.preventDefault();
const {
ref
} = (0,interactivity_namespaceObject.getElement)();
ref.querySelector('button').focus();
}
// Closes the lightbox when the user presses the escape key.
if (event.key === 'Escape') {
actions.hideLightbox();
}
}
},
handleTouchMove(event) {
// On mobile devices, prevents triggering the scroll event because
// otherwise the page jumps around when it resets the scroll position.
// This also means that closing the lightbox requires that a user
// perform a simple tap. This may be changed in the future if there is a
// better alternative to override or reset the scroll position during
// swipe actions.
if (state.overlayEnabled) {
event.preventDefault();
}
},
handleTouchStart() {
isTouching = true;
},
handleTouchEnd() {
// Waits a few milliseconds before resetting to ensure that pinch to
// zoom works consistently on mobile devices when the lightbox is open.
lastTouchTime = Date.now();
isTouching = false;
},
handleScroll() {
// Prevents scrolling behaviors that trigger content shift while the
// lightbox is open. It would be better to accomplish through CSS alone,
// but using overflow: hidden is currently the only way to do so and
// that causes a layout to shift and prevents the zoom animation from
// working in some cases because it's not possible to account for the
// layout shift when doing the animation calculations. Instead, it uses
// JavaScript to prevent and reset the scrolling behavior.
if (state.overlayOpened) {
// Avoids overriding the scroll behavior on mobile devices because
// doing so breaks the pinch to zoom functionality, and users should
// be able to zoom in further on the high-res image.
if (!isTouching && Date.now() - lastTouchTime > 450) {
// It doesn't rely on `event.preventDefault()` to prevent scrolling
// because the scroll event can't be canceled, so it resets the
// position instead.
window.scrollTo(state.scrollLeftReset, state.scrollTopReset);
}
}
}
},
callbacks: {
setOverlayStyles() {
if (!state.overlayEnabled) {
return;
}
let {
naturalWidth,
naturalHeight,
offsetWidth: originalWidth,
offsetHeight: originalHeight
} = state.currentImage.imageRef;
let {
x: screenPosX,
y: screenPosY
} = state.currentImage.imageRef.getBoundingClientRect();
// Natural ratio of the image clicked to open the lightbox.
const naturalRatio = naturalWidth / naturalHeight;
// Original ratio of the image clicked to open the lightbox.
let originalRatio = originalWidth / originalHeight;
// If it has object-fit: contain, recalculates the original sizes
// and the screen position without the blank spaces.
if (state.currentImage.scaleAttr === 'contain') {
if (naturalRatio > originalRatio) {
const heightWithoutSpace = originalWidth / naturalRatio;
// Recalculates screen position without the top space.
screenPosY += (originalHeight - heightWithoutSpace) / 2;
originalHeight = heightWithoutSpace;
} else {
const widthWithoutSpace = originalHeight * naturalRatio;
// Recalculates screen position without the left space.
screenPosX += (originalWidth - widthWithoutSpace) / 2;
originalWidth = widthWithoutSpace;
}
}
originalRatio = originalWidth / originalHeight;
// Typically, it uses the image's full-sized dimensions. If those
// dimensions have not been set (i.e. an external image with only one
// size), the image's dimensions in the lightbox are the same
// as those of the image in the content.
let imgMaxWidth = parseFloat(state.currentImage.targetWidth !== 'none' ? state.currentImage.targetWidth : naturalWidth);
let imgMaxHeight = parseFloat(state.currentImage.targetHeight !== 'none' ? state.currentImage.targetHeight : naturalHeight);
// Ratio of the biggest image stored in the database.
let imgRatio = imgMaxWidth / imgMaxHeight;
let containerMaxWidth = imgMaxWidth;
let containerMaxHeight = imgMaxHeight;
let containerWidth = imgMaxWidth;
let containerHeight = imgMaxHeight;
// Checks if the target image has a different ratio than the original
// one (thumbnail). Recalculates the width and height.
if (naturalRatio.toFixed(2) !== imgRatio.toFixed(2)) {
if (naturalRatio > imgRatio) {
// If the width is reached before the height, it keeps the maxWidth
// and recalculates the height unless the difference between the
// maxHeight and the reducedHeight is higher than the maxWidth,
// where it keeps the reducedHeight and recalculate the width.
const reducedHeight = imgMaxWidth / naturalRatio;
if (imgMaxHeight - reducedHeight > imgMaxWidth) {
imgMaxHeight = reducedHeight;
imgMaxWidth = reducedHeight * naturalRatio;
} else {
imgMaxHeight = imgMaxWidth / naturalRatio;
}
} else {
// If the height is reached before the width, it keeps the maxHeight
// and recalculate the width unlesss the difference between the
// maxWidth and the reducedWidth is higher than the maxHeight, where
// it keeps the reducedWidth and recalculate the height.
const reducedWidth = imgMaxHeight * naturalRatio;
if (imgMaxWidth - reducedWidth > imgMaxHeight) {
imgMaxWidth = reducedWidth;
imgMaxHeight = reducedWidth / naturalRatio;
} else {
imgMaxWidth = imgMaxHeight * naturalRatio;
}
}
containerWidth = imgMaxWidth;
containerHeight = imgMaxHeight;
imgRatio = imgMaxWidth / imgMaxHeight;
// Calculates the max size of the container.
if (originalRatio > imgRatio) {
containerMaxWidth = imgMaxWidth;
containerMaxHeight = containerMaxWidth / originalRatio;
} else {
containerMaxHeight = imgMaxHeight;
containerMaxWidth = containerMaxHeight * originalRatio;
}
}
// If the image has been pixelated on purpose, it keeps that size.
if (originalWidth > containerWidth || originalHeight > containerHeight) {
containerWidth = originalWidth;
containerHeight = originalHeight;
}
// Calculates the final lightbox image size and the scale factor.
// MaxWidth is either the window container (accounting for padding) or
// the image resolution.
let horizontalPadding = 0;
if (window.innerWidth > 480) {
horizontalPadding = 80;
} else if (window.innerWidth > 1920) {
horizontalPadding = 160;
}
const verticalPadding = 80;
const targetMaxWidth = Math.min(window.innerWidth - horizontalPadding, containerWidth);
const targetMaxHeight = Math.min(window.innerHeight - verticalPadding, containerHeight);
const targetContainerRatio = targetMaxWidth / targetMaxHeight;
if (originalRatio > targetContainerRatio) {
// If targetMaxWidth is reached before targetMaxHeight.
containerWidth = targetMaxWidth;
containerHeight = containerWidth / originalRatio;
} else {
// If targetMaxHeight is reached before targetMaxWidth.
containerHeight = targetMaxHeight;
containerWidth = containerHeight * originalRatio;
}
const containerScale = originalWidth / containerWidth;
const lightboxImgWidth = imgMaxWidth * (containerWidth / containerMaxWidth);
const lightboxImgHeight = imgMaxHeight * (containerHeight / containerMaxHeight);
// As of this writing, using the calculations above will render the
// lightbox with a small, erroneous whitespace on the left side of the
// image in iOS Safari, perhaps due to an inconsistency in how browsers
// handle absolute positioning and CSS transformation. In any case,
// adding 1 pixel to the container width and height solves the problem,
// though this can be removed if the issue is fixed in the future.
state.overlayStyles = `
:root {
--wp--lightbox-initial-top-position: ${screenPosY}px;
--wp--lightbox-initial-left-position: ${screenPosX}px;
--wp--lightbox-container-width: ${containerWidth + 1}px;
--wp--lightbox-container-height: ${containerHeight + 1}px;
--wp--lightbox-image-width: ${lightboxImgWidth}px;
--wp--lightbox-image-height: ${lightboxImgHeight}px;
--wp--lightbox-scale: ${containerScale};
--wp--lightbox-scrollbar-width: ${window.innerWidth - document.documentElement.clientWidth}px;
}
`;
},
setButtonStyles() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
const {
ref
} = (0,interactivity_namespaceObject.getElement)();
state.metadata[imageId].imageRef = ref;
state.metadata[imageId].currentSrc = ref.currentSrc;
const {
naturalWidth,
naturalHeight,
offsetWidth,
offsetHeight
} = ref;
// If the image isn't loaded yet, it can't calculate where the button
// should be.
if (naturalWidth === 0 || naturalHeight === 0) {
return;
}
const figure = ref.parentElement;
const figureWidth = ref.parentElement.clientWidth;
// It needs special handling for the height because a caption will cause
// the figure to be taller than the image, which means it needs to
// account for that when calculating the placement of the button in the
// top right corner of the image.
let figureHeight = ref.parentElement.clientHeight;
const caption = figure.querySelector('figcaption');
if (caption) {
const captionComputedStyle = window.getComputedStyle(caption);
if (!['absolute', 'fixed'].includes(captionComputedStyle.position)) {
figureHeight = figureHeight - caption.offsetHeight - parseFloat(captionComputedStyle.marginTop) - parseFloat(captionComputedStyle.marginBottom);
}
}
const buttonOffsetTop = figureHeight - offsetHeight;
const buttonOffsetRight = figureWidth - offsetWidth;
let imageButtonTop = buttonOffsetTop + 16;
let imageButtonRight = buttonOffsetRight + 16;
// In the case of an image with object-fit: contain, the size of the
//
element can be larger than the image itself, so it needs to
// calculate where to place the button.
if (state.metadata[imageId].scaleAttr === 'contain') {
// Natural ratio of the image.
const naturalRatio = naturalWidth / naturalHeight;
// Offset ratio of the image.
const offsetRatio = offsetWidth / offsetHeight;
if (naturalRatio >= offsetRatio) {
// If it reaches the width first, it keeps the width and compute the
// height.
const referenceHeight = offsetWidth / naturalRatio;
imageButtonTop = (offsetHeight - referenceHeight) / 2 + buttonOffsetTop + 16;
imageButtonRight = buttonOffsetRight + 16;
} else {
// If it reaches the height first, it keeps the height and compute
// the width.
const referenceWidth = offsetHeight * naturalRatio;
imageButtonTop = buttonOffsetTop + 16;
imageButtonRight = (offsetWidth - referenceWidth) / 2 + buttonOffsetRight + 16;
}
}
state.metadata[imageId].imageButtonTop = imageButtonTop;
state.metadata[imageId].imageButtonRight = imageButtonRight;
},
setOverlayFocus() {
if (state.overlayEnabled) {
// Moves the focus to the dialog when it opens.
const {
ref
} = (0,interactivity_namespaceObject.getElement)();
ref.focus();
}
},
initTriggerButton() {
const {
imageId
} = (0,interactivity_namespaceObject.getContext)();
const {
ref
} = (0,interactivity_namespaceObject.getElement)();
state.metadata[imageId].buttonRef = ref;
}
}
}, {
lock: true
});
image/view.min.asset.php 0000644 00000000124 14720634132 0011210 0 ustar 00 array(), 'version' => 'ff354d5368d64857fef0');
image/view.min.js 0000644 00000010763 14720634132 0007731 0 ustar 00 import*as t from"@wordpress/interactivity";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e)};const n=(t=>{var n={};return e.d(n,t),n})({getContext:()=>t.getContext,getElement:()=>t.getElement,store:()=>t.store});let o=!1,a=0;const{state:r,actions:i,callbacks:l}=(0,n.store)("core/image",{state:{currentImageId:null,get currentImage(){return r.metadata[r.currentImageId]},get overlayOpened(){return null!==r.currentImageId},get roleAttribute(){return r.overlayOpened?"dialog":null},get ariaModal(){return r.overlayOpened?"true":null},get enlargedSrc(){return r.currentImage.uploadedSrc||"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},get figureStyles(){return r.overlayOpened&&`${r.currentImage.figureStyles?.replace(/margin[^;]*;?/g,"")};`},get imgStyles(){return r.overlayOpened&&`${r.currentImage.imgStyles?.replace(/;$/,"")}; object-fit:cover;`},get imageButtonRight(){const{imageId:t}=(0,n.getContext)();return r.metadata[t].imageButtonRight},get imageButtonTop(){const{imageId:t}=(0,n.getContext)();return r.metadata[t].imageButtonTop},get isContentHidden(){const t=(0,n.getContext)();return r.overlayEnabled&&r.currentImageId===t.imageId},get isContentVisible(){const t=(0,n.getContext)();return!r.overlayEnabled&&r.currentImageId===t.imageId}},actions:{showLightbox(){const{imageId:t}=(0,n.getContext)();r.metadata[t].imageRef?.complete&&(r.scrollTopReset=document.documentElement.scrollTop,r.scrollLeftReset=document.documentElement.scrollLeft,r.overlayEnabled=!0,r.currentImageId=t,l.setOverlayStyles())},hideLightbox(){r.overlayEnabled&&(r.showClosingAnimation=!0,r.overlayEnabled=!1,setTimeout((function(){r.currentImage.buttonRef.focus({preventScroll:!0}),r.currentImageId=null}),450))},handleKeydown(t){if(r.overlayEnabled){if("Tab"===t.key){t.preventDefault();const{ref:e}=(0,n.getElement)();e.querySelector("button").focus()}"Escape"===t.key&&i.hideLightbox()}},handleTouchMove(t){r.overlayEnabled&&t.preventDefault()},handleTouchStart(){o=!0},handleTouchEnd(){a=Date.now(),o=!1},handleScroll(){r.overlayOpened&&!o&&Date.now()-a>450&&window.scrollTo(r.scrollLeftReset,r.scrollTopReset)}},callbacks:{setOverlayStyles(){if(!r.overlayEnabled)return;let{naturalWidth:t,naturalHeight:e,offsetWidth:n,offsetHeight:o}=r.currentImage.imageRef,{x:a,y:i}=r.currentImage.imageRef.getBoundingClientRect();const l=t/e;let g=n/o;if("contain"===r.currentImage.scaleAttr)if(l>g){const t=n/l;i+=(o-t)/2,o=t}else{const t=o*l;a+=(n-t)/2,n=t}g=n/o;let c=parseFloat("none"!==r.currentImage.targetWidth?r.currentImage.targetWidth:t),s=parseFloat("none"!==r.currentImage.targetHeight?r.currentImage.targetHeight:e),d=c/s,u=c,m=s,h=c,p=s;if(l.toFixed(2)!==d.toFixed(2)){if(l>d){const t=c/l;s-t>c?(s=t,c=t*l):s=c/l}else{const t=s*l;c-t>s?(c=t,s=t/l):c=s*l}h=c,p=s,d=c/s,g>d?(u=c,m=u/g):(m=s,u=m*g)}(n>h||o>p)&&(h=n,p=o);let f=0;window.innerWidth>480?f=80:window.innerWidth>1920&&(f=160);const y=Math.min(window.innerWidth-f,h),b=Math.min(window.innerHeight-80,p);g>y/b?(h=y,p=h/g):(p=b,h=p*g);const w=n/h,I=c*(h/u),x=s*(p/m);r.overlayStyles=`\n\t\t\t\t:root {\n\t\t\t\t\t--wp--lightbox-initial-top-position: ${i}px;\n\t\t\t\t\t--wp--lightbox-initial-left-position: ${a}px;\n\t\t\t\t\t--wp--lightbox-container-width: ${h+1}px;\n\t\t\t\t\t--wp--lightbox-container-height: ${p+1}px;\n\t\t\t\t\t--wp--lightbox-image-width: ${I}px;\n\t\t\t\t\t--wp--lightbox-image-height: ${x}px;\n\t\t\t\t\t--wp--lightbox-scale: ${w};\n\t\t\t\t\t--wp--lightbox-scrollbar-width: ${window.innerWidth-document.documentElement.clientWidth}px;\n\t\t\t\t}\n\t\t\t`},setButtonStyles(){const{imageId:t}=(0,n.getContext)(),{ref:e}=(0,n.getElement)();r.metadata[t].imageRef=e,r.metadata[t].currentSrc=e.currentSrc;const{naturalWidth:o,naturalHeight:a,offsetWidth:i,offsetHeight:l}=e;if(0===o||0===a)return;const g=e.parentElement,c=e.parentElement.clientWidth;let s=e.parentElement.clientHeight;const d=g.querySelector("figcaption");if(d){const t=window.getComputedStyle(d);["absolute","fixed"].includes(t.position)||(s=s-d.offsetHeight-parseFloat(t.marginTop)-parseFloat(t.marginBottom))}const u=s-l,m=c-i;let h=u+16,p=m+16;if("contain"===r.metadata[t].scaleAttr){const t=o/a;if(t>=i/l){h=(l-i/t)/2+u+16,p=m+16}else{h=u+16,p=(i-l*t)/2+m+16}}r.metadata[t].imageButtonTop=h,r.metadata[t].imageButtonRight=p},setOverlayFocus(){if(r.overlayEnabled){const{ref:t}=(0,n.getElement)();t.focus()}},initTriggerButton(){const{imageId:t}=(0,n.getContext)(),{ref:e}=(0,n.getElement)();r.metadata[t].buttonRef=e}}},{lock:!0}); image/editor-rtl.css 0000644 00000005156 14720634132 0010436 0 ustar 00 .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{
min-height:60px;
}
figure.wp-block-image:not(.wp-block){
margin:0;
}
.wp-block-image{
position:relative;
}
.wp-block-image .is-applying img,.wp-block-image.is-transient img{
opacity:.3;
}
.wp-block-image figcaption img{
display:inline;
}
.wp-block-image .components-spinner{
margin:0;
position:absolute;
right:50%;
top:50%;
transform:translate(50%, -50%);
}
.wp-block-image__placeholder{
aspect-ratio:4/3;
}
.wp-block-image__placeholder.has-illustration:before{
background:#fff;
opacity:.8;
}
.wp-block-image__placeholder .components-placeholder__illustration{
opacity:.1;
}
.wp-block-image .components-resizable-box__container{
display:table;
}
.wp-block-image .components-resizable-box__container img{
display:block;
height:inherit;
width:inherit;
}
.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{
left:0;
margin:-1px 0;
position:absolute;
right:0;
}
@media (min-width:600px){
.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{
margin:-1px;
}
}
[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{
height:auto;
width:100%;
}
.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{
display:table;
}
.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{
caption-side:bottom;
display:table-caption;
}
.wp-block[data-align=left]>.wp-block-image{
margin:.5em 0 .5em 1em;
}
.wp-block[data-align=right]>.wp-block-image{
margin:.5em 1em .5em 0;
}
.wp-block[data-align=center]>.wp-block-image{
margin-left:auto;
margin-right:auto;
text-align:center;
}
.wp-block[data-align]:has(>.wp-block-image){
position:relative;
}
.wp-block-image__crop-area{
max-width:100%;
overflow:hidden;
position:relative;
width:100%;
}
.wp-block-image__crop-area .reactEasyCrop_Container{
pointer-events:auto;
}
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
border:none;
border-radius:0;
}
.wp-block-image__crop-icon{
align-items:center;
display:flex;
justify-content:center;
min-width:48px;
padding:0 8px;
}
.wp-block-image__crop-icon svg{
fill:currentColor;
}
.wp-block-image__zoom .components-popover__content{
min-width:260px;
overflow:visible !important;
}
.wp-block-image__toolbar_content_textarea{
width:250px;
} image/editor.min.css 0000644 00000004557 14720634132 0010425 0 ustar 00 .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{min-height:60px}figure.wp-block-image:not(.wp-block){margin:0}.wp-block-image{position:relative}.wp-block-image .is-applying img,.wp-block-image.is-transient img{opacity:.3}.wp-block-image figcaption img{display:inline}.wp-block-image .components-spinner{left:50%;margin:0;position:absolute;top:50%;transform:translate(-50%,-50%)}.wp-block-image__placeholder{aspect-ratio:4/3}.wp-block-image__placeholder.has-illustration:before{background:#fff;opacity:.8}.wp-block-image__placeholder .components-placeholder__illustration{opacity:.1}.wp-block-image .components-resizable-box__container{display:table}.wp-block-image .components-resizable-box__container img{display:block;height:inherit;width:inherit}.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{left:0;margin:-1px 0;position:absolute;right:0}@media (min-width:600px){.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{margin:-1px}}[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{height:auto;width:100%}.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{display:table}.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{caption-side:bottom;display:table-caption}.wp-block[data-align=left]>.wp-block-image{margin:.5em 1em .5em 0}.wp-block[data-align=right]>.wp-block-image{margin:.5em 0 .5em 1em}.wp-block[data-align=center]>.wp-block-image{margin-left:auto;margin-right:auto;text-align:center}.wp-block[data-align]:has(>.wp-block-image){position:relative}.wp-block-image__crop-area{max-width:100%;overflow:hidden;position:relative;width:100%}.wp-block-image__crop-area .reactEasyCrop_Container{pointer-events:auto}.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{border:none;border-radius:0}.wp-block-image__crop-icon{align-items:center;display:flex;justify-content:center;min-width:48px;padding:0 8px}.wp-block-image__crop-icon svg{fill:currentColor}.wp-block-image__zoom .components-popover__content{min-width:260px;overflow:visible!important}.wp-block-image__toolbar_content_textarea{width:250px} image/theme-rtl.min.css 0000644 00000000274 14720634132 0011030 0 ustar 00 :root :where(.wp-block-image figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme :root :where(.wp-block-image figcaption){color:#ffffffa6}.wp-block-image{margin:0 0 1em} image/editor.css 0000644 00000005156 14720634132 0007637 0 ustar 00 .wp-block-image.wp-block-image .block-editor-media-placeholder.is-small{
min-height:60px;
}
figure.wp-block-image:not(.wp-block){
margin:0;
}
.wp-block-image{
position:relative;
}
.wp-block-image .is-applying img,.wp-block-image.is-transient img{
opacity:.3;
}
.wp-block-image figcaption img{
display:inline;
}
.wp-block-image .components-spinner{
left:50%;
margin:0;
position:absolute;
top:50%;
transform:translate(-50%, -50%);
}
.wp-block-image__placeholder{
aspect-ratio:4/3;
}
.wp-block-image__placeholder.has-illustration:before{
background:#fff;
opacity:.8;
}
.wp-block-image__placeholder .components-placeholder__illustration{
opacity:.1;
}
.wp-block-image .components-resizable-box__container{
display:table;
}
.wp-block-image .components-resizable-box__container img{
display:block;
height:inherit;
width:inherit;
}
.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{
left:0;
margin:-1px 0;
position:absolute;
right:0;
}
@media (min-width:600px){
.block-editor-block-list__block[data-type="core/image"] .block-editor-block-toolbar .block-editor-url-input__button-modal{
margin:-1px;
}
}
[data-align=full]>.wp-block-image img,[data-align=wide]>.wp-block-image img{
height:auto;
width:100%;
}
.wp-block[data-align=center]>.wp-block-image,.wp-block[data-align=left]>.wp-block-image,.wp-block[data-align=right]>.wp-block-image{
display:table;
}
.wp-block[data-align=center]>.wp-block-image>figcaption,.wp-block[data-align=left]>.wp-block-image>figcaption,.wp-block[data-align=right]>.wp-block-image>figcaption{
caption-side:bottom;
display:table-caption;
}
.wp-block[data-align=left]>.wp-block-image{
margin:.5em 1em .5em 0;
}
.wp-block[data-align=right]>.wp-block-image{
margin:.5em 0 .5em 1em;
}
.wp-block[data-align=center]>.wp-block-image{
margin-left:auto;
margin-right:auto;
text-align:center;
}
.wp-block[data-align]:has(>.wp-block-image){
position:relative;
}
.wp-block-image__crop-area{
max-width:100%;
overflow:hidden;
position:relative;
width:100%;
}
.wp-block-image__crop-area .reactEasyCrop_Container{
pointer-events:auto;
}
.wp-block-image__crop-area .reactEasyCrop_Container .reactEasyCrop_Image{
border:none;
border-radius:0;
}
.wp-block-image__crop-icon{
align-items:center;
display:flex;
justify-content:center;
min-width:48px;
padding:0 8px;
}
.wp-block-image__crop-icon svg{
fill:currentColor;
}
.wp-block-image__zoom .components-popover__content{
min-width:260px;
overflow:visible !important;
}
.wp-block-image__toolbar_content_textarea{
width:250px;
} image/block.json 0000644 00000005572 14720634132 0007626 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/image",
"title": "Image",
"category": "media",
"usesContext": [ "allowResize", "imageCrop", "fixedHeight" ],
"description": "Insert an image to make a visual statement.",
"keywords": [ "img", "photo", "picture" ],
"textdomain": "default",
"attributes": {
"blob": {
"type": "string",
"role": "local"
},
"url": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "src",
"role": "content"
},
"alt": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "alt",
"default": "",
"role": "content"
},
"caption": {
"type": "rich-text",
"source": "rich-text",
"selector": "figcaption",
"role": "content"
},
"lightbox": {
"type": "object",
"enabled": {
"type": "boolean"
}
},
"title": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "title",
"role": "content"
},
"href": {
"type": "string",
"source": "attribute",
"selector": "figure > a",
"attribute": "href",
"role": "content"
},
"rel": {
"type": "string",
"source": "attribute",
"selector": "figure > a",
"attribute": "rel"
},
"linkClass": {
"type": "string",
"source": "attribute",
"selector": "figure > a",
"attribute": "class"
},
"id": {
"type": "number",
"role": "content"
},
"width": {
"type": "string"
},
"height": {
"type": "string"
},
"aspectRatio": {
"type": "string"
},
"scale": {
"type": "string"
},
"sizeSlug": {
"type": "string"
},
"linkDestination": {
"type": "string"
},
"linkTarget": {
"type": "string",
"source": "attribute",
"selector": "figure > a",
"attribute": "target"
}
},
"supports": {
"interactivity": true,
"align": [ "left", "center", "right", "wide", "full" ],
"anchor": true,
"color": {
"text": false,
"background": false
},
"filter": {
"duotone": true
},
"spacing": {
"margin": true
},
"__experimentalBorder": {
"color": true,
"radius": true,
"width": true,
"__experimentalSkipSerialization": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"width": true
}
},
"shadow": {
"__experimentalSkipSerialization": true
}
},
"selectors": {
"border": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
"shadow": ".wp-block-image img, .wp-block-image .wp-block-image__crop-area, .wp-block-image .components-placeholder",
"filter": {
"duotone": ".wp-block-image img, .wp-block-image .components-placeholder"
}
},
"styles": [
{
"name": "default",
"label": "Default",
"isDefault": true
},
{ "name": "rounded", "label": "Rounded" }
],
"editorStyle": "wp-block-image-editor",
"style": "wp-block-image"
}
image/style-rtl.css 0000644 00000016675 14720634132 0010320 0 ustar 00 .wp-block-image a{
display:inline-block;
}
.wp-block-image img{
box-sizing:border-box;
height:auto;
max-width:100%;
vertical-align:bottom;
}
@media (prefers-reduced-motion:no-preference){
.wp-block-image img.hide{
visibility:hidden;
}
.wp-block-image img.show{
animation:show-content-image .4s;
}
}
.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{
border-radius:inherit;
}
.wp-block-image.has-custom-border img{
box-sizing:border-box;
}
.wp-block-image.aligncenter{
text-align:center;
}
.wp-block-image.alignfull a,.wp-block-image.alignwide a{
width:100%;
}
.wp-block-image.alignfull img,.wp-block-image.alignwide img{
height:auto;
width:100%;
}
.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{
display:table;
}
.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{
caption-side:bottom;
display:table-caption;
}
.wp-block-image .alignleft{
float:left;
margin:.5em 1em .5em 0;
}
.wp-block-image .alignright{
float:right;
margin:.5em 0 .5em 1em;
}
.wp-block-image .aligncenter{
margin-left:auto;
margin-right:auto;
}
.wp-block-image :where(figcaption){
margin-bottom:1em;
margin-top:.5em;
}
.wp-block-image.is-style-circle-mask img{
border-radius:9999px;
}
@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){
.wp-block-image.is-style-circle-mask img{
border-radius:0;
-webkit-mask-image:url('data:image/svg+xml;utf8,
');
mask-image:url('data:image/svg+xml;utf8,
');
mask-mode:alpha;
-webkit-mask-position:center;
mask-position:center;
-webkit-mask-repeat:no-repeat;
mask-repeat:no-repeat;
-webkit-mask-size:contain;
mask-size:contain;
}
}
:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){
border-radius:9999px;
}
.wp-block-image figure{
margin:0;
}
.wp-lightbox-container{
display:flex;
flex-direction:column;
position:relative;
}
.wp-lightbox-container img{
cursor:zoom-in;
}
.wp-lightbox-container img:hover+button{
opacity:1;
}
.wp-lightbox-container button{
align-items:center;
-webkit-backdrop-filter:blur(16px) saturate(180%);
backdrop-filter:blur(16px) saturate(180%);
background-color:#5a5a5a40;
border:none;
border-radius:4px;
cursor:zoom-in;
display:flex;
height:20px;
justify-content:center;
left:16px;
opacity:0;
padding:0;
position:absolute;
text-align:center;
top:16px;
transition:opacity .2s ease;
width:20px;
z-index:100;
}
.wp-lightbox-container button:focus-visible{
outline:3px auto #5a5a5a40;
outline:3px auto -webkit-focus-ring-color;
outline-offset:3px;
}
.wp-lightbox-container button:hover{
cursor:pointer;
opacity:1;
}
.wp-lightbox-container button:focus{
opacity:1;
}
.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){
background-color:#5a5a5a40;
border:none;
}
.wp-lightbox-overlay{
box-sizing:border-box;
cursor:zoom-out;
height:100vh;
overflow:hidden;
position:fixed;
right:0;
top:0;
visibility:hidden;
width:100%;
z-index:100000;
}
.wp-lightbox-overlay .close-button{
align-items:center;
cursor:pointer;
display:flex;
justify-content:center;
left:calc(env(safe-area-inset-left) + 16px);
min-height:40px;
min-width:40px;
padding:0;
position:absolute;
top:calc(env(safe-area-inset-top) + 16px);
z-index:5000000;
}
.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){
background:none;
border:none;
}
.wp-lightbox-overlay .lightbox-image-container{
height:var(--wp--lightbox-container-height);
overflow:hidden;
position:absolute;
right:50%;
top:50%;
transform:translate(50%, -50%);
transform-origin:top right;
width:var(--wp--lightbox-container-width);
z-index:9999999999;
}
.wp-lightbox-overlay .wp-block-image{
align-items:center;
box-sizing:border-box;
display:flex;
height:100%;
justify-content:center;
margin:0;
position:relative;
transform-origin:100% 0;
width:100%;
z-index:3000000;
}
.wp-lightbox-overlay .wp-block-image img{
height:var(--wp--lightbox-image-height);
min-height:var(--wp--lightbox-image-height);
min-width:var(--wp--lightbox-image-width);
width:var(--wp--lightbox-image-width);
}
.wp-lightbox-overlay .wp-block-image figcaption{
display:none;
}
.wp-lightbox-overlay button{
background:none;
border:none;
}
.wp-lightbox-overlay .scrim{
background-color:#fff;
height:100%;
opacity:.9;
position:absolute;
width:100%;
z-index:2000000;
}
.wp-lightbox-overlay.active{
animation:turn-on-visibility .25s both;
visibility:visible;
}
.wp-lightbox-overlay.active img{
animation:turn-on-visibility .35s both;
}
.wp-lightbox-overlay.show-closing-animation:not(.active){
animation:turn-off-visibility .35s both;
}
.wp-lightbox-overlay.show-closing-animation:not(.active) img{
animation:turn-off-visibility .25s both;
}
@media (prefers-reduced-motion:no-preference){
.wp-lightbox-overlay.zoom.active{
animation:none;
opacity:1;
visibility:visible;
}
.wp-lightbox-overlay.zoom.active .lightbox-image-container{
animation:lightbox-zoom-in .4s;
}
.wp-lightbox-overlay.zoom.active .lightbox-image-container img{
animation:none;
}
.wp-lightbox-overlay.zoom.active .scrim{
animation:turn-on-visibility .4s forwards;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){
animation:none;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{
animation:lightbox-zoom-out .4s;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{
animation:none;
}
.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{
animation:turn-off-visibility .4s forwards;
}
}
@keyframes show-content-image{
0%{
visibility:hidden;
}
99%{
visibility:hidden;
}
to{
visibility:visible;
}
}
@keyframes turn-on-visibility{
0%{
opacity:0;
}
to{
opacity:1;
}
}
@keyframes turn-off-visibility{
0%{
opacity:1;
visibility:visible;
}
99%{
opacity:0;
visibility:visible;
}
to{
opacity:0;
visibility:hidden;
}
}
@keyframes lightbox-zoom-in{
0%{
transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
}
to{
transform:translate(50%, -50%) scale(1);
}
}
@keyframes lightbox-zoom-out{
0%{
transform:translate(50%, -50%) scale(1);
visibility:visible;
}
99%{
visibility:visible;
}
to{
transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1), calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));
visibility:hidden;
}
} image/theme.min.css 0000644 00000000274 14720634132 0010231 0 ustar 00 :root :where(.wp-block-image figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme :root :where(.wp-block-image figcaption){color:#ffffffa6}.wp-block-image{margin:0 0 1em} image/style-rtl.min.css 0000644 00000015076 14720634132 0011074 0 ustar 00 .wp-block-image a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media (prefers-reduced-motion:no-preference){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull a,.wp-block-image.alignwide a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,
');mask-image:url('data:image/svg+xml;utf8,
');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;-webkit-backdrop-filter:blur(16px) saturate(180%);backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;left:16px;opacity:0;padding:0;position:absolute;text-align:center;top:16px;transition:opacity .2s ease;width:20px;z-index:100}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;overflow:hidden;position:fixed;right:0;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;left:calc(env(safe-area-inset-left) + 16px);min-height:40px;min-width:40px;padding:0;position:absolute;top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);overflow:hidden;position:absolute;right:50%;top:50%;transform:translate(50%,-50%);transform-origin:top right;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:100% 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both;visibility:visible}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}@media (prefers-reduced-motion:no-preference){.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc(((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position))*-1),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}} site-title/editor-rtl.min.css 0000644 00000000102 14720634132 0012203 0 ustar 00 .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0} site-title/style.css 0000644 00000000410 14720634132 0010476 0 ustar 00 .wp-block-site-title{
box-sizing:border-box;
}
.wp-block-site-title :where(a){
color:inherit;
font-family:inherit;
font-size:inherit;
font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
text-decoration:inherit;
} site-title/style.min.css 0000644 00000000350 14720634132 0011263 0 ustar 00 .wp-block-site-title{box-sizing:border-box}.wp-block-site-title :where(a){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit} site-title/editor-rtl.css 0000644 00000000112 14720634132 0011422 0 ustar 00 .wp-block-site-title__placeholder{
border:1px dashed;
padding:1em 0;
} site-title/editor.min.css 0000644 00000000102 14720634132 0011404 0 ustar 00 .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0} site-title/editor.css 0000644 00000000112 14720634132 0010623 0 ustar 00 .wp-block-site-title__placeholder{
border:1px dashed;
padding:1em 0;
} site-title/block.json 0000644 00000003307 14720634132 0010621 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/site-title",
"title": "Site Title",
"category": "theme",
"description": "Displays the name of this site. Update the block, and the changes apply everywhere it’s used. This will also appear in the browser title bar and in search results.",
"textdomain": "default",
"attributes": {
"level": {
"type": "number",
"default": 1
},
"levelOptions": {
"type": "array",
"default": [ 0, 1, 2, 3, 4, 5, 6 ]
},
"textAlign": {
"type": "string"
},
"isLink": {
"type": "boolean",
"default": true
},
"linkTarget": {
"type": "string",
"default": "_self"
}
},
"example": {
"viewportWidth": 500
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"spacing": {
"padding": true,
"margin": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalWritingMode": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"editorStyle": "wp-block-site-title-editor",
"style": "wp-block-site-title"
}
site-title/style-rtl.css 0000644 00000000410 14720634132 0011275 0 ustar 00 .wp-block-site-title{
box-sizing:border-box;
}
.wp-block-site-title :where(a){
color:inherit;
font-family:inherit;
font-size:inherit;
font-style:inherit;
font-weight:inherit;
letter-spacing:inherit;
line-height:inherit;
text-decoration:inherit;
} site-title/style-rtl.min.css 0000644 00000000350 14720634132 0012062 0 ustar 00 .wp-block-site-title{box-sizing:border-box}.wp-block-site-title :where(a){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit} footnotes.php 0000644 00000007273 14720634132 0007310 0 ustar 00 context['postId'] ) ) {
return '';
}
if ( post_password_required( $block->context['postId'] ) ) {
return;
}
$footnotes = get_post_meta( $block->context['postId'], 'footnotes', true );
if ( ! $footnotes ) {
return;
}
$footnotes = json_decode( $footnotes, true );
if ( ! is_array( $footnotes ) || count( $footnotes ) === 0 ) {
return '';
}
$wrapper_attributes = get_block_wrapper_attributes();
$footnote_index = 1;
$block_content = '';
foreach ( $footnotes as $footnote ) {
// Translators: %d: Integer representing the number of return links on the page.
$aria_label = sprintf( __( 'Jump to footnote reference %1$d' ), $footnote_index );
$block_content .= sprintf(
'
%2$s ↩︎',
$footnote['id'],
$footnote['content'],
$aria_label
);
++$footnote_index;
}
return sprintf(
'
%2$s
',
$wrapper_attributes,
$block_content
);
}
/**
* Registers the `core/footnotes` block on the server.
*
* @since 6.3.0
*/
function register_block_core_footnotes() {
register_block_type_from_metadata(
__DIR__ . '/footnotes',
array(
'render_callback' => 'render_block_core_footnotes',
)
);
}
add_action( 'init', 'register_block_core_footnotes' );
/**
* Registers the footnotes meta field required for footnotes to work.
*
* @since 6.5.0
*/
function register_block_core_footnotes_post_meta() {
$post_types = get_post_types( array( 'show_in_rest' => true ) );
foreach ( $post_types as $post_type ) {
// Only register the meta field if the post type supports the editor, custom fields, and revisions.
if (
post_type_supports( $post_type, 'editor' ) &&
post_type_supports( $post_type, 'custom-fields' ) &&
post_type_supports( $post_type, 'revisions' )
) {
register_post_meta(
$post_type,
'footnotes',
array(
'show_in_rest' => true,
'single' => true,
'type' => 'string',
'revisions_enabled' => true,
)
);
}
}
}
/*
* Most post types are registered at priority 10, so use priority 20 here in
* order to catch them.
*/
add_action( 'init', 'register_block_core_footnotes_post_meta', 20 );
/**
* Adds the footnotes field to the revisions display.
*
* @since 6.3.0
*
* @param array $fields The revision fields.
* @return array The revision fields.
*/
function wp_add_footnotes_to_revision( $fields ) {
$fields['footnotes'] = __( 'Footnotes' );
return $fields;
}
add_filter( '_wp_post_revision_fields', 'wp_add_footnotes_to_revision' );
/**
* Gets the footnotes field from the revision for the revisions screen.
*
* @since 6.3.0
*
* @param string $revision_field The field value, but $revision->$field
* (footnotes) does not exist.
* @param string $field The field name, in this case "footnotes".
* @param object $revision The revision object to compare against.
* @return string The field value.
*/
function wp_get_footnotes_from_revision( $revision_field, $field, $revision ) {
return get_metadata( 'post', $revision->ID, $field, true );
}
add_filter( '_wp_post_revision_field_footnotes', 'wp_get_footnotes_from_revision', 10, 3 );
cover.php 0000644 00000006045 14720634132 0006402 0 ustar 00 'wp-block-cover__image-background',
'data-object-fit' => 'cover',
);
if ( $object_position ) {
$attr['data-object-position'] = $object_position;
$attr['style'] = 'object-position:' . $object_position . ';';
}
$image = get_the_post_thumbnail( null, 'post-thumbnail', $attr );
} else {
if ( in_the_loop() ) {
update_post_thumbnail_cache();
}
$current_featured_image = get_the_post_thumbnail_url();
if ( ! $current_featured_image ) {
return $content;
}
$current_thumbnail_id = get_post_thumbnail_id();
$processor = new WP_HTML_Tag_Processor( '
' );
$processor->next_tag();
$current_alt = trim( strip_tags( get_post_meta( $current_thumbnail_id, '_wp_attachment_image_alt', true ) ) );
if ( $current_alt ) {
$processor->set_attribute( 'role', 'img' );
$processor->set_attribute( 'aria-label', $current_alt );
}
$processor->add_class( 'wp-block-cover__image-background' );
$processor->add_class( 'wp-image-' . $current_thumbnail_id );
if ( $attributes['hasParallax'] ) {
$processor->add_class( 'has-parallax' );
}
if ( $attributes['isRepeated'] ) {
$processor->add_class( 'is-repeated' );
}
$styles = 'background-position:' . ( $object_position ?? '50% 50%' ) . ';';
$styles .= 'background-image:url(' . esc_url( $current_featured_image ) . ');';
$processor->set_attribute( 'style', $styles );
$image = $processor->get_updated_html();
}
/*
* Inserts the featured image between the (1st) cover 'background' `span` and 'inner_container' `div`,
* and removes eventual whitespace characters between the two (typically introduced at template level)
*/
$inner_container_start = '/
]+wp-block-cover__inner-container[\s|"][^>]*>/U';
if ( 1 === preg_match( $inner_container_start, $content, $matches, PREG_OFFSET_CAPTURE ) ) {
$offset = $matches[0][1];
$content = substr( $content, 0, $offset ) . $image . substr( $content, $offset );
}
return $content;
}
/**
* Registers the `core/cover` block renderer on server.
*
* @since 6.0.0
*/
function register_block_core_cover() {
register_block_type_from_metadata(
__DIR__ . '/cover',
array(
'render_callback' => 'render_block_core_cover',
)
);
}
add_action( 'init', 'register_block_core_cover' );
media-text.php 0000644 00000010437 14720634132 0007325 0 ustar 00 'div',
'class_name' => 'wp-block-media-text',
);
while ( $block_tag_processor->next_tag( $block_query ) ) {
if ( $image_fill ) {
// The markup below does not work with the deprecated `is-image-fill` class.
$block_tag_processor->remove_class( 'is-image-fill' );
$block_tag_processor->add_class( 'is-image-fill-element' );
}
}
$content = $block_tag_processor->get_updated_html();
$media_tag_processor = new WP_HTML_Tag_Processor( $content );
$wrapping_figure_query = array(
'tag_name' => 'figure',
'class_name' => 'wp-block-media-text__media',
);
if ( $has_media_on_right ) {
// Loop through all the figure tags and set a bookmark on the last figure tag.
while ( $media_tag_processor->next_tag( $wrapping_figure_query ) ) {
$media_tag_processor->set_bookmark( 'last_figure' );
}
if ( $media_tag_processor->has_bookmark( 'last_figure' ) ) {
$media_tag_processor->seek( 'last_figure' );
// Insert a unique ID to identify the figure tag.
$media_tag_processor->set_attribute( 'id', $unique_id );
}
} else {
if ( $media_tag_processor->next_tag( $wrapping_figure_query ) ) {
// Insert a unique ID to identify the figure tag.
$media_tag_processor->set_attribute( 'id', $unique_id );
}
}
$content = $media_tag_processor->get_updated_html();
// Add the image tag inside the figure tag, and update the image attributes
// in order to display the featured image.
$media_size_slug = isset( $attributes['mediaSizeSlug'] ) ? $attributes['mediaSizeSlug'] : 'full';
$image_tag = '
';
$content = preg_replace(
'/(