Updating Style From WP Options Setting Page

I think you have to solve this with jQuery. If checked -> addClass, if not -> removeClass. Here’s how to enqueue your JS file: add_action(‘admin_menu’, ‘fwds_plugin_settings’); function fwds_plugin_settings() { $hook = add_menu_page( ‘Price Display’, ‘Price Display’, ‘add_users’, ‘fwds_settings’, ‘fwds_display_settings’ ); add_action( “admin_print_scripts-$hook”, ‘fwds_print_scripts’ ); } function fwds_print_scripts() { wp_register_script( ‘my-fx’ , plugin_dir_url( __FILE__ ) . … Read more

Assigning input to variable

Your form doesn’t contain the fields you think it does. Use FireBug or a similar tool (even var_dump($_POST)) to see what is actually being posted. Your num_users is a setting group, not a single field. At best the field with the value will be user_main_settings field. The previous commenter is also correct – checking for … Read more

Can’t add options to db

Just tested your code, found an error in the input name. Change currency_options_group to currency_options will make it work. The modified code: add_action(‘admin_init’, ‘currency_options_set’); add_action( ‘admin_menu’, ‘admin_menu’ ); function admin_menu () { add_options_page( ‘Currency Options’,’Currency Options’,’manage_options’,’options_currency’, ‘settings_page’ ); } function currency_options_set(){ register_setting( ‘currency_options_group’, ‘currency_options’ ); } function settings_page () { $default_options = array( ‘currency_eur’ => … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)