summaryrefslogtreecommitdiffstats
path: root/wp-includes/blocks/latest-posts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-includes/blocks/latest-posts
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream.tar.xz
wordpress-upstream.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-includes/blocks/latest-posts.php11
-rw-r--r--wp-includes/blocks/latest-posts/editor-rtl.css18
-rw-r--r--wp-includes/blocks/latest-posts/editor-rtl.min.css2
-rw-r--r--wp-includes/blocks/latest-posts/editor.css18
-rw-r--r--wp-includes/blocks/latest-posts/editor.min.css2
-rw-r--r--wp-includes/blocks/latest-posts/style-rtl.css10
-rw-r--r--wp-includes/blocks/latest-posts/style-rtl.min.css2
-rw-r--r--wp-includes/blocks/latest-posts/style.css10
-rw-r--r--wp-includes/blocks/latest-posts/style.min.css2
9 files changed, 46 insertions, 29 deletions
diff --git a/wp-includes/blocks/latest-posts.php b/wp-includes/blocks/latest-posts.php
index adc51d0..85c7b58 100644
--- a/wp-includes/blocks/latest-posts.php
+++ b/wp-includes/blocks/latest-posts.php
@@ -18,6 +18,8 @@ $block_core_latest_posts_excerpt_length = 0;
* Callback for the excerpt_length filter used by
* the Latest Posts block at render time.
*
+ * @since 5.4.0
+ *
* @return int Returns the global $block_core_latest_posts_excerpt_length variable
* to allow the excerpt_length filter respect the Latest Block setting.
*/
@@ -29,6 +31,8 @@ function block_core_latest_posts_get_excerpt_length() {
/**
* Renders the `core/latest-posts` block on server.
*
+ * @since 5.0.0
+ *
* @param array $attributes The block attributes.
*
* @return string Returns the post content with latest posts added.
@@ -148,12 +152,13 @@ function render_block_core_latest_posts( $attributes ) {
* [&hellip;] is the default excerpt ending from wp_trim_excerpt() in Core.
*/
if ( str_ends_with( $trimmed_excerpt, ' [&hellip;]' ) ) {
+ /** This filter is documented in wp-includes/formatting.php */
$excerpt_length = (int) apply_filters( 'excerpt_length', $block_core_latest_posts_excerpt_length );
if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
$trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 );
$trimmed_excerpt .= sprintf(
/* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
- __( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
+ __( '… <a class="wp-block-latest-posts__read-more" href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
esc_url( $post_link ),
esc_html( $title )
);
@@ -218,6 +223,8 @@ function render_block_core_latest_posts( $attributes ) {
/**
* Registers the `core/latest-posts` block on server.
+ *
+ * @since 5.0.0
*/
function register_block_core_latest_posts() {
register_block_type_from_metadata(
@@ -241,6 +248,8 @@ add_action( 'init', 'register_block_core_latest_posts' );
* TODO: Remove when and if the bottom client-side deprecation for this block
* is removed.
*
+ * @since 5.5.0
+ *
* @param array $block A single parsed block object.
*
* @return array The migrated block object.
diff --git a/wp-includes/blocks/latest-posts/editor-rtl.css b/wp-includes/blocks/latest-posts/editor-rtl.css
index 4b51e11..fc67c75 100644
--- a/wp-includes/blocks/latest-posts/editor-rtl.css
+++ b/wp-includes/blocks/latest-posts/editor-rtl.css
@@ -1,9 +1,3 @@
-.wp-block-latest-posts{
- padding-right:2.5em;
-}
-.wp-block-latest-posts.is-grid{
- padding-right:0;
-}
.wp-block-latest-posts>li{
overflow:hidden;
}
@@ -12,13 +6,17 @@
display:inline;
}
-.edit-post-visual-editor .wp-block-latest-posts.is-grid li{
- margin-bottom:20px;
-}
-
.editor-latest-posts-image-alignment-control .components-base-control__label{
display:block;
}
.editor-latest-posts-image-alignment-control .components-toolbar{
border-radius:2px;
+}
+
+:root :where(.wp-block-latest-posts){
+ padding-right:2.5em;
+}
+
+:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){
+ padding-right:0;
} \ No newline at end of file
diff --git a/wp-includes/blocks/latest-posts/editor-rtl.min.css b/wp-includes/blocks/latest-posts/editor-rtl.min.css
index b389b8e..5d0b3f4 100644
--- a/wp-includes/blocks/latest-posts/editor-rtl.min.css
+++ b/wp-includes/blocks/latest-posts/editor-rtl.min.css
@@ -1 +1 @@
-.wp-block-latest-posts{padding-right:2.5em}.wp-block-latest-posts.is-grid{padding-right:0}.wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}.edit-post-visual-editor .wp-block-latest-posts.is-grid li{margin-bottom:20px}.editor-latest-posts-image-alignment-control .components-base-control__label{display:block}.editor-latest-posts-image-alignment-control .components-toolbar{border-radius:2px} \ No newline at end of file
+.wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}.editor-latest-posts-image-alignment-control .components-base-control__label{display:block}.editor-latest-posts-image-alignment-control .components-toolbar{border-radius:2px}:root :where(.wp-block-latest-posts){padding-right:2.5em}:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){padding-right:0} \ No newline at end of file
diff --git a/wp-includes/blocks/latest-posts/editor.css b/wp-includes/blocks/latest-posts/editor.css
index 850c367..67af7df 100644
--- a/wp-includes/blocks/latest-posts/editor.css
+++ b/wp-includes/blocks/latest-posts/editor.css
@@ -1,9 +1,3 @@
-.wp-block-latest-posts{
- padding-left:2.5em;
-}
-.wp-block-latest-posts.is-grid{
- padding-left:0;
-}
.wp-block-latest-posts>li{
overflow:hidden;
}
@@ -12,13 +6,17 @@
display:inline;
}
-.edit-post-visual-editor .wp-block-latest-posts.is-grid li{
- margin-bottom:20px;
-}
-
.editor-latest-posts-image-alignment-control .components-base-control__label{
display:block;
}
.editor-latest-posts-image-alignment-control .components-toolbar{
border-radius:2px;
+}
+
+:root :where(.wp-block-latest-posts){
+ padding-left:2.5em;
+}
+
+:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){
+ padding-left:0;
} \ No newline at end of file
diff --git a/wp-includes/blocks/latest-posts/editor.min.css b/wp-includes/blocks/latest-posts/editor.min.css
index b34b815..8c02afe 100644
--- a/wp-includes/blocks/latest-posts/editor.min.css
+++ b/wp-includes/blocks/latest-posts/editor.min.css
@@ -1 +1 @@
-.wp-block-latest-posts{padding-left:2.5em}.wp-block-latest-posts.is-grid{padding-left:0}.wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}.edit-post-visual-editor .wp-block-latest-posts.is-grid li{margin-bottom:20px}.editor-latest-posts-image-alignment-control .components-base-control__label{display:block}.editor-latest-posts-image-alignment-control .components-toolbar{border-radius:2px} \ No newline at end of file
+.wp-block-latest-posts>li{overflow:hidden}.wp-block-latest-posts li a>div{display:inline}.editor-latest-posts-image-alignment-control .components-base-control__label{display:block}.editor-latest-posts-image-alignment-control .components-toolbar{border-radius:2px}:root :where(.wp-block-latest-posts){padding-left:2.5em}:root :where(.wp-block-latest-posts.is-grid),:root :where(.wp-block-latest-posts__list){padding-left:0} \ No newline at end of file
diff --git a/wp-includes/blocks/latest-posts/style-rtl.css b/wp-includes/blocks/latest-posts/style-rtl.css
index cad7683..3e42eaa 100644
--- a/wp-includes/blocks/latest-posts/style-rtl.css
+++ b/wp-includes/blocks/latest-posts/style-rtl.css
@@ -9,15 +9,14 @@
}
.wp-block-latest-posts.wp-block-latest-posts__list{
list-style:none;
- padding-right:0;
}
.wp-block-latest-posts.wp-block-latest-posts__list li{
clear:both;
+ overflow-wrap:break-word;
}
.wp-block-latest-posts.is-grid{
display:flex;
flex-wrap:wrap;
- padding:0;
}
.wp-block-latest-posts.is-grid li{
margin:0 0 1.25em 1.25em;
@@ -56,6 +55,13 @@
}
}
+:root :where(.wp-block-latest-posts.is-grid){
+ padding:0;
+}
+:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){
+ padding-right:0;
+}
+
.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{
display:block;
font-size:.8125em;
diff --git a/wp-includes/blocks/latest-posts/style-rtl.min.css b/wp-includes/blocks/latest-posts/style-rtl.min.css
index ff16e58..ef567be 100644
--- a/wp-includes/blocks/latest-posts/style-rtl.min.css
+++ b/wp-includes/blocks/latest-posts/style-rtl.min.css
@@ -1 +1 @@
-.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-right:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center} \ No newline at end of file
+.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 0 1.25em 1.25em;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-left:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-left:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-left:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-left:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-left:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-right:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center} \ No newline at end of file
diff --git a/wp-includes/blocks/latest-posts/style.css b/wp-includes/blocks/latest-posts/style.css
index 63f0115..a9c15ad 100644
--- a/wp-includes/blocks/latest-posts/style.css
+++ b/wp-includes/blocks/latest-posts/style.css
@@ -9,15 +9,14 @@
}
.wp-block-latest-posts.wp-block-latest-posts__list{
list-style:none;
- padding-left:0;
}
.wp-block-latest-posts.wp-block-latest-posts__list li{
clear:both;
+ overflow-wrap:break-word;
}
.wp-block-latest-posts.is-grid{
display:flex;
flex-wrap:wrap;
- padding:0;
}
.wp-block-latest-posts.is-grid li{
margin:0 1.25em 1.25em 0;
@@ -56,6 +55,13 @@
}
}
+:root :where(.wp-block-latest-posts.is-grid){
+ padding:0;
+}
+:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){
+ padding-left:0;
+}
+
.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{
display:block;
font-size:.8125em;
diff --git a/wp-includes/blocks/latest-posts/style.min.css b/wp-includes/blocks/latest-posts/style.min.css
index a71b476..e9403e4 100644
--- a/wp-includes/blocks/latest-posts/style.min.css
+++ b/wp-includes/blocks/latest-posts/style.min.css
@@ -1 +1 @@
-.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none;padding-left:0}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap;padding:0}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center} \ No newline at end of file
+.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-left:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center} \ No newline at end of file