Sindbad~EG File Manager

Current Path : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/functions/
Upload File :
Current File : /var/www/html/wordpress_alg24news/wp-content/themes/newsbt-mobile/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');
} else {
	add_action( 'wp_enqueue_scripts', 'load_theme_style_enqueue' );
}
/*
 * Inline ALL CSS Files For Vistors and NOADMIN USERS
 *
*/
function load_theme_style_inline(){
	echo '<style>', " \n";
	/*
	 * Style
	 *
	*/
	$style 	= get_template_directory() . '/style.css';
	mwp_inline_css_file2($style);
	$lists 	= get_template_directory() . '/css/lists.css';
	mwp_inline_css_file2($lists);
	/*
	 * Single Post
	 *
	*/
	if (is_singular()) {
		mwp_inline_css_file2(get_template_directory() . '/css/content.css');
		if (mwp_is_gb_active()){
			mwp_inline_css_file2(get_template_directory() . '/css/gutenberg.css');
		}	
	}
	/*
	 * Typography
	 *
	*/
	if ( mwp_option('mobile-fonts-library') == 1) {
		if ( is_rtl() ) {
			$typo_file = get_template_directory() . '/css/font/rtl/default.css';
		} else {
			$typo_file = get_template_directory() . '/css/font/default.css';
		}
	} elseif ( mwp_option('mobile-fonts-library') == 2) {
		$typo_file = get_template_directory() . '/css/font/rtl/google.css';
	} elseif ( mwp_option('mobile-fonts-library') == 3) {
		$typo_file = get_template_directory() . '/css/font/google.css';
	} elseif ( mwp_option('mobile-fonts-library') == 4) {	
		$typo_file = get_template_directory() . '/css/font/rtl/droid.css';
	} elseif ( mwp_option('mobile-fonts-library') == 5) {	
		$typo_file = get_template_directory() . '/css/font/roboto.css';
	} elseif ( mwp_option('mobile-fonts-library') == 6) {
		if ( is_rtl() ) {
			$typo_file = get_template_directory() . '/css/font/rtl/custom.css';
		} else {
			$typo_file = get_template_directory() . '/css/font/custom.css';
		}
	}
	mwp_inline_css_file2($typo_file);
	
	echo '</style>', " \n";
}
/*
 * 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(){
	/*
	 * Style
	 *
	*/
	wp_register_style('style', get_template_directory_uri() . '/style.css', array(), null, 'all');
	wp_enqueue_style('style');
	wp_register_style('lists', get_template_directory_uri() . '/css/lists.css', array(), null, 'all');
	wp_enqueue_style('lists');
	/*
	 * Single Post
	 *
	*/
	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-new', get_template_directory_uri() . '/css/elements/gutenberg.css' , array(), null, 'all');
		}
	}
	/*
	 * Typography
	 *
	*/
	if ( mwp_option('mobile-fonts-library') == 1) {
		if ( is_rtl() ) {
			wp_register_style('font', get_template_directory_uri() . '/css/font/rtl/default.css' , array(), null, 'all');
		} else {
			wp_register_style('font', get_template_directory_uri() . '/css/font/default.css' , array(), null, 'all');
		}
	} elseif ( mwp_option('mobile-fonts-library') == 2) {
		wp_register_style('font', get_template_directory_uri() . '/css/font/rtl/google.css' , array(), null, 'all');
	} elseif ( mwp_option('mobile-fonts-library') == 3) {
		wp_register_style('font', get_template_directory_uri() . '/css/font/google.css' , array(), null, 'all');
	} elseif ( mwp_option('mobile-fonts-library') == 4) {	
		wp_register_style('font', get_template_directory_uri() . '/css/font/rtl/droid.css' , array(), null, 'all');
	} elseif ( mwp_option('mobile-fonts-library') == 5) {	
		wp_register_style('font', get_template_directory_uri() . '/css/font/roboto.css' , array(), null, 'all');
	} elseif ( mwp_option('mobile-fonts-library') == 6) {
		if ( is_rtl() ) {
			wp_register_style('font', get_template_directory_uri() . '/css/font/rtl/custom.css' , array(), null, 'all');
		} else {
			wp_register_style('font', get_template_directory_uri() . '/css/font/custom.css' , array(), null, 'all');
		}
	}
	wp_enqueue_style('font');
}

