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:
Sergey Biryukov 2018-07-16 15:34:25 +00:00
parent cb2625e260
commit c0903e830b
2 changed files with 11 additions and 1 deletions

View File

@ -337,6 +337,16 @@ function get_inline_data($post) {
if ( post_type_supports( $post->post_type, 'post-formats' ) )
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>';
}

View File

@ -4,7 +4,7 @@
*
* @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.