_get_plugin_from_callback example


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'] ) ) {
        
Home | Imprint | This part of the site doesn't use cookies.