Compare commits

...

3 Commits

Author SHA1 Message Date
isabel_brison 9fd435aa15 Editor: fix spacing in function doc.
Correctly formats spacing in `get_layout_styles` docblock.

Props mukesh27, sabernhardt.
See #60981.

Built from https://develop.svn.wordpress.org/trunk@58030


git-svn-id: http://core.svn.wordpress.org/trunk@57496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 07:20:09 +00:00
Sergey Biryukov 4fb8608aa5 Docs: Use correct URL for the Embeds documentation article.
Follow-up to [57793].

Props shailu25, estelaris, audrasjb.
See #60732.
Built from https://develop.svn.wordpress.org/trunk@58029


git-svn-id: http://core.svn.wordpress.org/trunk@57495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 06:25:11 +00:00
isabel_brison 9ecc777ded Editor: limit layout rules on themes without theme.json.
Removes output of base rules for flow and constrained layout types on themes without theme.json.

Props evanltd, poena, isabel_brison, andrewserong, oandregal.
See #60981.

Built from https://develop.svn.wordpress.org/trunk@58028


git-svn-id: http://core.svn.wordpress.org/trunk@57494 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2024-04-22 05:30:13 +00:00
3 changed files with 11 additions and 4 deletions

View File

@ -359,7 +359,7 @@ if ( 'post' === $post_type ) {
if ( 'post' === $post_type || 'page' === $post_type ) {
$inserting_media = '<p>' . __( 'You can upload and insert media (images, audio, documents, etc.) by clicking the Add Media button. You can select from the images and files already uploaded to the Media Library, or upload new media to add to your page or post. To create an image gallery, select the images to add and click the &#8220;Create a new gallery&#8221; button.' ) . '</p>';
$inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. <a href="https://developer.wordpress.org/advanced-administration/wordpress/oembed/">Learn more about embeds</a>.' ) . '</p>';
$inserting_media .= '<p>' . __( 'You can also embed media from many popular websites including Twitter, YouTube, Flickr and others by pasting the media URL on its own line into the content of your post/page. <a href="https://wordpress.org/documentation/article/embeds/">Learn more about embeds</a>.' ) . '</p>';
get_current_screen()->add_help_tab(
array(

View File

@ -1227,7 +1227,7 @@ class WP_Theme_JSON {
);
foreach ( $base_styles_nodes as $base_style_node ) {
$stylesheet .= $this->get_layout_styles( $base_style_node );
$stylesheet .= $this->get_layout_styles( $base_style_node, $types );
}
}
@ -1389,11 +1389,13 @@ class WP_Theme_JSON {
* @since 6.1.0
* @since 6.3.0 Reduced specificity for layout margin rules.
* @since 6.5.1 Only output rules referencing content and wide sizes when values exist.
* @since 6.5.3 Add types parameter to check if only base layout styles are needed.
*
* @param array $block_metadata Metadata about the block to get styles for.
* @param array $types Optional. Types of styles to output. If empty, all styles will be output.
* @return string Layout styles for the block.
*/
protected function get_layout_styles( $block_metadata ) {
protected function get_layout_styles( $block_metadata, $types = array() ) {
$block_rules = '';
$block_type = null;
@ -1543,6 +1545,11 @@ class WP_Theme_JSON {
foreach ( $base_style_rules as $base_style_rule ) {
$declarations = array();
// Skip outputting base styles for flow and constrained layout types if theme doesn't support theme.json. The 'base-layout-styles' type flags this.
if ( in_array( 'base-layout-styles', $types, true ) && ( 'default' === $layout_definition['name'] || 'constrained' === $layout_definition['name'] ) ) {
continue;
}
if (
isset( $base_style_rule['selector'] ) &&
preg_match( $layout_selector_pattern, $base_style_rule['selector'] ) &&

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-58027';
$wp_version = '6.6-alpha-58030';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.