Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt/functions/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt/functions/load-styles.php

<?php
/*
 * Security 	: blocking direct access
 * Source		: http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");

if ( !current_user_can('edit_themes') && !is_user_logged_in()) {
	add_action( 'wp_head', 'load_theme_style_inline', 2);
} else {
	add_action( 'wp_enqueue_scripts', 'load_theme_style_enqueue', 2 );
}
/*
 * Inline ALL CSS Files For Vistors and NOADMIN USERS
 *
*/
function load_theme_style_inline(){
	global $post;
	$mega_menu				= mwp_option('megamenu');
	$slider_show 			= mwp_option('slider-show');
	$slider_style 			= mwp_option('slider-style');
	$home_type				= mwp_option('home-type');
	$home_blog_style		= mwp_option('home-blog-style');
	$archive_blog_style 	= mwp_option('home-blog-style-archives');
	$theme_skin				= mwp_option('theme-skin');
	$fonts_library			= mwp_option('fonts-library');
	$default_widget_css		= mwp_option('default-widgets-css');
	$single_full_width		= mwp_option('single-full');
	$check_current_sidebar 	= get_post_meta($post->ID, 'single_full_width' , true);
	
	echo '<style>', " \n";
	/*
	 * Style
	 *
	*/
	$style 	= get_template_directory() . '/style.css';
	mwp_inline_css_file2($style);
	
	/*
	 * Header
	 *
	 * TOP Menu
	*/
	mwp_inline_css_file2(get_template_directory() . '/css/elements/menu/top.css');
	/*
	 * Header Style
	 *
	*/
	mwp_inline_css_file2(get_template_directory() . '/css/elements/header.css');
	/*
	 * Main Nav - Mega or Normal
	 *
	*/
	if ($mega_menu == 1 ) {
		mwp_inline_css_file2(get_template_directory() . '/css/elements/menu/mega.css');
	} else {
		mwp_inline_css_file2(get_template_directory() . '/css/elements/menu/normal.css');
	}

	/*
	 * Sliders + Blog + Modules
	 *
	*/
	if(is_home()) {
		/*
		 * Sliders
		 *
		*/
		if ($slider_show == 1) {
			if ($slider_style == 1) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-1.css');
			} elseif ($slider_style == 2) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-2.css');
			} elseif ($slider_style == 3) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-3.css');
			} elseif ($slider_style == 4) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-4.css');
			} elseif ($slider_style == 5) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-5.css');
			} elseif ($slider_style == 6) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/sliders/slider-6.css');
			}
		}
		/*
		 * Blog
		 *
		*/
		if ( $home_type == 1 ) {
			if ( $home_blog_style == 1 ) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-1.css');
			} elseif ( $home_blog_style == 2 ) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-2.css');
			} elseif ( $home_blog_style == 3 ) {
				mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-3.css');
			}
		}
		/*
		 * Modules
		 *
		*/
		if ( $home_type == 2 ) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/modules.css');
		}
	}
	/*
	 * Single
	 *
	*/
	if (is_singular()) {
		mwp_inline_css_file2(get_template_directory() . '/css/elements/content.css');
		if (mwp_is_gb_active()){
			mwp_inline_css_file2(get_template_directory() . '/css/elements/gutenberg.css');
		}
		if (!is_admin() && class_exists( 'toc' )) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/toc.min.css');
		}
	}
	/*
	 * Blog
	 *
	*/
	if ( is_archive() && $archive_blog_style == 1 ) {
		if ( $home_blog_style == 1 ) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-1.css');
		} elseif ( $home_blog_style == 2 ) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-2.css');
		} elseif ( $home_blog_style == 3 ) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/blog/blog-3.css');
		}
	}
	/*
	 * Archive CSS
	 *
	*/
	if (is_archive() && $archive_blog_style == 0 || is_search() ) {
		mwp_inline_css_file2(get_template_directory() . '/css/elements/archive.css');
	}
	/*
	 * Sidebar
	 *
	*/
	if ($single_full_width == 1 && is_singular('post') || $check_current_sidebar == 'on' && is_singular('post') ) {
		// No Thing TO DO
	} elseif ( $home_type == 1 && $home_blog_style == 3 && is_home()) {
		// No Thing TO DO
	} elseif ( $home_type == 1 && $archive_blog_style == 1 && $home_blog_style == 3 && is_archive() ) {	
		// No Thing TO DO
	} else {
		mwp_inline_css_file2(get_template_directory().'/css/elements/widgets.css');
		if ($default_widget_css == 1) {
			mwp_inline_css_file2(get_template_directory() . '/css/elements/widgets-default.css'); 
		}
	}
	/*
	 * Skin
	 *
	*/
	if ( $theme_skin == 1) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-1.css');
	} elseif ( $theme_skin == 2) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-2.css');
	} elseif ( $theme_skin == 3) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-3.css');
	} elseif ( $theme_skin == 4) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-4.css');
	} elseif ( $theme_skin == 5) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-5.css');
	} elseif ( $theme_skin == 6) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-6.css');
	} elseif ( $theme_skin == 7) {
		mwp_inline_css_file2(get_template_directory() . '/css/skins/color-7.css');
	}
	/*
	 * Typography
	 *
	*/
	if ( $fonts_library == 1) {
		if ( is_rtl() ) {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/rtl/default.css');
		} else {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/default.css');
		}
	} elseif ( $fonts_library == 2) {
		mwp_inline_css_file2(get_template_directory() . '/css/fonts/rtl/google.css');
	} elseif ( $fonts_library == 3) {
		mwp_inline_css_file2(get_template_directory() . '/css/fonts/google.css');
	} elseif ( $fonts_library == 4) {	
		if ( is_rtl() ) {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/rtl/droid.css');
		} else {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/roboto.css');
		}
	} elseif ( $fonts_library == 5) {	
		if ( is_rtl() ) {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/rtl/droid.css');
		} else {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/roboto.css');
		}
	} elseif ( $fonts_library == 6) {
		if ( is_rtl() ) {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/rtl/custom.css');
		} else {
			mwp_inline_css_file2(get_template_directory() . '/css/fonts/custom.css');
		}
	}
	
	echo '</style>';
}
/*
 * Enqueue ALL CSS Files For ADMIN USERS ONLY 
 *
 * JUST FOR MAKE ACCESS EASY TO CSS FILES WHEN INSPECTING ELEMENTS WITH CHROME & FIREFOX DEV tools
 *
*/
function load_theme_style_enqueue(){
	global $post;
	$mega_menu				= mwp_option('megamenu');
	$slider_show 			= mwp_option('slider-show');
	$slider_style 			= mwp_option('slider-style');
	$home_type				= mwp_option('home-type');
	$home_blog_style		= mwp_option('home-blog-style');
	$archive_blog_style 	= mwp_option('home-blog-style-archives');
	$theme_skin				= mwp_option('theme-skin');
	$fonts_library			= mwp_option('fonts-library');
	$default_widget_css		= mwp_option('default-widgets-css');
	$single_full_width		= mwp_option('single-full');
	
	if ( is_singular() ) {
		$check_current_sidebar	= get_post_meta($post->ID, 'single_full_width' , true);
	} else {
		$check_current_sidebar	= false;
	}
	
	wp_enqueue_style('style', get_template_directory_uri() . '/style.css', array(), null, 'all');
	wp_enqueue_style('header', get_template_directory_uri() . '/css/elements/header.css' , array(), null, 'all');
	wp_enqueue_style('menu-top', get_template_directory_uri() . '/css/elements/menu/top.css' , array(), null, 'all');
	if ($mega_menu == 1 ) {
		wp_enqueue_style('menu', get_template_directory_uri() . '/css/elements/menu/mega.css' , array(), null, 'all');
	} else {
		wp_enqueue_style('menu', get_template_directory_uri() . '/css/elements/menu/normal.css' , array(), null, 'all');
	}

	if(is_home()) {
		if ($slider_show == 1) {
			if ($slider_style == 1) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-1.css' , array(), null, 'all');
			} elseif ($slider_style == 2) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-2.css' , array(), null, 'all');
			} elseif ($slider_style == 3) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-3.css' , array(), null, 'all');
			} elseif ($slider_style == 4) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-4.css' , array(), null, 'all');
			} elseif ($slider_style == 5) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-5.css' , array(), null, 'all');
			} elseif ($slider_style == 6) {
				wp_enqueue_style('slider', get_template_directory_uri() . '/css/elements/sliders/slider-6.css' , array(), null, 'all');
			}
		}
		if ( $home_type == 1 ) {
			
			if ( $home_blog_style == 1 ) {
				wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-1.css' , array(), null, 'all');
			} elseif ( $home_blog_style == 2 ) {
				wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-2.css' , array(), null, 'all');
			} elseif ( $home_blog_style == 3 ) {
				wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-3.css' , array(), null, 'all');
			}
		}
		if ( $home_type == 2 )  {
			wp_enqueue_style('modules', get_template_directory_uri() . '/css/elements/modules.css' , array(), null, 'all');
		}
	}
	if (is_singular()) {

		wp_enqueue_style('content', get_template_directory_uri() . '/css/elements/content.css' , array(), null, 'all');
		if (mwp_is_gb_active()){
			wp_enqueue_style('content-gutenberg', get_template_directory_uri() . '/css/elements/gutenberg.css' , array(), null, 'all');
		}
		if (!is_admin() && class_exists( 'toc' )) {
			wp_enqueue_style('toc', get_template_directory_uri() . '/css/elements/toc.min.css' , array(), null, 'all');
		}
	}
	if ( is_archive() && $archive_blog_style == 1 ) {
		
		if ( $home_blog_style == 1 ) {
			wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-1.css' , array(), null, 'all');
		} elseif ( $home_blog_style == 2 ) {
			wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-2.css' , array(), null, 'all');
		} elseif ( $home_blog_style == 3 ) {
			wp_enqueue_style('blog', get_template_directory_uri() . '/css/elements/blog/blog-3.css' , array(), null, 'all');
		}
	}
	if (is_archive() && $archive_blog_style == 0 || is_search() ) {
		wp_enqueue_style('archive', get_template_directory_uri() . '/css/elements/archive.css' , array(), null, 'all');
	}
	if ($single_full_width == 1 && is_singular('post') || $check_current_sidebar == 'on' && is_singular('post') ) {
		// No Thing TO DO
	} elseif ( $home_type == 1 && $home_blog_style == 3 && is_home()) {
		// No Thing TO DO
	} elseif ( $home_type == 1 && $archive_blog_style == 1 && $home_blog_style == 3 && is_archive() ) {	
		// No Thing TO DO
	} else {
		wp_enqueue_style('mwp-widgets', get_template_directory_uri() . '/css/elements/widgets.css' , array(), null, 'all');
		if ($default_widget_css == 1) {
			wp_enqueue_style('widgets-default', get_template_directory_uri() . '/css/elements/widgets-default.css' , array(), null, 'all');
		}
	}
	if ( $theme_skin == 1) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-1.css' , array(), null, 'all');
	} elseif ( $theme_skin == 2) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-2.css' , array(), null, 'all');
	} elseif ( $theme_skin == 3) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-3.css' , array(), null, 'all');
	} elseif ( $theme_skin == 4) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-4.css' , array(), null, 'all');
	} elseif ( $theme_skin == 5) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-5.css' , array(), null, 'all');
	} elseif ( $theme_skin == 6) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-6.css' , array(), null, 'all');
	} elseif ( $theme_skin == 7) {
		wp_enqueue_style('skin', get_template_directory_uri() . '/css/skins/color-7.css' , array(), null, 'all');
	}
	
	if ( $fonts_library == 1) {
		if ( is_rtl() ) {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/rtl/default.css' , array(), null, 'all');
		} else {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/default.css' , array(), null, 'all');
		}
	} elseif ( $fonts_library == 2) {
		wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/rtl/google.css' , array(), null, 'all');
	} elseif ( $fonts_library == 3) {
		wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/google.css' , array(), null, 'all');
	} elseif ( $fonts_library == 4) {	
		if ( is_rtl() ) {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/rtl/droid.css' , array(), null, 'all');
		} else {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/roboto.css' , array(), null, 'all');
		}
	} elseif ( $fonts_library == 5) {	
		if ( is_rtl() ) {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/rtl/droid.css' , array(), null, 'all');
		} else {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/roboto.css' , array(), null, 'all');
		}
	} elseif ( $fonts_library == 6) {
		if ( is_rtl() ) {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/rtl/custom.css' , array(), null, 'all');
		} else {
			wp_enqueue_style('typo', get_template_directory_uri() . '/css/fonts/custom.css' , array(), null, 'all');
		}
	}
	
}

