Adding theme option values as custom body class

Review how the variable scope works.. Let’s not add yet another global variable, instead we can e.g. fetch the option values within the filter’s callback: function wpse251261_custom_body_classes( $classes ) { // Get option values $rounded_corner_radio = of_get_option( ’rounded_corner_radio’ ); $gradient_radio = of_get_option( ‘gradient_radio’ ); // Assign new body classes $classes[] = esc_attr( $rounded_corner_radio ); $classes[] … Read more

call_user_func_array() expects parameter 1 to be a valid callback, function

You have to change this add_action(‘admin_menu’,’mafongroup_admin_menu’); to add_action(‘admin_menu’,array( $this, ‘mafongroup_admin_menu’ ) );. Cause you’r here calling a class method. So you’ve to give reference to the class. And also if you put public before declaring mafongroup_admin_menu() function, it would be more readable and would be helpful in future I think. See the updated class code … Read more

Front end theme options ajax returns 0

You’re sending a bad action for your AJAX request, the action should match with your string next to wp_ajax_: add_action(‘wp_ajax_fend_theme_data_save’, ‘fend_theme_data_save’);, so your action HTML field should be like this: <input type=”hidden” name=”action” value=”fend_theme_data_save” /> See the difference? Your action value should always be next to wp_ajax_ or wp_ajax_nopriv, whatever you’re using. I recommend you … Read more

not getting API setting saved confirmation message after update on option page

You need the settings_errors(); function somewhere on your settings page: function display_acme_options_page() { settings_errors(); echo ‘<h2>Acme Options</h2>’; echo ‘<form method=”post” action=”options.php”>’; do_settings_sections( ‘acme-options-page’ ); settings_fields( ‘acme-settings’ ); submit_button(); echo ‘</form>’; }

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