generalsettings = "General Settings"; $this->shortgeneralsettings = $best_magazine_special_id_for_db.""; /// get options from data base $value_of_std[0] = get_theme_mod($this->shortgeneralsettings."_logo_img", ""); $value_of_std[1] = get_theme_mod($this->shortgeneralsettings."_body_back", ''); $value_of_std[2] = get_theme_mod($this->shortgeneralsettings."_custom_css_enable", ''); $value_of_std[3] = get_theme_mod($this->shortgeneralsettings."_custom_css_text", ''); $value_of_std[4] = get_theme_mod($this->shortgeneralsettings."_favicon_img", ''); $value_of_std[5] = get_theme_mod($this->shortgeneralsettings."_blog_style", 'on'); $value_of_std[6] = get_theme_mod($this->shortgeneralsettings."_grab_image", ''); $value_of_std[7] = get_theme_mod($this->shortgeneralsettings."_show_twitter_icon", 'on'); $value_of_std[8] = get_theme_mod($this->shortgeneralsettings."_show_rss_icon", 'on'); $value_of_std[9] = get_theme_mod($this->shortgeneralsettings."_show_facebook_icon", 'on'); $value_of_std[10] = get_theme_mod($this->shortgeneralsettings."_twitter_url", ''); $value_of_std[11] = get_theme_mod($this->shortgeneralsettings."_rss_url", ''); $value_of_std[12] = get_theme_mod($this->shortgeneralsettings."_facebook_url", ''); $value_of_std[13] = get_theme_mod($this->shortgeneralsettings."_our_style", ''); $value_of_std[14] = get_theme_mod($this->shortgeneralsettings."_menu_search_form", ''); $value_of_std[15] = get_theme_mod($this->shortgeneralsettings."_post_header", ''); $value_of_std[16] = get_theme_mod($this->shortgeneralsettings."_favicon_enable", ''); $value_of_std[17] = get_theme_mod($this->shortgeneralsettings."_date_enable", 'on'); $value_of_std[18] = get_theme_mod($this->shortgeneralsettings."_footer_text_enable", 'on'); $value_of_std[19] = get_theme_mod($this->shortgeneralsettings."_footer_text", 'WordPress Themes by Web-Dorado'); $value_of_std[20] = get_theme_mod($this->shortgeneralsettings."_show_google_icon", 'on'); $value_of_std[21] = get_theme_mod($this->shortgeneralsettings."_google_url", ''); $this->options_generalsettings = array( 'logo_img' => array( "name" => "Logo", "description" => "You can apply a custom logo image by clicking on the Upload Image button and uploading your image.", "var_name" => "logo_img", "id" => $this->shortgeneralsettings."_logo_img", "std" => $value_of_std[0] ), 'body_back' => array( "name" => "General Settings", "description" => "", "var_name" => "body_back", "id" => $this->shortgeneralsettings."_body_back", "std" => $value_of_std[1] ), 'custom_css_enable' => array( "name" => "Custom CSS", "description" => "Custom CSS will change the visual style of the website. The CSS code provided here can be applied to any page or post.", "var_name" => "custom_css_enable", "id" => $this->shortgeneralsettings."_custom_css_enable", "std" => $value_of_std[2] ), 'custom_css_text' => array( "name" => "Custom CSS", "description" => "Provide the custom CSS code below.", "var_name" => "custom_css_text", "id" => $this->shortgeneralsettings."_custom_css_text", "std" => $value_of_std[3] ), 'favicon_img' => array( "name" => "", "description" => "Click on the Upload Image button to upload the favicon image.", "var_name" => "favicon_img", "id" => $this->shortgeneralsettings."_favicon_img", "std" => $value_of_std[4] ), 'blog_style' => array( "name" => "Blog Style post format", "description" => "Check the box to have short previews for the homepage/index posts.", "var_name" => "blog_style", "id" => $this->shortgeneralsettings."_blog_style", "std" => $value_of_std[5] ), 'grab_image' => array( "name" => "Grab the first post image", "description" => "Enable this option if you want to use the images that are already in your post to create a thumbnail without using custom fields. In this case thumbnail images will be generated automatically using the first image of the post. Note that the image needs to be hosted on your own server.", "var_name" => "grab_image", "id" => $this->shortgeneralsettings."_grab_image", "std" => $value_of_std[6] ), 'show_twitter_icon' => array( "name" => "Show Twitter Icon", "description" => "Check the box to display Twitter icon.", "var_name" => "show_twitter_icon", "id" => $this->shortgeneralsettings."_show_twitter_icon", "std" => $value_of_std[7] ), 'show_rss_icon' => array( "name" => "Show RSS Icon", "description" => "Check the box to display RSS feed icon.", "var_name" => "show_rss_icon", "id" => $this->shortgeneralsettings."_show_rss_icon", "std" => $value_of_std[8] ), 'show_facebook_icon' => array( "name" => "Show Facebook Icon", "description" => "Check the box to display Facebook icon.", "var_name" => "show_facebook_icon", "id" => $this->shortgeneralsettings."_show_facebook_icon", "std" => $value_of_std[9] ), 'twitter_url' => array( "name" => "", "description" => "Enter your Twitter Profile URL below.", "var_name" => "twitter_url", "id" => $this->shortgeneralsettings."_twitter_url", "std" => $value_of_std[10] ), 'rss_url' => array( "name" => "", "description" => "Enter your RSS URL below.", "var_name" => "rss_url", "id" => $this->shortgeneralsettings."_rss_url", "std" => $value_of_std[11] ), 'facebook_url' => array( "name" => "", "description" => "Enter your Facebook Profile URL below.", "var_name" => "facebook_url", "id" => $this->shortgeneralsettings."_facebook_url", "std" => $value_of_std[12] ), 'our_style' => array( "name" => "General Settings", "description" => "", "var_name" => "our_style", "id" => $this->shortgeneralsettings."_our_style", "std" => $value_of_std[13] ), 'menu_search_form' => array( "name" => "General Settings", "description" => "", "var_name" => "menu_search_form", "id" => $this->shortgeneralsettings."_menu_search_form", "std" => $value_of_std[14] ), 'post_header' => array( "name" => "General Settings", "description" => "", "var_name" => "post_header", "id" => $this->shortgeneralsettings."_post_header", "std" => $value_of_std[15] ), 'favicon_enable' => array( "name" => "Show Favicon", "description" => "Check the box to display the favicon. ", "var_name" => "favicon_enable", "id" => $this->shortgeneralsettings."_favicon_enable", "std" => $value_of_std[16] ), 'date_enable' => array( "name" => "Display post meta information", "description" => "Choose whether to display the post meta information such as date, author and etc.", "var_name" => "date_enable", "id" => $this->shortgeneralsettings."_date_enable", "std" => $value_of_std[17] ), 'footer_text_enable' => array( "name" => "Information in the Footer", "description" => "Check the box to display custom HTML for the footer.", "var_name" => "footer_text_enable", "id" => $this->shortgeneralsettings."_footer_text_enable", "std" => $value_of_std[18] ), 'footer_text' => array( "name" => "Information in the Footer", "description" => "Here you can provide the HTML code to be inserted in the footer of your web site.", "var_name" => "footer_text", "id" => $this->shortgeneralsettings."_footer_text", "std" => $value_of_std[19] ), 'show_google_icon' => array( "name" => "Show Google+ Icon", "description" => "Check the box to display Google + icon.", "var_name" => "show_google_icon", "id" => $this->shortgeneralsettings."_show_google_icon", "std" => $value_of_std[20] ), 'google_url' => array( "name" => "", "description" => "Enter your Google+ Profile URL below.", "var_name" => "google_url", "id" => $this->shortgeneralsettings."_google_url", "std" => $value_of_std[21] ) ); } /***********************************/ /* SAVE AND RESET PARAMETRS */ /***********************************/ public function web_dorado_theme_update_and_get_options_general_settings(){ if ( isset($_GET['page']) && $_GET['page'] == "web_dorado_theme" && isset($_GET['controller']) && $_GET['controller'] == "general_page") { if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'save') { foreach ($this->options_generalsettings as $value) { if(isset($value['var_name']) && isset($_REQUEST[$value['var_name']])) set_theme_mod($value['id'], $_REQUEST[$value['var_name']]); } header("Location: admin.php?page=web_dorado_theme&controller=general_page&saved=true"); die; } else { if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'reset' ) { foreach ($this->options_generalsettings as $value) { if(isset($value['var_name'])) remove_theme_mod($value['id']); } header("Location: admin.php?page=web_dorado_theme&controller=general_page&reset=true"); die; } } } } /***********************************/ /* UPDATE ONE PARAM OUT OF CLASS */ /***********************************/ public function update_parametr($param_name,$value){ set_theme_mod($this->options_generalsettings[$param_name]['id'],$value); } /***********************************/ /* SAVE AND RESET PARAMETRS */ /***********************************/ public function web_dorado_general_settings_page_admin_scripts(){ wp_enqueue_style('general_settings_page_main_style',get_template_directory_uri().'/admin/css/general_settings_page.css'); wp_enqueue_script('jquery'); wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); wp_print_scripts('editor'); if (function_exists('add_thickbox')) add_thickbox(); wp_print_scripts('media-upload'); //if (function_exists('wp_tiny_mce')) wp_tiny_mce(); wp_admin_css(); wp_enqueue_script('utils'); } /***********************************/ /* BACK END ADMIN HTML */ /***********************************/ public function dorado_theme_admin_general_settings(){ if (isset($_REQUEST['saved']) && $_REQUEST['saved'] && isset($_REQUEST['controller']) && $_REQUEST['controller']=='general_page') echo '

