Exemplo n.º 1
0
 function raindrops_color_type_custom($css)
 {
     global $post;
     if (isset($post)) {
         $filter_custom_color = apply_filters('raindrops_color_type_custom', '', $post->ID);
     } else {
         $filter_custom_color = apply_filters('raindrops_color_type_custom', '', 0);
     }
     if (!empty($filter_custom_color)) {
         /* validate value */
         $raindrops_style_type_choices = raindrops_register_styles("w3standard");
         if (!array_key_exists($filter_custom_color, $raindrops_style_type_choices)) {
             $filter_custom_color = '';
         }
     }
     if (false !== ($type = raindrops_has_indivisual_notation())) {
         if (isset($type['color_type'])) {
             return raindrops_design_output($type['color_type']) . raindrops_color_base();
         }
         if (!empty($filter_custom_color)) {
             return raindrops_design_output($filter_custom_color) . raindrops_color_base($filter_custom_color);
         } else {
             return $css;
         }
     } elseif (intval(get_query_var('raindrops_color_type')) == 1 && ($post_id = get_query_var('raindrops_pid'))) {
         $type = raindrops_has_indivisual_notation($post_id);
         if (isset($type['color_type'])) {
             return raindrops_design_output($type['color_type']) . raindrops_color_base();
         } else {
             if (!empty($filter_custom_color)) {
                 $color_type = $filter_custom_color;
                 return raindrops_design_output($color_type) . raindrops_color_base();
             } else {
                 return $css;
             }
         }
     } else {
         return $css;
     }
 }
