Add highlighting to new Admin Dashboard Menu Item

The probability is high that no hook will exist for that…

But it can be solved with jQuery:

add_action( 'admin_head-post.php', 'wpse_58567_highlight_menu_item' );

function wpse_58567_highlight_menu_item()
{
    global $post;

    if( 69 != $post->ID )
        return;

    ?>
        <script type="text/javascript">
            jQuery(document).ready( function($) {
                $('#toplevel_page_post-post-69-action-edit').removeClass('wp-not-current-submenu').addClass('current');
                $('#toplevel_page_post-post-69-action-edit').find('a:last').addClass('current');
            });     
        </script>
    <?php
}

Leave a Comment