]+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' );
pullquote/theme-rtl.css 0000644 00000000450 15025144027 0011210 0 ustar 00 .wp-block-pullquote{
border-bottom:4px solid;
border-top:4px solid;
color:currentColor;
margin-bottom:1.75em;
}
.wp-block-pullquote cite,.wp-block-pullquote footer,.wp-block-pullquote__citation{
color:currentColor;
font-size:.8125em;
font-style:normal;
text-transform:uppercase;
} pullquote/theme.min.css 0000644 00000000413 15025144027 0011172 0 ustar 00 .wp-block-pullquote{border-bottom:4px solid;border-top:4px solid;color:currentColor;margin-bottom:1.75em}.wp-block-pullquote cite,.wp-block-pullquote footer,.wp-block-pullquote__citation{color:currentColor;font-size:.8125em;font-style:normal;text-transform:uppercase} pullquote/editor.min.css 0000644 00000000362 15025144027 0011361 0 ustar 00 .wp-block-pullquote.is-style-solid-color blockquote p{font-size:32px}.wp-block-pullquote.is-style-solid-color .wp-block-pullquote__citation{font-style:normal;text-transform:none}.wp-block-pullquote .wp-block-pullquote__citation{color:inherit} pullquote/editor.css 0000644 00000000407 15025144027 0010577 0 ustar 00 .wp-block-pullquote.is-style-solid-color blockquote p{
font-size:32px;
}
.wp-block-pullquote.is-style-solid-color .wp-block-pullquote__citation{
font-style:normal;
text-transform:none;
}
.wp-block-pullquote .wp-block-pullquote__citation{
color:inherit;
} pullquote/theme-rtl.min.css 0000644 00000000413 15025144027 0011771 0 ustar 00 .wp-block-pullquote{border-bottom:4px solid;border-top:4px solid;color:currentColor;margin-bottom:1.75em}.wp-block-pullquote cite,.wp-block-pullquote footer,.wp-block-pullquote__citation{color:currentColor;font-size:.8125em;font-style:normal;text-transform:uppercase} pullquote/style-rtl.css 0000644 00000002361 15025144027 0011251 0 ustar 00 .wp-block-pullquote{
box-sizing:border-box;
margin:0 0 1em;
overflow-wrap:break-word;
padding:4em 0;
text-align:center;
}
.wp-block-pullquote blockquote,.wp-block-pullquote cite,.wp-block-pullquote p{
color:inherit;
}
.wp-block-pullquote blockquote{
margin:0;
}
.wp-block-pullquote p{
margin-top:0;
}
.wp-block-pullquote p:last-child{
margin-bottom:0;
}
.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{
max-width:420px;
}
.wp-block-pullquote cite,.wp-block-pullquote footer{
position:relative;
}
.wp-block-pullquote .has-text-color a{
color:inherit;
}
.wp-block-pullquote.has-text-align-left blockquote{
text-align:right;
}
.wp-block-pullquote.has-text-align-right blockquote{
text-align:left;
}
.wp-block-pullquote.has-text-align-center blockquote{
text-align:center;
}
.wp-block-pullquote.is-style-solid-color{
border:none;
}
.wp-block-pullquote.is-style-solid-color blockquote{
margin-left:auto;
margin-right:auto;
max-width:60%;
}
.wp-block-pullquote.is-style-solid-color blockquote p{
font-size:2em;
margin-bottom:0;
margin-top:0;
}
.wp-block-pullquote.is-style-solid-color blockquote cite{
font-style:normal;
text-transform:none;
}
.wp-block-pullquote cite{
color:inherit;
display:block;
} pullquote/theme.css 0000644 00000000450 15025144027 0010411 0 ustar 00 .wp-block-pullquote{
border-bottom:4px solid;
border-top:4px solid;
color:currentColor;
margin-bottom:1.75em;
}
.wp-block-pullquote cite,.wp-block-pullquote footer,.wp-block-pullquote__citation{
color:currentColor;
font-size:.8125em;
font-style:normal;
text-transform:uppercase;
} pullquote/style-rtl.min.css 0000644 00000002157 15025144027 0012036 0 ustar 00 .wp-block-pullquote{box-sizing:border-box;margin:0 0 1em;overflow-wrap:break-word;padding:4em 0;text-align:center}.wp-block-pullquote blockquote,.wp-block-pullquote cite,.wp-block-pullquote p{color:inherit}.wp-block-pullquote blockquote{margin:0}.wp-block-pullquote p{margin-top:0}.wp-block-pullquote p:last-child{margin-bottom:0}.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{max-width:420px}.wp-block-pullquote cite,.wp-block-pullquote footer{position:relative}.wp-block-pullquote .has-text-color a{color:inherit}.wp-block-pullquote.has-text-align-left blockquote{text-align:right}.wp-block-pullquote.has-text-align-right blockquote{text-align:left}.wp-block-pullquote.has-text-align-center blockquote{text-align:center}.wp-block-pullquote.is-style-solid-color{border:none}.wp-block-pullquote.is-style-solid-color blockquote{margin-left:auto;margin-right:auto;max-width:60%}.wp-block-pullquote.is-style-solid-color blockquote p{font-size:2em;margin-bottom:0;margin-top:0}.wp-block-pullquote.is-style-solid-color blockquote cite{font-style:normal;text-transform:none}.wp-block-pullquote cite{color:inherit;display:block} pullquote/block.json 0000644 00000003603 15025144027 0010565 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/pullquote",
"title": "Pullquote",
"category": "text",
"description": "Give special visual emphasis to a quote from your text.",
"textdomain": "default",
"attributes": {
"value": {
"type": "rich-text",
"source": "rich-text",
"selector": "p",
"role": "content"
},
"citation": {
"type": "rich-text",
"source": "rich-text",
"selector": "cite",
"role": "content"
},
"textAlign": {
"type": "string"
}
},
"supports": {
"anchor": true,
"align": [ "left", "right", "wide", "full" ],
"background": {
"backgroundImage": true,
"backgroundSize": true,
"__experimentalDefaultControls": {
"backgroundImage": true
}
},
"color": {
"gradients": true,
"background": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"dimensions": {
"minHeight": true,
"__experimentalDefaultControls": {
"minHeight": false
}
},
"spacing": {
"margin": true,
"padding": 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
}
},
"__experimentalStyle": {
"typography": {
"fontSize": "1.5em",
"lineHeight": "1.6"
}
},
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-pullquote-editor",
"style": "wp-block-pullquote"
}
pullquote/style.css 0000644 00000002361 15025144027 0010452 0 ustar 00 .wp-block-pullquote{
box-sizing:border-box;
margin:0 0 1em;
overflow-wrap:break-word;
padding:4em 0;
text-align:center;
}
.wp-block-pullquote blockquote,.wp-block-pullquote cite,.wp-block-pullquote p{
color:inherit;
}
.wp-block-pullquote blockquote{
margin:0;
}
.wp-block-pullquote p{
margin-top:0;
}
.wp-block-pullquote p:last-child{
margin-bottom:0;
}
.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{
max-width:420px;
}
.wp-block-pullquote cite,.wp-block-pullquote footer{
position:relative;
}
.wp-block-pullquote .has-text-color a{
color:inherit;
}
.wp-block-pullquote.has-text-align-left blockquote{
text-align:left;
}
.wp-block-pullquote.has-text-align-right blockquote{
text-align:right;
}
.wp-block-pullquote.has-text-align-center blockquote{
text-align:center;
}
.wp-block-pullquote.is-style-solid-color{
border:none;
}
.wp-block-pullquote.is-style-solid-color blockquote{
margin-left:auto;
margin-right:auto;
max-width:60%;
}
.wp-block-pullquote.is-style-solid-color blockquote p{
font-size:2em;
margin-bottom:0;
margin-top:0;
}
.wp-block-pullquote.is-style-solid-color blockquote cite{
font-style:normal;
text-transform:none;
}
.wp-block-pullquote cite{
color:inherit;
display:block;
} pullquote/style.min.css 0000644 00000002157 15025144027 0011237 0 ustar 00 .wp-block-pullquote{box-sizing:border-box;margin:0 0 1em;overflow-wrap:break-word;padding:4em 0;text-align:center}.wp-block-pullquote blockquote,.wp-block-pullquote cite,.wp-block-pullquote p{color:inherit}.wp-block-pullquote blockquote{margin:0}.wp-block-pullquote p{margin-top:0}.wp-block-pullquote p:last-child{margin-bottom:0}.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{max-width:420px}.wp-block-pullquote cite,.wp-block-pullquote footer{position:relative}.wp-block-pullquote .has-text-color a{color:inherit}.wp-block-pullquote.has-text-align-left blockquote{text-align:left}.wp-block-pullquote.has-text-align-right blockquote{text-align:right}.wp-block-pullquote.has-text-align-center blockquote{text-align:center}.wp-block-pullquote.is-style-solid-color{border:none}.wp-block-pullquote.is-style-solid-color blockquote{margin-left:auto;margin-right:auto;max-width:60%}.wp-block-pullquote.is-style-solid-color blockquote p{font-size:2em;margin-bottom:0;margin-top:0}.wp-block-pullquote.is-style-solid-color blockquote cite{font-style:normal;text-transform:none}.wp-block-pullquote cite{color:inherit;display:block} pullquote/editor-rtl.css 0000644 00000000407 15025144027 0011376 0 ustar 00 .wp-block-pullquote.is-style-solid-color blockquote p{
font-size:32px;
}
.wp-block-pullquote.is-style-solid-color .wp-block-pullquote__citation{
font-style:normal;
text-transform:none;
}
.wp-block-pullquote .wp-block-pullquote__citation{
color:inherit;
} pullquote/editor-rtl.min.css 0000644 00000000362 15025144027 0012160 0 ustar 00 .wp-block-pullquote.is-style-solid-color blockquote p{font-size:32px}.wp-block-pullquote.is-style-solid-color .wp-block-pullquote__citation{font-style:normal;text-transform:none}.wp-block-pullquote .wp-block-pullquote__citation{color:inherit} post-terms/style-rtl.css 0000644 00000000200 15025144027 0011322 0 ustar 00 .wp-block-post-terms{
box-sizing:border-box;
}
.wp-block-post-terms .wp-block-post-terms__separator{
white-space:pre-wrap;
} post-terms/style-rtl.min.css 0000644 00000000165 15025144027 0012116 0 ustar 00 .wp-block-post-terms{box-sizing:border-box}.wp-block-post-terms .wp-block-post-terms__separator{white-space:pre-wrap} post-terms/block.json 0000644 00000002723 15025144027 0010652 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-terms",
"title": "Post Terms",
"category": "theme",
"description": "Post terms.",
"textdomain": "default",
"attributes": {
"term": {
"type": "string"
},
"textAlign": {
"type": "string"
},
"separator": {
"type": "string",
"default": ", "
},
"prefix": {
"type": "string",
"default": ""
},
"suffix": {
"type": "string",
"default": ""
}
},
"usesContext": [ "postId", "postType" ],
"example": {
"viewportWidth": 350
},
"supports": {
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"spacing": {
"margin": true,
"padding": 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-terms"
}
post-terms/style.css 0000644 00000000200 15025144027 0010523 0 ustar 00 .wp-block-post-terms{
box-sizing:border-box;
}
.wp-block-post-terms .wp-block-post-terms__separator{
white-space:pre-wrap;
} post-terms/style.min.css 0000644 00000000165 15025144027 0011317 0 ustar 00 .wp-block-post-terms{box-sizing:border-box}.wp-block-post-terms .wp-block-post-terms__separator{white-space:pre-wrap} tag-cloud.php 0000644 00000003066 15025144027 0007141 0 ustar 00 [a-z%]+)$/i', $smallest_font_size, $m ) ? $m['unit'] : 'pt' );
$args = array(
'echo' => false,
'unit' => $unit,
'taxonomy' => $attributes['taxonomy'],
'show_count' => $attributes['showTagCounts'],
'number' => $attributes['numberOfTags'],
'smallest' => floatVal( $attributes['smallestFontSize'] ),
'largest' => floatVal( $attributes['largestFontSize'] ),
);
$tag_cloud = wp_tag_cloud( $args );
if ( empty( $tag_cloud ) ) {
// Display placeholder content when there are no tags only in editor.
if ( wp_is_serving_rest_request() ) {
$tag_cloud = __( 'There’s no content to show here yet.' );
} else {
return '';
}
}
$wrapper_attributes = get_block_wrapper_attributes();
return sprintf(
'
%2$s
',
$wrapper_attributes,
$tag_cloud
);
}
/**
* Registers the `core/tag-cloud` block on server.
*
* @since 5.2.0
*/
function register_block_core_tag_cloud() {
register_block_type_from_metadata(
__DIR__ . '/tag-cloud',
array(
'render_callback' => 'render_block_core_tag_cloud',
)
);
}
add_action( 'init', 'register_block_core_tag_cloud' );
comment-edit-link/style-rtl.css 0000644 00000000067 15025144027 0012540 0 ustar 00 .wp-block-comment-edit-link{
box-sizing:border-box;
} comment-edit-link/style-rtl.min.css 0000644 00000000062 15025144027 0013315 0 ustar 00 .wp-block-comment-edit-link{box-sizing:border-box} comment-edit-link/block.json 0000644 00000002644 15025144027 0012057 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/comment-edit-link",
"title": "Comment Edit Link",
"category": "theme",
"ancestor": [ "core/comment-template" ],
"description": "Displays a link to edit the comment in the WordPress Dashboard. This link is only visible to users with the edit comment capability.",
"textdomain": "default",
"usesContext": [ "commentId" ],
"attributes": {
"linkTarget": {
"type": "string",
"default": "_self"
},
"textAlign": {
"type": "string"
}
},
"supports": {
"html": false,
"color": {
"link": true,
"gradients": true,
"text": false,
"__experimentalDefaultControls": {
"background": 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
}
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"style": "wp-block-comment-edit-link"
}
comment-edit-link/style.css 0000644 00000000067 15025144027 0011741 0 ustar 00 .wp-block-comment-edit-link{
box-sizing:border-box;
} comment-edit-link/style.min.css 0000644 00000000062 15025144027 0012516 0 ustar 00 .wp-block-comment-edit-link{box-sizing:border-box} text-columns/editor.min.css 0000644 00000000126 15025144027 0011767 0 ustar 00 .wp-block-text-columns .block-editor-rich-text__editable:focus{outline:1px solid #ddd} text-columns/editor.css 0000644 00000000133 15025144027 0011203 0 ustar 00 .wp-block-text-columns .block-editor-rich-text__editable:focus{
outline:1px solid #ddd;
} text-columns/style-rtl.css 0000644 00000000765 15025144027 0011667 0 ustar 00 .wp-block-text-columns,.wp-block-text-columns.aligncenter{
display:flex;
}
.wp-block-text-columns .wp-block-column{
margin:0 1em;
padding:0;
}
.wp-block-text-columns .wp-block-column:first-child{
margin-right:0;
}
.wp-block-text-columns .wp-block-column:last-child{
margin-left:0;
}
.wp-block-text-columns.columns-2 .wp-block-column{
width:50%;
}
.wp-block-text-columns.columns-3 .wp-block-column{
width:33.3333333333%;
}
.wp-block-text-columns.columns-4 .wp-block-column{
width:25%;
} text-columns/style-rtl.min.css 0000644 00000000711 15025144027 0012440 0 ustar 00 .wp-block-text-columns,.wp-block-text-columns.aligncenter{display:flex}.wp-block-text-columns .wp-block-column{margin:0 1em;padding:0}.wp-block-text-columns .wp-block-column:first-child{margin-right:0}.wp-block-text-columns .wp-block-column:last-child{margin-left:0}.wp-block-text-columns.columns-2 .wp-block-column{width:50%}.wp-block-text-columns.columns-3 .wp-block-column{width:33.3333333333%}.wp-block-text-columns.columns-4 .wp-block-column{width:25%} text-columns/block.json 0000644 00000001420 15025144027 0011170 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/text-columns",
"title": "Text Columns (deprecated)",
"icon": "columns",
"category": "design",
"description": "This block is deprecated. Please use the Columns block instead.",
"textdomain": "default",
"attributes": {
"content": {
"type": "array",
"source": "query",
"selector": "p",
"query": {
"children": {
"type": "string",
"source": "html"
}
},
"default": [ {}, {} ]
},
"columns": {
"type": "number",
"default": 2
},
"width": {
"type": "string"
}
},
"supports": {
"inserter": false,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-text-columns-editor",
"style": "wp-block-text-columns"
}
text-columns/style.css 0000644 00000000765 15025144027 0011070 0 ustar 00 .wp-block-text-columns,.wp-block-text-columns.aligncenter{
display:flex;
}
.wp-block-text-columns .wp-block-column{
margin:0 1em;
padding:0;
}
.wp-block-text-columns .wp-block-column:first-child{
margin-left:0;
}
.wp-block-text-columns .wp-block-column:last-child{
margin-right:0;
}
.wp-block-text-columns.columns-2 .wp-block-column{
width:50%;
}
.wp-block-text-columns.columns-3 .wp-block-column{
width:33.3333333333%;
}
.wp-block-text-columns.columns-4 .wp-block-column{
width:25%;
} text-columns/style.min.css 0000644 00000000711 15025144027 0011641 0 ustar 00 .wp-block-text-columns,.wp-block-text-columns.aligncenter{display:flex}.wp-block-text-columns .wp-block-column{margin:0 1em;padding:0}.wp-block-text-columns .wp-block-column:first-child{margin-left:0}.wp-block-text-columns .wp-block-column:last-child{margin-right:0}.wp-block-text-columns.columns-2 .wp-block-column{width:50%}.wp-block-text-columns.columns-3 .wp-block-column{width:33.3333333333%}.wp-block-text-columns.columns-4 .wp-block-column{width:25%} text-columns/editor-rtl.css 0000644 00000000133 15025144027 0012002 0 ustar 00 .wp-block-text-columns .block-editor-rich-text__editable:focus{
outline:1px solid #ddd;
} text-columns/editor-rtl.min.css 0000644 00000000126 15025144027 0012566 0 ustar 00 .wp-block-text-columns .block-editor-rich-text__editable:focus{outline:1px solid #ddd} page-list-item.php 0000644 00000000551 15025144027 0010077 0 ustar 00 li",
"border": ".wp-block-list:not(.wp-block-list .wp-block-list) > li"
}
}
post-author-biography/style-rtl.css 0000644 00000000073 15025144027 0013464 0 ustar 00 .wp-block-post-author-biography{
box-sizing:border-box;
} post-author-biography/style-rtl.min.css 0000644 00000000066 15025144027 0014250 0 ustar 00 .wp-block-post-author-biography{box-sizing:border-box} post-author-biography/block.json 0000644 00000002401 15025144027 0012775 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.css 0000644 00000000073 15025144027 0012665 0 ustar 00 .wp-block-post-author-biography{
box-sizing:border-box;
} post-author-biography/style.min.css 0000644 00000000066 15025144027 0013451 0 ustar 00 .wp-block-post-author-biography{box-sizing:border-box} more/editor.min.css 0000644 00000001333 15025144027 0010270 0 ustar 00 .block-editor-block-list__block[data-type="core/more"]{margin-bottom:28px;margin-top:28px;max-width:100%;text-align:center}.wp-block-more{display:block;text-align:center;white-space:nowrap}.wp-block-more input[type=text]{background:#fff;border:none;border-radius:4px;box-shadow:none;color:#757575;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;height:24px;margin:0;max-width:100%;padding:6px 8px;position:relative;text-align:center;text-transform:uppercase;white-space:nowrap}.wp-block-more input[type=text]:focus{box-shadow:none}.wp-block-more:before{border-top:3px dashed #ccc;content:"";left:0;position:absolute;right:0;top:50%} more/editor.css 0000644 00000001504 15025144027 0007506 0 ustar 00 .block-editor-block-list__block[data-type="core/more"]{
margin-bottom:28px;
margin-top:28px;
max-width:100%;
text-align:center;
}
.wp-block-more{
display:block;
text-align:center;
white-space:nowrap;
}
.wp-block-more input[type=text]{
background:#fff;
border:none;
border-radius:4px;
box-shadow:none;
color:#757575;
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-size:13px;
font-weight:600;
height:24px;
margin:0;
max-width:100%;
padding:6px 8px;
position:relative;
text-align:center;
text-transform:uppercase;
white-space:nowrap;
}
.wp-block-more input[type=text]:focus{
box-shadow:none;
}
.wp-block-more:before{
border-top:3px dashed #ccc;
content:"";
left:0;
position:absolute;
right:0;
top:50%;
} more/block.json 0000644 00000001174 15025144027 0007476 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/more",
"title": "More",
"category": "design",
"description": "Content before this block will be shown in the excerpt on your archives page.",
"keywords": [ "read more" ],
"textdomain": "default",
"attributes": {
"customText": {
"type": "string",
"default": ""
},
"noTeaser": {
"type": "boolean",
"default": false
}
},
"supports": {
"customClassName": false,
"className": false,
"html": false,
"multiple": false,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-more-editor"
}
more/editor-rtl.css 0000644 00000001504 15025144027 0010305 0 ustar 00 .block-editor-block-list__block[data-type="core/more"]{
margin-bottom:28px;
margin-top:28px;
max-width:100%;
text-align:center;
}
.wp-block-more{
display:block;
text-align:center;
white-space:nowrap;
}
.wp-block-more input[type=text]{
background:#fff;
border:none;
border-radius:4px;
box-shadow:none;
color:#757575;
font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-size:13px;
font-weight:600;
height:24px;
margin:0;
max-width:100%;
padding:6px 8px;
position:relative;
text-align:center;
text-transform:uppercase;
white-space:nowrap;
}
.wp-block-more input[type=text]:focus{
box-shadow:none;
}
.wp-block-more:before{
border-top:3px dashed #ccc;
content:"";
left:0;
position:absolute;
right:0;
top:50%;
} more/editor-rtl.min.css 0000644 00000001333 15025144027 0011067 0 ustar 00 .block-editor-block-list__block[data-type="core/more"]{margin-bottom:28px;margin-top:28px;max-width:100%;text-align:center}.wp-block-more{display:block;text-align:center;white-space:nowrap}.wp-block-more input[type=text]{background:#fff;border:none;border-radius:4px;box-shadow:none;color:#757575;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;font-weight:600;height:24px;margin:0;max-width:100%;padding:6px 8px;position:relative;text-align:center;text-transform:uppercase;white-space:nowrap}.wp-block-more input[type=text]:focus{box-shadow:none}.wp-block-more:before{border-top:3px dashed #ccc;content:"";left:0;position:absolute;right:0;top:50%} site-logo.php 0000644 00000014276 15025144027 0007171 0 ustar 00 (.*?)#i', '\1', $custom_logo );
}
if ( $attributes['isLink'] && '_blank' === $attributes['linkTarget'] ) {
// Add the link target after the rel="home".
// Add an aria-label for informing that the page opens in a new tab.
$processor = new WP_HTML_Tag_Processor( $custom_logo );
$processor->next_tag( 'a' );
if ( 'home' === $processor->get_attribute( 'rel' ) ) {
$processor->set_attribute( 'aria-label', __( '(Home link, opens in a new tab)' ) );
$processor->set_attribute( 'target', $attributes['linkTarget'] );
}
$custom_logo = $processor->get_updated_html();
}
$classnames = array();
if ( empty( $attributes['width'] ) ) {
$classnames[] = 'is-default-size';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) );
$html = sprintf( '
%s
', $wrapper_attributes, $custom_logo );
return $html;
}
/**
* Register a core site setting for a site logo
*
* @since 5.8.0
*/
function register_block_core_site_logo_setting() {
register_setting(
'general',
'site_logo',
array(
'show_in_rest' => array(
'name' => 'site_logo',
),
'type' => 'integer',
'label' => __( 'Logo' ),
'description' => __( 'Site logo.' ),
)
);
}
add_action( 'rest_api_init', 'register_block_core_site_logo_setting', 10 );
/**
* Register a core site setting for a site icon
*
* @since 5.9.0
*/
function register_block_core_site_icon_setting() {
register_setting(
'general',
'site_icon',
array(
'show_in_rest' => true,
'type' => 'integer',
'label' => __( 'Icon' ),
'description' => __( 'Site icon.' ),
)
);
}
add_action( 'rest_api_init', 'register_block_core_site_icon_setting', 10 );
/**
* Registers the `core/site-logo` block on the server.
*
* @since 5.8.0
*/
function register_block_core_site_logo() {
register_block_type_from_metadata(
__DIR__ . '/site-logo',
array(
'render_callback' => 'render_block_core_site_logo',
)
);
}
add_action( 'init', 'register_block_core_site_logo' );
/**
* Overrides the custom logo with a site logo, if the option is set.
*
* @since 5.8.0
*
* @param string $custom_logo The custom logo set by a theme.
*
* @return string The site logo if set.
*/
function _override_custom_logo_theme_mod( $custom_logo ) {
$site_logo = get_option( 'site_logo' );
return false === $site_logo ? $custom_logo : $site_logo;
}
add_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod' );
/**
* Updates the site_logo option when the custom_logo theme-mod gets updated.
*
* @since 5.8.0
*
* @param mixed $value Attachment ID of the custom logo or an empty value.
* @return mixed
*/
function _sync_custom_logo_to_site_logo( $value ) {
if ( empty( $value ) ) {
delete_option( 'site_logo' );
} else {
update_option( 'site_logo', $value );
}
return $value;
}
add_filter( 'pre_set_theme_mod_custom_logo', '_sync_custom_logo_to_site_logo' );
/**
* Deletes the site_logo when the custom_logo theme mod is removed.
*
* @since 5.8.0
*
* @global array $_ignore_site_logo_changes
*
* @param array $old_value Previous theme mod settings.
* @param array $value Updated theme mod settings.
*/
function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
global $_ignore_site_logo_changes;
if ( $_ignore_site_logo_changes ) {
return;
}
// If the custom_logo is being unset, it's being removed from theme mods.
if ( isset( $old_value['custom_logo'] ) && ! isset( $value['custom_logo'] ) ) {
delete_option( 'site_logo' );
}
}
/**
* Deletes the site logo when all theme mods are being removed.
*
* @since 5.8.0
*
* @global array $_ignore_site_logo_changes
*/
function _delete_site_logo_on_remove_theme_mods() {
global $_ignore_site_logo_changes;
if ( $_ignore_site_logo_changes ) {
return;
}
if ( false !== get_theme_support( 'custom-logo' ) ) {
delete_option( 'site_logo' );
}
}
/**
* Hooks `_delete_site_logo_on_remove_custom_logo` in `update_option_theme_mods_$theme`.
* Hooks `_delete_site_logo_on_remove_theme_mods` in `delete_option_theme_mods_$theme`.
*
* Runs on `setup_theme` to account for dynamically-switched themes in the Customizer.
*
* @since 5.8.0
*/
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
$theme = get_option( 'stylesheet' );
add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 );
add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
}
add_action( 'setup_theme', '_delete_site_logo_on_remove_custom_logo_on_setup_theme', 11 );
/**
* Removes the custom_logo theme-mod when the site_logo option gets deleted.
*
* @since 5.9.0
*
* @global array $_ignore_site_logo_changes
*/
function _delete_custom_logo_on_remove_site_logo() {
global $_ignore_site_logo_changes;
// Prevent _delete_site_logo_on_remove_custom_logo and
// _delete_site_logo_on_remove_theme_mods from firing and causing an
// infinite loop.
$_ignore_site_logo_changes = true;
// Remove the custom logo.
remove_theme_mod( 'custom_logo' );
$_ignore_site_logo_changes = false;
}
add_action( 'delete_option_site_logo', '_delete_custom_logo_on_remove_site_logo' );
post-excerpt.php 0000644 00000006567 15025144027 0007730 0 ustar 00 context['postId'] ) ) {
return '';
}
/*
* The purpose of the excerpt length setting is to limit the length of both
* automatically generated and user-created excerpts.
* Because the excerpt_length filter only applies to auto generated excerpts,
* wp_trim_words is used instead.
*/
$excerpt_length = $attributes['excerptLength'];
$excerpt = get_the_excerpt( $block->context['postId'] );
if ( isset( $excerpt_length ) ) {
$excerpt = wp_trim_words( $excerpt, $excerpt_length );
}
$more_text = ! empty( $attributes['moreText'] ) ? '
' . wp_kses_post( $attributes['moreText'] ) . ' ' : '';
$filter_excerpt_more = static function ( $more ) use ( $more_text ) {
return empty( $more_text ) ? $more : '';
};
/**
* Some themes might use `excerpt_more` filter to handle the
* `more` link displayed after a trimmed excerpt. Since the
* block has a `more text` attribute we have to check and
* override if needed the return value from this filter.
* So if the block's attribute is not empty override the
* `excerpt_more` filter and return nothing. This will
* result in showing only one `read more` link at a time.
*/
add_filter( 'excerpt_more', $filter_excerpt_more );
$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 ) ) );
$content = '
' . $excerpt;
$show_more_on_new_line = ! isset( $attributes['showMoreOnNewLine'] ) || $attributes['showMoreOnNewLine'];
if ( $show_more_on_new_line && ! empty( $more_text ) ) {
$content .= '
' . $more_text . '
';
} else {
$content .= " $more_text";
}
remove_filter( 'excerpt_more', $filter_excerpt_more );
return sprintf( '
%2$s
', $wrapper_attributes, $content );
}
/**
* Registers the `core/post-excerpt` block on the server.
*
* @since 5.8.0
*/
function register_block_core_post_excerpt() {
register_block_type_from_metadata(
__DIR__ . '/post-excerpt',
array(
'render_callback' => 'render_block_core_post_excerpt',
)
);
}
add_action( 'init', 'register_block_core_post_excerpt' );
/**
* If themes or plugins filter the excerpt_length, we need to
* override the filter in the editor, otherwise
* the excerpt length block setting has no effect.
* Returns 100 because 100 is the max length in the setting.
*/
if ( is_admin() ||
defined( 'REST_REQUEST' ) && REST_REQUEST ) {
add_filter(
'excerpt_length',
static function () {
return 100;
},
PHP_INT_MAX
);
}
table/theme-rtl.css 0000644 00000000405 15025144027 0010245 0 ustar 00 .wp-block-table{
margin:0 0 1em;
}
.wp-block-table td,.wp-block-table th{
word-break:normal;
}
.wp-block-table :where(figcaption){
color:#555;
font-size:13px;
text-align:center;
}
.is-dark-theme .wp-block-table :where(figcaption){
color:#ffffffa6;
} table/theme.min.css 0000644 00000000350 15025144027 0010227 0 ustar 00 .wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table :where(figcaption){color:#ffffffa6} table/editor.min.css 0000644 00000002727 15025144027 0010425 0 ustar 00 .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px} table/editor.css 0000644 00000003071 15025144027 0007634 0 ustar 00 .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{
height:auto;
}
.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{
width:auto;
}
.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{
word-break:break-word;
}
.wp-block[data-align=center]>.wp-block-table{
text-align:initial;
}
.wp-block[data-align=center]>.wp-block-table table{
margin:0 auto;
}
.wp-block-table td,.wp-block-table th{
border:1px solid;
padding:.5em;
}
.wp-block-table td.is-selected,.wp-block-table th.is-selected{
border-color:var(--wp-admin-theme-color);
border-style:double;
box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);
}
.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{
border:1px solid;
}
.blocks-table__placeholder-form.blocks-table__placeholder-form{
align-items:flex-start;
display:flex;
flex-direction:column;
gap:8px;
}
@media (min-width:782px){
.blocks-table__placeholder-form.blocks-table__placeholder-form{
align-items:flex-end;
flex-direction:row;
}
}
.blocks-table__placeholder-input{
width:112px;
} table/theme-rtl.min.css 0000644 00000000350 15025144027 0011026 0 ustar 00 .wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table :where(figcaption){color:#ffffffa6} table/style-rtl.css 0000644 00000007724 15025144027 0010316 0 ustar 00 .wp-block-table{
overflow-x:auto;
}
.wp-block-table table{
border-collapse:collapse;
width:100%;
}
.wp-block-table thead{
border-bottom:3px solid;
}
.wp-block-table tfoot{
border-top:3px solid;
}
.wp-block-table td,.wp-block-table th{
border:1px solid;
padding:.5em;
}
.wp-block-table .has-fixed-layout{
table-layout:fixed;
width:100%;
}
.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{
word-break:break-word;
}
.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{
display:table;
width:auto;
}
.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{
word-break:break-word;
}
.wp-block-table .has-subtle-light-gray-background-color{
background-color:#f3f4f5;
}
.wp-block-table .has-subtle-pale-green-background-color{
background-color:#e9fbe5;
}
.wp-block-table .has-subtle-pale-blue-background-color{
background-color:#e7f5fe;
}
.wp-block-table .has-subtle-pale-pink-background-color{
background-color:#fcf0ef;
}
.wp-block-table.is-style-stripes{
background-color:initial;
border-bottom:1px solid #f0f0f0;
border-collapse:inherit;
border-spacing:0;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd){
background-color:#f0f0f0;
}
.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){
background-color:#f3f4f5;
}
.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){
background-color:#e9fbe5;
}
.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){
background-color:#e7f5fe;
}
.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){
background-color:#fcf0ef;
}
.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{
border-color:#0000;
}
.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{
border-color:inherit;
}
.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{
border-top-color:inherit;
}
.wp-block-table table[style*=border-top-color] tr:not(:first-child){
border-top-color:initial;
}
.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{
border-left-color:inherit;
}
.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{
border-bottom-color:inherit;
}
.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){
border-bottom-color:initial;
}
.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{
border-right-color:inherit;
}
.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{
border-style:inherit;
}
.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{
border-style:inherit;
border-width:inherit;
} table/theme.css 0000644 00000000405 15025144027 0007446 0 ustar 00 .wp-block-table{
margin:0 0 1em;
}
.wp-block-table td,.wp-block-table th{
word-break:normal;
}
.wp-block-table :where(figcaption){
color:#555;
font-size:13px;
text-align:center;
}
.is-dark-theme .wp-block-table :where(figcaption){
color:#ffffffa6;
} table/style-rtl.min.css 0000644 00000007417 15025144027 0011077 0 ustar 00 .wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} table/block.json 0000644 00000010470 15025144027 0007622 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/table",
"title": "Table",
"category": "text",
"description": "Create structured content in rows and columns to display information.",
"textdomain": "default",
"attributes": {
"hasFixedLayout": {
"type": "boolean",
"default": true
},
"caption": {
"type": "rich-text",
"source": "rich-text",
"selector": "figcaption"
},
"head": {
"type": "array",
"default": [],
"source": "query",
"selector": "thead tr",
"query": {
"cells": {
"type": "array",
"default": [],
"source": "query",
"selector": "td,th",
"query": {
"content": {
"type": "rich-text",
"source": "rich-text"
},
"tag": {
"type": "string",
"default": "td",
"source": "tag"
},
"scope": {
"type": "string",
"source": "attribute",
"attribute": "scope"
},
"align": {
"type": "string",
"source": "attribute",
"attribute": "data-align"
},
"colspan": {
"type": "string",
"source": "attribute",
"attribute": "colspan"
},
"rowspan": {
"type": "string",
"source": "attribute",
"attribute": "rowspan"
}
}
}
}
},
"body": {
"type": "array",
"default": [],
"source": "query",
"selector": "tbody tr",
"query": {
"cells": {
"type": "array",
"default": [],
"source": "query",
"selector": "td,th",
"query": {
"content": {
"type": "rich-text",
"source": "rich-text"
},
"tag": {
"type": "string",
"default": "td",
"source": "tag"
},
"scope": {
"type": "string",
"source": "attribute",
"attribute": "scope"
},
"align": {
"type": "string",
"source": "attribute",
"attribute": "data-align"
},
"colspan": {
"type": "string",
"source": "attribute",
"attribute": "colspan"
},
"rowspan": {
"type": "string",
"source": "attribute",
"attribute": "rowspan"
}
}
}
}
},
"foot": {
"type": "array",
"default": [],
"source": "query",
"selector": "tfoot tr",
"query": {
"cells": {
"type": "array",
"default": [],
"source": "query",
"selector": "td,th",
"query": {
"content": {
"type": "rich-text",
"source": "rich-text"
},
"tag": {
"type": "string",
"default": "td",
"source": "tag"
},
"scope": {
"type": "string",
"source": "attribute",
"attribute": "scope"
},
"align": {
"type": "string",
"source": "attribute",
"attribute": "data-align"
},
"colspan": {
"type": "string",
"source": "attribute",
"attribute": "colspan"
},
"rowspan": {
"type": "string",
"source": "attribute",
"attribute": "rowspan"
}
}
}
}
}
},
"supports": {
"anchor": true,
"align": true,
"color": {
"__experimentalSkipSerialization": true,
"gradients": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalBorder": {
"__experimentalSkipSerialization": true,
"color": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"style": true,
"width": true
}
},
"interactivity": {
"clientNavigation": true
}
},
"selectors": {
"root": ".wp-block-table > table",
"spacing": ".wp-block-table"
},
"styles": [
{
"name": "regular",
"label": "Default",
"isDefault": true
},
{ "name": "stripes", "label": "Stripes" }
],
"editorStyle": "wp-block-table-editor",
"style": "wp-block-table"
}
table/style.css 0000644 00000007724 15025144027 0007517 0 ustar 00 .wp-block-table{
overflow-x:auto;
}
.wp-block-table table{
border-collapse:collapse;
width:100%;
}
.wp-block-table thead{
border-bottom:3px solid;
}
.wp-block-table tfoot{
border-top:3px solid;
}
.wp-block-table td,.wp-block-table th{
border:1px solid;
padding:.5em;
}
.wp-block-table .has-fixed-layout{
table-layout:fixed;
width:100%;
}
.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{
word-break:break-word;
}
.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{
display:table;
width:auto;
}
.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{
word-break:break-word;
}
.wp-block-table .has-subtle-light-gray-background-color{
background-color:#f3f4f5;
}
.wp-block-table .has-subtle-pale-green-background-color{
background-color:#e9fbe5;
}
.wp-block-table .has-subtle-pale-blue-background-color{
background-color:#e7f5fe;
}
.wp-block-table .has-subtle-pale-pink-background-color{
background-color:#fcf0ef;
}
.wp-block-table.is-style-stripes{
background-color:initial;
border-bottom:1px solid #f0f0f0;
border-collapse:inherit;
border-spacing:0;
}
.wp-block-table.is-style-stripes tbody tr:nth-child(odd){
background-color:#f0f0f0;
}
.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){
background-color:#f3f4f5;
}
.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){
background-color:#e9fbe5;
}
.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){
background-color:#e7f5fe;
}
.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){
background-color:#fcf0ef;
}
.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{
border-color:#0000;
}
.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{
border-color:inherit;
}
.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{
border-top-color:inherit;
}
.wp-block-table table[style*=border-top-color] tr:not(:first-child){
border-top-color:initial;
}
.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{
border-right-color:inherit;
}
.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{
border-bottom-color:inherit;
}
.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){
border-bottom-color:initial;
}
.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{
border-left-color:inherit;
}
.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{
border-style:inherit;
}
.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{
border-style:inherit;
border-width:inherit;
} table/style.min.css 0000644 00000007417 15025144027 0010300 0 ustar 00 .wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit} table/editor-rtl.css 0000644 00000003071 15025144027 0010433 0 ustar 00 .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{
height:auto;
}
.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{
width:auto;
}
.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{
word-break:break-word;
}
.wp-block[data-align=center]>.wp-block-table{
text-align:initial;
}
.wp-block[data-align=center]>.wp-block-table table{
margin:0 auto;
}
.wp-block-table td,.wp-block-table th{
border:1px solid;
padding:.5em;
}
.wp-block-table td.is-selected,.wp-block-table th.is-selected{
border-color:var(--wp-admin-theme-color);
border-style:double;
box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color);
}
.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{
border:1px solid;
}
.blocks-table__placeholder-form.blocks-table__placeholder-form{
align-items:flex-start;
display:flex;
flex-direction:column;
gap:8px;
}
@media (min-width:782px){
.blocks-table__placeholder-form.blocks-table__placeholder-form{
align-items:flex-end;
flex-direction:row;
}
}
.blocks-table__placeholder-input{
width:112px;
} table/editor-rtl.min.css 0000644 00000002727 15025144027 0011224 0 ustar 00 .wp-block[data-align=center]>.wp-block-table,.wp-block[data-align=left]>.wp-block-table,.wp-block[data-align=right]>.wp-block-table{height:auto}.wp-block[data-align=center]>.wp-block-table table,.wp-block[data-align=left]>.wp-block-table table,.wp-block[data-align=right]>.wp-block-table table{width:auto}.wp-block[data-align=center]>.wp-block-table td,.wp-block[data-align=center]>.wp-block-table th,.wp-block[data-align=left]>.wp-block-table td,.wp-block[data-align=left]>.wp-block-table th,.wp-block[data-align=right]>.wp-block-table td,.wp-block[data-align=right]>.wp-block-table th{word-break:break-word}.wp-block[data-align=center]>.wp-block-table{text-align:initial}.wp-block[data-align=center]>.wp-block-table table{margin:0 auto}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table td.is-selected,.wp-block-table th.is-selected{border-color:var(--wp-admin-theme-color);border-style:double;box-shadow:inset 0 0 0 1px var(--wp-admin-theme-color)}.wp-block-table table.has-individual-borders td,.wp-block-table table.has-individual-borders th,.wp-block-table table.has-individual-borders tr,.wp-block-table table.has-individual-borders>*{border:1px solid}.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-start;display:flex;flex-direction:column;gap:8px}@media (min-width:782px){.blocks-table__placeholder-form.blocks-table__placeholder-form{align-items:flex-end;flex-direction:row}}.blocks-table__placeholder-input{width:112px} file.php 0000644 00000003401 15025144027 0006172 0 ustar 00 next_tag();
$processor->set_attribute( 'data-wp-interactive', 'core/file' );
$processor->next_tag( 'object' );
$processor->set_attribute( 'data-wp-bind--hidden', '!state.hasPdfPreview' );
$processor->set_attribute( 'hidden', true );
$filename = $processor->get_attribute( 'aria-label' );
$has_filename = ! empty( $filename ) && 'PDF embed' !== $filename;
$label = $has_filename ? sprintf(
/* translators: %s: filename. */
__( 'Embed of %s.' ),
$filename
) : __( 'PDF embed' );
// Update object's aria-label attribute if present in block HTML.
// Match an aria-label attribute from an object tag.
$processor->set_attribute( 'aria-label', $label );
return $processor->get_updated_html();
}
return $content;
}
/**
* Registers the `core/file` block on server.
*
* @since 5.8.0
*/
function register_block_core_file() {
register_block_type_from_metadata(
__DIR__ . '/file',
array(
'render_callback' => 'render_block_core_file',
)
);
}
add_action( 'init', 'register_block_core_file' );
query-no-results.php 0000644 00000003467 15025144027 0010545 0 ustar 00 context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
// Override the custom query with the global query if needed.
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
if ( $use_global_query ) {
global $wp_query;
$query = $wp_query;
} else {
$query_args = build_query_vars_from_query_block( $block, $page );
$query = new WP_Query( $query_args );
}
if ( $query->post_count > 0 ) {
return '';
}
$classes = ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) ? 'has-link-color' : '';
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
return sprintf(
'
%2$s
',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/query-no-results` block on the server.
*
* @since 6.0.0
*/
function register_block_core_query_no_results() {
register_block_type_from_metadata(
__DIR__ . '/query-no-results',
array(
'render_callback' => 'render_block_core_query_no_results',
)
);
}
add_action( 'init', 'register_block_core_query_no_results' );
paragraph/editor.min.css 0000644 00000001314 15025144027 0011272 0 ustar 00 .block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{min-height:auto!important}.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:1}.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{opacity:0}.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:0} paragraph/editor.css 0000644 00000001356 15025144027 0010516 0 ustar 00 .block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{
min-height:auto !important;
}
.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{
opacity:1;
}
.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{
opacity:0;
}
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{
rotate:180deg;
}
.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{
opacity:0;
} paragraph/style-rtl.css 0000644 00000001352 15025144027 0011163 0 ustar 00 .is-small-text{
font-size:.875em;
}
.is-regular-text{
font-size:1em;
}
.is-large-text{
font-size:2.25em;
}
.is-larger-text{
font-size:3em;
}
.has-drop-cap:not(:focus):first-letter{
float:right;
font-size:8.4em;
font-style:normal;
font-weight:100;
line-height:.68;
margin:.05em 0 0 .1em;
text-transform:uppercase;
}
body.rtl .has-drop-cap:not(:focus):first-letter{
float:none;
margin-right:.1em;
}
p.has-drop-cap.has-background{
overflow:hidden;
}
:root :where(p.has-background){
padding:1.25em 2.375em;
}
:where(p.has-text-color:not(.has-link-color)) a{
color:inherit;
}
p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{
rotate:180deg;
} paragraph/style-rtl.min.css 0000644 00000001221 15025144027 0011740 0 ustar 00 .is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:right;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em 0 0 .1em;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-right:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg} paragraph/block.json 0000644 00000003227 15025144027 0010502 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/paragraph",
"title": "Paragraph",
"category": "text",
"description": "Start with the basic building block of all narrative.",
"keywords": [ "text" ],
"textdomain": "default",
"attributes": {
"align": {
"type": "string"
},
"content": {
"type": "rich-text",
"source": "rich-text",
"selector": "p",
"role": "content"
},
"dropCap": {
"type": "boolean",
"default": false
},
"placeholder": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [ "ltr", "rtl" ]
}
},
"supports": {
"splitting": true,
"anchor": true,
"className": false,
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"spacing": {
"margin": true,
"padding": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalTextDecoration": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalTextTransform": true,
"__experimentalWritingMode": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"__experimentalSelector": "p",
"__unstablePasteTextInline": true,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-paragraph-editor",
"style": "wp-block-paragraph"
}
paragraph/style.css 0000644 00000001350 15025144027 0010362 0 ustar 00 .is-small-text{
font-size:.875em;
}
.is-regular-text{
font-size:1em;
}
.is-large-text{
font-size:2.25em;
}
.is-larger-text{
font-size:3em;
}
.has-drop-cap:not(:focus):first-letter{
float:left;
font-size:8.4em;
font-style:normal;
font-weight:100;
line-height:.68;
margin:.05em .1em 0 0;
text-transform:uppercase;
}
body.rtl .has-drop-cap:not(:focus):first-letter{
float:none;
margin-left:.1em;
}
p.has-drop-cap.has-background{
overflow:hidden;
}
:root :where(p.has-background){
padding:1.25em 2.375em;
}
:where(p.has-text-color:not(.has-link-color)) a{
color:inherit;
}
p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{
rotate:180deg;
} paragraph/style.min.css 0000644 00000001217 15025144027 0011146 0 ustar 00 .is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:left;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em .1em 0 0;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-left:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg} paragraph/editor-rtl.css 0000644 00000001356 15025144027 0011315 0 ustar 00 .block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{
min-height:auto !important;
}
.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{
opacity:1;
}
.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{
opacity:0;
}
.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{
rotate:180deg;
}
.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{
opacity:0;
} paragraph/editor-rtl.min.css 0000644 00000001314 15025144027 0012071 0 ustar 00 .block-editor-block-list__block[data-type="core/paragraph"].has-drop-cap:focus{min-height:auto!important}.block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:1}.block-editor-block-list__block[data-empty=true]+.block-editor-block-list__block[data-empty=true]:not([data-custom-placeholder=true]) [data-rich-text-placeholder]{opacity:0}.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-left[style*="writing-mode: vertical-lr"],.block-editor-block-list__block[data-type="core/paragraph"].has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.is-zoomed-out .block-editor-block-list__block[data-empty=true] [data-rich-text-placeholder]{opacity:0} post-template.php 0000644 00000013165 15025144027 0010061 0 ustar 00 name ) {
return true;
}
if (
'core/cover' === $block->name &&
! empty( $block->attributes['useFeaturedImage'] )
) {
return true;
}
if ( $block->inner_blocks && block_core_post_template_uses_featured_image( $block->inner_blocks ) ) {
return true;
}
}
return false;
}
/**
* Renders the `core/post-template` block on the server.
*
* @since 6.3.0 Changed render_block_context priority to `1`.
*
* @global WP_Query $wp_query WordPress Query object.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
*
* @return string Returns the output of the query, structured using the layout defined by the block's inner blocks.
*/
function render_block_core_post_template( $attributes, $content, $block ) {
$page_key = isset( $block->context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination'];
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
// Use global query if needed.
$use_global_query = ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] );
if ( $use_global_query ) {
global $wp_query;
/*
* If already in the main query loop, duplicate the query instance to not tamper with the main instance.
* Since this is a nested query, it should start at the beginning, therefore rewind posts.
* Otherwise, the main query loop has not started yet and this block is responsible for doing so.
*/
if ( in_the_loop() ) {
$query = clone $wp_query;
$query->rewind_posts();
} else {
$query = $wp_query;
}
} else {
$query_args = build_query_vars_from_query_block( $block, $page );
$query = new WP_Query( $query_args );
}
if ( ! $query->have_posts() ) {
return '';
}
if ( block_core_post_template_uses_featured_image( $block->inner_blocks ) ) {
update_post_thumbnail_cache( $query );
}
$classnames = '';
if ( isset( $block->context['displayLayout'] ) && isset( $block->context['query'] ) ) {
if ( isset( $block->context['displayLayout']['type'] ) && 'flex' === $block->context['displayLayout']['type'] ) {
$classnames = "is-flex-container columns-{$block->context['displayLayout']['columns']}";
}
}
if ( isset( $attributes['style']['elements']['link']['color']['text'] ) ) {
$classnames .= ' has-link-color';
}
// Ensure backwards compatibility by flagging the number of columns via classname when using grid layout.
if ( isset( $attributes['layout']['type'] ) && 'grid' === $attributes['layout']['type'] && ! empty( $attributes['layout']['columnCount'] ) ) {
$classnames .= ' ' . sanitize_title( 'columns-' . $attributes['layout']['columnCount'] );
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => trim( $classnames ) ) );
$content = '';
while ( $query->have_posts() ) {
$query->the_post();
// Get an instance of the current Post Template block.
$block_instance = $block->parsed_block;
// Set the block name to one that does not correspond to an existing registered block.
// This ensures that for the inner instances of the Post Template block, we do not render any block supports.
$block_instance['blockName'] = 'core/null';
$post_id = get_the_ID();
$post_type = get_post_type();
$filter_block_context = static function ( $context ) use ( $post_id, $post_type ) {
$context['postType'] = $post_type;
$context['postId'] = $post_id;
return $context;
};
// Use an early priority to so that other 'render_block_context' filters have access to the values.
add_filter( 'render_block_context', $filter_block_context, 1 );
// Render the inner blocks of the Post Template block with `dynamic` set to `false` to prevent calling
// `render_callback` and ensure that no wrapper markup is included.
$block_content = ( new WP_Block( $block_instance ) )->render( array( 'dynamic' => false ) );
remove_filter( 'render_block_context', $filter_block_context, 1 );
// Wrap the render inner blocks in a `li` element with the appropriate post classes.
$post_classes = implode( ' ', get_post_class( 'wp-block-post' ) );
$inner_block_directives = $enhanced_pagination ? ' data-wp-key="post-template-item-' . $post_id . '"' : '';
$content .= '
' . $block_content . ' ';
}
/*
* Use this function to restore the context of the template tags
* from a secondary query loop back to the main query loop.
* Since we use two custom loops, it's safest to always restore.
*/
wp_reset_postdata();
return sprintf(
'
',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/post-template` block on the server.
*
* @since 5.8.0
*/
function register_block_core_post_template() {
register_block_type_from_metadata(
__DIR__ . '/post-template',
array(
'render_callback' => 'render_block_core_post_template',
'skip_inner_blocks' => true,
)
);
}
add_action( 'init', 'register_block_core_post_template' );
post-author-name.php 0000644 00000003637 15025144027 0010471 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 '';
}
if ( isset( $block->context['postType'] ) && ! post_type_supports( $block->context['postType'], 'author' ) ) {
return '';
}
$author_name = get_the_author_meta( 'display_name', $author_id );
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
$author_name = sprintf( '
%3$s ', get_author_posts_url( $author_id ), esc_attr( $attributes['linkTarget'] ), $author_name );
}
$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, $author_name );
}
/**
* Registers the `core/post-author-name` block on the server.
*
* @since 6.2.0
*/
function register_block_core_post_author_name() {
register_block_type_from_metadata(
__DIR__ . '/post-author-name',
array(
'render_callback' => 'render_block_core_post_author_name',
)
);
}
add_action( 'init', 'register_block_core_post_author_name' );
query-pagination-numbers/editor.min.css 0000644 00000000314 15025144027 0014271 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 15025144027 0013512 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 15025144027 0013475 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"
}
query-pagination-numbers/editor-rtl.css 0000644 00000000334 15025144027 0014310 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.min.css 0000644 00000000313 15025144027 0015067 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-title/style-rtl.css 0000644 00000000061 15025144027 0011476 0 ustar 00 .wp-block-query-title{
box-sizing:border-box;
} query-title/style-rtl.min.css 0000644 00000000054 15025144027 0012262 0 ustar 00 .wp-block-query-title{box-sizing:border-box} query-title/block.json 0000644 00000002777 15025144027 0011032 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/query-title",
"title": "Query Title",
"category": "theme",
"description": "Display the query title.",
"textdomain": "default",
"attributes": {
"type": {
"type": "string"
},
"textAlign": {
"type": "string"
},
"level": {
"type": "number",
"default": 1
},
"levelOptions": {
"type": "array"
},
"showPrefix": {
"type": "boolean",
"default": true
},
"showSearchTerm": {
"type": "boolean",
"default": true
}
},
"example": {
"attributes": {
"type": "search"
}
},
"supports": {
"align": [ "wide", "full" ],
"html": false,
"color": {
"gradients": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"spacing": {
"margin": true,
"padding": true
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontStyle": true,
"__experimentalFontWeight": true,
"__experimentalLetterSpacing": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": 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-query-title"
}
query-title/style.css 0000644 00000000061 15025144027 0010677 0 ustar 00 .wp-block-query-title{
box-sizing:border-box;
} query-title/style.min.css 0000644 00000000054 15025144027 0011463 0 ustar 00 .wp-block-query-title{box-sizing:border-box} site-title/editor.min.css 0000644 00000000102 15025144027 0011402 0 ustar 00 .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0} site-title/editor.css 0000644 00000000112 15025144027 0010621 0 ustar 00 .wp-block-site-title__placeholder{
border:1px dashed;
padding:1em 0;
} site-title/style-rtl.css 0000644 00000000410 15025144027 0011273 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 15025144027 0012060 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/block.json 0000644 00000003363 15025144027 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,
"role": "content"
},
"linkTarget": {
"type": "string",
"default": "_self",
"role": "content"
}
},
"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.css 0000644 00000000410 15025144027 0010474 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 15025144027 0011261 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 15025144027 0011420 0 ustar 00 .wp-block-site-title__placeholder{
border:1px dashed;
padding:1em 0;
} site-title/editor-rtl.min.css 0000644 00000000102 15025144027 0012201 0 ustar 00 .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0} button.php 0000644 00000003415 15025144027 0006573 0 ustar 00 ` or `
` and also has a
* `` 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' );
buttons/editor.min.css 0000644 00000001756 15025144027 0011035 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 15025144027 0010245 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-rtl.css 0000644 00000002650 15025144027 0010716 0 ustar 00 .wp-block-buttons{
box-sizing:border-box;
}
.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 00000002477 15025144027 0011507 0 ustar 00 .wp-block-buttons{box-sizing:border-box}.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/block.json 0000644 00000003066 15025144027 0010234 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.css 0000644 00000002650 15025144027 0010117 0 ustar 00 .wp-block-buttons{
box-sizing:border-box;
}
.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 00000002477 15025144027 0010710 0 ustar 00 .wp-block-buttons{box-sizing:border-box}.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 15025144027 0011044 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-rtl.min.css 0000644 00000001756 15025144027 0011634 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} avatar.php 0000644 00000013161 15025144027 0006535 0 ustar 00 context['commentId'] ) ) {
if ( isset( $attributes['userId'] ) ) {
$author_id = $attributes['userId'];
} elseif ( isset( $block->context['postId'] ) ) {
$author_id = get_post_field( 'post_author', $block->context['postId'] );
} else {
$author_id = get_query_var( 'author' );
}
if ( empty( $author_id ) ) {
return '';
}
$author_name = get_the_author_meta( 'display_name', $author_id );
// translators: %s: Author name.
$alt = sprintf( __( '%s Avatar' ), $author_name );
$avatar_block = get_avatar(
$author_id,
$size,
'',
$alt,
array(
'extra_attr' => $image_styles,
'class' => $image_classes,
)
);
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s is the Author name.
$label = 'aria-label="' . esc_attr( sprintf( __( '(%s author archive, opens in a new tab)' ), $author_name ) ) . '"';
}
// translators: 1: Author archive link. 2: Link target. %3$s Aria label. %4$s Avatar image.
$avatar_block = sprintf( '
%4$s ', esc_url( get_author_posts_url( $author_id ) ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
}
return sprintf( '
%2s
', $wrapper_attributes, $avatar_block );
}
$comment = get_comment( $block->context['commentId'] );
if ( ! $comment ) {
return '';
}
/* translators: %s: Author name. */
$alt = sprintf( __( '%s Avatar' ), $comment->comment_author );
$avatar_block = get_avatar(
$comment,
$size,
'',
$alt,
array(
'extra_attr' => $image_styles,
'class' => $image_classes,
)
);
if ( isset( $attributes['isLink'] ) && $attributes['isLink'] && isset( $comment->comment_author_url ) && '' !== $comment->comment_author_url ) {
$label = '';
if ( '_blank' === $attributes['linkTarget'] ) {
// translators: %s: Comment author name.
$label = 'aria-label="' . esc_attr( sprintf( __( '(%s website link, opens in a new tab)' ), $comment->comment_author ) ) . '"';
}
$avatar_block = sprintf( '
%4$s ', esc_url( $comment->comment_author_url ), esc_attr( $attributes['linkTarget'] ), $label, $avatar_block );
}
return sprintf( '
%2s
', $wrapper_attributes, $avatar_block );
}
/**
* Generates class names and styles to apply the border support styles for
* the Avatar block.
*
* @since 6.3.0
*
* @param array $attributes The block attributes.
* @return array The border-related classnames and styles for the block.
*/
function get_block_core_avatar_border_attributes( $attributes ) {
$border_styles = array();
$sides = array( 'top', 'right', 'bottom', 'left' );
// Border radius.
if ( isset( $attributes['style']['border']['radius'] ) ) {
$border_styles['radius'] = $attributes['style']['border']['radius'];
}
// Border style.
if ( isset( $attributes['style']['border']['style'] ) ) {
$border_styles['style'] = $attributes['style']['border']['style'];
}
// Border width.
if ( isset( $attributes['style']['border']['width'] ) ) {
$border_styles['width'] = $attributes['style']['border']['width'];
}
// Border color.
$preset_color = array_key_exists( 'borderColor', $attributes ) ? "var:preset|color|{$attributes['borderColor']}" : null;
$custom_color = $attributes['style']['border']['color'] ?? null;
$border_styles['color'] = $preset_color ? $preset_color : $custom_color;
// Individual border styles e.g. top, left etc.
foreach ( $sides as $side ) {
$border = $attributes['style']['border'][ $side ] ?? null;
$border_styles[ $side ] = array(
'color' => isset( $border['color'] ) ? $border['color'] : null,
'style' => isset( $border['style'] ) ? $border['style'] : null,
'width' => isset( $border['width'] ) ? $border['width'] : null,
);
}
$styles = wp_style_engine_get_styles( array( 'border' => $border_styles ) );
$attributes = array();
if ( ! empty( $styles['classnames'] ) ) {
$attributes['class'] = $styles['classnames'];
}
if ( ! empty( $styles['css'] ) ) {
$attributes['style'] = $styles['css'];
}
return $attributes;
}
/**
* Registers the `core/avatar` block on the server.
*
* @since 6.0.0
*/
function register_block_core_avatar() {
register_block_type_from_metadata(
__DIR__ . '/avatar',
array(
'render_callback' => 'render_block_core_avatar',
)
);
}
add_action( 'init', 'register_block_core_avatar' );
rss.php 0000644 00000007751 15025144027 0006076 0 ustar 00
' . __( 'Adding an RSS feed to this site’s homepage is not supported, as it could lead to a loop that slows down your site. Try using another block, like the Latest Posts block, to list posts from the site.' ) . '
';
}
$rss = fetch_feed( $attributes['feedURL'] );
if ( is_wp_error( $rss ) ) {
return '' . __( 'RSS Error:' ) . ' ' . esc_html( $rss->get_error_message() ) . '
';
}
if ( ! $rss->get_item_quantity() ) {
return '' . __( 'An error has occurred, which probably means the feed is down. Try again later.' ) . '
';
}
$rss_items = $rss->get_items( 0, $attributes['itemsToShow'] );
$list_items = '';
foreach ( $rss_items as $item ) {
$title = esc_html( trim( strip_tags( $item->get_title() ) ) );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
$link = $item->get_link();
$link = esc_url( $link );
if ( $link ) {
$title = "{$title} ";
}
$title = "";
$date = '';
if ( $attributes['displayDate'] ) {
$date = $item->get_date( 'U' );
if ( $date ) {
$date = sprintf(
' ',
esc_attr( date_i18n( 'c', $date ) ),
esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
);
}
}
$author = '';
if ( $attributes['displayAuthor'] ) {
$author = $item->get_author();
if ( is_object( $author ) ) {
$author = $author->get_name();
if ( ! empty( $author ) ) {
$author = '';
}
}
}
$excerpt = '';
$description = $item->get_description();
if ( $attributes['displayExcerpt'] && ! empty( $description ) ) {
$excerpt = html_entity_decode( $description, ENT_QUOTES, get_option( 'blog_charset' ) );
$excerpt = esc_attr( wp_trim_words( $excerpt, $attributes['excerptLength'], ' […]' ) );
// Change existing [...] to […].
if ( '[...]' === substr( $excerpt, -5 ) ) {
$excerpt = substr( $excerpt, 0, -5 ) . '[…]';
}
$excerpt = '';
}
$list_items .= "";
}
$classnames = array();
if ( isset( $attributes['blockLayout'] ) && 'grid' === $attributes['blockLayout'] ) {
$classnames[] = 'is-grid';
}
if ( isset( $attributes['columns'] ) && 'grid' === $attributes['blockLayout'] ) {
$classnames[] = 'columns-' . $attributes['columns'];
}
if ( $attributes['displayDate'] ) {
$classnames[] = 'has-dates';
}
if ( $attributes['displayAuthor'] ) {
$classnames[] = 'has-authors';
}
if ( $attributes['displayExcerpt'] ) {
$classnames[] = 'has-excerpts';
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => implode( ' ', $classnames ) ) );
return sprintf( '', $wrapper_attributes, $list_items );
}
/**
* Registers the `core/rss` block on server.
*
* @since 5.2.0
*/
function register_block_core_rss() {
register_block_type_from_metadata(
__DIR__ . '/rss',
array(
'render_callback' => 'render_block_core_rss',
)
);
}
add_action( 'init', 'register_block_core_rss' );
widget-group.php 0000644 00000004606 15025144027 0007700 0 ustar 00 ';
$after_title = '';
}
$html = '';
if ( ! empty( $attributes['title'] ) ) {
$html .= $before_title . esc_html( $attributes['title'] ) . $after_title;
}
$html .= '';
foreach ( $block->inner_blocks as $inner_block ) {
$html .= $inner_block->render();
}
$html .= '
';
return $html;
}
/**
* Registers the 'core/widget-group' block.
*
* @since 5.9.0
*/
function register_block_core_widget_group() {
register_block_type_from_metadata(
__DIR__ . '/widget-group',
array(
'render_callback' => 'render_block_core_widget_group',
)
);
}
add_action( 'init', 'register_block_core_widget_group' );
/**
* Make a note of the sidebar being rendered before WordPress starts rendering
* it. This lets us get to the current sidebar in
* render_block_core_widget_group().
*
* @since 5.9.0
*
* @global int|string $_sidebar_being_rendered
*
* @param int|string $index Index, name, or ID of the dynamic sidebar.
*/
function note_sidebar_being_rendered( $index ) {
global $_sidebar_being_rendered;
$_sidebar_being_rendered = $index;
}
add_action( 'dynamic_sidebar_before', 'note_sidebar_being_rendered' );
/**
* Clear whatever we set in note_sidebar_being_rendered() after WordPress
* finishes rendering a sidebar.
*
* @since 5.9.0
*
* @global int|string $_sidebar_being_rendered
*/
function discard_sidebar_being_rendered() {
global $_sidebar_being_rendered;
unset( $_sidebar_being_rendered );
}
add_action( 'dynamic_sidebar_after', 'discard_sidebar_being_rendered' );
details/editor.min.css 0000644 00000000055 15025144027 0010753 0 ustar 00 .wp-block-details summary div{display:inline} details/editor.css 0000644 00000000062 15025144027 0010167 0 ustar 00 .wp-block-details summary div{
display:inline;
} details/style-rtl.css 0000644 00000000135 15025144027 0010641 0 ustar 00 .wp-block-details{
box-sizing:border-box;
}
.wp-block-details summary{
cursor:pointer;
} details/style-rtl.min.css 0000644 00000000121 15025144027 0011416 0 ustar 00 .wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer} details/block.json 0000644 00000003272 15025144027 0010162 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/details",
"title": "Details",
"category": "text",
"description": "Hide and show additional content.",
"keywords": [ "accordion", "summary", "toggle", "disclosure" ],
"textdomain": "default",
"attributes": {
"showContent": {
"type": "boolean",
"default": false
},
"summary": {
"type": "rich-text",
"source": "rich-text",
"selector": "summary"
},
"name": {
"type": "string",
"source": "attribute",
"attribute": "name",
"selector": ".wp-block-details"
},
"allowedBlocks": {
"type": "array"
},
"placeholder": {
"type": "string"
}
},
"supports": {
"__experimentalOnEnter": true,
"align": [ "wide", "full" ],
"anchor": true,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"__experimentalBorder": {
"color": true,
"width": true,
"style": true
},
"html": false,
"spacing": {
"margin": true,
"padding": true,
"blockGap": 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
}
},
"layout": {
"allowEditing": false
},
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-details-editor",
"style": "wp-block-details"
}
details/style.css 0000644 00000000135 15025144027 0010042 0 ustar 00 .wp-block-details{
box-sizing:border-box;
}
.wp-block-details summary{
cursor:pointer;
} details/style.min.css 0000644 00000000121 15025144027 0010617 0 ustar 00 .wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer} details/editor-rtl.css 0000644 00000000062 15025144027 0010766 0 ustar 00 .wp-block-details summary div{
display:inline;
} details/editor-rtl.min.css 0000644 00000000055 15025144027 0011552 0 ustar 00 .wp-block-details summary div{display:inline} query-pagination-next.php 0000644 00000007313 15025144027 0011531 0 ustar 00 context['queryId'] ) ? 'query-' . $block->context['queryId'] . '-page' : 'query-page';
$enhanced_pagination = isset( $block->context['enhancedPagination'] ) && $block->context['enhancedPagination'];
$page = empty( $_GET[ $page_key ] ) ? 1 : (int) $_GET[ $page_key ];
$max_page = isset( $block->context['query']['pages'] ) ? (int) $block->context['query']['pages'] : 0;
$wrapper_attributes = get_block_wrapper_attributes();
$show_label = isset( $block->context['showLabel'] ) ? (bool) $block->context['showLabel'] : true;
$default_label = __( 'Next Page' );
$label_text = isset( $attributes['label'] ) && ! empty( $attributes['label'] ) ? esc_html( $attributes['label'] ) : $default_label;
$label = $show_label ? $label_text : '';
$pagination_arrow = get_query_pagination_arrow( $block, true );
if ( ! $label ) {
$wrapper_attributes .= ' aria-label="' . $label_text . '"';
}
if ( $pagination_arrow ) {
$label .= $pagination_arrow;
}
$content = '';
// Check if the pagination is for Query that inherits the global context.
if ( isset( $block->context['query']['inherit'] ) && $block->context['query']['inherit'] ) {
$filter_link_attributes = static function () use ( $wrapper_attributes ) {
return $wrapper_attributes;
};
add_filter( 'next_posts_link_attributes', $filter_link_attributes );
// Take into account if we have set a bigger `max page`
// than what the query has.
global $wp_query;
if ( $max_page > $wp_query->max_num_pages ) {
$max_page = $wp_query->max_num_pages;
}
$content = get_next_posts_link( $label, $max_page );
remove_filter( 'next_posts_link_attributes', $filter_link_attributes );
} elseif ( ! $max_page || $max_page > $page ) {
$custom_query = new WP_Query( build_query_vars_from_query_block( $block, $page ) );
$custom_query_max_pages = (int) $custom_query->max_num_pages;
if ( $custom_query_max_pages && $custom_query_max_pages !== $page ) {
$content = sprintf(
'%3$s ',
esc_url( add_query_arg( $page_key, $page + 1 ) ),
$wrapper_attributes,
$label
);
}
wp_reset_postdata(); // Restore original Post Data.
}
if ( $enhanced_pagination && isset( $content ) ) {
$p = new WP_HTML_Tag_Processor( $content );
if ( $p->next_tag(
array(
'tag_name' => 'a',
'class_name' => 'wp-block-query-pagination-next',
)
) ) {
$p->set_attribute( 'data-wp-key', 'query-pagination-next' );
$p->set_attribute( 'data-wp-on--click', 'core/query::actions.navigate' );
$p->set_attribute( 'data-wp-on-async--mouseenter', 'core/query::actions.prefetch' );
$p->set_attribute( 'data-wp-watch', 'core/query::callbacks.prefetch' );
$content = $p->get_updated_html();
}
}
return $content;
}
/**
* Registers the `core/query-pagination-next` block on the server.
*
* @since 5.8.0
*/
function register_block_core_query_pagination_next() {
register_block_type_from_metadata(
__DIR__ . '/query-pagination-next',
array(
'render_callback' => 'render_block_core_query_pagination_next',
)
);
}
add_action( 'init', 'register_block_core_query_pagination_next' );
loginout.php 0000644 00000002612 15025144027 0007116 0 ustar 00 false ) );
}
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
return '' . $contents . '
';
}
/**
* Registers the `core/loginout` block on server.
*
* @since 5.8.0
*/
function register_block_core_loginout() {
register_block_type_from_metadata(
__DIR__ . '/loginout',
array(
'render_callback' => 'render_block_core_loginout',
)
);
}
add_action( 'init', 'register_block_core_loginout' );
post-content/style-rtl.css 0000644 00000000056 15025144027 0011653 0 ustar 00 .wp-block-post-content{
display:flow-root;
} post-content/style-rtl.min.css 0000644 00000000051 15025144027 0012430 0 ustar 00 .wp-block-post-content{display:flow-root} post-content/block.json 0000644 00000003104 15025144027 0011164 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,
"margin": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
},
"color": {
"gradients": true,
"heading": 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
}
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true,
"__experimentalDefaultControls": {
"radius": true,
"color": true,
"width": true,
"style": true
}
}
},
"style": "wp-block-post-content",
"editorStyle": "wp-block-post-content-editor"
}
post-content/style.css 0000644 00000000056 15025144027 0011054 0 ustar 00 .wp-block-post-content{
display:flow-root;
} post-content/style.min.css 0000644 00000000051 15025144027 0011631 0 ustar 00 .wp-block-post-content{display:flow-root} pattern.php 0000644 00000003374 15025144027 0006741 0 ustar 00 'render_block_core_pattern',
)
);
}
/**
* Renders the `core/pattern` block on the server.
*
* @since 6.3.0 Backwards compatibility: blocks with no `syncStatus` attribute do not receive block wrapper.
*
* @global WP_Embed $wp_embed Used to process embedded content within patterns
*
* @param array $attributes Block attributes.
*
* @return string Returns the output of the pattern.
*/
function render_block_core_pattern( $attributes ) {
static $seen_refs = array();
if ( empty( $attributes['slug'] ) ) {
return '';
}
$slug = $attributes['slug'];
$registry = WP_Block_Patterns_Registry::get_instance();
if ( ! $registry->is_registered( $slug ) ) {
return '';
}
if ( isset( $seen_refs[ $attributes['slug'] ] ) ) {
// WP_DEBUG_DISPLAY must only be honored when WP_DEBUG. This precedent
// is set in `wp_debug_mode()`.
$is_debug = WP_DEBUG && WP_DEBUG_DISPLAY;
return $is_debug ?
// translators: Visible only in the front end, this warning takes the place of a faulty block. %s represents a pattern's slug.
sprintf( __( '[block rendering halted for pattern "%s"]' ), $slug ) :
'';
}
$pattern = $registry->get_registered( $slug );
$content = $pattern['content'];
$seen_refs[ $attributes['slug'] ] = true;
$content = do_blocks( $content );
global $wp_embed;
$content = $wp_embed->autoembed( $content );
unset( $seen_refs[ $attributes['slug'] ] );
return $content;
}
add_action( 'init', 'register_block_core_pattern' );
post-comments-form.php 0000644 00000005365 15025144027 0011037 0 ustar 00 context['postId'] ) ) {
return '';
}
if ( post_password_required( $block->context['postId'] ) ) {
return;
}
$classes = array( 'comment-respond' ); // See comment further below.
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 ) ) );
add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
ob_start();
comment_form( array(), $block->context['postId'] );
$form = ob_get_clean();
remove_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
// We use the outermost wrapping `
` returned by `comment_form()`
// which is identified by its default classname `comment-respond` to inject
// our wrapper attributes. This way, it is guaranteed that all styling applied
// to the block is carried along when the comment form is moved to the location
// of the 'Reply' link that the user clicked by Core's `comment-reply.js` script.
$form = str_replace( 'class="comment-respond"', $wrapper_attributes, $form );
// Enqueue the comment-reply script.
wp_enqueue_script( 'comment-reply' );
return $form;
}
/**
* Registers the `core/post-comments-form` block on the server.
*
* @since 6.0.0
*/
function register_block_core_post_comments_form() {
register_block_type_from_metadata(
__DIR__ . '/post-comments-form',
array(
'render_callback' => 'render_block_core_post_comments_form',
)
);
}
add_action( 'init', 'register_block_core_post_comments_form' );
/**
* Use the button block classes for the form-submit button.
*
* @since 6.0.0
*
* @param array $fields The default comment form arguments.
*
* @return array Returns the modified fields.
*/
function post_comments_form_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = ' ';
$fields['submit_field'] = '%1$s %2$s
';
}
return $fields;
}
comments.php 0000644 00000015157 15025144027 0007113 0 ustar 00 context['postId'];
if ( ! isset( $post_id ) ) {
return '';
}
// Return early if there are no comments and comments are closed.
if ( ! comments_open( $post_id ) && (int) get_comments_number( $post_id ) === 0 ) {
return '';
}
// If this isn't the legacy block, we need to render the static version of this block.
$is_legacy = 'core/post-comments' === $block->name || ! empty( $attributes['legacy'] );
if ( ! $is_legacy ) {
return $block->render( array( 'dynamic' => false ) );
}
$post_before = $post;
$post = get_post( $post_id );
setup_postdata( $post );
ob_start();
/*
* There's a deprecation warning generated by WP Core.
* Ideally this deprecation is removed from Core.
* In the meantime, this removes it from the output.
*/
add_filter( 'deprecated_file_trigger_error', '__return_false' );
comments_template();
remove_filter( 'deprecated_file_trigger_error', '__return_false' );
$output = ob_get_clean();
$post = $post_before;
$classnames = array();
// Adds the old class name for styles' backwards compatibility.
if ( isset( $attributes['legacy'] ) ) {
$classnames[] = 'wp-block-post-comments';
}
if ( isset( $attributes['textAlign'] ) ) {
$classnames[] = 'has-text-align-' . $attributes['textAlign'];
}
$wrapper_attributes = get_block_wrapper_attributes(
array( 'class' => implode( ' ', $classnames ) )
);
/*
* Enqueues scripts and styles required only for the legacy version. That is
* why they are not defined in `block.json`.
*/
wp_enqueue_script( 'comment-reply' );
enqueue_legacy_post_comments_block_styles( $block->name );
return sprintf( '%2$s
', $wrapper_attributes, $output );
}
/**
* Registers the `core/comments` block on the server.
*
* @since 6.1.0
*/
function register_block_core_comments() {
register_block_type_from_metadata(
__DIR__ . '/comments',
array(
'render_callback' => 'render_block_core_comments',
'skip_inner_blocks' => true,
)
);
}
add_action( 'init', 'register_block_core_comments' );
/**
* Use the button block classes for the form-submit button.
*
* @since 6.1.0
*
* @param array $fields The default comment form arguments.
*
* @return array Returns the modified fields.
*/
function comments_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = ' ';
$fields['submit_field'] = '%1$s %2$s
';
}
return $fields;
}
add_filter( 'comment_form_defaults', 'comments_block_form_defaults' );
/**
* Enqueues styles from the legacy `core/post-comments` block. These styles are
* required only by the block's fallback.
*
* @since 6.1.0
*
* @param string $block_name Name of the new block type.
*/
function enqueue_legacy_post_comments_block_styles( $block_name ) {
static $are_styles_enqueued = false;
if ( ! $are_styles_enqueued ) {
$handles = array(
'wp-block-post-comments',
'wp-block-buttons',
'wp-block-button',
);
foreach ( $handles as $handle ) {
wp_enqueue_block_style( $block_name, array( 'handle' => $handle ) );
}
$are_styles_enqueued = true;
}
}
/**
* Ensures backwards compatibility for any users running the Gutenberg plugin
* who have used Post Comments before it was merged into Comments Query Loop.
*
* The same approach was followed when core/query-loop was renamed to
* core/post-template.
*
* @since 6.1.0
*
* @see https://github.com/WordPress/gutenberg/pull/41807
* @see https://github.com/WordPress/gutenberg/pull/32514
*/
function register_legacy_post_comments_block() {
$registry = WP_Block_Type_Registry::get_instance();
/*
* Remove the old `post-comments` block if it was already registered, as it
* is about to be replaced by the type defined below.
*/
if ( $registry->is_registered( 'core/post-comments' ) ) {
unregister_block_type( 'core/post-comments' );
}
// Recreate the legacy block metadata.
$metadata = array(
'name' => 'core/post-comments',
'category' => 'theme',
'attributes' => array(
'textAlign' => array(
'type' => 'string',
),
),
'uses_context' => array(
'postId',
'postType',
),
'supports' => array(
'html' => false,
'align' => array( 'wide', 'full' ),
'typography' => array(
'fontSize' => true,
'lineHeight' => true,
'__experimentalFontStyle' => true,
'__experimentalFontWeight' => true,
'__experimentalLetterSpacing' => true,
'__experimentalTextTransform' => true,
'__experimentalDefaultControls' => array(
'fontSize' => true,
),
),
'color' => array(
'gradients' => true,
'link' => true,
'__experimentalDefaultControls' => array(
'background' => true,
'text' => true,
),
),
'inserter' => false,
),
'style' => array(
'wp-block-post-comments',
'wp-block-buttons',
'wp-block-button',
),
'render_callback' => 'render_block_core_comments',
'skip_inner_blocks' => true,
);
/*
* Filters the metadata object, the same way it's done inside
* `register_block_type_from_metadata()`. This applies some default filters,
* like `_wp_multiple_block_styles`, which is required in this case because
* the block has multiple styles.
*/
/** This filter is documented in wp-includes/blocks.php */
$metadata = apply_filters( 'block_type_metadata', $metadata );
register_block_type( 'core/post-comments', $metadata );
}
add_action( 'init', 'register_legacy_post_comments_block', 21 );
comments-pagination-numbers.php 0000644 00000003140 15025144027 0012700 0 ustar 00 context['postId'] ) ) {
return '';
}
$comment_vars = build_comment_query_vars_from_block( $block );
$total = ( new WP_Comment_Query( $comment_vars ) )->max_num_pages;
$current = ! empty( $comment_vars['paged'] ) ? $comment_vars['paged'] : null;
// Render links.
$content = paginate_comments_links(
array(
'total' => $total,
'current' => $current,
'prev_next' => false,
'echo' => false,
)
);
if ( empty( $content ) ) {
return '';
}
$wrapper_attributes = get_block_wrapper_attributes();
return sprintf(
'%2$s
',
$wrapper_attributes,
$content
);
}
/**
* Registers the `core/comments-pagination-numbers` block on the server.
*
* @since 6.0.0
*/
function register_block_core_comments_pagination_numbers() {
register_block_type_from_metadata(
__DIR__ . '/comments-pagination-numbers',
array(
'render_callback' => 'render_block_core_comments_pagination_numbers',
)
);
}
add_action( 'init', 'register_block_core_comments_pagination_numbers' );
shortcode.php 0000644 00000001337 15025144027 0007253 0 ustar 00 'render_block_core_shortcode',
)
);
}
add_action( 'init', 'register_block_core_shortcode' );
loginout/style-rtl.css 0000644 00000000056 15025144027 0011056 0 ustar 00 .wp-block-loginout{
box-sizing:border-box;
} loginout/style-rtl.min.css 0000644 00000000051 15025144027 0011633 0 ustar 00 .wp-block-loginout{box-sizing:border-box} loginout/block.json 0000644 00000002424 15025144027 0010373 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.css 0000644 00000000056 15025144027 0010257 0 ustar 00 .wp-block-loginout{
box-sizing:border-box;
} loginout/style.min.css 0000644 00000000051 15025144027 0011034 0 ustar 00 .wp-block-loginout{box-sizing:border-box} page-list-item/block.json 0000644 00000002125 15025144027 0011352 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/page-list-item",
"title": "Page List Item",
"category": "widgets",
"parent": [ "core/page-list" ],
"description": "Displays a page inside a list of all pages.",
"keywords": [ "page", "menu", "navigation" ],
"textdomain": "default",
"attributes": {
"id": {
"type": "number"
},
"label": {
"type": "string"
},
"title": {
"type": "string"
},
"link": {
"type": "string"
},
"hasChildren": {
"type": "boolean"
}
},
"usesContext": [
"textColor",
"customTextColor",
"backgroundColor",
"customBackgroundColor",
"overlayTextColor",
"customOverlayTextColor",
"overlayBackgroundColor",
"customOverlayBackgroundColor",
"fontSize",
"customFontSize",
"showSubmenuIcon",
"style",
"openSubmenusOnClick"
],
"supports": {
"reusable": false,
"html": false,
"lock": false,
"inserter": false,
"__experimentalToolbar": false,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-page-list-editor",
"style": "wp-block-page-list"
}
post-terms.php 0000644 00000007070 15025144027 0007376 0 ustar 00 context['postId'] ) || ! isset( $attributes['term'] ) ) {
return '';
}
if ( ! is_taxonomy_viewable( $attributes['term'] ) ) {
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;
}
$post_terms = get_the_term_list(
$block->context['postId'],
$attributes['term'],
wp_kses_post( $prefix ),
'' . esc_html( $separator ) . ' ',
wp_kses_post( $suffix )
);
if ( is_wp_error( $post_terms ) || empty( $post_terms ) ) {
return '';
}
return $post_terms;
}
/**
* 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' );
navigation-link/editor.min.css 0000644 00000003304 15025144027 0012420 0 ustar 00 .wp-block-navigation .block-list-appender{position:relative}.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px auto 16px 16px}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{-webkit-text-decoration:wavy underline;text-decoration:wavy underline;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none;text-underline-offset:.25rem}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto} navigation-link/editor.css 0000644 00000003577 15025144027 0011652 0 ustar 00 .wp-block-navigation .block-list-appender{
position:relative;
}
.wp-block-navigation .has-child{
cursor:pointer;
}
.wp-block-navigation .has-child .wp-block-navigation__submenu-container{
z-index:28;
}
.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{
z-index:29;
}
.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{
height:auto !important;
min-width:200px !important;
opacity:1 !important;
overflow:visible !important;
visibility:visible !important;
width:auto !important;
}
.wp-block-navigation-item .wp-block-navigation-item__content{
cursor:text;
}
.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{
min-width:20px;
}
.wp-block-navigation-item .block-list-appender{
margin:16px auto 16px 16px;
}
.wp-block-navigation-link__invalid-item{
color:#000;
}
.wp-block-navigation-link__placeholder{
background-image:none !important;
box-shadow:none !important;
position:relative;
text-decoration:none !important;
}
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{
-webkit-text-decoration:wavy underline;
text-decoration:wavy underline;
-webkit-text-decoration-skip-ink:none;
text-decoration-skip-ink:none;
text-underline-offset:.25rem;
}
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{
cursor:pointer;
}
.link-control-transform{
border-top:1px solid #ccc;
padding:0 16px 8px;
}
.link-control-transform__subheading{
color:#1e1e1e;
font-size:11px;
font-weight:500;
margin-bottom:1.5em;
text-transform:uppercase;
}
.link-control-transform__items{
display:flex;
justify-content:space-between;
}
.link-control-transform__item{
flex-basis:33%;
flex-direction:column;
gap:8px;
height:auto;
} navigation-link/style-rtl.css 0000644 00000000546 15025144027 0012314 0 ustar 00 .wp-block-navigation .wp-block-navigation-item__label{
overflow-wrap:break-word;
}
.wp-block-navigation .wp-block-navigation-item__description{
display:none;
}
.link-ui-tools{
border-top:1px solid #f0f0f0;
padding:8px;
}
.link-ui-block-inserter{
padding-top:8px;
}
.link-ui-block-inserter__back{
margin-right:8px;
text-transform:uppercase;
} navigation-link/style-rtl.min.css 0000644 00000000500 15025144027 0013064 0 ustar 00 .wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-right:8px;text-transform:uppercase} navigation-link/block.json 0000644 00000003326 15025144027 0011627 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/navigation-link",
"title": "Custom Link",
"category": "design",
"parent": [ "core/navigation" ],
"allowedBlocks": [
"core/navigation-link",
"core/navigation-submenu",
"core/page-list"
],
"description": "Add a page, link, or another item to your navigation.",
"textdomain": "default",
"attributes": {
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"rel": {
"type": "string"
},
"id": {
"type": "number"
},
"opensInNewTab": {
"type": "boolean",
"default": false
},
"url": {
"type": "string"
},
"title": {
"type": "string"
},
"kind": {
"type": "string"
},
"isTopLevelLink": {
"type": "boolean"
}
},
"usesContext": [
"textColor",
"customTextColor",
"backgroundColor",
"customBackgroundColor",
"overlayTextColor",
"customOverlayTextColor",
"overlayBackgroundColor",
"customOverlayBackgroundColor",
"fontSize",
"customFontSize",
"showSubmenuIcon",
"maxNestingLevel",
"style"
],
"supports": {
"reusable": false,
"html": false,
"__experimentalSlashInserter": true,
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"renaming": false,
"interactivity": {
"clientNavigation": true
}
},
"editorStyle": "wp-block-navigation-link-editor",
"style": "wp-block-navigation-link"
}
navigation-link/style.css 0000644 00000000545 15025144027 0011514 0 ustar 00 .wp-block-navigation .wp-block-navigation-item__label{
overflow-wrap:break-word;
}
.wp-block-navigation .wp-block-navigation-item__description{
display:none;
}
.link-ui-tools{
border-top:1px solid #f0f0f0;
padding:8px;
}
.link-ui-block-inserter{
padding-top:8px;
}
.link-ui-block-inserter__back{
margin-left:8px;
text-transform:uppercase;
} navigation-link/style.min.css 0000644 00000000477 15025144027 0012302 0 ustar 00 .wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-left:8px;text-transform:uppercase} navigation-link/editor-rtl.css 0000644 00000003577 15025144027 0012451 0 ustar 00 .wp-block-navigation .block-list-appender{
position:relative;
}
.wp-block-navigation .has-child{
cursor:pointer;
}
.wp-block-navigation .has-child .wp-block-navigation__submenu-container{
z-index:28;
}
.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{
z-index:29;
}
.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{
height:auto !important;
min-width:200px !important;
opacity:1 !important;
overflow:visible !important;
visibility:visible !important;
width:auto !important;
}
.wp-block-navigation-item .wp-block-navigation-item__content{
cursor:text;
}
.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{
min-width:20px;
}
.wp-block-navigation-item .block-list-appender{
margin:16px 16px 16px auto;
}
.wp-block-navigation-link__invalid-item{
color:#000;
}
.wp-block-navigation-link__placeholder{
background-image:none !important;
box-shadow:none !important;
position:relative;
text-decoration:none !important;
}
.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{
-webkit-text-decoration:wavy underline;
text-decoration:wavy underline;
-webkit-text-decoration-skip-ink:none;
text-decoration-skip-ink:none;
text-underline-offset:.25rem;
}
.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{
cursor:pointer;
}
.link-control-transform{
border-top:1px solid #ccc;
padding:0 16px 8px;
}
.link-control-transform__subheading{
color:#1e1e1e;
font-size:11px;
font-weight:500;
margin-bottom:1.5em;
text-transform:uppercase;
}
.link-control-transform__items{
display:flex;
justify-content:space-between;
}
.link-control-transform__item{
flex-basis:33%;
flex-direction:column;
gap:8px;
height:auto;
} navigation-link/editor-rtl.min.css 0000644 00000003304 15025144027 0013217 0 ustar 00 .wp-block-navigation .block-list-appender{position:relative}.wp-block-navigation .has-child{cursor:pointer}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{z-index:28}.wp-block-navigation .has-child:hover .wp-block-navigation__submenu-container{z-index:29}.wp-block-navigation .has-child.has-child-selected>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child.is-selected>.wp-block-navigation__submenu-container{height:auto!important;min-width:200px!important;opacity:1!important;overflow:visible!important;visibility:visible!important;width:auto!important}.wp-block-navigation-item .wp-block-navigation-item__content{cursor:text}.wp-block-navigation-item.is-editing,.wp-block-navigation-item.is-selected{min-width:20px}.wp-block-navigation-item .block-list-appender{margin:16px 16px 16px auto}.wp-block-navigation-link__invalid-item{color:#000}.wp-block-navigation-link__placeholder{background-image:none!important;box-shadow:none!important;position:relative;text-decoration:none!important}.wp-block-navigation-link__placeholder .wp-block-navigation-link__placeholder-text span{-webkit-text-decoration:wavy underline;text-decoration:wavy underline;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none;text-underline-offset:.25rem}.wp-block-navigation-link__placeholder.wp-block-navigation-item__content{cursor:pointer}.link-control-transform{border-top:1px solid #ccc;padding:0 16px 8px}.link-control-transform__subheading{color:#1e1e1e;font-size:11px;font-weight:500;margin-bottom:1.5em;text-transform:uppercase}.link-control-transform__items{display:flex;justify-content:space-between}.link-control-transform__item{flex-basis:33%;flex-direction:column;gap:8px;height:auto} post-author-name/style-rtl.css 0000644 00000000066 15025144027 0012422 0 ustar 00 .wp-block-post-author-name{
box-sizing:border-box;
} post-author-name/style-rtl.min.css 0000644 00000000061 15025144027 0013177 0 ustar 00 .wp-block-post-author-name{box-sizing:border-box} post-author-name/block.json 0000644 00000002673 15025144027 0011744 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-author-name",
"title": "Author Name",
"category": "theme",
"description": "The author name.",
"textdomain": "default",
"attributes": {
"textAlign": {
"type": "string"
},
"isLink": {
"type": "boolean",
"default": false,
"role": "content"
},
"linkTarget": {
"type": "string",
"default": "_self",
"role": "content"
}
},
"usesContext": [ "postType", "postId" ],
"example": {
"viewportWidth": 350
},
"supports": {
"html": false,
"spacing": {
"margin": true,
"padding": true
},
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__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-name"
}
post-author-name/style.css 0000644 00000000066 15025144027 0011623 0 ustar 00 .wp-block-post-author-name{
box-sizing:border-box;
} post-author-name/style.min.css 0000644 00000000061 15025144027 0012400 0 ustar 00 .wp-block-post-author-name{box-sizing:border-box} social-link.php 0000644 00000177226 15025144027 0007501 0 ustar 00 context['openInNewTab'] ) ? $block->context['openInNewTab'] : false;
$text = ! empty( $attributes['label'] ) ? trim( $attributes['label'] ) : '';
$service = isset( $attributes['service'] ) ? $attributes['service'] : 'Icon';
$url = isset( $attributes['url'] ) ? $attributes['url'] : false;
$text = $text ? $text : block_core_social_link_get_name( $service );
$rel = isset( $attributes['rel'] ) ? $attributes['rel'] : '';
$show_labels = array_key_exists( 'showLabels', $block->context ) ? $block->context['showLabels'] : false;
// Don't render a link if there is no URL set.
if ( ! $url ) {
return '';
}
/**
* Prepend emails with `mailto:` if not set.
* The `is_email` returns false for emails with schema.
*/
if ( is_email( $url ) ) {
$url = 'mailto:' . antispambot( $url );
}
/**
* Prepend URL with https:// if it doesn't appear to contain a scheme
* and it's not a relative link or a fragment.
*/
if ( ! parse_url( $url, PHP_URL_SCHEME ) && ! str_starts_with( $url, '//' ) && ! str_starts_with( $url, '#' ) ) {
$url = 'https://' . $url;
}
$icon = block_core_social_link_get_icon( $service );
$wrapper_attributes = get_block_wrapper_attributes(
array(
'class' => 'wp-social-link wp-social-link-' . $service . block_core_social_link_get_color_classes( $block->context ),
'style' => block_core_social_link_get_color_styles( $block->context ),
)
);
$link = '';
$link .= '';
$link .= $icon;
$link .= '' . esc_html( $text ) . ' ';
$link .= ' ';
$processor = new WP_HTML_Tag_Processor( $link );
$processor->next_tag( 'a' );
if ( $open_in_new_tab ) {
$processor->set_attribute( 'rel', trim( $rel . ' noopener nofollow' ) );
$processor->set_attribute( 'target', '_blank' );
} elseif ( '' !== $rel ) {
$processor->set_attribute( 'rel', trim( $rel ) );
}
return $processor->get_updated_html();
}
/**
* Registers the `core/social-link` blocks.
*
* @since 5.4.0
*/
function register_block_core_social_link() {
register_block_type_from_metadata(
__DIR__ . '/social-link',
array(
'render_callback' => 'render_block_core_social_link',
)
);
}
add_action( 'init', 'register_block_core_social_link' );
/**
* Returns the SVG for social link.
*
* @since 5.4.0
*
* @param string $service The service icon.
*
* @return string SVG Element for service icon.
*/
function block_core_social_link_get_icon( $service ) {
$services = block_core_social_link_services();
if ( isset( $services[ $service ] ) && isset( $services[ $service ]['icon'] ) ) {
return $services[ $service ]['icon'];
}
return $services['share']['icon'];
}
/**
* Returns the brand name for social link.
*
* @since 5.4.0
*
* @param string $service The service icon.
*
* @return string Brand label.
*/
function block_core_social_link_get_name( $service ) {
$services = block_core_social_link_services();
if ( isset( $services[ $service ] ) && isset( $services[ $service ]['name'] ) ) {
return $services[ $service ]['name'];
}
return $services['share']['name'];
}
/**
* Returns the SVG for social link.
*
* @since 5.4.0
*
* @param string $service The service slug to extract data from.
* @param string $field The field ('name', 'icon', etc) to extract for a service.
*
* @return array|string
*/
function block_core_social_link_services( $service = '', $field = '' ) {
$services_data = array(
'fivehundredpx' => array(
'name' => '500px',
'icon' => ' ',
),
'amazon' => array(
'name' => 'Amazon',
'icon' => ' ',
),
'bandcamp' => array(
'name' => 'Bandcamp',
'icon' => ' ',
),
'behance' => array(
'name' => 'Behance',
'icon' => ' ',
),
'bluesky' => array(
'name' => 'Bluesky',
'icon' => ' ',
),
'chain' => array(
'name' => 'Link',
'icon' => ' ',
),
'codepen' => array(
'name' => 'CodePen',
'icon' => ' ',
),
'deviantart' => array(
'name' => 'DeviantArt',
'icon' => ' ',
),
'discord' => array(
'name' => 'Discord',
'icon' => ' ',
),
'dribbble' => array(
'name' => 'Dribbble',
'icon' => ' ',
),
'dropbox' => array(
'name' => 'Dropbox',
'icon' => ' ',
),
'etsy' => array(
'name' => 'Etsy',
'icon' => ' ',
),
'facebook' => array(
'name' => 'Facebook',
'icon' => ' ',
),
'feed' => array(
'name' => 'RSS Feed',
'icon' => ' ',
),
'flickr' => array(
'name' => 'Flickr',
'icon' => ' ',
),
'foursquare' => array(
'name' => 'Foursquare',
'icon' => ' ',
),
'goodreads' => array(
'name' => 'Goodreads',
'icon' => ' ',
),
'google' => array(
'name' => 'Google',
'icon' => ' ',
),
'github' => array(
'name' => 'GitHub',
'icon' => ' ',
),
'gravatar' => array(
'name' => 'Gravatar',
'icon' => ' ',
),
'instagram' => array(
'name' => 'Instagram',
'icon' => ' ',
),
'lastfm' => array(
'name' => 'Last.fm',
'icon' => ' ',
),
'linkedin' => array(
'name' => 'LinkedIn',
'icon' => ' ',
),
'mail' => array(
'name' => 'Mail',
'icon' => ' ',
),
'mastodon' => array(
'name' => 'Mastodon',
'icon' => ' ',
),
'meetup' => array(
'name' => 'Meetup',
'icon' => ' ',
),
'medium' => array(
'name' => 'Medium',
'icon' => ' ',
),
'patreon' => array(
'name' => 'Patreon',
'icon' => ' ',
),
'pinterest' => array(
'name' => 'Pinterest',
'icon' => ' ',
),
'pocket' => array(
'name' => 'Pocket',
'icon' => ' ',
),
'reddit' => array(
'name' => 'Reddit',
'icon' => ' ',
),
'share' => array(
'name' => 'Share Icon',
'icon' => ' ',
),
'skype' => array(
'name' => 'Skype',
'icon' => ' ',
),
'snapchat' => array(
'name' => 'Snapchat',
'icon' => ' ',
),
'soundcloud' => array(
'name' => 'Soundcloud',
'icon' => ' ',
),
'spotify' => array(
'name' => 'Spotify',
'icon' => ' ',
),
'telegram' => array(
'name' => 'Telegram',
'icon' => ' ',
),
'threads' => array(
'name' => 'Threads',
'icon' => ' ',
),
'tiktok' => array(
'name' => 'TikTok',
'icon' => ' ',
),
'tumblr' => array(
'name' => 'Tumblr',
'icon' => ' ',
),
'twitch' => array(
'name' => 'Twitch',
'icon' => ' ',
),
'twitter' => array(
'name' => 'Twitter',
'icon' => ' ',
),
'vimeo' => array(
'name' => 'Vimeo',
'icon' => ' ',
),
'vk' => array(
'name' => 'VK',
'icon' => ' ',
),
'wordpress' => array(
'name' => 'WordPress',
'icon' => ' ',
),
'whatsapp' => array(
'name' => 'WhatsApp',
'icon' => ' ',
),
'x' => array(
'name' => 'X',
'icon' => ' ',
),
'yelp' => array(
'name' => 'Yelp',
'icon' => ' ',
),
'youtube' => array(
'name' => 'YouTube',
'icon' => ' ',
),
);
if ( ! empty( $service )
&& ! empty( $field )
&& isset( $services_data[ $service ] )
&& ( 'icon' === $field || 'name' === $field )
) {
return $services_data[ $service ][ $field ];
} elseif ( ! empty( $service ) && isset( $services_data[ $service ] ) ) {
return $services_data[ $service ];
}
return $services_data;
}
/**
* Returns CSS styles for icon and icon background colors.
*
* @since 5.7.0
*
* @param array $context Block context passed to Social Link.
*
* @return string Inline CSS styles for link's icon and background colors.
*/
function block_core_social_link_get_color_styles( $context ) {
$styles = array();
if ( array_key_exists( 'iconColorValue', $context ) ) {
$styles[] = 'color: ' . $context['iconColorValue'] . '; ';
}
if ( array_key_exists( 'iconBackgroundColorValue', $context ) ) {
$styles[] = 'background-color: ' . $context['iconBackgroundColorValue'] . '; ';
}
return implode( '', $styles );
}
/**
* Returns CSS classes for icon and icon background colors.
*
* @since 6.3.0
*
* @param array $context Block context passed to Social Sharing Link.
*
* @return string CSS classes for link's icon and background colors.
*/
function block_core_social_link_get_color_classes( $context ) {
$classes = array();
if ( array_key_exists( 'iconColor', $context ) ) {
$classes[] = 'has-' . $context['iconColor'] . '-color';
}
if ( array_key_exists( 'iconBackgroundColor', $context ) ) {
$classes[] = 'has-' . $context['iconBackgroundColor'] . '-background-color';
}
return ' ' . implode( ' ', $classes );
}
avatar/editor.min.css 0000644 00000000167 15025144027 0010610 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 15025144027 0010015 0 ustar 00 .wp-block-avatar__image img{
width:100%;
}
.wp-block-avatar.aligncenter .components-resizable-box__container{
margin:0 auto;
} avatar/style-rtl.css 0000644 00000000233 15025144027 0010471 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 15025144027 0011250 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/block.json 0000644 00000002272 15025144027 0010012 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.css 0000644 00000000233 15025144027 0007672 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 15025144027 0010451 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 15025144027 0010614 0 ustar 00 .wp-block-avatar__image img{
width:100%;
}
.wp-block-avatar.aligncenter .components-resizable-box__container{
margin:0 auto;
} avatar/editor-rtl.min.css 0000644 00000000167 15025144027 0011407 0 ustar 00 .wp-block-avatar__image img{width:100%}.wp-block-avatar.aligncenter .components-resizable-box__container{margin:0 auto} search.php 0000644 00000054750 15025144027 0006535 0 ustar 00 `. Support these by defaulting an undefined label and
// buttonText to `__( 'Search' )`.
$attributes = wp_parse_args(
$attributes,
array(
'label' => __( 'Search' ),
'buttonText' => __( 'Search' ),
)
);
$input_id = wp_unique_id( 'wp-block-search__input-' );
$classnames = classnames_for_block_core_search( $attributes );
$show_label = ! empty( $attributes['showLabel'] );
$use_icon_button = ! empty( $attributes['buttonUseIcon'] );
$show_button = ( ! empty( $attributes['buttonPosition'] ) && 'no-button' === $attributes['buttonPosition'] ) ? false : true;
$button_position = $show_button ? $attributes['buttonPosition'] : null;
$query_params = ( ! empty( $attributes['query'] ) ) ? $attributes['query'] : array();
$button = '';
$query_params_markup = '';
$inline_styles = styles_for_block_core_search( $attributes );
$color_classes = get_color_classes_for_block_core_search( $attributes );
$typography_classes = get_typography_classes_for_block_core_search( $attributes );
$is_button_inside = ! empty( $attributes['buttonPosition'] ) &&
'button-inside' === $attributes['buttonPosition'];
// Border color classes need to be applied to the elements that have a border color.
$border_color_classes = get_border_color_classes_for_block_core_search( $attributes );
// This variable is a constant and its value is always false at this moment.
// It is defined this way because some values depend on it, in case it changes in the future.
$open_by_default = false;
$label_inner_html = empty( $attributes['label'] ) ? __( 'Search' ) : wp_kses_post( $attributes['label'] );
$label = new WP_HTML_Tag_Processor( sprintf( '%2$s ', $inline_styles['label'], $label_inner_html ) );
if ( $label->next_tag() ) {
$label->set_attribute( 'for', $input_id );
$label->add_class( 'wp-block-search__label' );
if ( $show_label && ! empty( $attributes['label'] ) ) {
if ( ! empty( $typography_classes ) ) {
$label->add_class( $typography_classes );
}
} else {
$label->add_class( 'screen-reader-text' );
}
}
$input = new WP_HTML_Tag_Processor( sprintf( ' ', $inline_styles['input'] ) );
$input_classes = array( 'wp-block-search__input' );
if ( ! $is_button_inside && ! empty( $border_color_classes ) ) {
$input_classes[] = $border_color_classes;
}
if ( ! empty( $typography_classes ) ) {
$input_classes[] = $typography_classes;
}
if ( $input->next_tag() ) {
$input->add_class( implode( ' ', $input_classes ) );
$input->set_attribute( 'id', $input_id );
$input->set_attribute( 'value', get_search_query() );
$input->set_attribute( 'placeholder', $attributes['placeholder'] );
// If it's interactive, enqueue the script module and add the directives.
$is_expandable_searchfield = 'button-only' === $button_position;
if ( $is_expandable_searchfield ) {
wp_enqueue_script_module( '@wordpress/block-library/search/view' );
$input->set_attribute( 'data-wp-bind--aria-hidden', '!context.isSearchInputVisible' );
$input->set_attribute( 'data-wp-bind--tabindex', 'state.tabindex' );
// Adding these attributes manually is needed until the Interactivity API
// SSR logic is added to core.
$input->set_attribute( 'aria-hidden', 'true' );
$input->set_attribute( 'tabindex', '-1' );
}
}
if ( count( $query_params ) > 0 ) {
foreach ( $query_params as $param => $value ) {
$query_params_markup .= sprintf(
' ',
esc_attr( $param ),
esc_attr( $value )
);
}
}
if ( $show_button ) {
$button_classes = array( 'wp-block-search__button' );
$button_internal_markup = '';
if ( ! empty( $color_classes ) ) {
$button_classes[] = $color_classes;
}
if ( ! empty( $typography_classes ) ) {
$button_classes[] = $typography_classes;
}
if ( ! $is_button_inside && ! empty( $border_color_classes ) ) {
$button_classes[] = $border_color_classes;
}
if ( ! $use_icon_button ) {
if ( ! empty( $attributes['buttonText'] ) ) {
$button_internal_markup = wp_kses_post( $attributes['buttonText'] );
}
} else {
$button_classes[] = 'has-icon';
$button_internal_markup =
'
';
}
// Include the button element class.
$button_classes[] = wp_theme_get_element_class_name( 'button' );
$button = new WP_HTML_Tag_Processor( sprintf( '%s ', $inline_styles['button'], $button_internal_markup ) );
if ( $button->next_tag() ) {
$button->add_class( implode( ' ', $button_classes ) );
if ( 'button-only' === $attributes['buttonPosition'] ) {
$button->set_attribute( 'data-wp-bind--aria-label', 'state.ariaLabel' );
$button->set_attribute( 'data-wp-bind--aria-controls', 'state.ariaControls' );
$button->set_attribute( 'data-wp-bind--aria-expanded', 'context.isSearchInputVisible' );
$button->set_attribute( 'data-wp-bind--type', 'state.type' );
$button->set_attribute( 'data-wp-on--click', 'actions.openSearchInput' );
// Adding these attributes manually is needed until the Interactivity
// API SSR logic is added to core.
$button->set_attribute( 'aria-label', __( 'Expand search field' ) );
$button->set_attribute( 'aria-controls', 'wp-block-search__input-' . $input_id );
$button->set_attribute( 'aria-expanded', 'false' );
$button->set_attribute( 'type', 'button' );
} else {
$button->set_attribute( 'aria-label', wp_strip_all_tags( $attributes['buttonText'] ) );
}
}
}
$field_markup_classes = $is_button_inside ? $border_color_classes : '';
$field_markup = sprintf(
'%s
',
esc_attr( $field_markup_classes ),
$inline_styles['wrapper'],
$input . $query_params_markup . $button
);
$wrapper_attributes = get_block_wrapper_attributes(
array( 'class' => $classnames )
);
$form_directives = '';
// If it's interactive, add the directives.
if ( $is_expandable_searchfield ) {
$aria_label_expanded = __( 'Submit Search' );
$aria_label_collapsed = __( 'Expand search field' );
$form_context = wp_interactivity_data_wp_context(
array(
'isSearchInputVisible' => $open_by_default,
'inputId' => $input_id,
'ariaLabelExpanded' => $aria_label_expanded,
'ariaLabelCollapsed' => $aria_label_collapsed,
)
);
$form_directives = '
data-wp-interactive="core/search"
' . $form_context . '
data-wp-class--wp-block-search__searchfield-hidden="!context.isSearchInputVisible"
data-wp-on-async--keydown="actions.handleSearchKeydown"
data-wp-on-async--focusout="actions.handleSearchFocusout"
';
}
return sprintf(
'',
esc_url( home_url( '/' ) ),
$wrapper_attributes,
$form_directives,
$label . $field_markup
);
}
/**
* Registers the `core/search` block on the server.
*
* @since 5.2.0
*/
function register_block_core_search() {
register_block_type_from_metadata(
__DIR__ . '/search',
array(
'render_callback' => 'render_block_core_search',
)
);
}
add_action( 'init', 'register_block_core_search' );
/**
* Builds the correct top level classnames for the 'core/search' block.
*
* @since 5.6.0
*
* @param array $attributes The block attributes.
*
* @return string The classnames used in the block.
*/
function classnames_for_block_core_search( $attributes ) {
$classnames = array();
if ( ! empty( $attributes['buttonPosition'] ) ) {
if ( 'button-inside' === $attributes['buttonPosition'] ) {
$classnames[] = 'wp-block-search__button-inside';
}
if ( 'button-outside' === $attributes['buttonPosition'] ) {
$classnames[] = 'wp-block-search__button-outside';
}
if ( 'no-button' === $attributes['buttonPosition'] ) {
$classnames[] = 'wp-block-search__no-button';
}
if ( 'button-only' === $attributes['buttonPosition'] ) {
$classnames[] = 'wp-block-search__button-only wp-block-search__searchfield-hidden';
}
}
if ( isset( $attributes['buttonUseIcon'] ) ) {
if ( ! empty( $attributes['buttonPosition'] ) && 'no-button' !== $attributes['buttonPosition'] ) {
if ( $attributes['buttonUseIcon'] ) {
$classnames[] = 'wp-block-search__icon-button';
} else {
$classnames[] = 'wp-block-search__text-button';
}
}
}
return implode( ' ', $classnames );
}
/**
* This generates a CSS rule for the given border property and side if provided.
* Based on whether the Search block is configured to display the button inside
* or not, the generated rule is injected into the appropriate collection of
* styles for later application in the block's markup.
*
* @since 6.1.0
*
* @param array $attributes The block attributes.
* @param string $property Border property to generate rule for e.g. width or color.
* @param string $side Optional side border. The dictates the value retrieved and final CSS property.
* @param array $wrapper_styles Current collection of wrapper styles.
* @param array $button_styles Current collection of button styles.
* @param array $input_styles Current collection of input styles.
*/
function apply_block_core_search_border_style( $attributes, $property, $side, &$wrapper_styles, &$button_styles, &$input_styles ) {
$is_button_inside = isset( $attributes['buttonPosition'] ) && 'button-inside' === $attributes['buttonPosition'];
$path = array( 'style', 'border', $property );
if ( $side ) {
array_splice( $path, 2, 0, $side );
}
$value = _wp_array_get( $attributes, $path, false );
if ( empty( $value ) ) {
return;
}
if ( 'color' === $property && $side ) {
$has_color_preset = str_contains( $value, 'var:preset|color|' );
if ( $has_color_preset ) {
$named_color_value = substr( $value, strrpos( $value, '|' ) + 1 );
$value = sprintf( 'var(--wp--preset--color--%s)', $named_color_value );
}
}
$property_suffix = $side ? sprintf( '%s-%s', $side, $property ) : $property;
if ( $is_button_inside ) {
$wrapper_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) );
} else {
$button_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) );
$input_styles[] = sprintf( 'border-%s: %s;', $property_suffix, esc_attr( $value ) );
}
}
/**
* This adds CSS rules for a given border property e.g. width or color. It
* injects rules into the provided wrapper, button and input style arrays for
* uniform "flat" borders or those with individual sides configured.
*
* @since 6.1.0
*
* @param array $attributes The block attributes.
* @param string $property Border property to generate rule for e.g. width or color.
* @param array $wrapper_styles Current collection of wrapper styles.
* @param array $button_styles Current collection of button styles.
* @param array $input_styles Current collection of input styles.
*/
function apply_block_core_search_border_styles( $attributes, $property, &$wrapper_styles, &$button_styles, &$input_styles ) {
apply_block_core_search_border_style( $attributes, $property, null, $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'top', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'right', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'bottom', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_style( $attributes, $property, 'left', $wrapper_styles, $button_styles, $input_styles );
}
/**
* Builds an array of inline styles for the search block.
*
* The result will contain one entry for shared styles such as those for the
* inner input or button and a second for the inner wrapper should the block
* be positioning the button "inside".
*
* @since 5.8.0
*
* @param array $attributes The block attributes.
*
* @return array Style HTML attribute.
*/
function styles_for_block_core_search( $attributes ) {
$wrapper_styles = array();
$button_styles = array();
$input_styles = array();
$label_styles = array();
$is_button_inside = ! empty( $attributes['buttonPosition'] ) &&
'button-inside' === $attributes['buttonPosition'];
$show_label = ( isset( $attributes['showLabel'] ) ) && false !== $attributes['showLabel'];
// Add width styles.
$has_width = ! empty( $attributes['width'] ) && ! empty( $attributes['widthUnit'] );
if ( $has_width ) {
$wrapper_styles[] = sprintf(
'width: %d%s;',
esc_attr( $attributes['width'] ),
esc_attr( $attributes['widthUnit'] )
);
}
// Add border width and color styles.
apply_block_core_search_border_styles( $attributes, 'width', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_styles( $attributes, 'color', $wrapper_styles, $button_styles, $input_styles );
apply_block_core_search_border_styles( $attributes, 'style', $wrapper_styles, $button_styles, $input_styles );
// Add border radius styles.
$has_border_radius = ! empty( $attributes['style']['border']['radius'] );
if ( $has_border_radius ) {
$default_padding = '4px';
$border_radius = $attributes['style']['border']['radius'];
if ( is_array( $border_radius ) ) {
// Apply styles for individual corner border radii.
foreach ( $border_radius as $key => $value ) {
if ( null !== $value ) {
// Convert camelCase key to kebab-case.
$name = strtolower( preg_replace( '/(? ! empty( $input_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $input_styles ) ) ) ) : '',
'button' => ! empty( $button_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $button_styles ) ) ) ) : '',
'wrapper' => ! empty( $wrapper_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $wrapper_styles ) ) ) ) : '',
'label' => ! empty( $label_styles ) ? sprintf( ' style="%s"', esc_attr( safecss_filter_attr( implode( ' ', $label_styles ) ) ) ) : '',
);
}
/**
* Returns typography classnames depending on whether there are named font sizes/families.
*
* @since 6.1.0
*
* @param array $attributes The block attributes.
*
* @return string The typography color classnames to be applied to the block elements.
*/
function get_typography_classes_for_block_core_search( $attributes ) {
$typography_classes = array();
$has_named_font_family = ! empty( $attributes['fontFamily'] );
$has_named_font_size = ! empty( $attributes['fontSize'] );
if ( $has_named_font_size ) {
$typography_classes[] = sprintf( 'has-%s-font-size', esc_attr( $attributes['fontSize'] ) );
}
if ( $has_named_font_family ) {
$typography_classes[] = sprintf( 'has-%s-font-family', esc_attr( $attributes['fontFamily'] ) );
}
return implode( ' ', $typography_classes );
}
/**
* Returns typography styles to be included in an HTML style tag.
* This excludes text-decoration, which is applied only to the label and button elements of the search block.
*
* @since 6.1.0
*
* @param array $attributes The block attributes.
*
* @return string A string of typography CSS declarations.
*/
function get_typography_styles_for_block_core_search( $attributes ) {
$typography_styles = array();
// Add typography styles.
if ( ! empty( $attributes['style']['typography']['fontSize'] ) ) {
$typography_styles[] = sprintf(
'font-size: %s;',
wp_get_typography_font_size_value(
array(
'size' => $attributes['style']['typography']['fontSize'],
)
)
);
}
if ( ! empty( $attributes['style']['typography']['fontFamily'] ) ) {
$typography_styles[] = sprintf( 'font-family: %s;', $attributes['style']['typography']['fontFamily'] );
}
if ( ! empty( $attributes['style']['typography']['letterSpacing'] ) ) {
$typography_styles[] = sprintf( 'letter-spacing: %s;', $attributes['style']['typography']['letterSpacing'] );
}
if ( ! empty( $attributes['style']['typography']['fontWeight'] ) ) {
$typography_styles[] = sprintf( 'font-weight: %s;', $attributes['style']['typography']['fontWeight'] );
}
if ( ! empty( $attributes['style']['typography']['fontStyle'] ) ) {
$typography_styles[] = sprintf( 'font-style: %s;', $attributes['style']['typography']['fontStyle'] );
}
if ( ! empty( $attributes['style']['typography']['lineHeight'] ) ) {
$typography_styles[] = sprintf( 'line-height: %s;', $attributes['style']['typography']['lineHeight'] );
}
if ( ! empty( $attributes['style']['typography']['textTransform'] ) ) {
$typography_styles[] = sprintf( 'text-transform: %s;', $attributes['style']['typography']['textTransform'] );
}
return implode( '', $typography_styles );
}
/**
* Returns border color classnames depending on whether there are named or custom border colors.
*
* @since 5.9.0
*
* @param array $attributes The block attributes.
*
* @return string The border color classnames to be applied to the block elements.
*/
function get_border_color_classes_for_block_core_search( $attributes ) {
$border_color_classes = array();
$has_custom_border_color = ! empty( $attributes['style']['border']['color'] );
$has_named_border_color = ! empty( $attributes['borderColor'] );
if ( $has_custom_border_color || $has_named_border_color ) {
$border_color_classes[] = 'has-border-color';
}
if ( $has_named_border_color ) {
$border_color_classes[] = sprintf( 'has-%s-border-color', esc_attr( $attributes['borderColor'] ) );
}
return implode( ' ', $border_color_classes );
}
/**
* Returns color classnames depending on whether there are named or custom text and background colors.
*
* @since 5.9.0
*
* @param array $attributes The block attributes.
*
* @return string The color classnames to be applied to the block elements.
*/
function get_color_classes_for_block_core_search( $attributes ) {
$classnames = array();
// Text color.
$has_named_text_color = ! empty( $attributes['textColor'] );
$has_custom_text_color = ! empty( $attributes['style']['color']['text'] );
if ( $has_named_text_color ) {
$classnames[] = sprintf( 'has-text-color has-%s-color', $attributes['textColor'] );
} elseif ( $has_custom_text_color ) {
// If a custom 'textColor' was selected instead of a preset, still add the generic `has-text-color` class.
$classnames[] = 'has-text-color';
}
// Background color.
$has_named_background_color = ! empty( $attributes['backgroundColor'] );
$has_custom_background_color = ! empty( $attributes['style']['color']['background'] );
$has_named_gradient = ! empty( $attributes['gradient'] );
$has_custom_gradient = ! empty( $attributes['style']['color']['gradient'] );
if (
$has_named_background_color ||
$has_custom_background_color ||
$has_named_gradient ||
$has_custom_gradient
) {
$classnames[] = 'has-background';
}
if ( $has_named_background_color ) {
$classnames[] = sprintf( 'has-%s-background-color', $attributes['backgroundColor'] );
}
if ( $has_named_gradient ) {
$classnames[] = sprintf( 'has-%s-gradient-background', $attributes['gradient'] );
}
return implode( ' ', $classnames );
}
columns/editor.min.css 0000644 00000000213 15025144027 0011002 0 ustar 00 .wp-block-columns :where(.wp-block){margin-left:0;margin-right:0;max-width:none}html :where(.wp-block-column){margin-bottom:0;margin-top:0} columns/editor.css 0000644 00000000240 15025144027 0010220 0 ustar 00 .wp-block-columns :where(.wp-block){
margin-left:0;
margin-right:0;
max-width:none;
}
html :where(.wp-block-column){
margin-bottom:0;
margin-top:0;
} columns/style-rtl.css 0000644 00000003317 15025144027 0010701 0 ustar 00 .wp-block-columns{
align-items:normal !important;
box-sizing:border-box;
display:flex;
flex-wrap:wrap !important;
}
@media (min-width:782px){
.wp-block-columns{
flex-wrap:nowrap !important;
}
}
.wp-block-columns.are-vertically-aligned-top{
align-items:flex-start;
}
.wp-block-columns.are-vertically-aligned-center{
align-items:center;
}
.wp-block-columns.are-vertically-aligned-bottom{
align-items:flex-end;
}
@media (max-width:781px){
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{
flex-basis:100% !important;
}
}
@media (min-width:782px){
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{
flex-basis:0;
flex-grow:1;
}
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{
flex-grow:0;
}
}
.wp-block-columns.is-not-stacked-on-mobile{
flex-wrap:nowrap !important;
}
.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{
flex-basis:0;
flex-grow:1;
}
.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{
flex-grow:0;
}
:where(.wp-block-columns){
margin-bottom:1.75em;
}
:where(.wp-block-columns.has-background){
padding:1.25em 2.375em;
}
.wp-block-column{
flex-grow:1;
min-width:0;
overflow-wrap:break-word;
word-break:break-word;
}
.wp-block-column.is-vertically-aligned-top{
align-self:flex-start;
}
.wp-block-column.is-vertically-aligned-center{
align-self:center;
}
.wp-block-column.is-vertically-aligned-bottom{
align-self:flex-end;
}
.wp-block-column.is-vertically-aligned-stretch{
align-self:stretch;
}
.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{
width:100%;
} columns/style-rtl.min.css 0000644 00000003036 15025144027 0011461 0 ustar 00 .wp-block-columns{align-items:normal!important;box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%} columns/block.json 0000644 00000003671 15025144027 0010220 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/columns",
"title": "Columns",
"category": "design",
"allowedBlocks": [ "core/column" ],
"description": "Display content in multiple columns, with blocks added to each column.",
"textdomain": "default",
"attributes": {
"verticalAlignment": {
"type": "string"
},
"isStackedOnMobile": {
"type": "boolean",
"default": true
},
"templateLock": {
"type": [ "string", "boolean" ],
"enum": [ "all", "insert", "contentOnly", false ]
}
},
"supports": {
"anchor": true,
"align": [ "wide", "full" ],
"html": false,
"color": {
"gradients": true,
"link": true,
"heading": true,
"button": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"spacing": {
"blockGap": {
"__experimentalDefault": "2em",
"sides": [ "horizontal", "vertical" ]
},
"margin": [ "top", "bottom" ],
"padding": true,
"__experimentalDefaultControls": {
"padding": true,
"blockGap": true
}
},
"layout": {
"allowSwitching": false,
"allowInheriting": false,
"allowEditing": false,
"default": {
"type": "flex",
"flexWrap": "nowrap"
}
},
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
},
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true,
"__experimentalTextDecoration": true,
"__experimentalLetterSpacing": true,
"__experimentalDefaultControls": {
"fontSize": true
}
},
"interactivity": {
"clientNavigation": true
},
"shadow": true
},
"editorStyle": "wp-block-columns-editor",
"style": "wp-block-columns"
}
columns/style.css 0000644 00000003317 15025144027 0010102 0 ustar 00 .wp-block-columns{
align-items:normal !important;
box-sizing:border-box;
display:flex;
flex-wrap:wrap !important;
}
@media (min-width:782px){
.wp-block-columns{
flex-wrap:nowrap !important;
}
}
.wp-block-columns.are-vertically-aligned-top{
align-items:flex-start;
}
.wp-block-columns.are-vertically-aligned-center{
align-items:center;
}
.wp-block-columns.are-vertically-aligned-bottom{
align-items:flex-end;
}
@media (max-width:781px){
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{
flex-basis:100% !important;
}
}
@media (min-width:782px){
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{
flex-basis:0;
flex-grow:1;
}
.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{
flex-grow:0;
}
}
.wp-block-columns.is-not-stacked-on-mobile{
flex-wrap:nowrap !important;
}
.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{
flex-basis:0;
flex-grow:1;
}
.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{
flex-grow:0;
}
:where(.wp-block-columns){
margin-bottom:1.75em;
}
:where(.wp-block-columns.has-background){
padding:1.25em 2.375em;
}
.wp-block-column{
flex-grow:1;
min-width:0;
overflow-wrap:break-word;
word-break:break-word;
}
.wp-block-column.is-vertically-aligned-top{
align-self:flex-start;
}
.wp-block-column.is-vertically-aligned-center{
align-self:center;
}
.wp-block-column.is-vertically-aligned-bottom{
align-self:flex-end;
}
.wp-block-column.is-vertically-aligned-stretch{
align-self:stretch;
}
.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{
width:100%;
} columns/style.min.css 0000644 00000003036 15025144027 0010662 0 ustar 00 .wp-block-columns{align-items:normal!important;box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%} columns/editor-rtl.css 0000644 00000000240 15025144027 0011017 0 ustar 00 .wp-block-columns :where(.wp-block){
margin-left:0;
margin-right:0;
max-width:none;
}
html :where(.wp-block-column){
margin-bottom:0;
margin-top:0;
} columns/editor-rtl.min.css 0000644 00000000213 15025144027 0011601 0 ustar 00 .wp-block-columns :where(.wp-block){margin-left:0;margin-right:0;max-width:none}html :where(.wp-block-column){margin-bottom:0;margin-top:0} image.php 0000644 00000027367 15025144027 0006356 0 ustar 00 next_tag( 'img' ) || ! $p->get_attribute( 'src' ) ) {
return '';
}
$has_id_binding = isset( $attributes['metadata']['bindings']['id'] ) && isset( $attributes['id'] );
// Ensure the `wp-image-id` classname on the image block supports block bindings.
if ( $has_id_binding ) {
// If there's a mismatch with the 'wp-image-' class and the actual id, the id was
// probably overridden by block bindings. Update it to the correct value.
// See https://github.com/WordPress/gutenberg/issues/62886 for why this is needed.
$id = $attributes['id'];
$image_classnames = $p->get_attribute( 'class' );
$class_with_binding_value = "wp-image-$id";
if ( is_string( $image_classnames ) && ! str_contains( $image_classnames, $class_with_binding_value ) ) {
$image_classnames = preg_replace( '/wp-image-(\d+)/', $class_with_binding_value, $image_classnames );
$p->set_attribute( 'class', $image_classnames );
}
}
// For backwards compatibility, the data-id html attribute is only set for
// image blocks nested in a gallery. Detect if the image is in a gallery by
// checking the data-id attribute.
// See the `block_core_gallery_data_id_backcompatibility` function.
if ( isset( $attributes['data-id'] ) ) {
// If there's a binding for the `id`, the `id` attribute is used for the
// value, since `data-id` does not support block bindings.
// Else the `data-id` is used for backwards compatibility, since
// third parties may be filtering its value.
$data_id = $has_id_binding ? $attributes['id'] : $attributes['data-id'];
$p->set_attribute( 'data-id', $data_id );
}
$link_destination = isset( $attributes['linkDestination'] ) ? $attributes['linkDestination'] : 'none';
$lightbox_settings = block_core_image_get_lightbox_settings( $block->parsed_block );
/*
* If the lightbox is enabled and the image is not linked, adds the filter and
* the JavaScript view file.
*/
if (
isset( $lightbox_settings ) &&
'none' === $link_destination &&
isset( $lightbox_settings['enabled'] ) &&
true === $lightbox_settings['enabled']
) {
wp_enqueue_script_module( '@wordpress/block-library/image/view' );
/*
* This render needs to happen in a filter with priority 15 to ensure that
* it runs after the duotone filter and that duotone styles are applied to
* the image in the lightbox. Lightbox has to work with any plugins that
* might use filters as well. Removing this can be considered in the future
* if the way the blocks are rendered changes, or if a new kind of filter is
* introduced.
*/
add_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15, 2 );
} else {
/*
* Remove the filter if previously added by other Image blocks.
*/
remove_filter( 'render_block_core/image', 'block_core_image_render_lightbox', 15 );
}
return $p->get_updated_html();
}
/**
* Adds the lightboxEnabled flag to the block data.
*
* This is used to determine whether the lightbox should be rendered or not.
*
* @since 6.4.0
*
* @param array $block Block data.
*
* @return array Filtered block data.
*/
function block_core_image_get_lightbox_settings( $block ) {
// Gets the lightbox setting from the block attributes.
if ( isset( $block['attrs']['lightbox'] ) ) {
$lightbox_settings = $block['attrs']['lightbox'];
}
if ( ! isset( $lightbox_settings ) ) {
$lightbox_settings = wp_get_global_settings( array( 'lightbox' ), array( 'block_name' => 'core/image' ) );
// If not present in global settings, check the top-level global settings.
//
// NOTE: If no block-level settings are found, the previous call to
// `wp_get_global_settings` will return the whole `theme.json` structure in
// which case we can check if the "lightbox" key is present at the top-level
// of the global settings and use its value.
if ( isset( $lightbox_settings['lightbox'] ) ) {
$lightbox_settings = wp_get_global_settings( array( 'lightbox' ) );
}
}
return $lightbox_settings ?? null;
}
/**
* Adds the directives and layout needed for the lightbox behavior.
*
* @since 6.4.0
*
* @param string $block_content Rendered block content.
* @param array $block Block object.
*
* @return string Filtered block content.
*/
function block_core_image_render_lightbox( $block_content, $block ) {
/*
* If there's no IMG tag in the block then return the given block content
* as-is. There's nothing that this code can knowingly modify to add the
* lightbox behavior.
*/
$p = new WP_HTML_Tag_Processor( $block_content );
if ( $p->next_tag( 'figure' ) ) {
$p->set_bookmark( 'figure' );
}
if ( ! $p->next_tag( 'img' ) ) {
return $block_content;
}
$alt = $p->get_attribute( 'alt' );
$img_uploaded_src = $p->get_attribute( 'src' );
$img_class_names = $p->get_attribute( 'class' );
$img_styles = $p->get_attribute( 'style' );
$img_width = 'none';
$img_height = 'none';
$aria_label = __( 'Enlarge' );
$dialog_aria_label = __( 'Enlarged image' );
if ( isset( $block['attrs']['id'] ) ) {
$img_uploaded_src = wp_get_attachment_url( $block['attrs']['id'] );
$img_metadata = wp_get_attachment_metadata( $block['attrs']['id'] );
$img_width = $img_metadata['width'] ?? 'none';
$img_height = $img_metadata['height'] ?? 'none';
}
// Figure.
$p->seek( 'figure' );
$figure_class_names = $p->get_attribute( 'class' );
$figure_styles = $p->get_attribute( 'style' );
// Create unique id and set the image metadata in the state.
$unique_image_id = uniqid();
wp_interactivity_state(
'core/image',
array(
'metadata' => array(
$unique_image_id => array(
'uploadedSrc' => $img_uploaded_src,
'figureClassNames' => $figure_class_names,
'figureStyles' => $figure_styles,
'imgClassNames' => $img_class_names,
'imgStyles' => $img_styles,
'targetWidth' => $img_width,
'targetHeight' => $img_height,
'scaleAttr' => $block['attrs']['scale'] ?? false,
'ariaLabel' => $dialog_aria_label,
'alt' => $alt,
),
),
)
);
$p->add_class( 'wp-lightbox-container' );
$p->set_attribute( 'data-wp-interactive', 'core/image' );
$p->set_attribute(
'data-wp-context',
wp_json_encode(
array(
'imageId' => $unique_image_id,
),
JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP
)
);
// Image.
$p->next_tag( 'img' );
$p->set_attribute( 'data-wp-init', 'callbacks.setButtonStyles' );
$p->set_attribute( 'data-wp-on-async--load', 'callbacks.setButtonStyles' );
$p->set_attribute( 'data-wp-on-async-window--resize', 'callbacks.setButtonStyles' );
// Sets an event callback on the `img` because the `figure` element can also
// contain a caption, and we don't want to trigger the lightbox when the
// caption is clicked.
$p->set_attribute( 'data-wp-on-async--click', 'actions.showLightbox' );
$p->set_attribute( 'data-wp-class--hide', 'state.isContentHidden' );
$p->set_attribute( 'data-wp-class--show', 'state.isContentVisible' );
$body_content = $p->get_updated_html();
// Adds a button alongside image in the body content.
$img = null;
preg_match( '/ ]+>/', $body_content, $img );
$button =
$img[0]
. '
';
$body_content = preg_replace( '/ ]+>/', $button, $body_content );
add_action( 'wp_footer', 'block_core_image_print_lightbox_overlay' );
return $body_content;
}
/**
* @since 6.5.0
*/
function block_core_image_print_lightbox_overlay() {
$close_button_label = esc_attr__( 'Close' );
// If the current theme does NOT have a `theme.json`, or the colors are not
// defined, it needs to set the background color & close button color to some
// default values because it can't get them from the Global Styles.
$background_color = '#fff';
$close_button_color = '#000';
if ( wp_theme_has_theme_json() ) {
$global_styles_color = wp_get_global_styles( array( 'color' ) );
if ( ! empty( $global_styles_color['background'] ) ) {
$background_color = esc_attr( $global_styles_color['background'] );
}
if ( ! empty( $global_styles_color['text'] ) ) {
$close_button_color = esc_attr( $global_styles_color['text'] );
}
}
echo <<
HTML;
}
/**
* Registers the `core/image` block on server.
*
* @since 5.9.0
*/
function register_block_core_image() {
register_block_type_from_metadata(
__DIR__ . '/image',
array(
'render_callback' => 'render_block_core_image',
)
);
}
add_action( 'init', 'register_block_core_image' );
query-pagination-next/block.json 0000644 00000002017 15025144027 0013001 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/query-pagination-next",
"title": "Next Page",
"category": "theme",
"parent": [ "core/query-pagination" ],
"description": "Displays the next posts page link.",
"textdomain": "default",
"attributes": {
"label": {
"type": "string"
}
},
"usesContext": [
"queryId",
"query",
"paginationArrow",
"showLabel",
"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
}
}
}
comment-date/style-rtl.css 0000644 00000000062 15025144027 0011570 0 ustar 00 .wp-block-comment-date{
box-sizing:border-box;
} comment-date/style-rtl.min.css 0000644 00000000055 15025144027 0012354 0 ustar 00 .wp-block-comment-date{box-sizing:border-box} comment-date/block.json 0000644 00000002534 15025144027 0011112 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/comment-date",
"title": "Comment Date",
"category": "theme",
"ancestor": [ "core/comment-template" ],
"description": "Displays the date on which the comment was posted.",
"textdomain": "default",
"attributes": {
"format": {
"type": "string"
},
"isLink": {
"type": "boolean",
"default": true
}
},
"usesContext": [ "commentId" ],
"supports": {
"html": false,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true,
"link": true
}
},
"spacing": {
"margin": true,
"padding": 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-comment-date"
}
comment-date/style.css 0000644 00000000062 15025144027 0010771 0 ustar 00 .wp-block-comment-date{
box-sizing:border-box;
} comment-date/style.min.css 0000644 00000000055 15025144027 0011555 0 ustar 00 .wp-block-comment-date{box-sizing:border-box} post-template/style-rtl.css 0000644 00000003215 15025144027 0012014 0 ustar 00 .wp-block-post-template{
box-sizing:border-box;
list-style:none;
margin-bottom:0;
margin-top:0;
max-width:100%;
padding:0;
}
.wp-block-post-template.is-flex-container{
display:flex;
flex-direction:row;
flex-wrap:wrap;
gap:1.25em;
}
.wp-block-post-template.is-flex-container>li{
margin:0;
width:100%;
}
@media (min-width:600px){
.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{
width:calc(50% - .625em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{
width:calc(33.33333% - .83333em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{
width:calc(25% - .9375em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{
width:calc(20% - 1em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{
width:calc(16.66667% - 1.04167em);
}
}
@media (max-width:600px){
.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{
grid-template-columns:1fr;
}
}
.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{
float:left;
margin-inline-end:0;
margin-inline-start:2em;
}
.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{
float:right;
margin-inline-end:2em;
margin-inline-start:0;
}
.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{
margin-inline-end:auto;
margin-inline-start:auto;
} post-template/style-rtl.min.css 0000644 00000002761 15025144027 0012603 0 ustar 00 .wp-block-post-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-post-template.is-flex-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.25em}.wp-block-post-template.is-flex-container>li{margin:0;width:100%}@media (min-width:600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - .625em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{width:calc(33.33333% - .83333em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{width:calc(25% - .9375em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{width:calc(20% - 1em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{width:calc(16.66667% - 1.04167em)}}@media (max-width:600px){.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{grid-template-columns:1fr}}.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{float:left;margin-inline-end:0;margin-inline-start:2em}.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{float:right;margin-inline-end:2em;margin-inline-start:0}.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{margin-inline-end:auto;margin-inline-start:auto} post-template/block.json 0000644 00000003043 15025144027 0011327 0 ustar 00 {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/post-template",
"title": "Post Template",
"category": "theme",
"ancestor": [ "core/query" ],
"description": "Contains the block elements used to render a post, like the title, date, featured image, content or excerpt, and more.",
"textdomain": "default",
"usesContext": [
"queryId",
"query",
"displayLayout",
"templateSlug",
"previewPostType",
"enhancedPagination",
"postType"
],
"supports": {
"reusable": false,
"html": false,
"align": [ "wide", "full" ],
"layout": 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
}
},
"spacing": {
"margin": true,
"padding": true,
"blockGap": {
"__experimentalDefault": "1.25em"
},
"__experimentalDefaultControls": {
"blockGap": true,
"padding": false,
"margin": false
}
},
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"radius": true,
"color": true,
"width": true,
"style": true
}
},
"style": "wp-block-post-template",
"editorStyle": "wp-block-post-template-editor"
}
post-template/style.css 0000644 00000003215 15025144027 0011215 0 ustar 00 .wp-block-post-template{
box-sizing:border-box;
list-style:none;
margin-bottom:0;
margin-top:0;
max-width:100%;
padding:0;
}
.wp-block-post-template.is-flex-container{
display:flex;
flex-direction:row;
flex-wrap:wrap;
gap:1.25em;
}
.wp-block-post-template.is-flex-container>li{
margin:0;
width:100%;
}
@media (min-width:600px){
.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{
width:calc(50% - .625em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{
width:calc(33.33333% - .83333em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{
width:calc(25% - .9375em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{
width:calc(20% - 1em);
}
.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{
width:calc(16.66667% - 1.04167em);
}
}
@media (max-width:600px){
.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{
grid-template-columns:1fr;
}
}
.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{
float:right;
margin-inline-end:0;
margin-inline-start:2em;
}
.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{
float:left;
margin-inline-end:2em;
margin-inline-start:0;
}
.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{
margin-inline-end:auto;
margin-inline-start:auto;
} post-template/style.min.css 0000644 00000002761 15025144027 0012004 0 ustar 00 .wp-block-post-template{box-sizing:border-box;list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-post-template.is-flex-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.25em}.wp-block-post-template.is-flex-container>li{margin:0;width:100%}@media (min-width:600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - .625em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{width:calc(33.33333% - .83333em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{width:calc(25% - .9375em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{width:calc(20% - 1em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{width:calc(16.66667% - 1.04167em)}}@media (max-width:600px){.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{grid-template-columns:1fr}}.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{float:right;margin-inline-end:0;margin-inline-start:2em}.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{float:left;margin-inline-end:2em;margin-inline-start:0}.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{margin-inline-end:auto;margin-inline-start:auto} comments-pagination-previous.php 0000644 00000003376 15025144027 0013114 0 ustar 00 'render_block_core_comments_pagination_previous',
)
);
}
add_action( 'init', 'register_block_core_comments_pagination_previous' );
post-navigation-link.php 0000644 00000011345 15025144027 0011336 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 = '