# do_block_editor_incompatible_meta_box()

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

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

## Сигнатура

```php
do_block_editor_incompatible_meta_box( mixed $data_object, array $box )
```

## Описание

Отображает «фиктивный» метабокс с информационным сообщением, показываемый в блочном редакторе при обнаружении несовместимого метабокса.

## Параметры

- `$data_object` `mixed` — обязательный. Объект данных, отображаемый на этом экране.
- `$box` `array` — обязательный. Аргументы метабокса пользовательских форматов.
  
  id stringАтрибут 'id' метабокса.
  
  title stringЗаголовок метабокса.
  
  old_callback callableИсходная функция обратного вызова для этого метабокса.
  
  args arrayДополнительные аргументы метабокса.

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

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

```php
function do_block_editor_incompatible_meta_box( $data_object, $box ) {
	$plugin  = _get_plugin_from_callback( $box['old_callback'] );
	$plugins = get_plugins();
	echo '<p>';
	if ( $plugin ) {
		/* translators: %s: The name of the plugin that generated this meta box. */
		printf( __( 'This meta box, from the %s plugin, is not compatible with the block editor.' ), "<strong>{$plugin['Name']}</strong>" );
	} else {
		_e( 'This meta box is not compatible with the block editor.' );
	}
	echo '</p>';

	if ( empty( $plugins['classic-editor/classic-editor.php'] ) ) {
		if ( current_user_can( 'install_plugins' ) ) {
			$install_url = wp_nonce_url(
				self_admin_url( 'plugin-install.php?tab=favorites&user=wordpressdotorg&save=0' ),
				'save_wporg_username_' . get_current_user_id()
			);

			echo '<p>';
			/* translators: %s: A link to install the Classic Editor plugin. */
			printf( __( 'Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.' ), esc_url( $install_url ) );
			echo '</p>';
		}
	} elseif ( is_plugin_inactive( 'classic-editor/classic-editor.php' ) ) {
		if ( current_user_can( 'activate_plugins' ) ) {
			$activate_url = wp_nonce_url(
				self_admin_url( 'plugins.php?action=activate&plugin=classic-editor/classic-editor.php' ),
				'activate-plugin_classic-editor/classic-editor.php'
			);

			echo '<p>';
			/* translators: %s: A link to activate the Classic Editor plugin. */
			printf( __( 'Please activate the <a href="%s">Classic Editor plugin</a> to use this meta box.' ), esc_url( $activate_url ) );
			echo '</p>';
		}
	} elseif ( $data_object instanceof WP_Post ) {
		$edit_url = add_query_arg(
			array(
				'classic-editor'         => '',
				'classic-editor__forget' => '',
			),
			get_edit_post_link( $data_object )
		);
		echo '<p>';
		/* translators: %s: A link to use the Classic Editor plugin. */
		printf( __( 'Please open the <a href="%s">classic editor</a> to use this meta box.' ), esc_url( $edit_url ) );
		echo '</p>';
	}
}
```

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

- 5.0.0 — Introduced.

## Связанные

Использует: [`_get_plugin_from_callback`](https://chugunov.pro/api-wordpress/functions/_get_plugin_from_callback/), [`is_plugin_inactive`](https://chugunov.pro/api-wordpress/functions/is_plugin_inactive/), [`get_plugins`](https://chugunov.pro/api-wordpress/functions/get_plugins/), [`self_admin_url`](https://chugunov.pro/api-wordpress/functions/self_admin_url/), [`get_edit_post_link`](https://chugunov.pro/api-wordpress/functions/get_edit_post_link/), [`current_user_can`](https://chugunov.pro/api-wordpress/functions/current_user_can/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`_e`](https://chugunov.pro/api-wordpress/functions/_e/), [`esc_url`](https://chugunov.pro/api-wordpress/functions/esc_url/), [`wp_nonce_url`](https://chugunov.pro/api-wordpress/functions/wp_nonce_url/), [`add_query_arg`](https://chugunov.pro/api-wordpress/functions/add_query_arg/), [`get_current_user_id`](https://chugunov.pro/api-wordpress/functions/get_current_user_id/).

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