Skip to content

Commit 080c66d

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/branches/4.9@43461 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 8123e21 commit 080c66d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/wp-admin/includes/template.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,16 @@ function get_inline_data($post) {
337337
if ( post_type_supports( $post->post_type, 'post-formats' ) )
338338
echo '<div class="post_format">' . esc_html( get_post_format( $post->ID ) ) . '</div>';
339339

340+
/**
341+
* Fires after outputting the fields for the inline editor for posts and pages.
342+
*
343+
* @since 4.9.8
344+
*
345+
* @param WP_Post $post The current post object.
346+
* @param WP_Post_Type $post_type_object The current post's post type object.
347+
*/
348+
do_action( 'add_inline_data', $post, $post_type_object );
349+
340350
echo '</div>';
341351
}
342352

0 commit comments

Comments
 (0)