Exemplo n.º 1
0
 function et_delete_option($option_name)
 {
     global $et_theme_options, $shortname;
     if (et_options_stored_in_one_row()) {
         $et_theme_options_name = 'et_' . $shortname;
         if (!isset($et_theme_options)) {
             $et_theme_options = get_option($et_theme_options_name);
         }
         unset($et_theme_options[$option_name]);
         update_option($et_theme_options_name, $et_theme_options);
     } else {
         delete_option($option_name);
     }
 }
Exemplo n.º 2
0
 function et_load_google_fonts_scripts()
 {
     wp_enqueue_script('et_google_fonts', get_template_directory_uri() . '/epanel/google-fonts/et_google_fonts.js', array('jquery'), '1.0', true);
     wp_localize_script('et_google_fonts', 'et_google_fonts', array('options_in_one_row' => et_options_stored_in_one_row() ? 1 : 0));
 }
Exemplo n.º 3
0
 function et_init_options()
 {
     global $et_theme_options, $shortname, $et_theme_options_defaults;
     if (et_options_stored_in_one_row()) {
         $et_theme_options_name = 'et_' . $shortname;
         if (!isset($et_theme_options)) {
             $et_theme_options = get_option($et_theme_options_name);
             if (empty($et_theme_options)) {
                 update_option($et_theme_options_name, $et_theme_options_defaults);
             }
         }
     }
 }