Plugin CSS i WordPress

Efter en række eksperimenter har jeg fundet denne opskrift, der hooker et stylesheet rigtigt ind i WP dashboard. Virker både for admin og øvrige registrerede brugere:

add_action( 'admin_enqueue_scripts', 'safely_add_stylesheet_to_admin' );
    /**
     * Add stylesheet to the page
     */
    function safely_add_stylesheet_to_admin() {
        wp_enqueue_style( 'prefix-style', plugins_url('style_admin.css', __FILE__) );
    }
Enable Notifications OK No thanks

We use cookies - more information

Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.

Close