',
esc_url( $iframe_src )
);
// Use the HTML API to find and replace the figure.wp-block-embed element.
$processor = new WP_HTML_Tag_Processor( $content );
if ( $processor->next_tag(
array(
'tag_name' => 'FIGURE',
'class_name' => 'wp-block-embed',
)
) ) {
// Use regex with PREG_OFFSET_CAPTURE to find the position of the figure element.
// This follows the same pattern used for featured image insertion below.
$figure_pattern = '/
]+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' );
PK \90 0 loginout/style.cssnu [ .wp-block-loginout {
box-sizing: border-box;
}PK \`) ) loginout/style-rtl.min.cssnu [ .wp-block-loginout{box-sizing:border-box}PK \D& & loginout/block.jsonnu [ {
"$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": {
"anchor": true,
"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"
}
PK \90 0 loginout/style-rtl.cssnu [ .wp-block-loginout {
box-sizing: border-box;
}PK \`) ) loginout/style.min.cssnu [ .wp-block-loginout{box-sizing:border-box}PK \
k
freeform/editor-rtl.cssnu [ /**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Typography
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Radius scale.
*/
/**
* Elevation scale.
*/
/**
* Dimensions.
*/
/**
* Mobile specific styles
*/
/**
* Editor styles.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Typography
*/
/**
* Breakpoints & Media Queries
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Breakpoint mixins
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/**
* Creates a checkerboard pattern background to indicate transparency.
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
*/
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe {
height: 50vh !important;
}
@media (min-width: 960px) {
.block-editor-freeform-modal .block-editor-freeform-modal__content:not(.is-full-screen) {
height: 9999rem;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .components-modal__header + div {
height: 100%;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-tinymce {
height: calc(100% - 36px - 16px);
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-container-body {
height: 100%;
display: flex;
flex-direction: column;
min-width: 50vw;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area {
flex-grow: 1;
display: flex;
flex-direction: column;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe {
flex-grow: 1;
height: 10px !important;
}
}
.block-editor-freeform-modal__actions {
margin-top: 16px;
}PK \ freeform/block.jsonnu [ {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/freeform",
"title": "Classic",
"category": "text",
"description": "Use the classic WordPress editor.",
"textdomain": "default",
"attributes": {
"content": {
"type": "string",
"source": "raw"
}
},
"supports": {
"className": false,
"customClassName": false,
"lock": false,
"reusable": false,
"renaming": false,
"visibility": false,
"customCSS": false
},
"editorStyle": "wp-block-freeform-editor"
}
PK \TA freeform/editor.min.cssnu [ .block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe{height:50vh!important}@media (min-width:960px){.block-editor-freeform-modal .block-editor-freeform-modal__content:not(.is-full-screen){height:9999rem}.block-editor-freeform-modal .block-editor-freeform-modal__content .components-modal__header+div{height:100%}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-tinymce{height:calc(100% - 52px)}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-container-body{display:flex;flex-direction:column;height:100%;min-width:50vw}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area{display:flex;flex-direction:column;flex-grow:1}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe{flex-grow:1;height:10px!important}}.block-editor-freeform-modal__actions{margin-top:16px}PK \TA freeform/editor-rtl.min.cssnu [ .block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe{height:50vh!important}@media (min-width:960px){.block-editor-freeform-modal .block-editor-freeform-modal__content:not(.is-full-screen){height:9999rem}.block-editor-freeform-modal .block-editor-freeform-modal__content .components-modal__header+div{height:100%}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-tinymce{height:calc(100% - 52px)}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-container-body{display:flex;flex-direction:column;height:100%;min-width:50vw}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area{display:flex;flex-direction:column;flex-grow:1}.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe{flex-grow:1;height:10px!important}}.block-editor-freeform-modal__actions{margin-top:16px}PK \
k
freeform/editor.cssnu [ /**
* SCSS Variables.
*
* Please use variables from this sheet to ensure consistency across the UI.
* Don't add to this sheet unless you're pretty sure the value will be reused in many places.
* For example, don't add rules to this sheet that affect block visuals. It's purely for UI.
*/
/**
* Colors
*/
/**
* Fonts & basic variables.
*/
/**
* Typography
*/
/**
* Grid System.
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
*/
/**
* Radius scale.
*/
/**
* Elevation scale.
*/
/**
* Dimensions.
*/
/**
* Mobile specific styles
*/
/**
* Editor styles.
*/
/**
* Block & Editor UI.
*/
/**
* Block paddings.
*/
/**
* React Native specific.
* These variables do not appear to be used anywhere else.
*/
/**
* Typography
*/
/**
* Breakpoints & Media Queries
*/
/**
* Converts a hex value into the rgb equivalent.
*
* @param {string} hex - the hexadecimal value to convert
* @return {string} comma separated rgb values
*/
/**
* Long content fade mixin
*
* Creates a fading overlay to signify that the content is longer
* than the space allows.
*/
/**
* Breakpoint mixins
*/
/**
* Focus styles.
*/
/**
* Applies editor left position to the selector passed as argument
*/
/**
* Styles that are reused verbatim in a few places
*/
/**
* Allows users to opt-out of animations via OS-level preferences.
*/
/**
* Reset default styles for JavaScript UI based pages.
* This is a WP-admin agnostic reset
*/
/**
* Reset the WP Admin page styles for Gutenberg-like pages.
*/
/**
* Creates a checkerboard pattern background to indicate transparency.
* @param {String} $size - The size of the squares in the checkerboard pattern. Default is 12px.
*/
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe {
height: 50vh !important;
}
@media (min-width: 960px) {
.block-editor-freeform-modal .block-editor-freeform-modal__content:not(.is-full-screen) {
height: 9999rem;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .components-modal__header + div {
height: 100%;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-tinymce {
height: calc(100% - 36px - 16px);
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-container-body {
height: 100%;
display: flex;
flex-direction: column;
min-width: 50vw;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area {
flex-grow: 1;
display: flex;
flex-direction: column;
}
.block-editor-freeform-modal .block-editor-freeform-modal__content .mce-edit-area iframe {
flex-grow: 1;
height: 10px !important;
}
}
.block-editor-freeform-modal__actions {
margin-top: 16px;
}PK \zĐ missing/block.jsonnu [ {
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/missing",
"title": "Unsupported",
"category": "text",
"description": "Your site doesn’t include support for this block.",
"textdomain": "default",
"attributes": {
"originalName": {
"type": "string"
},
"originalUndelimitedContent": {
"type": "string"
},
"originalContent": {
"type": "string",
"source": "raw"
}
},
"supports": {
"className": false,
"customClassName": false,
"inserter": false,
"html": false,
"lock": false,
"reusable": false,
"renaming": false,
"visibility": false,
"interactivity": {
"clientNavigation": true
},
"customCSS": false
}
}
PK \Q site-title/style.cssnu [ .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;
}PK \dSM M site-title/editor-rtl.cssnu [ .wp-block-site-title__placeholder {
padding: 1em 0;
border: 1px dashed;
}PK \C site-title/style-rtl.min.cssnu [ .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}PK \Ԣg site-title/block.jsonnu [ {
"$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": {
"anchor": true,
"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"
}
PK \Q site-title/style-rtl.cssnu [ .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;
}PK \fB B site-title/editor.min.cssnu [ .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0}PK \fB B site-title/editor-rtl.min.cssnu [ .wp-block-site-title__placeholder{border:1px dashed;padding:1em 0}PK \dSM M site-title/editor.cssnu [ .wp-block-site-title__placeholder {
padding: 1em 0;
border: 1px dashed;
}PK \C site-title/style.min.cssnu [ .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}PK \~A rss.phpnu [
' . __( '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.' ) . '
';
return $html;
}
/**
* Returns a navigation link variation
*
* @since 5.9.0
*
* @param WP_Taxonomy|WP_Post_Type $entity post type or taxonomy entity.
* @param string $kind string of value 'taxonomy' or 'post-type'.
*
* @return array
*/
function build_variation_for_navigation_link( $entity, $kind ) {
$title = '';
$description = '';
// Get default labels based on entity type
$default_labels = null;
if ( $entity instanceof WP_Post_Type ) {
$default_labels = WP_Post_Type::get_default_labels();
} elseif ( $entity instanceof WP_Taxonomy ) {
$default_labels = WP_Taxonomy::get_default_labels();
}
// Get title and check if it's default
$is_default_title = false;
if ( property_exists( $entity->labels, 'item_link' ) ) {
$title = $entity->labels->item_link;
if ( isset( $default_labels['item_link'] ) ) {
$is_default_title = in_array( $title, $default_labels['item_link'], true );
}
}
// Get description and check if it's default
$is_default_description = false;
if ( property_exists( $entity->labels, 'item_link_description' ) ) {
$description = $entity->labels->item_link_description;
if ( isset( $default_labels['item_link_description'] ) ) {
$is_default_description = in_array( $description, $default_labels['item_link_description'], true );
}
}
// Calculate singular name once (used for both title and description)
$singular = $entity->labels->singular_name ?? ucfirst( $entity->name );
// Set default title if needed
if ( $is_default_title || '' === $title ) {
/* translators: %s: Singular label of the entity. */
$title = sprintf( __( '%s link' ), $singular );
}
// Default description if needed.
// Use a single space character instead of an empty string to prevent fallback to the
// block.json default description ("Add a page, link, or another item to your navigation.").
// An empty string would be treated as missing and trigger the fallback, while a single
// space appears blank in the UI but prevents the fallback behavior.
// We avoid generating descriptions like "A link to a %s" to prevent grammatical errors
// (e.g., "A link to a event" should be "A link to an event").
if ( $is_default_description || '' === $description ) {
$description = ' ';
}
$variation = array(
'name' => $entity->name,
'title' => $title,
'description' => $description,
'attributes' => array(
'type' => $entity->name,
'kind' => $kind,
),
);
// Tweak some value for the variations.
$variation_overrides = array(
'post_tag' => array(
'name' => 'tag',
'attributes' => array(
'type' => 'tag',
'kind' => $kind,
),
),
'post_format' => array(
// The item_link and item_link_description for post formats is the
// same as for tags, so need to be overridden.
'title' => __( 'Post Format Link' ),
'description' => __( 'A link to a post format' ),
'attributes' => array(
'type' => 'post_format',
'kind' => $kind,
),
),
);
if ( array_key_exists( $entity->name, $variation_overrides ) ) {
$variation = array_merge(
$variation,
$variation_overrides[ $entity->name ]
);
}
return $variation;
}
/**
* Filters the registered variations for a block type.
* Returns the dynamically built variations for all post-types and taxonomies.
*
* @since 6.5.0
*
* @param array $variations Array of registered variations for a block type.
* @param WP_Block_Type $block_type The full block type object.
* @return array Numerically indexed array of block variations.
*/
function block_core_navigation_link_filter_variations( $variations, $block_type ) {
if ( 'core/navigation-link' !== $block_type->name ) {
return $variations;
}
$generated_variations = block_core_navigation_link_build_variations();
/*
* IMPORTANT: Order matters for deduplication.
*
* The variations returned from this filter are bootstrapped to JavaScript and
* processed by the block variations reducer. The reducer uses `getUniqueItemsByName()`
* (packages/blocks/src/store/reducer.js:51-57) which keeps the FIRST variation with
* a given 'name' and discards later duplicates when processing the array in order.
*
* By placing generated variations first in `array_merge()`, the improved
* labels (e.g., "Product link" instead of generic "Post Link") are processed first
* and preserved. The generic incoming variations are then discarded as duplicates.
*
* Why `array_merge()` instead of manual deduplication?
* - Both arrays use numeric indices (0, 1, 2...), so `array_merge()` concatenates
* and re-indexes them sequentially, preserving order
* - The reducer handles deduplication, so it is not needed here
* - This keeps the PHP code simple and relies on the established JavaScript behavior
*
* See: https://github.com/WordPress/gutenberg/pull/72517
*/
return array_merge( $generated_variations, $variations );
}
/**
* Returns an array of variations for the navigation link block.
*
* @since 6.5.0
*
* @return array
*/
function block_core_navigation_link_build_variations() {
$post_types = get_post_types( array( 'show_in_nav_menus' => true ), 'objects' );
$taxonomies = get_taxonomies( array( 'show_in_nav_menus' => true ), 'objects' );
/*
* Use two separate arrays as a way to order the variations in the UI.
* Known variations (like Post Link and Page Link) are added to the
* `built_ins` array. Variations for custom post types and taxonomies are
* added to the `variations` array and will always appear after `built-ins.
*/
$built_ins = array();
$variations = array();
if ( $post_types ) {
foreach ( $post_types as $post_type ) {
$variation = build_variation_for_navigation_link( $post_type, 'post-type' );
if ( $post_type->_builtin ) {
$built_ins[] = $variation;
} else {
$variations[] = $variation;
}
}
}
if ( $taxonomies ) {
foreach ( $taxonomies as $taxonomy ) {
$variation = build_variation_for_navigation_link( $taxonomy, 'taxonomy' );
if ( $taxonomy->_builtin ) {
$built_ins[] = $variation;
} else {
$variations[] = $variation;
}
}
}
$all_variations = array_merge( $built_ins, $variations );
return $all_variations;
}
/**
* Registers the navigation link block.
*
* @since 5.9.0
*
* @uses render_block_core_navigation_link()
* @throws WP_Error An WP_Error exception parsing the block definition.
*/
function register_block_core_navigation_link() {
register_block_type_from_metadata(
__DIR__ . '/navigation-link',
array(
'render_callback' => 'render_block_core_navigation_link',
)
);
}
add_action( 'init', 'register_block_core_navigation_link' );
/**
* Creates all variations for post types / taxonomies dynamically (= each time when variations are requested).
* Do not use variation_callback, to also account for unregistering post types/taxonomies later on.
*/
add_action( 'get_block_type_variations', 'block_core_navigation_link_filter_variations', 10, 2 );
PK \{
button.phpnu [ ` or `