Exemplo n.º 2
0
do_action('raindrops_extend_style_type');
global $raindrops_wp_version, $raindrops_current_theme_name, $raindrops_current_theme_slug, $raindrops_setting_type;
$alias_functions = get_stylesheet_directory() . '/lib/alias_functions.php';
$raindrops_included_files = get_included_files();
if (!in_array($alias_functions, $raindrops_included_files)) {
    locate_template(array('lib/alias_functions.php'), true, true);
}
if (isset($raindrops_current_theme_name)) {
    $raindrops_embed_common_style = $raindrops_current_theme_name;
} else {
    $boots_current_theme_data = wp_get_theme();
    $raindrops_embed_common_style = $boots_current_theme_data->get('Name');
}
/* 1.303 */
if (function_exists('raindrops_indv_css_' . $raindrops_embed_common_style)) {
    raindrops_register_styles($raindrops_embed_common_style);
}
$raindrops_images_path = get_stylesheet_directory_uri() . '/images/';
if (!file_exists($raindrops_images_path)) {
    get_template_directory() . '/images/';
}
$raindrops_base_color = raindrops_warehouse_clone('raindrops_base_color');
$style_type = raindrops_warehouse_clone('raindrops_style_type');
$navigation_title_img = raindrops_warehouse_clone('raindrops_heading_image');
$position_y = raindrops_warehouse_clone('raindrops_heading_image_position');
$raindrops_header_image = raindrops_warehouse_clone('raindrops_header_image');
$raindrops_header_color = raindrops_warehouse_clone('raindrops_default_fonts_color');
$raindrops_footer_image = raindrops_warehouse_clone('raindrops_footer_image');
$raindrops_footer_color = raindrops_warehouse_clone('raindrops_footer_color');
$raindrops_footer_color = raindrops_warehouse_clone('raindrops_footer_link_color');
//define("BASE_COLOR1",$raindrops_base_color);
Exemplo n.º 3
0
 /**
  *
  *
  *
  *
  *
  */
 function raindrops_SubMenu_GUI()
 {
     do_action('raindrops_SubMenu_GUI_pre');
     global $wpdb, $raindrops_base_setting, $raindrops_wp_version, $raindrops_current_theme_name;
     if (true == RAINDROPS_USE_AUTO_COLOR) {
         $this->col_settings_raindrops_style_type = raindrops_register_styles("w3standard");
     } else {
         $this->col_settings_raindrops_style_type = array("w3standard" => "w3standard");
     }
     $settings_check = get_option('raindrops_theme_settings');
     if ($settings_check == false) {
         $this->first_save_to_database = 'yes';
     }
     $ok = false;
     $result = "";
     /**
      * POSTGET
      *
      *
      */
     if (isset($_POST['raindrops_option_values']) && !empty($_POST['raindrops_option_values'])) {
         if (!wp_verify_nonce($_POST['_wpnonce'], 'update-options')) {
             wp_die(esc_html__('Post Errors 14', 'raindrops'));
         }
         if (!check_admin_referer('update-options', '_wpnonce')) {
             wp_die(esc_html__('Post Errors 18', 'raindrops'));
         }
         $option_id = intval($_POST['option_id']);
         $raindrops_updates = "";
         foreach ($_POST["raindrops_option_values"] as $key => $val) {
             $valid_function = $key . '_validate';
             $new_settings = get_option('raindrops_theme_settings');
             $new_settings[$key] = $valid_function($val);
             $upload_dir = wp_upload_dir();
             $new_settings['current_stylesheet_dir_url'] = get_stylesheet_directory_uri();
             $new_settings['current_upload_base_url'] = $upload_dir['baseurl'];
             $new_settings['install'] = true;
             if ($key == "raindrops_style_type") {
                 $style_type = raindrops_warehouse("raindrops_style_type");
                 $raindrops_indv_css = raindrops_design_output($style_type) . raindrops_color_base();
                 $new_settings['_raindrops_indv_css'] = $raindrops_indv_css;
             }
             if (update_option('raindrops_theme_settings', $new_settings)) {
                 $ok = true;
                 $raindrops_updates .= ',<span class="' . esc_attr($key) . '">' . $key . '</span>';
             }
         }
     }
     $result .= '<div class="wrap"><div id="title-raindrops-header" >';
     $result .= "<h2>" . ucfirst($raindrops_current_theme_name) . esc_html__(' Theme Settings', 'raindrops') . "</h2>";
     $install_condition = get_option('raindrops_theme_settings');
     if ($install_condition !== false) {
         $result .= "<p>" . __('Saved Database table name:', 'raindrops') . " <strong>" . RAINDROPS_PLUGIN_TABLE . "</strong></p></div>";
     } else {
         $result .= "<p>" . __('Now, Raindrops Not Using Database Table', 'raindrops') . "</p></div>";
     }
     /**
      *
      *
      *
      *
      *
      */
     if (isset($_POST['reset'])) {
         foreach ($raindrops_base_setting as $add) {
             $option_name = $add['option_name'];
             $raindrops_theme_settings[$option_name] = $add['option_value'];
         }
         $style_type = raindrops_warehouse("raindrops_style_type");
         $raindrops_indv_css = raindrops_design_output($style_type) . raindrops_color_base();
         $raindrops_theme_settings['_raindrops_indv_css'] = $raindrops_indv_css;
         $upload_dir = wp_upload_dir();
         $raindrops_theme_settings['current_stylesheet_dir_url'] = get_stylesheet_directory_uri();
         $raindrops_theme_settings['current_upload_base_url'] = $upload_dir['baseurl'];
         $raindrops_theme_settings['install'] = true;
         update_option('raindrops_theme_settings', $raindrops_theme_settings, "", $add['autoload']);
         //1.213 nav_menu hide issue
         //remove_theme_mods();
         do_action('raindrops_remove_theme_mods');
         if (file_exists(get_stylesheet_directory() . '/images/headers/wp3.jpg')) {
             $raindrops_site_image = get_stylesheet_directory_uri() . '/images/headers/wp3.jpg';
             $raindrops_site_thumbnail_image = get_stylesheet_directory_uri() . '/images/headers/wp3-thumbnail.jpg';
         } else {
             $raindrops_site_image = get_template_directory_uri() . '/images/headers/wp3.jpg';
             $raindrops_site_thumbnail_image = get_template_directory_uri() . '/images/headers/wp3-thumbnail.jpg';
         }
         set_theme_mod('default-image', $raindrops_site_image);
     }
     /**
      *
      *
      *
      *
      *
      */
     if (isset($_POST['raindrops_option_values']) && !empty($_POST['raindrops_option_values'])) {
         $scheme = raindrops_warehouse("raindrops_color_scheme");
         global ${$scheme};
         if ($ok == true) {
             if ($this->first_save_to_database == 'yes') {
                 $result .= '<div id="message" class="updated fade" title="' . esc_attr($raindrops_updates) . '"><p>' . __('updated saved database successfully.', 'raindrops');
             } else {
                 $result .= '<div id="message" class="updated fade" title="' . esc_attr($raindrops_updates) . '"><p>' . sprintf(__('updated %1$s successfully.', 'raindrops'), $raindrops_updates);
             }
             if (is_multisite()) {
                 $result .= sprintf('<a href="%s">%s</a></p></div>', 'themes.php?page=raindrops_settings', esc_html__(" MultiSite User must Click here !!", 'raindrops'));
             } else {
                 $result .= '</p></div>';
             }
         }
     }
     /**
      *
      *
      *
      *
      *
      */
     if (isset($_POST['raindrops_upload'])) {
         global $raindrops_max_upload_size, $raindrops_max_width, $raindrops_allow_file_type;
         $upload_result = raindrops_upload_image($raindrops_max_upload_size, $raindrops_max_width, $raindrops_allow_file_type);
         if (true == $upload_result[0]) {
             $result .= '<div id="message" class="updated fade" title="' . esc_attr(basename($upload_result[1])) . '"><img src="' . $upload_result[2] . '" width="100" style="vertical-align:middle;">&nbsp;&nbsp;&nbsp;&nbsp;' . sprintf(__('updated %1$s successfully.', 'raindrops'), basename($upload_result[2]));
         } else {
             $result .= '<div id="message" class="updated fade" title="' . esc_attr(basename($upload_result[1])) . '">' . sprintf(__('updated %s fail.', 'raindrops'), $upload_result[1]);
         }
     }
     $result .= '</div>';
     $result .= '<div id="reset2"></div>';
     $result .= '<div>' . $this->raindrops_form_user_input() . '</div>';
     echo $result;
 }
