# get_inline_data()

URL: https://chugunov.pro/api-wordpress/functions/get_inline_data/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.7.0.

## Сигнатура

```php
get_inline_data( WP_Post $post )
```

## Описание

Добавляет скрытые поля с данными для использования во встроенном редакторе записей и страниц.

## Параметры

- `$post` `WP_Post` — обязательный. Объект записи.

## Исходный код

Файл: `wp-admin/includes/template.php:311`

```php
function get_inline_data( $post ) {
	$post_type_object = get_post_type_object( $post->post_type );
	if ( ! current_user_can( 'edit_post', $post->ID ) ) {
		return;
	}

	$title = esc_textarea( trim( $post->post_title ) );

	echo '
<div class="hidden" id="inline_' . $post->ID . '">
	<div class="post_title">' . $title . '</div>' .
	/** This filter is documented in wp-admin/edit-tag-form.php */
	'<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div>
	<div class="post_author">' . $post->post_author . '</div>
	<div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
	<div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
	<div class="_status">' . esc_html( $post->post_status ) . '</div>
	<div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>
	<div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>
	<div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>
	<div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div>
	<div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div>
	<div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>
	<div class="post_password">' . esc_html( $post->post_password ) . '</div>';

	if ( $post_type_object->hierarchical ) {
		echo '<div class="post_parent">' . $post->post_parent . '</div>';
	}

	echo '<div class="page_template">' . ( $post->page_template ? esc_html( $post->page_template ) : 'default' ) . '</div>';

	if ( post_type_supports( $post->post_type, 'page-attributes' ) ) {
		echo '<div class="menu_order">' . $post->menu_order . '</div>';
	}

	$taxonomy_names = get_object_taxonomies( $post->post_type );

	foreach ( $taxonomy_names as $taxonomy_name ) {
		$taxonomy = get_taxonomy( $taxonomy_name );

		if ( ! $taxonomy->show_in_quick_edit ) {
			continue;
		}

		if ( $taxonomy->hierarchical ) {

			$terms = get_object_term_cache( $post->ID, $taxonomy_name );
			if ( false === $terms ) {
				$terms = wp_get_object_terms( $post->ID, $taxonomy_name );
				wp_cache_add( $post->ID, wp_list_pluck( $terms, 'term_id' ), $taxonomy_name . '_relationships' );
			}
			$term_ids = empty( $terms ) ? array() : wp_list_pluck( $terms, 'term_id' );

			echo '<div class="post_category" id="' . $taxonomy_name . '_' . $post->ID . '">' . implode( ',', $term_ids ) . '</div>';

		} else {

			$terms_to_edit = get_terms_to_edit( $post->ID, $taxonomy_name );
			if ( ! is_string( $terms_to_edit ) ) {
				$terms_to_edit = '';
			}

			echo '<div class="tags_input" id="' . $taxonomy_name . '_' . $post->ID . '">'
				. esc_html( str_replace( ',', ', ', $terms_to_edit ) ) . '</div>';

		}
	}

	if ( ! $post_type_object->hierarchical ) {
		echo '<div class="sticky">' . ( is_sticky( $post->ID ) ? 'sticky' : '' ) . '</div>';
	}

	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>';
}
```

## История изменений

- 2.7.0 — Introduced.

## Связанные

Использует: [`get_terms_to_edit`](https://chugunov.pro/api-wordpress/functions/get_terms_to_edit/), [`wp_cache_add`](https://chugunov.pro/api-wordpress/functions/wp_cache_add/), [`esc_textarea`](https://chugunov.pro/api-wordpress/functions/esc_textarea/), [`wp_list_pluck`](https://chugunov.pro/api-wordpress/functions/wp_list_pluck/), [`mysql2date`](https://chugunov.pro/api-wordpress/functions/mysql2date/), [`get_object_term_cache`](https://chugunov.pro/api-wordpress/functions/get_object_term_cache/), [`wp_get_object_terms`](https://chugunov.pro/api-wordpress/functions/wp_get_object_terms/), [`get_object_taxonomies`](https://chugunov.pro/api-wordpress/functions/get_object_taxonomies/), [`is_sticky`](https://chugunov.pro/api-wordpress/functions/is_sticky/), [`post_type_supports`](https://chugunov.pro/api-wordpress/functions/post_type_supports/), [`get_post_format`](https://chugunov.pro/api-wordpress/functions/get_post_format/), [`current_user_can`](https://chugunov.pro/api-wordpress/functions/current_user_can/), [`esc_html`](https://chugunov.pro/api-wordpress/functions/esc_html/), [`get_taxonomy`](https://chugunov.pro/api-wordpress/functions/get_taxonomy/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`do_action`](https://chugunov.pro/api-wordpress/functions/do_action/), [`get_post_type_object`](https://chugunov.pro/api-wordpress/functions/get_post_type_object/).
Используется в: `WP_Posts_List_Table::column_title`.

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/get_inline_data/
