__('General', 'amdhas'), 'logic' => __('Logical Element', 'amdhas'), 'slider' => __('Sliding effect', 'amdhas'), 'social' => __('Social buttons', 'amdhas'), 'ads' => __('Ads area', 'amdhas'), 'seo' => __('SEO', 'amdhas') ); return $tabs; } function amdhas_get_sections($tab) { switch ( $tab ) : case 'general' : require_once dirname( __FILE__ ) . '/options/general.php'; $amdhas_sections = amdhas_get_general_sections(); break; case 'logic' : require_once dirname( __FILE__ ) . '/options/element.php'; $amdhas_sections = amdhas_get_logic_sections(); break; case 'slider' : require_once dirname( __FILE__ ) . '/options/sliding-efect.php'; $amdhas_sections = amdhas_get_slider_sections(); break; case 'social' : require_once dirname( __FILE__ ) . '/options/social.php'; $amdhas_sections = amdhas_get_social_sections(); break; case 'ads' : require_once dirname( __FILE__ ) . '/options/ads.php'; $amdhas_sections = amdhas_get_ads_sections(); break; case 'seo' : require_once dirname( __FILE__ ) . '/options/seo.php'; $amdhas_sections = amdhas_get_seo_sections(); break; default : require_once dirname( __FILE__ ) . '/options/general.php'; $amdhas_sections = amdhas_get_general_sections(); break; endswitch; return $amdhas_sections; } function amdhas_get_settings($tab = 'general') { switch ( $tab ) : case 'general' : require_once dirname( __FILE__ ) . '/options/general.php'; $amdhas_settings = amdhas_get_general_settings(); break; case 'logic' : require_once dirname( __FILE__ ) . '/options/element.php'; $amdhas_settings = amdhas_get_logic_settings(); break; case 'slider' : require_once dirname( __FILE__ ) . '/options/sliding-efect.php'; $amdhas_settings = amdhas_get_slider_settings(); break; case 'social' : require_once dirname( __FILE__ ) . '/options/social.php'; $amdhas_settings = amdhas_get_social_settings(); break; case 'ads' : require_once dirname( __FILE__ ) . '/options/ads.php'; $amdhas_settings = amdhas_get_ads_settings(); break; case 'seo' : require_once dirname( __FILE__ ) . '/options/seo.php'; $amdhas_settings = amdhas_get_seo_settings(); break; default : require_once dirname( __FILE__ ) . '/options/general.php'; $amdhas_settings = amdhas_get_general_settings(); break; endswitch; return $amdhas_settings; } function amdhas_body_classes( $classes ) { if ( is_singular() ) $options = get_option('amdhas_options'); if(!empty($options['amdhas_single_layout'])) { switch($options['amdhas_single_layout']) { case 1: $classes[] = 'left-sidebar'; break; case 2: $classes[] = 'right-sidebar'; break; case 3: $classes[] = 'one-column'; break; default: $classes[] = 'left-sidebar'; break; } } else{ $classes[] = 'left-sidebar'; } return $classes; }//end add_filter( 'body_class', 'amdhas_body_classes' ); function amdhas_menu_classes( $classes ) { $options = get_option('amdhas_options'); if(!empty($options['amdhas_menu_layout'])) { switch($options['amdhas_menu_layout']) { case 1: $classes[] = ''; break; case 2: $classes[] = 'lmenu'; break; case 3: $classes[] = 'nosecondary'; break; default: $classes[] = ''; break; } } else{ $classes[] = ''; } return $classes; }//end add_filter( 'body_class', 'amdhas_menu_classes' ); function amdhas_menu_primary_classes( $classes ) { $options = get_option('amdhas_options'); if(!empty($options['amdhas_primary_menu_layout'])) { switch($options['amdhas_primary_menu_layout']) { case 1: $classes[] = ''; break; case 2: $classes[] = 'rprimary'; break; case 3: $classes[] = 'noprimary'; break; default: $classes[] = ''; break; } } else{ $classes[] = ''; } return $classes; }//end add_filter( 'body_class', 'amdhas_menu_primary_classes' ); function amdhas_layout_classes( $classes ) { $options = get_option('amdhas_options'); if(!empty($options['amdhas_layout_flex'])) { switch($options['amdhas_layout_flex']) { case 1: $classes[] = ''; break; case 2: $classes[] = 'flex1'; break; case 3: $classes[] = 'flex2'; break; case 4: $classes[] = 'flex3'; break; case 5: $classes[] = 'flex4'; break; case 6: $classes[] = 'flex5'; break; default: $classes[] = ''; break; } } else{ $classes[] = ''; } return $classes; }//end add_filter( 'body_class', 'amdhas_layout_classes' ); function amdhas_typo_classes($typo) { $options = get_option('amdhas_options'); if(!empty($options['amdhas_font_stack'])) { switch($options['amdhas_font_stack']) { case 0: $typo[] = ''; break; case 1: $typo[] = 'arial'; break; case 2: $typo[] = 'palatino'; break; case 3: $typo[] = 'tahoma'; break; case 4: $typo[] = 'times'; break; case 5: $typo[] = 'lucida'; break; case 6: $typo[] = 'georgia'; break; default: $typo[] = ''; break; } } else{ $typo[] = ''; } return $typo ; }//end add_filter( 'body_class', 'amdhas_typo_classes' ); function amdhas_typo_heading() { $options = get_option('amdhas_options'); if(isset($options['amdhas_font_heading'])){ switch($options['amdhas_font_heading']) { case 0: $font_heading = ''; break; case 1: $font_heading = 'Arial, Helvetica, sans-serif'; break; case 2: $font_heading = 'Palatino Linotype, Palatino, Baskerville, Georgia, serif'; break; case 3: $font_heading = 'Tahoma, Verdana, Segoe, sans-serif'; break; case 4: $font_heading = 'Times, "Times New Roman", sans-serif'; break; case 5: $font_heading = 'Lucida Grande, Arial, sans-serif'; break; case 6: $font_heading = 'Georgia, palatino, serif'; break; case 7: $font_heading = 'Unna'; break; default: $font_heading = ''; break; } } return $font_heading; }//end function amdhas_typo_heading_intro() { $options = get_option('amdhas_options'); if(isset($options['amdhas_font_heading_intro'])){ switch($options['amdhas_font_heading_intro']) { case 0: $font_heading2 = ''; break; case 1: $font_heading2 = 'Arial, Helvetica, sans-serif'; break; case 2: $font_heading2 = 'Palatino Linotype, Palatino, Baskerville, Georgia, serif'; break; case 3: $font_heading2 = 'Tahoma, Verdana, Segoe, sans-serif'; break; case 4: $font_heading2 = 'Times, "Times New Roman", sans-serif'; break; case 5: $font_heading2 = 'Lucida Grande, Arial, sans-serif'; break; case 6: $font_heading2 = 'Georgia, palatino, serif'; break; case 7: $font_heading2 = 'Unna'; break; default: $font_heading2 = ''; break; } } return $font_heading2; }//end function amdhas_custom_logical_element() { $options = get_option('amdhas_options'); $header_background = $options['amdhas_color_header']; $color_text = $options['amdhas_color_text']; $header_hover = $options['amdhas_header_hover']; $textheader_color = $options['amdhas_text_header']; $link_color = $options['amdhas_link_color']; $link_hover = $options['amdhas_link_hover']; $secondary_menu = $options['amdhas_secondary_color']; $secondary_colormenu = $options['amdhas_secondary_colormenu']; $main_content = $options['amdhas_main_content']; $comment_area = $options['amdhas_comment_background']; $comment_color = $options['amdhas_comment_color']; $footer_color = $options['amdhas_footer_color']; $fontsize_body = $options['amdhas_fontsize_body']; $font_heading = $options['amdhas_font_heading']; $fontsize_title = $options['amdhas_fontsize_title']; $font_h1 = amdhas_typo_heading(); $font_intro = amdhas_typo_heading_intro(); if($options['amdhas_color_header']or $options['amdhas_font_heading_intro']or $options['amdhas_color_text']or $options['amdhas_heading_welcome']or $options['amdhas_fontsize_body']or $options['amdhas_comment_background']or $options['amdhas_secondary_colormenu']or $options['amdhas_comment_color']or $options['amdhas_fontsize_title']or $options['amdhas_font_heading'] or $options['amdhas_text_header']or $options['amdhas_header_hover']or $options['amdhas_link_color']or $options['amdhas_link_hover']or $options['amdhas_secondary_color']or $options['amdhas_main_content']or $options['amdhas_footer_color']<> ''){ ?> '' ) { echo '' . "\n"; } } function amdhas_bing_verifications() { $options = get_option('amdhas_options'); if ( isset($options['amdhas_bing_meta']) and $options['amdhas_bing_meta'] <> '' ) { echo '' . "\n"; } } function amdhas_google_plus() { $options = get_option('amdhas_options'); if ( isset($options['amdhas_googleplus_meta']) and $options['amdhas_googleplus_meta'] <> '' ) { echo '' . "\n"; } } function amdhas_statistics_code() { $options = get_option('amdhas_options'); if (!empty($options['amdhas_analitic_code'])and $options['amdhas_analitic_code'] <> '') { echo $options['amdhas_analitic_code']; } } add_action('wp_footer', 'amdhas_statistics_code'); function amdhas_admin_enqueue_scripts( $hook_suffix ) { if ( isset($_GET['page']) and $_GET['page'] == 'amdhas' ) : wp_enqueue_style('amdhas_options_style', get_template_directory_uri() .'/options/css/admin-style.css'); wp_enqueue_style('amdhas_options_color', get_template_directory_uri() .'/options/css/colorpicker.css'); wp_enqueue_script('thickbox'); wp_enqueue_script('media-upload'); wp_enqueue_script('jquery'); wp_enqueue_script('amdhas_color', get_template_directory_uri() .'/options/js/custom.js'); wp_enqueue_script('color', get_template_directory_uri() .'/options/js/colorpicker.js'); wp_enqueue_script('amdhas_theme_options', get_template_directory_uri() .'/options/js/jquery-image-upload.js', array('jquery','media-upload','thickbox')); wp_localize_script('image_upload', 'localizing_upload_js', array( 'use_this_image' => __('Use this Image', 'amdhas') )); wp_enqueue_style('thickbox'); endif; } ?>