Exemplo n.º 4
0
         $font_size_key = "{$i}px";
         $raindrops_basefont_size[$font_size_key] = $i;
     }
 } else {
     $raindrops_basefont_default_val = raindrops_warehouse_clone('raindrops_basefont_settings');
     $raindrops_basefont_size = array();
     for ($i = 13; $i < $raindrops_font_max_size + 1; $i++) {
         $font_size_key = "{$i}px";
         $raindrops_basefont_size[$font_size_key] = $i;
     }
 }
 $raindrops_customize_color_ja = array_flip($raindrops_color_ja);
 $raindrops_customize_color_en_140 = array_flip($raindrops_color_en_140);
 $raindrops_customize_color_en = array_flip($raindrops_color_en);
 $raindrops_customize_color_anime = array_flip($raindrops_color_anime);
 $raindrops_style_type_chices = raindrops_register_styles("w3standard");
 $raindrops_get_permalink_structure = get_option('permalink_structure');
 if (empty($raindrops_get_permalink_structure)) {
     $raindrops_get_permalink_structure_message = '1';
 } else {
     $raindrops_get_permalink_structure_message = '0';
 }
 /*
  * callback
  */
 function raindrops_place_of_site_title_callback($control)
 {
     if ($control->manager->get_setting(raindrops_data_store_relate_id('raindrops_place_of_site_title'))->value() == 'header_image') {
         return true;
     } else {
         return false;