How to change the body color in my plug-in option page?
-
I have followed the example shown in the link from @lucspe but it is not working for me, I’m not sure if this is up to date, cause I cant get it to work, here is what I have on my plugin class:
public function __construct() { add_action( 'admin_head', 'wpso_add_admin_custom_css' ); add_action( 'admin_menu', array( $this, 'settings_add_plugin_page' ) ); add_action( 'admin_init', array( $this, 'settings_page_init' ) ); } function wpso_add_admin_custom_css() { ?> <style type="text/css"> #wpadminbar { background-color : #f1f1f1; } #wpcontent {background-color: #f0f0f0; } </style> <?php }
I feel like the function is not being run, this is my class creation:
public function __construct() { add_action( 'admin_head', 'wpso_add_admin_custom_css' ); add_action( 'admin_menu', array( $this, 'settings_add_plugin_page' ) ); add_action( 'admin_init', array( $this, 'settings_page_init' ) ); }
This is where I create the class:
add_action('plugins_loaded', 'stwc_loaded'); function stwc_loaded(){ if ( is_admin() ) $settings = new Settings(); }
- This topic was modified 3 years, 2 months ago by . Reason: typo
- This topic was modified 3 years, 2 months ago by .
The page I need help with: [log in to see the link]
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘How to change the body color in my plug-in option page?’ is closed to new replies.