/*!
 * Font Awesome 4.7.0
 *
 * load a CSS file asynchronously.
 * [c]2014 @scottjehl, Filament Group, Inc.
 * Licensed MIT
*/
add_action('wp_footer', 'mwp_load_font_awesome_css', 99999999999999999);
function mwp_load_font_awesome_css() {
	$fonts_file = MWP_PATH_URL . '/css/assets.css';
	echo '<script>load_MWP_CSS("'.$fonts_file.'");</script>';
	echo '<noscript><link rel="stylesheet" type="text/css" href="'.$fonts_file.'" /></noscript>';
}
/*!
 * Jetpack Related Posts CSS
 *
*/
add_action('wp_footer', 'mwp_load_jetpack_related_posts_css', 99999999999999999);
function mwp_load_jetpack_related_posts_css() {
	if (is_singular()) {
		if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'related-posts' ) ) :
			if (!is_rtl()) {
				$related_css = MWP_PATH_URL . '/css/jetpack/related.css';
			} else {
				$related_css = MWP_PATH_URL . '/css/jetpack/related-rtl.css';
			}
			echo '<script>load_MWP_CSS("'.$related_css.'");</script>';
			echo '<noscript><link rel="stylesheet" type="text/css" href="'.$related_css.'" /></noscript>';
		endif;
	}
}
/*!
 * LightBox jQuery Libs
 *
*/
add_action('wp_footer', 'mwp_load_lightbox_css', 99999999999999999);
function mwp_load_lightbox_css() {
	$lightbox_check 	= mwp_option('lightbox-enable');
	$lightbox_library 	= mwp_option('lightbox-library');
	if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'carousel' ) ) {
		
	} elseif ($lightbox_check == 1 && is_singular()) {
		// Swipebox
		if ($lightbox_library == 1) {
			$lightbox_file = MWP_PATH_URL . '/css/lightbox/swipebox.min.css';
		} 
		// LightBox
		elseif ($lightbox_library == 2) {
			$lightbox_file = MWP_PATH_URL . '/css/lightbox/lightbox.css';
		} 
		// Venobox
		elseif ($lightbox_library == 3) {
			$lightbox_file = MWP_PATH_URL . '/css/lightbox/venobox.css';
		}
		echo '<script>load_MWP_CSS("'.$lightbox_file.'");</script>';
		echo '<noscript><link rel="stylesheet" type="text/css" href="'.$lightbox_file.'" /></noscript>';
	}
}
/*
 * Styles
 *
 * Inline small files
*/
add_action('wp_head', 'mwp_inline_small_styles', 999999);
function mwp_inline_small_styles(){
	$background_type 				= mwp_option('background-type');
	$background_color 				= mwp_option('background-color-simple');
	$background_pattern_color 		= mwp_option('background-pattern-color');
	$background_pattern 			= mwp_option('background-pattern');
	$background_pattern_image 		= mwp_option('background-pattern-image');
	$background_image 				= mwp_option('background-image');
	$background_image_color 		= mwp_option('background-color');
	$background_image_repeat 		= mwp_option('background-repeat');
	$background_image_position 		= mwp_option('background-position');
	$background_image_attachment 	= mwp_option('background-attachment');
	/*
	 * Body Background
	 *
	*/
	if ($background_type == 1) {
		if(!empty($background_color)) {
			echo '<style>body{background-color:'. esc_attr($background_color). ';}</style>';
		}
	} elseif ($background_type == 2) {
		if ($background_pattern_color <> "") {
			$color = esc_attr($background_pattern_color);
		} else { 
			$color = '#f8f8f8';
		}
		if ($background_pattern <> "") {
			echo '<style>body{background-image:url("'.esc_url($background_pattern).'");background-color:'. $color.';background-repeat:repeat;background-position:0 0}</style>';
		} else {
			$pattren_select_image 	= esc_url(get_template_directory_uri() .'/images/pattren/pattren'. $background_pattern_image. '.png');
			echo '<style>body{background-image:url("'.$pattren_select_image.'");background-color:'. $color.';background-repeat:repeat;background-position:0 0;}</style>';
		}
	} elseif ($background_type == 3) {
		echo '<style>body{background-image:url("'.esc_url($background_image).'");background-color:'. $background_image_color.';background-repeat:'. $background_image_repeat.';background-position:'. $background_image_position.';background-attachment:'. $background_image_attachment.'}</style>';
	}
	/*
	 * Logo
	 *
	 * Custom Width and Height
	 *
	*/
	$logo_width  = mwp_option('logo-width');
	$logo_height = mwp_option('logo-height');
	if (!empty($logo_width) && !empty($logo_height)) {
		echo '<style>.logo-size{width:'.esc_attr($logo_width).'px;height:'.esc_attr($logo_height).'px}</style>';
	}
	/*
	 * Logo
	 *
	 * Custom Margin
	 *
	*/
	$logo_margin = mwp_option('logo-margin');
	if (!empty($logo_margin)) {
		echo '<style>.logo-margin{margin-top:'.esc_attr($logo_margin).'px;margin-bottom:'.esc_attr($logo_margin).'px}</style>';
	}
	/*
	 * Post Pagination
	 *
	 * Next/Prev
	 *
	*/
	$pagination_text_size 	= mwp_option('page-links-text-size');
	$pagination_icon_size 	= mwp_option('page-links-fa-icon-size');
	$pagination_it_color	= mwp_option('page-links-color');
	if (!empty($pagination_text_size) && is_singular() || !empty($pagination_icon_size) && is_singular() || !empty($pagination_color) && is_singular()) :
	?>
	<style>
		<?php if (!empty($pagination_text_size)) { ?>
		.pagination-text-size .btn,
		.pagination-text-size {
			font-size:<?php echo esc_attr($pagination_text_size); ?>px;
			font-weight:700;
		}
		<?php } ?>
		<?php if (!empty($pagination_icon_size)) { ?>
		.pagination-icon-size i {
			font-size:<?php echo esc_attr($pagination_icon_size); ?>px;
		}
		<?php } ?>
		<?php if (!empty($pagination_it_color)) { ?>
		.pagination-it-color,
		.pagination-it-color a {
			color:<?php echo esc_attr($pagination_it_color); ?>;
		}
		<?php } ?>
		<?php if (!empty($pagination_text_size) && !empty($pagination_icon_size) && mwp_option('page-links-it') == 5) { ?>
		.pagination-text span{top:-<?php echo esc_attr($pagination_icon_size) / 4; ?>px}
		<?php } ?>
	</style>
	<?php
	endif;
	
	$get_advert_out_top	= mwp_option('advert-out-top');
	if ($get_advert_out_top == 0) {
		echo '<style>.advert-out-top{top:0px}</style>';
	} elseif (!empty($get_advert_out_top)) {
		$advert_out_top = preg_replace("/[^0-9]/", "", $get_advert_out_top);
		echo '<style>.advert-out-top{top:'.esc_attr($advert_out_top).'px}</style>';
	}
}
/*
 * Skin
 *
 * Custom Color 8
 *
*/
add_action('wp_head', 'mwp_custom_skin_helper');
function mwp_custom_skin_helper(){
	
	$skin_custom_color	= mwp_option('custom-skin-color');
	$skin_custom_head	= mwp_option('custom-skin-head');
	if ( is_array( $skin_custom_color ) ) {
		$color 		= esc_attr($skin_custom_color['color']);
		$border 	= esc_attr($skin_custom_color['border']);
		$background = esc_attr($skin_custom_color['background']);
		$trans 		= mwp_hex2rgba($background, 0.8);
		if (!empty($color) || !empty($border) || !empty($background) || !empty($skin_custom_head) ) {
			echo '<style>
			.skin8-border {border-bottom:2px solid '.$border.';}
			.skin8-border-top {border-top:3px solid '.$border.';}
			.skin8-background {background-color:'.$background.';}
			.skin8-trans {background-color:'.$trans.';}
			.skin8-background-head {background-color:'.$skin_custom_head.';}
			.skin8-color {color:'.$color.';}
			.skin8-color a{color:'.$color.'!important;}
			.skin8-hover a:hover{color:'.$color.'!important;}
			</style>';
		}
	} else {
		$background 		= '#eb9a28';
		$border 			= '#eb9a28';
		$color 				= '#eb9a28';
		$skin_custom_head 	= '#eb9a28';
		$trans 				= mwp_hex2rgba($background, 0.8);
		echo '<style>
			.skin8-border {border-bottom:2px solid '.$border.';}
			.skin8-border-top {border-top:3px solid '.$border.';}
			.skin8-background {background-color:'.$background.';}
			.skin8-trans {background-color:'.$trans.';}
			.skin8-background-head {background-color:'.$trans.';}
			.skin8-color {color:'.$color.';}
			.skin8-color a{color:'.$color.'!important;}
			.skin8-hover a:hover{color:'.$color.'!important;}
		</style>';
	}
	/*
	 * Custom Skin Only
	 *
	*/
	if (mwp_option('theme-skin') == 8) {
		echo '<style>
			a:hover, 
			.post-source a,
			.post-source,
			.post-source span,
			.comment-meta h3.comment-author a,
			.comment-subscription-form .subscribe-label{color:'.$color.'}
			.btn-color {background-color:'.$background.';border-color:'.$color.';color:#fff!important;}
			.btn-color:hover,
			.btn-color:focus,
			.btn-color.focus,
			.btn-color:active,
			.btn-color.active {background-color:'.$trans.';border-color:'.$border.';color:#fff!important;}
		</style>';

		$tagcloud = mwp_option('custom-skin-tagcloud');
		if (!empty($tagcloud)) {
			echo '<style>.tagcloud a:hover {background-color:'.$tagcloud.';border:1px solid '.$tagcloud.';color:#fff}</style>';
		} else {
			$tagcloud = '#eb9a28';
			echo '<style>.tagcloud a:hover {background-color:'.$tagcloud.';border:1px solid '.$tagcloud.';color:#fff}</style>';
		}
		
		$search_button	= mwp_option('custom-skin-search-button');
		if (!empty($search_button)) {
			echo '<style>.search-form input.search-submit{background-color:'.$search_button.';color:#fff;}</style>';
		} else {
			$search_button = '#eb9a28';
			echo '<style>.search-form input.search-submit{background-color:'.$search_button.';color:#fff;}</style>';
		}
		
		$cs_menu_hover_1 = esc_attr(mwp_option('cs-menu-hover-1'));
		$cs_menu_hover_2 = esc_attr(mwp_option('cs-menu-hover-2'));
		$cs_menu_border_1 = esc_attr(mwp_option('cs-menu-border-1'));
		$cs_menu_border_2 = esc_attr(mwp_option('cs-menu-border-2'));
		if (mwp_option('megamenu') == 1) {
			if (!empty($cs_menu_hover_1) && !empty($cs_menu_hover_1)) {
				echo '<style>
					.sf-mega{color:#fff;background-color:#31313c;border-top:4px solid '.$cs_menu_hover_1.'}
					.mega-category{background-color:#31313c;border-bottom:4px solid '.$cs_menu_hover_1.'}
					.mega-category a{color:#fff}
					.mega-category li.current_page_item,.mega-category li.current-menu-item,.mega-category li:hover,.mega-category li.sfHover,.mega-category a:focus,.mega-category a:hover,.mega-category a:active{background:#3B5998}
					.mega-category li a:active{background: '.$cs_menu_hover_2.'}
					.mega-category li{border-right:1px solid #505061;border-left:1px solid #1F1F26}
					.mega-category li:first-child{border-right:none}
				</style>';
			}
		} else {
			if (!empty($cs_menu_hover_1) && !empty($cs_menu_hover_1) && !empty($cs_menu_border_1) && !empty($cs_menu_border_1)) {
				echo '<style>
					.menu{background-color:#fff}
					.menu-category{background-color:#31313c;border-bottom:4px solid '.$cs_menu_hover_1.'}
					.menu-category a{color:#fff}
					.menu-category li.current_page_item,.menu-category li.current-menu-item,.menu-category li.current-post-ancestor,.menu-category li li,.menu-category li li li,.menu-category li:hover,.menu-category li.sfHover,.menu-category a:focus,.menu-category a:hover,.menu-category a:active{background:'.$cs_menu_hover_1.'}
					.menu-category li li:hover,.menu-category li li.sfHover,.menu-category li li a:focus,.menu-category li li a:hover,.menu-category li a:active{background:'.$cs_menu_hover_2.'}
					.menu-category li{border-right:1px solid #505061;border-left:1px solid #1F1F26}
					.menu-category li li,.menu-category li li li{border-top:1px solid '.$cs_menu_border_1.';border-bottom:1px solid '.$cs_menu_border_2.';border-right:none;border-left:none}
					.menu-category li li:first-child,.menu-category li li li:first-child{border-top:none;border-right:none;border-left:none}
					.menu-category li li:last-child,.menu-category li li li:last-child{border-bottom:none;border-right:none;border-left:none}
				</style>';
			}
		}
		
		$cs_menu_top_hover_1 = esc_attr(mwp_option('cs-menu-top-hover-1'));
		$cs_menu_top_hover_2 = esc_attr(mwp_option('cs-menu-top-hover-2'));
		$cs_menu_top_border_1 = esc_attr(mwp_option('cs-menu-top-border-1'));
		$cs_menu_top_border_2 = esc_attr(mwp_option('cs-menu-top-border-2'));
		
		if (!empty($cs_menu_top_hover_1) && !empty($cs_menu_top_hover_1) && !empty($cs_menu_top_border_1) && !empty($cs_menu_top_border_1)) {
			echo '<style>
				.menu-top a{color:#fff}
				.menu-top ul.sub-menu{box-shadow:0 2px 5px -1px #555;-moz-box-shadow:0 2px 5px -1px #555;-webkit-box-shadow:0 2px 5px -1px #555}
				.menu-top li li,.menu-top li li li,.menu-top li.current-menu-item,.menu-top li.current_page_item,.menu-top li:hover,.menu-top li.sfHover,.menu-top a:focus,.menu-top a:hover,.menu-top a:active{background-color:'.$cs_menu_top_hover_1.'}
				.menu-top li li:hover,.menu-top li li.sfHover,.menu-top li li a:focus,.menu-top li li a:hover,.menu-top li a:active{background-color:'.$cs_menu_top_hover_2.'}
				.menu-top li li,.menu-top li li li{border-top:1px solid '.$cs_menu_border_1.';border-bottom:1px solid '.$cs_menu_border_2.';border-right:none;border-left:none}
				.menu-top li li:first-child,.menu-top li li li:first-child{border-top:none;border-right:none;border-left:none}
				.menu-top li li:last-child,.menu-top li li li:last-child{border-bottom:none;border-right:none;border-left:none}
			</style>';
		}

	}
}
/*
 * Custom Style
 *
*/
add_action('wp_head', 'mwp_custom_skin_elements');
function mwp_custom_skin_elements() {

	$color_set 			= mwp_option('theme-skin');
	$skin_custom_color	= mwp_option('custom-skin-color');
		
	if ($color_set == 1) {
		$background_color 	= '#3b5998';
		$border_color 		= '#3b5998';
		$text_color 		= '#3b5998';
	} elseif ($color_set == 2) {
		$background_color 	= '#e82239';
		$border_color 		= '#e82239';
		$text_color 		= '#e82239';
	} elseif ($color_set == 3) {
		$background_color 	= '#da2483';
		$border_color 		= '#da2483';
		$text_color 		= '#da2483';
	} elseif ($color_set == 4) {
		$background_color 	= '#35a047';
		$border_color 		= '#35a047';
		$text_color 		= '#35a047';
	} elseif ($color_set == 5) {
		$background_color 	= '#6441a5';
		$border_color 		= '#6441a5';
		$text_color 		= '#6441a5';
	} elseif ($color_set == 6) {
		$background_color 	= '#318dcb';
		$border_color 		= '#318dcb';
		$text_color 		= '#318dcb';
	} elseif ($color_set == 7) {
		$background_color 	= '#fd5d29';
		$border_color 		= '#fd5d29';
		$text_color 		= '#fd5d29';
	} elseif ($color_set == 8) {
		if ( is_array( $skin_custom_color )) {
			$color 		= $skin_custom_color['color'];
			$border 	= $skin_custom_color['border'];
			$background = $skin_custom_color['background'];
			if (!empty($color) || !empty($border) || !empty($background)): 
				$text_color 		= esc_attr($color);
				$border_color 		= esc_attr($border);
				$background_color 	= esc_attr($background);
			endif;
		} else {
			$background_color 	= '#eb9a28';
			$border_color 		= '#eb9a28';
			$text_color 		= '#eb9a28';
		}
	}
	?>
	<style>
		<?php 
		/*
		 * remove padding for main div
		*/
		if ( mwp_option('slider-style') == 1 && is_home() || mwp_option('slider-style') == 4 && is_home() || mwp_option('slider-style') == 5 && is_home() || mwp_option('slider-style') == 6 && is_home()) { ?>	
		#main {padding-top:0!important;}		
		<?php } ?>

		<?php
		/*
		 * Login links
		*/
		?>
		.logged a:hover{background-color:rgba(255,255,255,0.05)}
		.login a:hover{background-color:rgba(255,255,255,0.05)}
		<?php if (is_rtl()) { ?>
		.login a:first-child{border-left:1px solid rgba(255,255,255,0.2)}
		.login a:last-child{border-right:1px solid rgba(0,0,0,0.2)}
		<?php } else { ?>
		.login a:first-child{border-right:1px solid rgba(255,255,255,0.2)}
		.login a:last-child{border-left:1px solid rgba(0,0,0,0.2)}
		<?php } ?>
		
		<?php 
		/*
		 * Main & Mega Menu
		*/
		?>
		<?php if (mwp_option('megamenu') == 1) { ?>
		.mega-category li.menu-item-home a{background-image:url(<?php echo MWP_PATH_URL; ?>/images/home-bt.png)}
		.mega-category li.menu-item-home a:hover,
		.mega-category li.menu-item-home a:focus,
		.mega-category li.menu-item-home a:active{background-image:url(<?php echo MWP_PATH_URL; ?>/images/home-bt.png)}
		<?php } else { ?>
		.menu-category li.menu-item-home a,
		.menu-category li.menu-item-home a:hover{background-image:url(<?php echo MWP_PATH_URL; ?>/images/home-bt.png)}
		<?php } ?>
		<?php if (is_rtl()) { ?>
		.menu-category > li:first-child{border-right:none}
		.menu-category > li:last-child {border-left:none}
		.mega-category > li:last-child {border-left:none}
		<?php } else { ?>
		.menu-category > li:first-child{border-left:none}
		.menu-category > li:last-child {border-right:none}
		.mega-category > li:last-child {border-right:none}
		<?php } ?>

		<?php
		/*
		 * Cookie Consent
		*/
		$gdpr = mwp_option('cookie-consent-color');
		if (!empty($gdpr)) { ?>
		.gdpr-cm-wrap{background-color:<?php echo $gdpr; ?>}
		<?php } else { ?>
		.gdpr-cm-wrap{background-color:#47c}
		<?php } ?>
		
		<?php
		/*
		 * POSTQUARE ads
		*/
		?>
		.eng_ww_ttl_span1 {color:<?php echo $text_color; ?> !important;}
		<?php 
		/*
		 * Slider 2
		*/
		if ( is_home() ) : 
		?>
		.slider2-nav li.cycle-pager-active{background-color:<?php echo $background_color; ?>}
		.slider2-content .category{background-color:<?php echo $background_color; ?>}
		<?php endif; ?>
		
		<?php 
		/*
		 * Slider 3
		*/
		if ( is_home() ) : 
		?>
		.slider3-content .category{background-color:<?php echo $background_color; ?>}
		.slider3-nav li.cycle-pager-active{background-color:<?php echo $background_color; ?>}
		<?php endif; ?>
		
		<?php 
		/*
		 * Blog - Category links
		 * 
		*/
		?>
		.recent .ps3 .category a,
		.recent .ps2 .category a,
		.recent .ps1 .category a{color:<?php echo $text_color; ?>}
		<?php 
		/*
		 * Blog - Read More button
		 * 
		*/
		?>
		.recent .read-more{border:2px solid <?php echo mwp_hex2rgba($border_color, 0.8); ?> !important}
		.recent .read-more:hover{border:2px solid <?php echo $border_color; ?> !important}
		
		<?php 
		/*
		 * Pager - Archives & Comments
		 * 
		*/
		?>
		.comments-nav .current,
		.page-numbers li span.current,
		.pagination span.current{border:2px solid <?php echo mwp_hex2rgba($border_color, 0.8); ?>;color:<?php echo $text_color; ?>}
		.comments-nav a:hover,
		.pagination a:hover{border:2px solid <?php echo $border_color; ?>;color:<?php echo $text_color; ?>}

		<?php 
		/*
		 * Author Bio - Social Icon Hover
		*/
		?>
		.author-bio ul.author-links li.googleplus:hover{background-color:<?php echo mwp_hex2rgba('#d0422a', 0.86); ?>}
		.author-bio ul.author-links li.facebook:hover{background-color:<?php echo mwp_hex2rgba('#3b5998', 0.86); ?>}
		.author-bio ul.author-links li.twitter:hover{background-color:<?php echo mwp_hex2rgba('#00abf1', 0.86); ?>}
		<?php 
		/*
		 * jQuery Read More 
		*/
		?>
		.show-morecontent div {background-color:<?php echo $background_color; ?>;color:#fff}
		
		<?php 
		/*
		 * Light Embed Video Play Button Color
		*/
		?>
		.vi-responsive .play {background-color:<?php echo $background_color; ?>}
		
		<?php 
		/*
		 * Post Content Links Color
		*/
		if ( is_singular() ) : 
		?>
		.el-content a{color:<?php echo $text_color; ?>}
		.el-content a:hover{text-decoration:underline}
		<?php endif; ?>
		/* 
		 * mediaelement
		 * Current track progress and active audio volume level bar 
		*/
		.mejs-controls {direction:ltr}
		.mejs-container .mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current,
		.mejs-container .mejs-controls .mejs-time-rail .mejs-time-current{background:<?php echo $background_color; ?>}
		/* 
		 * mediaelement
		 * Track progress bar background (amount of track fully loaded)
		 * We prefer to style these with the main accent color of our theme 
		*/
		.mejs-container .mejs-controls .mejs-time-rail .mejs-time-loaded{background-color:<?php echo mwp_hex2rgba($background_color, 0.075); ?>}
		.wp-playlist-light .wp-playlist-playing{border-bottom-color:<?php echo $background_color; ?>}
		.mejs-container .mejs-button > button{background-image:url(<?php echo MWP_PATH_URL; ?>/images/mediaelement/mejs-controls-dark.svg)}
		<?php 
		/*
		 * Default wordpress widgets List style
		*/
		?>
		.widget-content ul{list-style-image:url(<?php echo MWP_PATH_URL; ?>/images/list.png)}
		<?php 
		/*
		 * Widget jQuery - Most Viewed & Popular
		 * Widget Most
		*/
		?>
		.widget-wrapper ul.tab_nav li a.current_tab{color:<?php echo $text_color; ?>;}
		<?php 
		/*
		 * Post Pagination : Next/Prev - Switch Align
		 *
		*/
		$page_links_align_switch = mwp_option('page-links-align-switch');
		if ($page_links_align_switch == 1) { ?>
		.pagination-links a:nth-child(1n){float:right;text-align:right}
		.pagination-links a:nth-child(2n){float:left;text-align:left}
		.rtl .pagination-links a:nth-child(1n){float:left;text-align:left}
		.rtl .pagination-links a:nth-child(2n){float:right;text-align:right}	
		<?php } else { ?>
		.pagination-links a:nth-child(1n){text-align:left}
		.pagination-links a:nth-child(2n){text-align:right}
		.rtl .pagination-links a:nth-child(1n){text-align:right}
		.rtl .pagination-links a:nth-child(2n){text-align:left}
		<?php } ?>
	</style>
	<?php
}

/*
 * Sidebar
 *
 * Float Right or Left
 *
*/
function mwp_sidebar_float() {
	
	if (is_singular()) {
	
		if (is_rtl()) {
			if (is_rtl() && mwp_option('single-sidebar') == 1) {
				$content_margin = "margin-left:10px;";
				$content_float = 'right';
				$sidebar_float = 'left';
			} elseif (!is_rtl() && mwp_option('single-sidebar') == 1) {
				$content_margin = "margin-left:10px;";
				$content_float = 'right';
				$sidebar_float = 'left';
			} else {
				$content_margin = "margin-right:10px;";
				$content_float = 'left';
				$sidebar_float = 'right';
			}
		} else {
			if (!is_rtl() && mwp_option('single-sidebar') == 1) {
				$content_margin = "margin-right:10px;";
				$content_float = 'left';
				$sidebar_float = 'right';
			} elseif (is_rtl() && mwp_option('single-sidebar') == 1) {
				$content_margin = "margin-right:10px;";
				$content_float = 'left';
				$sidebar_float = 'right';
			} else {
				$content_margin = "margin-left:10px;";
				$content_float = 'right';
				$sidebar_float = 'left';
			}
		}
		?>
		<style>
			#content {
				float:<?php echo $content_float; ?>;
				<?php echo $content_margin; ?>
			}
			.sidebar {
				float:<?php echo $sidebar_float; ?>;
			}
			@media only screen and (max-width: 986px) and (min-width:768px){
				#content {
					margin-right:0px;
				}
				.rtl #content {
					margin-left:0px;
				}
				.sidebar {
					float:<?php echo $sidebar_float; ?>;
				}
			}
			@media only screen and (max-width: 767px) and (min-width:560px){
				#content {
					margin-right:0px;
				}
				.rtl #content {
					margin-left:0px;
				}
				.sidebar {
					float:none;
				}
			}
			@media only screen and (max-width: 559px){
				#content {
					margin-right:0px;
				}
				.rtl #content {
					margin-left:0px;
				}
				.sidebar {
					float:<?php echo $sidebar_float; ?>;
				}	
			}
		</style>
		<?php
	} else {
		if (is_rtl()) {
			$content_margin = "margin-left:10px;";
			$content_float = 'right';
			$sidebar_float = 'left';
		} else {
			$content_margin = "margin-right:10px;";
			$content_float = 'left';
			$sidebar_float = 'right';
		} ?>
		<style>
			#content {
				float:<?php echo $content_float; ?>;
				<?php echo $content_margin; ?>
			}
			.sidebar {
				float:<?php echo $sidebar_float; ?>;
			}
			@media only screen and (max-width: 986px) and (min-width:768px){
				.sidebar {
					float:<?php echo $sidebar_float; ?>;
				}
			}
			@media only screen and (max-width: 767px) and (min-width:560px){
				.sidebar {
					float:none;
				}
			}
			@media only screen and (max-width: 559px){
				.sidebar {
					float:<?php echo $sidebar_float; ?>;
				}	
			}
		</style>
		<?php	
	}
}
add_action('wp_head', 'mwp_sidebar_float');
/*
 *
 * Important CSS Rules
 *
 *
*/
function mwp_important_css_rules() {
	// Contanier
	$container 		= esc_attr(mwp_option('container-color'));
	// Backgroud
	$background 	= esc_attr(mwp_option('background-type'));
	echo '<style>';

	if ($background <= 3 && $container == 0) {
		?>
		.container{box-shadow:0 5px 5px -1px #ccc}
		<?php
	}

	/*
	 * Remove container Color
	*/
	if ($container == 1) {
		?>
		.container,
		.footer-style1{background-color:transparent!important}
		.misc-bar{padding:0 5px}
		<?php
	}
	/*
	 * Extra Remove container Color
	*/
	$check_body_color = mwp_option('background-color-simple');
	if ($container == 1 && !empty($check_body_color)) {
		echo 'body{background-color:'.$check_body_color.' !important;}';
	} elseif ($container == 0 && empty($check_body_color)) {
		echo 'body{background-color:#f8f8f8!important;}.container{box-shadow:0 5px 5px -1px #ccc}';
	}
	echo '</style>';
}
add_action('wp_head', 'mwp_important_css_rules', 9999999997);

/*
 * Load Custom Fonts Styles
*/
require_once( get_template_directory() . '/functions/fonts.php' );

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists