do_block_editor_incompatible_meta_box

The timeline below displays how wordpress function do_block_editor_incompatible_meta_box has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $data_object The data object being rendered on this screen.
 * @param array $box         {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
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>';
    }
}

WordPress Version: 5.8

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't 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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg(array('classic-editor' => '', 'classic-editor__forget' => ''), get_edit_post_link($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>';
    }
}

WordPress Version: 5.3

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            echo '<p>';
            printf(
                /* translators: %s: A link to install the Classic Editor plugin. */
                __('Please install the <a href="%s">Classic Editor plugin</a> to use this meta box.'),
                esc_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>';
        }
    } 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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg(array('classic-editor' => '', 'classic-editor__forget' => ''), get_edit_post_link($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>';
    }
}

WordPress Version: .20

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            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(self_admin_url('plugin-install.php?tab=featured')));
            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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg(array('classic-editor' => '', 'classic-editor__forget' => ''), get_edit_post_link($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>';
    }
}

WordPress Version: 2.2

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            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(self_admin_url('plugin-install.php?tab=featured')));
            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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg('classic-editor', '', get_edit_post_link($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>';
    }
}

WordPress Version: .10

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            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(self_admin_url('plugin-install.php?tab=featured')));
            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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg(array('classic-editor' => '', 'classic-editor__forget' => ''), get_edit_post_link($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>';
    }
}

WordPress Version: 5.1

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            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(self_admin_url('plugin-install.php?tab=featured')));
            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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg('classic-editor', '', get_edit_post_link($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>';
    }
}

WordPress Version: 5.0

/**
 * Function that renders a "fake" meta box with an information message,
 * shown on the block editor, when an incompatible meta box is found.
 *
 * @since 5.0.0
 *
 * @param mixed $object The data object being rendered on this screen.
 * @param array $box    {
 *     Custom formats meta box arguments.
 *
 *     @type string   $id           Meta box 'id' attribute.
 *     @type string   $title        Meta box title.
 *     @type callable $old_callback The original callback for this meta box.
 *     @type array    $args         Extra meta box arguments.
 * }
 */
function do_block_editor_incompatible_meta_box($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, isn't compatible with the block editor."), "<strong>{$plugin['Name']}</strong>");
    } else {
        _e("This meta box isn't compatible with the block editor.");
    }
    echo '</p>';
    if (empty($plugins['classic-editor/classic-editor.php'])) {
        if (current_user_can('install_plugins')) {
            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(self_admin_url('plugin-install.php?tab=featured')));
            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 ($object instanceof WP_Post) {
        $edit_url = add_query_arg('classic-editor', '', get_edit_post_link($object));
        echo '<p>';
        /* translators: %s: An edit post link to use the classic editor. */
        printf(__('Please open the <a href="%s">classic editor</a> to use this meta box.'), esc_url($edit_url));
        echo '</p>';
    }
}