/*
 * Styles
 *
 * Inline small files
*/
function mwp_inline_small_styles(){
	/*
	 * Next/Prev pages
	 *
	*/
	$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 $pagination_text_size; ?>px;
			font-weight:700;
		}
		<?php } ?>
		<?php if (!empty($pagination_icon_size)) { ?>
		.pagination-icon-size i {
			font-size:<?php echo $pagination_icon_size; ?>px;
		}
		<?php } ?>
		<?php if (!empty($pagination_it_color)) { ?>
		.pagination-it-color,
		.pagination-it-color a {
			color:<?php echo $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 $pagination_icon_size / 4; ?>px}
		<?php } ?>
	</style>
	<?php
	endif;
}
add_action('wp_head', 'mwp_inline_small_styles', 999999);
/*!
 * Font Awesome 4.7.0
 *
 * load a CSS file asynchronously.
 * [c]2014 @scottjehl, Filament Group, Inc.
 * Licensed MIT
*/
function mwp_droid_css_load_as() {
	$mtboost_version = MWP_CDN_VERSION;
	$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
	 *
	*/
	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
	 *
	*/
	if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'carousel' ) ) {
		
	} elseif (mwp_option('lightbox-enable') == 1 && is_singular()) {
	
		if (mwp_option('lightbox-library') == 1) {
			// Swipebox
			$lightbox_file = MWP_PATH_URL . '/css/lightbox/swipebox.min.css';
		} elseif (mwp_option('lightbox-library') == 2) {
			// LightBox
			$lightbox_file = MWP_PATH_URL . '/css/lightbox/lightbox.css';
		} elseif (mwp_option('lightbox-library') == 3) {
			// Venobox
			$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>';
	}
}
add_action('wp_footer', 'mwp_droid_css_load_as', 99999999999999999);
/*
 * Skin
 *
 * Custom Color 8
 *
*/
add_action('wp_head', 'mwp_custom_skin_helper');
function mwp_custom_skin_helper() {
	
	$skin_custom_color	= mwp_option('mobile-theme-custom');
	
	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) || !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-color {color:'.$color.';}
			.skin8-color a{color:'.$color.'!important;}
			.skin8-hover a:hover{color:'.$color.'!important;}
			</style>';
		endif;
		
	else :
		$background 		= '#eb9a28';
		$border 			= '#eb9a28';
		$color 				= '#eb9a28';
		$skin_custom_head 	= '#eb9a28';
			echo '<style>
			.skin8-border {border-bottom:2px solid '.$border.';}
			.skin8-border-top {border-top:3px solid '.$border.';}
			.skin8-background {background-color:'.$background.';}
			.skin8-color {color:'.$color.';}
			.skin8-color a{color:'.$color.'!important;}
			.skin8-hover a:hover{color:'.$color.'!important;}
			</style>';
	endif;
}
/*
 * Tabs Widget
 *
 * Custom Style
 *
*/
add_action('wp_head', 'mwp_custom_skin_elements');
function mwp_custom_skin_elements() {

	$color_set 			= mwp_option('mobile-theme-color');
	$skin_custom_color	= mwp_option('mobile-theme-custom');
		
	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>
		a:hover,
		.tags a,
		.post-source a,
		.post-source,
		.post-source span,
		.comment-meta h3.comment-author a,
		.comment-subscription-form .subscribe-label
		{
			color:<?php echo $text_color; ?>;
		}
		/*
		 * Custom btn
		 *
		*/
		.btn-color {
			background-color:<?php echo $text_color; ?>;
			color:#fff!important;
			border-color:<?php echo $text_color; ?>;
		}
		.btn-color:hover,
		.btn-color:focus,
		.btn-color.focus,
		.btn-color:active,
		.btn-color.active {
			background-color:<?php echo $text_color; ?>;
			color:#fff!important;
			border-color:<?php echo $text_color; ?>;
		}
		.show-morecontent div {border:2px solid <?php echo $border_color; ?>;color:<?php echo $text_color; ?>;}
		<?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 
		/*
		 * Pager - Archives & Comments
		 * 
		*/
		?>
		.comments-nav .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 
		/*
		 * Load More Posts
		 * 
		*/
		?>
		.post-load {border:2px solid <?php echo mwp_hex2rgba($border_color, 0.8); ?>;color:<?php echo $text_color; ?>}
		.post-load:hover {border:2px solid <?php echo $border_color; ?>;color:<?php echo $text_color; ?>}
		.post-load span.spinner{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; ?>
		
		<?php 
		/*
		 * Search Form
		 *
		*/
		if(mwp_option('mobile-container-color') == 1) {
		if (!is_singular()) {
			echo '.container {background-color:transparent !important;}';
		} 
		?>
		.list-posts .s1 h2,
		.list-posts .s1 .category,
		.list-posts .s1 p {
			padding:0 10px;
		}
		.list-posts .s2 {
			padding:8px !important;
		}
		.search-c {
			background-color:#fff;
		}
		<?php } else { ?>
		@media only screen and (min-width: 985px){
			.search-w{padding:0 10px}
		}
		<?php } ?>
		
		<?php 
		/*
		 * Remove container color
		 *
		*/
		if (mwp_option('mobile-container-color') == 1 ) { ?>
		.content-bg {
			background-color:#fff;padding:5px;
		}
		<?php } ?>
		
		<?php
		/*
		 * Logo color
		 *
		*/
		if(mwp_option('mobile-header-style') == 2) {
		?>
		.bg-white .logo,
		.bg-white .logo a,
		.bg-white .logo h1{
			color:<?php echo $text_color; ?>;
		}
		<?php } ?>
		
		/* 
		 * 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)}
		
		.list-posts .s3 .category{background:<?php echo mwp_hex2rgba($background_color, 0.8); ?>}
		.list-posts .s3:nth-child(6n+1) .category{background:<?php echo mwp_hex2rgba($background_color, 0.8); ?>}
		.list-posts .s3:nth-child(6n+2) .category{background:<?php echo mwp_hex2rgba('#4267b2', 0.8); ?>}
		.list-posts .s3:nth-child(6n+3) .category{background:<?php echo mwp_hex2rgba('#da2483', 0.8); ?>}
		.list-posts .s3:nth-child(6n+4) .category{background:<?php echo mwp_hex2rgba('#35a047', 0.8); ?>}
		.list-posts .s3:nth-child(6n+5) .category{background:<?php echo mwp_hex2rgba('#e82239', 0.8); ?>}
		.list-posts .s3:nth-child(6n+6) .category{background:<?php echo mwp_hex2rgba('#318dcb', 0.8); ?>}
		.list-posts .s3:nth-child(6n+7) .category{background:<?php echo mwp_hex2rgba('#fd5d29', 0.8); ?>}
		<?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
}

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

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