Plugin settings not saving

the problem is you keep resting the values here: $options = array( ‘cemb_seminar_seminars_college’ => ‘0’, ‘cemb_seminar_showcases_college’ => ‘0’, ‘cemb_seminar_writers_college’ > ‘0’, ‘cemb_seminar_aet_college’ => ‘0’, ‘cemb_seminar_mbu_college’ => ‘0’, ‘cemb_seminar_eis_college’ => ‘0’, ‘cemb_seminar_sng_college’ => ‘0’, ); update_option( ‘cemb_seminar_options’, $options ); change it to $options = get_option(‘cemb_seminar_options’); if ($options === false){ $options = array( ‘cemb_seminar_seminars_college’ => ‘0’, ‘cemb_seminar_showcases_college’ … Read more

Output ‘do_settings_sections()’ as tabs, not one under the other

So because I couldn’t find an out of the box way, I created this. Don’t forget to enqueue the jquery-ui-tabs script – /** Replace the call to ‘do_settings_sections()’ with a call to this function */ function do_settings_sections_tabs($page){ global $wp_settings_sections, $wp_settings_fields; if(!isset($wp_settings_sections[$page])) : return; endif; echo ‘<div id=”abb-tabs”>’; echo ‘<ul>’; foreach((array)$wp_settings_sections[$page] as $section) : if(!isset($section[‘title’])) continue; … Read more

Why can’t I use “%s” format value in the WordPress function checked?

Because the order of operations means you’re passing that variable into your checked function before the printf function is even being run, which is what’s parsing the enumerated variables. Here’s a possible solution haven’t tested it though: printf( ‘<input type=”checkbox” id=”%2$s” name=”%1$s[%2$s]” %3$s)’. ‘<label for=”%2$s”>%4$s</label>’ . ‘<hr />’, $args[‘option_name’], $args[‘name’], checked(“on”, $args[‘value’], false ), $args[‘description’] … Read more

site identity section name?

The “Site Identity” section has the ID of title_tagline for historical reasons. If you want to see the IDs for the core sections, all you have to do is look at the source for WP_Customize_Manager::register_controls(). Alternatively, you can get a list of all the sections registered, whether by core or by plugins, by opening your … Read more

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