' . $this->generalsettings . ' settings are saved.

'; if (isset($_REQUEST['reset']) && $_REQUEST['reset'] && isset($_REQUEST['controller']) && $_REQUEST['controller']=='general_page') echo '

' . $this->generalsettings . ' settings are reset.

'; global $best_magazine_admin_helepr_functions,$best_magazine_web_dor; ?>
User Manual
This section allows you to make changes in overall content of the site. More...

General

checkbox_with_textarea($this->options_generalsettings['custom_css_enable'],$this->options_generalsettings['custom_css_text']); $best_magazine_admin_helepr_functions->only_upload($this->options_generalsettings['logo_img']); $best_magazine_admin_helepr_functions->checkbox_with_upload($this->options_generalsettings['favicon_enable'],$this->options_generalsettings["favicon_img"]); $best_magazine_admin_helepr_functions->only_checkbox($this->options_generalsettings['blog_style']); $best_magazine_admin_helepr_functions->only_checkbox($this->options_generalsettings['grab_image']); $best_magazine_admin_helepr_functions->checkbox_with_input($this->options_generalsettings['show_twitter_icon'],$this->options_generalsettings['twitter_url']); $best_magazine_admin_helepr_functions->checkbox_with_input($this->options_generalsettings['show_rss_icon'],$this->options_generalsettings['rss_url']); $best_magazine_admin_helepr_functions->checkbox_with_input($this->options_generalsettings['show_facebook_icon'],$this->options_generalsettings['facebook_url']); $best_magazine_admin_helepr_functions->checkbox_with_input($this->options_generalsettings['show_google_icon'],$this->options_generalsettings['google_url']); $best_magazine_admin_helepr_functions->only_checkbox($this->options_generalsettings['date_enable']); $best_magazine_admin_helepr_functions->checkbox_with_textarea($this->options_generalsettings['footer_text_enable'],$this->options_generalsettings['footer_text']); ?>

options_generalsettings['favicon_enable']['std']=='on' && $this->options_generalsettings['favicon_img']['std']) { ?>