Title: add_inline_data
Published: October 5, 2018
Last modified: May 20, 2026

---

# do_action( ‘add_inline_data’, WP_Post $post, WP_Post_Type $post_type_object )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#wp--skip-link--target)

Fires after outputting the fields for the inline editor for posts and pages.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#parameters)󠁿

 `$post`[WP_Post](https://developer.wordpress.org/reference/classes/wp_post/)

The current post object.

`$post_type_object`[WP_Post_Type](https://developer.wordpress.org/reference/classes/wp_post_type/)

The current post’s post type object.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#source)󠁿

    ```php
    do_action( 'add_inline_data', $post, $post_type_object );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-admin/includes/template.php#L395)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-admin/includes/template.php#L395-L395)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#related)󠁿

| Used by | Description | 
| [get_inline_data()](https://developer.wordpress.org/reference/functions/get_inline_data/)`wp-admin/includes/template.php` |

Adds hidden fields with the data for use in the inline editor for posts and pages.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/add_inline_data/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.9.8](https://developer.wordpress.org/reference/since/4.9.8/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fadd_inline_data%2F)
before being able to contribute a note or feedback.