• Resolved bkjproductions

    (@bkjproductions)


    It would be great if you could have a place for us to inject some CSS/JS into the Admin of WP Dashboard. At present, you’ve allowed some extra code that could go before and after a column label, which is great. I can wrap a field with <span style=color:red>, sure, that’s amazing!

    The next level of customization: make it dead easy to add css to the Pages/Posts etc. lists, and/or perhaps javascript. Sometimes I might want to run a little javascript snippet on the list of Posts and the additional columns (which I have wrapped with <span CLASS=alert> this time knowing I can have a bit of css so my class “alert” is red).

Viewing 1 replies (of 1 total)
  • Plugin Author Stefan van den Dungen Gronovius

    (@dungengronovius)

    There is a hook in our column that allows you to add CSS/JS on the overview pages.
    ac/table_scripts

    This hooks fires only on the overview pages, so you can use it to enqueue your own JS or CSS files. Here below is an example on how to load your own files.

    add_action( 'ac/table_scripts', function ( AC\ListScreen $list_screen ) {
    	// $list_screen->get_meta_type() > returs post, media, user, taxonomy
    	if ( 'post' === $list_screen->get_meta_type() ) {
    		wp_enqueue_script( 'mycustomjs', 'path/to/script' );
    	}
    }, 1 );
Viewing 1 replies (of 1 total)

The topic ‘Feature Request: CSS on Dashboard’ is closed to new replies.