Advertisement
Guest User

functions.php

a guest
Feb 28th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.96 KB | None | 0 0
  1. <?php
  2. //Content Width
  3. if ( ! isset( $content_width ) ) $content_width = 690;
  4. //Front page query
  5. function asteria_home_query($query) {
  6. if ( $query->is_home()) {
  7. global $asteria;
  8. set_query_var( 'post_type', 'post' );
  9. set_query_var( 'paged', ( get_query_var('paged') ? get_query_var('paged') : 1) );
  10. if(!empty($asteria['enable_cat'])){
  11. $postcount = $asteria['n_posts_field_id'];
  12. $postcat = $asteria['posts_cat_id'];
  13. set_query_var( 'posts_per_page', ''.$postcount.'' );
  14. if(!empty($asteria['posts_cat_id'])){set_query_var( 'cat', ''.implode(',', $postcat).'' );}
  15. }
  16. }
  17.  
  18. }
  19. add_action( 'pre_get_posts', 'asteria_home_query' );
  20.  
  21. /***WPML Translation Shortcode****/
  22. if(! function_exists('wpex_wpml_lang_translate')) {
  23. function wpex_wpml_lang_translate( $atts, $content = null ) {
  24. extract(shortcode_atts(array(
  25. 'lang' => '',
  26. ), $atts));
  27.  
  28. $current_lang = ICL_LANGUAGE_CODE; //get WPL current language
  29.  
  30. if($lang == $current_lang{
  31. return do_shortcode($content);
  32. }
  33. }
  34. add_shortcode('wpml_translate', 'wpex_wpml_lang_translate');
  35. }
  36.  
  37. //Asteria Site title
  38. function asteria_wp_title( $title, $sep ) {
  39. global $paged, $page;
  40.  
  41. if ( is_feed() )
  42. return $title;
  43.  
  44. // Add the site name.
  45. $title .= get_bloginfo( 'name' );
  46.  
  47. // Add the site description for the home/front page.
  48. $site_description = get_bloginfo( 'description', 'display' );
  49. if ( $site_description && ( is_home() || is_front_page() ) )
  50. $title = "$title $sep $site_description";
  51.  
  52. // Add a page number if necessary.
  53. if ( $paged >= 2 || $page >= 2 )
  54. $title = "$title $sep " . sprintf( __( 'Page %s', 'asteria' ), max( $paged, $page ) );
  55.  
  56. return $title;
  57. }
  58. add_filter( 'wp_title', 'asteria_wp_title', 10, 2 );
  59.  
  60. //Load Other CSS files
  61. function asteria_other_css() {
  62. if ( !is_admin() ) {
  63. wp_enqueue_style( 'asteria-style', get_template_directory_uri().'/style.css');
  64. global $asteria; if ( ! empty ( $asteria['post_lightbox_id'] ) ) {wp_enqueue_style('fancybox',get_template_directory_uri().'/css/fancybox.css'); }
  65. wp_enqueue_style('customfont',get_template_directory_uri().'/fonts/yanone_kaffeesatz.css', 'yanone_kaffeesatz' );
  66. wp_enqueue_style('customfont2',get_template_directory_uri().'/fonts/opensans-light.css', 'open_sans' );
  67. wp_enqueue_style('icons',get_template_directory_uri().'/fonts/font-awesome.css', 'font_awesome' );
  68. }
  69. }
  70. add_action('wp_enqueue_scripts', 'asteria_other_css');
  71.  
  72. //Load Default Logo Fonts
  73. function asteria_google_fonts() {
  74. //Site Title Font
  75. wp_register_style('SiteTitleFont','http://fonts.googleapis.com/css?family=Cinzel+Decorative');
  76. global $asteria;
  77. if ( !get_option( 'asteria' )) {
  78. wp_enqueue_style( 'SiteTitleFont'); }
  79.  
  80. }
  81. add_action('wp_print_styles', 'asteria_google_fonts');
  82.  
  83. //Load Java Scripts to header
  84. function asteria_head_js() {
  85. if ( !is_admin() ) {
  86. wp_enqueue_script('jquery');
  87. wp_enqueue_script('asteria_js',get_template_directory_uri().'/asteria.js');
  88. wp_enqueue_script('asteria_otherjs',get_template_directory_uri().'/js/other.js');
  89. global $asteria; if ( ! empty ( $asteria['post_gallery_id'] ) ) {wp_enqueue_script('asteria_gallery',get_template_directory_uri().'/js/gallery.js');}
  90. global $asteria; if ( ! empty ( $asteria['post_lightbox_id'] ) ) {wp_enqueue_script('asteria_fancybox',get_template_directory_uri().'/js/fancybox.js');}
  91. wp_enqueue_script('asteria_nivo',get_template_directory_uri().'/js/jquery.nivo.js');
  92. if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
  93.  
  94. }
  95. }
  96.  
  97. add_action('wp_enqueue_scripts', 'asteria_head_js');
  98.  
  99.  
  100. //Load RAW Java Scripts
  101. add_action('wp_footer', 'znn_load_js');
  102.  
  103. function znn_load_js() {
  104. include(get_template_directory() . '/javascript.php');
  105. }
  106.  
  107. //SIDEBAR
  108. function asteria_widgets_init(){
  109.  
  110. register_sidebar(array(
  111. 'name' => __('Right Sidebar', 'asteria'),
  112. 'id' => 'sidebar',
  113. 'description' => __('Right Sidebar', 'asteria'),
  114. 'before_widget' => '<div id="%1$s" class="widget %2$s"><div class="widget_wrap">',
  115. 'after_widget' => '<span class="widget_corner"></span></div></div>',
  116. 'before_title' => '<h3 class="widgettitle">',
  117. 'after_title' => '</h3>'
  118. ));
  119.  
  120. register_sidebar(array(
  121. 'name' => __('Footer Widgets', 'asteria'),
  122. 'id' => 'foot_sidebar',
  123. 'description' => __('Widget Area for the Footer', 'asteria'),
  124. 'before_widget' => '<li id="%1$s" class="widget %2$s"><div class="widget_wrap">',
  125. 'after_widget' => '</div>',
  126. 'before_title' => '<h3 class="widgettitle">',
  127. 'after_title' => '</h3>'
  128. ));
  129.  
  130.  
  131. }
  132.  
  133. add_action( 'widgets_init', 'asteria_widgets_init' );
  134.  
  135. //asteria get the first image of the post Function
  136. function asteria_get_images($overrides = '', $exclude_thumbnail = false)
  137. {
  138. return get_posts(wp_parse_args($overrides, array(
  139. 'numberposts' => -1,
  140. 'post_parent' => get_the_ID(),
  141. 'post_type' => 'attachment',
  142. 'post_mime_type' => 'image',
  143. 'order' => 'ASC',
  144. 'exclude' => $exclude_thumbnail ? array(get_post_thumbnail_id()) : array(),
  145. 'orderby' => 'menu_order ID'
  146. )));
  147. }
  148.  
  149.  
  150. //Custom Excerpt Length
  151. function asteria_excerptlength_teaser($length) {
  152. return 20;
  153. }
  154. function asteria_excerptlength_index($length) {
  155. return 12;
  156. }
  157. function asteria_excerptmore($more) {
  158. return '...';
  159. }
  160.  
  161. function asteria_excerpt($length_callback='', $more_callback='') {
  162. global $post;
  163. if(function_exists($length_callback)){
  164. add_filter('excerpt_length', $length_callback);
  165. }
  166. if(function_exists($more_callback)){
  167. add_filter('excerpt_more', $more_callback);
  168. }
  169. $output = get_the_excerpt();
  170. $output = apply_filters('wptexturize', $output);
  171. $output = apply_filters('convert_chars', $output);
  172. $output = '<p>'.$output.'</p>';
  173. echo $output;
  174. }
  175.  
  176. //Asteria CUSTOM Search Form
  177. function asteria_search_form( $form ) {
  178. $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
  179. <div>
  180. <input placeholder="' . __( 'Search....', 'asteria' ) . '" type="text" value="' . get_search_query() . '" name="s" id="s" />
  181. <input type="submit" id="searchsubmit" value="'. esc_attr__( 'Search', 'asteria' ) .'" />
  182. </div>
  183. </form>';
  184.  
  185. return $form;
  186. }
  187.  
  188. add_filter( 'get_search_form', 'asteria_search_form' );
  189.  
  190.  
  191. //**************TASTERIA COMMENTS******************//
  192. function asteria_comment($comment, $args, $depth) {
  193. $GLOBALS['comment'] = $comment; ?>
  194. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
  195.  
  196. <div id="comment-<?php comment_ID(); ?>" class="comment-body">
  197. <div class="comment-author vcard">
  198. <div class="avatar"><?php echo get_avatar($comment,$size='75' ); ?></div>
  199. </div>
  200. <div class="comment-meta commentmetadata">
  201. <?php printf(__('%s', 'asteria'), get_comment_author_link()) ?> <span><?php _e('says:', 'asteria') ?></span>
  202. </div>
  203. <?php if ($comment->comment_approved == '0') : ?>
  204. <em><?php _e('Your comment is awaiting moderation.', 'asteria') ?></em>
  205. <br />
  206. <?php endif; ?>
  207.  
  208. <div class="org_comment"><?php comment_text() ?>
  209.  
  210. <div class="comm_meta_reply">
  211. <a class="comm_date"><i class="icon-time"></i><?php printf(get_comment_date()) ?></a>
  212. <div class="comm_reply"><i class="fa-reply"></i><?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?></div>
  213. <?php edit_comment_link(__('Edit', 'asteria'),'<i class="fa-pencil"></i>','') ?></div>
  214. </div>
  215.  
  216. </div>
  217. <?php
  218. }
  219.  
  220. //**************TRACKBACKS & PINGS******************//
  221. function asteria_ping($comment, $args, $depth) {
  222.  
  223. $GLOBALS['comment'] = $comment; ?>
  224.  
  225. <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
  226.  
  227. <div id="comment-<?php comment_ID(); ?>" class="comment-body">
  228. <?php if ($comment->comment_approved == '0') : ?>
  229. <em><?php _e('Your comment is awaiting moderation.', 'asteria') ?></em>
  230. <br />
  231. <?php endif; ?>
  232.  
  233. <div class="org_ping">
  234. <?php printf(__('<cite class="citeping">%s</cite> <span class="says">:</span>'), get_comment_author_link()) ?>
  235. <?php comment_text() ?>
  236. <div class="comm_meta_reply">
  237. <a class="comm_date"><?php printf(get_comment_date()) ?></a>
  238. <?php edit_comment_link(__('Edit', 'asteria'),' ','') ?></div>
  239. </div>
  240. </div>
  241.  
  242.  
  243. <?php }
  244.  
  245.  
  246. //**************COMMENT FORM******************//
  247. function asteria_comment_form ( $arg ) {
  248. $commenter = wp_get_current_commenter();
  249. $req = get_option( 'require_name_email' );
  250. $aria_req = ( $req ? " aria-required='true'" : '' );
  251. $defaults = array( 'title_reply'=>''. __( 'Leave a Reply', 'asteria' ) . '',
  252.  
  253. 'fields' => apply_filters( 'comment_form_default_fields', array(
  254.  
  255. 'author' => '<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"' . $aria_req . ' /></p>',
  256.  
  257. 'email' => '<p class="comment-form-email"><input placeholder="' . __( 'Email', 'asteria' ) . '" id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) .'" size="30"' . $aria_req . ' /></p>',
  258.  
  259. 'url' => '<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>')
  260.  
  261. ));
  262. return $arg;
  263. }
  264.  
  265. add_filter( 'comments_form_defaults', 'asteria_comment_form' );
  266.  
  267.  
  268. //WOOCOMMERCE SUPPORT
  269. if (class_exists('Woocommerce')) {
  270.  
  271. add_action('woocommerce_before_main_content', 'asteria_wrapper_start', 10);
  272. add_action('woocommerce_after_main_content', 'asteria_wrapper_end', 10);
  273.  
  274. function asteria_wrapper_start() {
  275. echo '<div class="fixed_site"><div class="fixed_wrap"><div class="center">';
  276. }
  277.  
  278. function asteria_wrapper_end() {
  279. echo '</div></div></div>';
  280. }
  281. //Remove Sidebars from all woocommerce pages
  282. remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
  283. }
  284.  
  285. //**************ASTERIA SETUP******************//
  286. function asteria_setup() {
  287. //Custom Thumbnail Size
  288. if ( function_exists( 'add_image_size' ) ) {
  289. add_image_size( 'asteriathumb', 387, 260, true ); //(cropped)
  290. }
  291.  
  292. //Woocommerce Support
  293. add_theme_support( 'woocommerce' );
  294.  
  295. //Custom Background
  296. add_theme_support( 'custom-background', array(
  297. 'default-color' => 'f7f7f7'
  298. ) );
  299.  
  300. add_theme_support('automatic-feed-links');
  301.  
  302. //Post Thumbnail
  303. add_theme_support( 'post-thumbnails' );
  304.  
  305. // Make theme available for translation
  306. load_theme_textdomain('asteria', get_template_directory() . '/languages');
  307.  
  308. //Register Menus
  309. register_nav_menus( array(
  310. 'primary' => __( 'Header Navigation', 'asteria' )
  311. ) );
  312.  
  313.  
  314. }
  315. add_action( 'after_setup_theme', 'asteria_setup' );
  316.  
  317.  
  318. /*Mobile Detection*/
  319. function asteria_is_mobile() {
  320. static $is_mobile;
  321.  
  322. if ( isset($is_mobile) )
  323. return $is_mobile;
  324.  
  325. if ( empty($_SERVER['HTTP_USER_AGENT']) ) {
  326. $is_mobile = false;
  327. } elseif (
  328. strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false
  329. || strpos($_SERVER['HTTP_USER_AGENT'], 'Silk/') !== false
  330. || strpos($_SERVER['HTTP_USER_AGENT'], 'Kindle') !== false
  331. || strpos($_SERVER['HTTP_USER_AGENT'], 'BlackBerry') !== false
  332. || strpos($_SERVER['HTTP_USER_AGENT'], 'Opera Mini') !== false ) {
  333. $is_mobile = true;
  334. } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'Mobile') !== false && strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') == false) {
  335. $is_mobile = true;
  336. } elseif (strpos($_SERVER['HTTP_USER_AGENT'], 'iPad') !== false) {
  337. $is_mobile = false;
  338. } else {
  339. $is_mobile = false;
  340. }
  341.  
  342. return $is_mobile;
  343. }
  344.  
  345.  
  346. /* -----------------------------------------------------------------------------
  347. Underconstruction / Maintenance Mode
  348. ----------------------------------------------------------------------------- */
  349. function asteria_under_contruction(){
  350. global $asteria;
  351. if(!empty($asteria['offline_id'])){
  352. // if user is logged in, don't show the construction page
  353. if ( is_user_logged_in() ) {
  354. return;
  355. }
  356. // You could check the remote ip
  357. // $ips = array( '127.0.0.1', '192.168.0.1', '208.117.46.9' );
  358. // if ( in_array( $_SERVER['REMOTE_ADDR'], $ips ) ) {
  359. // return;
  360. // }
  361. $protocol = $_SERVER["SERVER_PROTOCOL"];
  362. if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
  363. $protocol = 'HTTP/1.0';
  364. // 503 is recommended : http://bit.ly/YdGkXl
  365. header( "$protocol 503 Service Unavailable", true, 503 );
  366. // or header( "$protocol 200 Ok", true, 200 );
  367. header( 'Content-Type: text/html; charset=utf-8' );
  368. // adjust the Retry-After value (in seconds)
  369. header( 'Retry-After: 3600' );
  370. ?>
  371. <?php get_template_part('maintanance'); ?>
  372. <?php
  373.  
  374. die();
  375.  
  376. }
  377. }
  378. add_action( 'template_redirect', 'asteria_under_contruction' );
  379.  
  380.  
  381.  
  382. /* -----------------------------------------------------------------------------
  383. LIVE CUSTOMIZER
  384. ----------------------------------------------------------------------------- */
  385. function asteria_customizer( $wp_customize ) {
  386. //register the javascript
  387. if ( $wp_customize->is_preview() && ! is_admin() )
  388. add_action( 'wp_footer', 'asteria_customize_preview', 21);
  389.  
  390. $wp_customize->add_section(
  391. 'asteria_section_one',
  392. array(
  393. 'title' => 'Asteria Element Colors',
  394. 'description' => 'Change the color of each element',
  395. 'priority' => 35,
  396. )
  397. );
  398.  
  399. $wp_customize->add_section(
  400. 'asteria_section_two',
  401. array(
  402. 'title' => 'Asteria Text Colors',
  403. 'description' => 'Change the color of each element',
  404. 'priority' => 35,
  405. )
  406. );
  407.  
  408. $wp_customize->add_setting('asteria[sec_color_id]',array('type' => 'option','transport' => 'postMessage'));
  409.  
  410.  
  411. $wp_customize->add_setting('asteria[primtxt_color_id]',array('type' => 'option','transport' => 'postMessage'));
  412. $wp_customize->add_setting('asteria[sectxt_color_id]',array('type' => 'option','transport' => 'postMessage'));
  413. $wp_customize->add_setting('asteria[menutxt_color_id]',array('type' => 'option','transport' => 'postMessage'));
  414. $wp_customize->add_setting('asteria[leavreplytxt_color_id]',array('type' => 'option','transport' => 'postMessage'));
  415.  
  416. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'live_sec_elm', array(
  417. 'label' => __( 'Secondary Element background Color', 'asteria' ),
  418. 'section' => 'asteria_section_one',
  419. 'settings' => 'asteria[sec_color_id]',
  420. ) ) );
  421.  
  422.  
  423. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'live_prim_txt', array(
  424. 'label' => __( 'Site wide Text Color', 'asteria' ),
  425. 'section' => 'asteria_section_two',
  426. 'settings' => 'asteria[primtxt_color_id]',
  427. ) ) );
  428.  
  429. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'live_sec_txt', array(
  430. 'label' => __( 'Text Color on secondary elements', 'asteria' ),
  431. 'section' => 'asteria_section_two',
  432. 'settings' => 'asteria[sectxt_color_id]',
  433. ) ) );
  434.  
  435. $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'live_leavreply_txt', array(
  436. 'label' => __( '"Leave a Reply" Text Color', 'asteria' ),
  437. 'section' => 'asteria_section_two',
  438. 'settings' => 'asteria[leavreplytxt_color_id]',
  439. ) ) );
  440. }
  441.  
  442. add_action( 'customize_register', 'asteria_customizer' );
  443.  
  444.  
  445. function asteria_customizer_live_preview() {
  446.  
  447. wp_enqueue_script(
  448. 'live_fontselect',
  449. get_template_directory_uri() . '/admin/js/jquery.fontselect.min.js',
  450. array( 'jquery', 'customize-preview' ),
  451. '',
  452. true
  453. );
  454.  
  455. } // end asteria_customizer_live_preview
  456. add_action( 'customize_preview_init', 'asteria_customizer_live_preview' );
  457.  
  458. function asteria_customize_preview() {
  459.  
  460. ?>
  461. <script type="text/javascript">
  462. ( function( $ ){
  463. //Primary Color change
  464. 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');});});
  465. //Secondary Color change
  466. 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');});});
  467. 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');});});
  468.  
  469. //TEXT COLORS=======================
  470. 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');});});
  471. 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');});});
  472. 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');});});
  473.  
  474. } )( jQuery )
  475. </script>
  476. <?php
  477. }
  478.  
  479. /**
  480. * Options Framework
  481. */
  482.  
  483. require_once('redux/framework.php');
  484. require_once('asteria-config.php');
  485. function asteria_admin() {
  486. wp_register_style(
  487. 'redux-custom-css',
  488. get_template_directory_uri() . '/css/admin.css',
  489. array( 'redux-css' ), // Be sure to include redux-css so it's appended after the core css is applied
  490. time(),
  491. 'all'
  492. );
  493. wp_register_style(
  494. 'redux-fontawesome',
  495. get_template_directory_uri() . '/fonts/font-awesome.css',
  496. array(),
  497. time(),
  498. 'all'
  499. );
  500. wp_enqueue_style( 'redux-custom-css' );
  501. wp_enqueue_style( 'redux-fontawesome' );
  502. wp_enqueue_script( 'admin-js', get_template_directory_uri() . '/js/admin.js', false, '1.0', true );
  503.  
  504. }
  505. add_action('redux-enqueue-asteria', 'asteria_admin');
  506. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement