Twenty Twenty: Pass `$post_meta` and `$location` values to `twentytwenty_start_of_post_meta_list` and `twentytwenty_end_of_post_meta_list` actions to provide better context.
Props msaari, SergeyBiryukov. Merges [46832] to the 5.3 branch. Fixes #48906. Built from https://develop.svn.wordpress.org/branches/5.3@46833 git-svn-id: http://core.svn.wordpress.org/branches/5.3@46633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bd3bd0c6ff
commit
33da7d7e7f
|
@ -275,6 +275,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
||||||
'sticky',
|
'sticky',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$post_meta_wrapper_classes = ' post-meta-single post-meta-single-top';
|
$post_meta_wrapper_classes = ' post-meta-single post-meta-single-top';
|
||||||
|
|
||||||
} elseif ( 'single-bottom' === $location ) {
|
} elseif ( 'single-bottom' === $location ) {
|
||||||
|
@ -296,6 +297,7 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
||||||
'tags',
|
'tags',
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
$post_meta_wrapper_classes = ' post-meta-single post-meta-single-bottom';
|
$post_meta_wrapper_classes = ' post-meta-single post-meta-single-bottom';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -326,10 +328,14 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
||||||
* Allow output of additional post meta info to be added by child themes and plugins.
|
* Allow output of additional post meta info to be added by child themes and plugins.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
* @since Twenty Twenty 1.1 Added the `$post_meta` and `$location` parameters.
|
||||||
*
|
*
|
||||||
* @param int $post_ID Post ID.
|
* @param int $post_id Post ID.
|
||||||
|
* @param array $post_meta An array of post meta information.
|
||||||
|
* @param string $location The location where the meta is shown.
|
||||||
|
* Accepts 'single-top' or 'single-bottom'.
|
||||||
*/
|
*/
|
||||||
do_action( 'twentytwenty_start_of_post_meta_list', $post_id );
|
do_action( 'twentytwenty_start_of_post_meta_list', $post_id, $post_meta, $location );
|
||||||
|
|
||||||
// Author.
|
// Author.
|
||||||
if ( in_array( 'author', $post_meta, true ) ) {
|
if ( in_array( 'author', $post_meta, true ) ) {
|
||||||
|
@ -449,10 +455,14 @@ function twentytwenty_get_post_meta( $post_id = null, $location = 'single-top' )
|
||||||
* Allow output of additional post meta info to be added by child themes and plugins.
|
* Allow output of additional post meta info to be added by child themes and plugins.
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
* @since Twenty Twenty 1.1 Added the `$post_meta` and `$location` parameters.
|
||||||
*
|
*
|
||||||
* @param int $post_ID Post ID.
|
* @param int $post_id Post ID.
|
||||||
|
* @param array $post_meta An array of post meta information.
|
||||||
|
* @param string $location The location where the meta is shown.
|
||||||
|
* Accepts 'single-top' or 'single-bottom'.
|
||||||
*/
|
*/
|
||||||
do_action( 'twentytwenty_end_of_post_meta_list', $post_id );
|
do_action( 'twentytwenty_end_of_post_meta_list', $post_id, $post_meta, $location );
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3.1-alpha-46825';
|
$wp_version = '5.3.1-alpha-46833';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue