mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-01 05:57:55 +01:00
Posts, Post Types: Add a new add_inline_data
action which allows extra fields to be added to the inline editing fields.
Props mensmaximus, NathanAtmoz. Merges [42676] and [43460] to the 4.9 branch. Fixes #36085. Built from https://develop.svn.wordpress.org/branches/4.9@43461 git-svn-id: http://core.svn.wordpress.org/branches/4.9@43288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cb2625e260
commit
c0903e830b
@ -337,6 +337,16 @@ function get_inline_data($post) {
|
|||||||
if ( post_type_supports( $post->post_type, 'post-formats' ) )
|
if ( post_type_supports( $post->post_type, 'post-formats' ) )
|
||||||
echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
|
echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fires after outputting the fields for the inline editor for posts and pages.
|
||||||
|
*
|
||||||
|
* @since 4.9.8
|
||||||
|
*
|
||||||
|
* @param WP_Post $post The current post object.
|
||||||
|
* @param WP_Post_Type $post_type_object The current post's post type object.
|
||||||
|
*/
|
||||||
|
do_action( 'add_inline_data', $post, $post_type_object );
|
||||||
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.9.8-alpha-43459';
|
$wp_version = '4.9.8-alpha-43461';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user