@wordpress/block-library 9.6.0 → 9.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/block-library",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.1",
|
|
4
4
|
"description": "Block library for the WordPress editor.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "2c178a34c8ea9b1c0e51c1fd48e24da95c418f6e"
|
|
86
86
|
}
|
|
@@ -30,7 +30,7 @@ function render_block_core_comment_date( $attributes, $content, $block ) {
|
|
|
30
30
|
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
|
31
31
|
if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
|
|
32
32
|
// translators: %s: human-readable time difference.
|
|
33
|
-
$formatted_date = sprintf( __( '%s ago'
|
|
33
|
+
$formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_comment_date( 'U', $comment ) ) );
|
|
34
34
|
} else {
|
|
35
35
|
$formatted_date = get_comment_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $comment );
|
|
36
36
|
}
|
package/src/form/index.php
CHANGED
|
@@ -92,7 +92,7 @@ function block_core_form_send_email() {
|
|
|
92
92
|
// Start building the email content.
|
|
93
93
|
$content = sprintf(
|
|
94
94
|
/* translators: %s: The request URI. */
|
|
95
|
-
__( 'Form submission from %1$s'
|
|
95
|
+
__( 'Form submission from %1$s' ) . '</br>',
|
|
96
96
|
'<a href="' . esc_url( get_site_url( null, $params['_wp_http_referer'] ) ) . '">' . get_bloginfo( 'name' ) . '</a>'
|
|
97
97
|
);
|
|
98
98
|
|
|
@@ -110,7 +110,7 @@ function block_core_form_send_email() {
|
|
|
110
110
|
// Send the email.
|
|
111
111
|
$result = wp_mail(
|
|
112
112
|
str_replace( 'mailto:', '', $params['formAction'] ),
|
|
113
|
-
__( 'Form submission'
|
|
113
|
+
__( 'Form submission' ),
|
|
114
114
|
$content
|
|
115
115
|
);
|
|
116
116
|
|
package/src/post-date/index.php
CHANGED
|
@@ -26,10 +26,10 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
26
26
|
$post_timestamp = get_post_timestamp( $post_ID );
|
|
27
27
|
if ( $post_timestamp > time() ) {
|
|
28
28
|
// translators: %s: human-readable time difference.
|
|
29
|
-
$formatted_date = sprintf( __( '%s from now'
|
|
29
|
+
$formatted_date = sprintf( __( '%s from now' ), human_time_diff( $post_timestamp ) );
|
|
30
30
|
} else {
|
|
31
31
|
// translators: %s: human-readable time difference.
|
|
32
|
-
$formatted_date = sprintf( __( '%s ago'
|
|
32
|
+
$formatted_date = sprintf( __( '%s ago' ), human_time_diff( $post_timestamp ) );
|
|
33
33
|
}
|
|
34
34
|
} else {
|
|
35
35
|
$formatted_date = get_the_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
@@ -52,7 +52,7 @@ function render_block_core_post_date( $attributes, $content, $block ) {
|
|
|
52
52
|
if ( get_the_modified_date( 'Ymdhi', $post_ID ) > get_the_date( 'Ymdhi', $post_ID ) ) {
|
|
53
53
|
if ( isset( $attributes['format'] ) && 'human-diff' === $attributes['format'] ) {
|
|
54
54
|
// translators: %s: human-readable time difference.
|
|
55
|
-
$formatted_date = sprintf( __( '%s ago'
|
|
55
|
+
$formatted_date = sprintf( __( '%s ago' ), human_time_diff( get_post_timestamp( $post_ID, 'modified' ) ) );
|
|
56
56
|
} else {
|
|
57
57
|
$formatted_date = get_the_modified_date( empty( $attributes['format'] ) ? '' : $attributes['format'], $post_ID );
|
|
58
58
|
}
|