PageRenderTime 37ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 2ms

/web/app/themes/salient/functions.php

https://bitbucket.org/mikestivala/vinciarchitects
PHP | 6143 lines | 4171 code | 1592 blank | 380 comment | 1515 complexity | 86b7cd6d5001ee9e1c952845cf7b4cdd MD5 | raw file
Possible License(s): MIT, Apache-2.0

Large files files are truncated, but you can click here to view the full file

  1. <?php
  2. #-----------------------------------------------------------------#
  3. # Default theme constants
  4. #-----------------------------------------------------------------#
  5. define('NECTAR_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/nectar/');
  6. define('NECTAR_THEME_NAME', 'salient');
  7. #-----------------------------------------------------------------#
  8. # Load text domain
  9. #-----------------------------------------------------------------#
  10. add_action('after_setup_theme', 'lang_setup');
  11. function lang_setup(){
  12. load_theme_textdomain(NECTAR_THEME_NAME, get_template_directory() . '/lang');
  13. }
  14. #-----------------------------------------------------------------#
  15. # Register/Enqueue JS
  16. #-----------------------------------------------------------------#
  17. $options = get_nectar_theme_options();
  18. $nectar_get_template_directory_uri = get_template_directory_uri();
  19. function nectar_register_js() {
  20. global $options;
  21. global $post;
  22. global $nectar_get_template_directory_uri;
  23. if (!is_admin()) {
  24. // Register
  25. wp_register_script('modernizer', $nectar_get_template_directory_uri . '/js/modernizr.js', 'jquery', '2.6.2', TRUE);
  26. wp_register_script('respond', $nectar_get_template_directory_uri . '/js/respond.js', 'jquery', '1.1', TRUE);
  27. wp_register_script('superfish', $nectar_get_template_directory_uri . '/js/superfish.js', 'jquery', '1.4.8', TRUE);
  28. wp_register_script('respond', $nectar_get_template_directory_uri . '/js/respond.js', 'jquery', '1.1',TRUE);
  29. wp_register_script('touchswipe', $nectar_get_template_directory_uri . '/js/touchswipe.min.js', 'jquery', '1.0', TRUE);
  30. wp_register_script('flexslider', $nectar_get_template_directory_uri . '/js/flexslider.min.js', array('jquery', 'touchswipe'), '2.1', TRUE);
  31. wp_register_script('orbit', $nectar_get_template_directory_uri . '/js/orbit.js', 'jquery', '1.4', TRUE);
  32. wp_register_script('flickity', $nectar_get_template_directory_uri . '/js/flickity.min.js', 'jquery', '1.1.1', TRUE);
  33. wp_register_script('nicescroll', $nectar_get_template_directory_uri . '/js/nicescroll.js', 'jquery', '3.5.4' ,TRUE);
  34. wp_register_script('sticky', $nectar_get_template_directory_uri . '/js/sticky.js', 'jquery', '8.5', TRUE);
  35. wp_register_script('magnific', $nectar_get_template_directory_uri . '/js/magnific.js', 'jquery', '7.0.1', TRUE);
  36. wp_register_script('fancyBox', $nectar_get_template_directory_uri . '/js/jquery.fancybox.min.js', 'jquery', '7.0.1', TRUE);
  37. wp_register_script('nectar_parallax', $nectar_get_template_directory_uri . '/js/parallax.js', 'jquery', '1.0', TRUE);
  38. wp_register_script('isotope', $nectar_get_template_directory_uri . '/js/isotope.min.js', 'jquery', '7.6' ,TRUE);
  39. wp_register_script('select2', $nectar_get_template_directory_uri . '/js/select2.min.js', 'jquery', '3.5.2' ,TRUE);
  40. wp_register_script('nectarSlider', $nectar_get_template_directory_uri . '/js/nectar-slider.js', 'jquery', '8.5.5', TRUE);
  41. wp_register_script('iosSlider', $nectar_get_template_directory_uri . '/js/jquery.iosslider.min.js', 'jquery', '7.5', TRUE);
  42. wp_register_script('fullPage', $nectar_get_template_directory_uri . '/js/jquery.fullPage.min.js', 'jquery', '8.5.2', TRUE);
  43. wp_register_script('vivus', $nectar_get_template_directory_uri . '/js/vivus.min.js', 'jquery', '6.0.1', TRUE);
  44. wp_register_script('nectarParticles', $nectar_get_template_directory_uri . '/js/nectar-particles.js', 'jquery', '8.5.5', TRUE);
  45. wp_register_script('ajaxify', $nectar_get_template_directory_uri . '/js/ajaxify.js', 'jquery', '7.0', TRUE);
  46. wp_register_script('caroufredsel', $nectar_get_template_directory_uri . '/js/caroufredsel.min.js', array('jquery', 'touchswipe'), '7.0.1', TRUE);
  47. wp_register_script('owl_carousel', $nectar_get_template_directory_uri . '/js/owl.carousel.min.js', 'jquery', '1.3.3', TRUE);
  48. wp_register_script('midnight', $nectar_get_template_directory_uri . '/js/midnight.js', 'jquery', '1.0', TRUE);
  49. wp_register_script('twentytwenty', $nectar_get_template_directory_uri . '/js/jquery.twentytwenty.js', 'jquery', '1.0', TRUE);
  50. wp_register_script('stickykit', $nectar_get_template_directory_uri . '/js/stickkit.js', 'jquery', '1.0', TRUE);
  51. if ( floatval(get_bloginfo('version')) < "3.6" ) {
  52. wp_register_script('jplayer', $nectar_get_template_directory_uri . '/js/jplayer.min.js', 'jquery', '2.1', TRUE);
  53. }
  54. wp_register_script('nectarFrontend', $nectar_get_template_directory_uri . '/js/init.js', array('jquery', 'superfish'), '8.5.5', TRUE);
  55. // Dequeue
  56. $lightbox_script = (!empty($options['lightbox_script'])) ? $options['lightbox_script'] : 'magnific';
  57. if($lightbox_script == 'pretty_photo') { $lightbox_script = 'magnific'; }
  58. // Enqueue
  59. wp_enqueue_script('jquery');
  60. wp_enqueue_script('modernizer');
  61. ////only load for IE8
  62. if(preg_match('/(?i)msie [2-8]/',$_SERVER['HTTP_USER_AGENT'])) {
  63. wp_enqueue_script('respond');
  64. }
  65. $portfolio_extra_content = (isset($post->ID)) ? get_post_meta($post->ID, '_nectar_portfolio_extra_content', true) : '';
  66. $post_content = (isset($post->post_content)) ? $post->post_content : '';
  67. if(!empty($options['smooth-scrolling']) && $options['smooth-scrolling'] == '1') wp_enqueue_script('nicescroll');
  68. if(!empty($options['portfolio_sidebar_follow']) && $options['portfolio_sidebar_follow'] == '1' && is_singular('portfolio') ) wp_enqueue_script('sticky');
  69. if ($lightbox_script == 'magnific') {
  70. wp_enqueue_script('magnific');
  71. } elseif($lightbox_script == 'fancybox') {
  72. wp_enqueue_script('fancyBox');
  73. }
  74. if(stripos( $post_content, 'nectar_portfolio') !== FALSE || stripos( $portfolio_extra_content, 'nectar_portfolio') !== FALSE ||
  75. stripos( $post_content, 'nectar_blog') !== FALSE || stripos( $portfolio_extra_content, 'nectar_blog') !== FALSE ||
  76. stripos( $post_content, 'vc_gallery type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'vc_gallery type="image_grid"') !== FALSE ||
  77. stripos( $post_content, "vc_gallery type='image_grid'") !== FALSE || stripos( $portfolio_extra_content, "vc_gallery type='image_grid'") !== FALSE ||
  78. stripos( $post_content, 'type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'type="image_grid"') !== FALSE ||
  79. stripos( $post_content, "type='image_grid'") !== FALSE || stripos( $portfolio_extra_content, "type='image_grid'") !== FALSE ||
  80. is_page_template('template-portfolio.php') || is_archive() || is_home() || is_search()) {
  81. wp_enqueue_script('isotope');
  82. }
  83. $page_full_screen_rows = (isset($post->ID)) ? get_post_meta($post->ID, '_nectar_full_screen_rows', true) : '';
  84. if($page_full_screen_rows == 'on') wp_enqueue_script('fullPage');
  85. if ( floatval(get_bloginfo('version')) < "3.6" ) {
  86. wp_enqueue_script('jplayer');
  87. }
  88. if(stripos( $post_content, '[recent_projects') !== FALSE || stripos( $portfolio_extra_content, '[recent_projects') !== FALSE
  89. || stripos($post_content, '[carousel') !== FALSE || stripos( $portfolio_extra_content, '[carousel') !== FALSE
  90. || stripos($post_content, 'carousel="true"') !== FALSE || stripos( $portfolio_extra_content, 'carousel="true"') !== FALSE
  91. || stripos($post_content, 'carousel="1"') !== FALSE || stripos( $portfolio_extra_content, 'carousel="1"') !== FALSE
  92. || is_page_template('template-home-1.php')) {
  93. wp_enqueue_script('caroufredsel');
  94. }
  95. if( stripos( $post_content, 'script="owl_carousel"') !== FALSE || stripos( $portfolio_extra_content, 'script="owl_carousel"') !== FALSE ) {
  96. wp_enqueue_script('owl_carousel');
  97. }
  98. $nectar_theme_skin = (!empty($options['theme-skin'])) ? $options['theme-skin'] : 'original' ;
  99. if(!empty($options['header-permanent-transparent']) && $options['header-permanent-transparent'] == '1' && $nectar_theme_skin != 'material') {
  100. wp_enqueue_script('midnight');
  101. }
  102. wp_enqueue_script('nectarFrontend');
  103. $bg_type = (isset($post->ID)) ? get_post_meta($post->ID, '_nectar_slider_bg_type', true) : '';
  104. if(is_singular('post') && (!empty($options['blog_next_post_link']) && $options['blog_next_post_link'] == '1' && !empty($options['blog_next_post_link_style']) && $options['blog_next_post_link_style'] == 'fullwidth_next_only') ||
  105. stripos( $post_content, 'project_style="3"') !== FALSE || stripos( $portfolio_extra_content, 'project_style="3"') !== FALSE ||
  106. stripos( $post_content, 'project_style="5"') !== FALSE || stripos( $portfolio_extra_content, 'project_style="5"') !== FALSE ||
  107. stripos( $post_content, 'gallery_style="3"') !== FALSE || stripos( $portfolio_extra_content, 'gallery_style="3"') !== FALSE ||
  108. stripos( $post_content, 'gallery_style="5"') !== FALSE || stripos( $portfolio_extra_content, 'gallery_style="5"') !== FALSE ||
  109. stripos( $post_content, "project_style='3'") !== FALSE || stripos( $portfolio_extra_content, "project_style='3'") !== FALSE ||
  110. stripos( $post_content, "project_style='5'") !== FALSE || stripos( $portfolio_extra_content, "project_style='5'") !== FALSE ||
  111. stripos( $post_content, "gallery_style='3'") !== FALSE || stripos( $portfolio_extra_content, "gallery_style='3'") !== FALSE ||
  112. is_page_template('template-portfolio.php') || $bg_type == 'particle_bg' || (get_post_type() == 'portfolio' && is_archive()) ) {
  113. }
  114. $transition_method = (!empty($options['transition-method'])) ? $options['transition-method'] : 'ajax';
  115. if(!empty($options['ajax-page-loading']) && $options['ajax-page-loading'] == '1' && $transition_method == 'ajax') {
  116. wp_enqueue_script('nectarSlider');
  117. wp_enqueue_script('fullPage');
  118. wp_enqueue_script('ajaxify');
  119. }
  120. else if(!empty($options['ajax-page-loading']) && $options['ajax-page-loading'] == '1' && $transition_method == 'standard') {
  121. //simulated ajax workaround will go here
  122. }
  123. }
  124. }
  125. add_action('wp_enqueue_scripts', 'nectar_register_js');
  126. function nectar_page_specific_js() {
  127. global $post;
  128. global $options;
  129. global $nectar_get_template_directory_uri;
  130. if(!is_object($post)) $post = (object) array('post_content'=>' ', 'ID' => ' ');
  131. $template_name = get_post_meta( $post->ID, '_wp_page_template', true );
  132. //home
  133. if ( is_page_template('template-home-1.php') || $template_name == 'salient/template-home-1.php' ||
  134. is_page_template('template-home-2.php') || $template_name == 'salient/template-home-2.php' ||
  135. is_page_template('template-home-3.php') || $template_name == 'salient/template-home-3.php' ||
  136. is_page_template('template-home-4.php') || $template_name == 'salient/template-home-4.php') {
  137. wp_enqueue_script('orbit');
  138. wp_enqueue_script('touchswipe');
  139. }
  140. ////infinite scroll
  141. $portfolio_extra_content = get_post_meta($post->ID, '_nectar_portfolio_extra_content', true);
  142. $post_content = $post->post_content;
  143. $posttype = get_post_type($post);
  144. if(stripos( $post->post_content, '[nectar_blog') !== FALSE || stripos( $portfolio_extra_content, '[nectar_blog') !== FALSE
  145. || stripos( $post->post_content, 'pagination_type="infinite_scroll"') !== FALSE || stripos( $portfolio_extra_content, 'pagination_type="infinite_scroll"') !== FALSE
  146. || (!empty($options['blog_pagination_type']) && $options['blog_pagination_type'] == 'infinite_scroll')
  147. || (!empty($options['portfolio_pagination_type']) && $options['portfolio_pagination_type'] == 'infinite_scroll')
  148. || (((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_tag())) && ( $posttype == 'post') && (!is_singular())) ) {
  149. wp_register_script('infinite_scroll', $nectar_get_template_directory_uri . '/js/infinitescroll.js', array('jquery'), '1.1', TRUE);
  150. wp_enqueue_script('infinite_scroll');
  151. if ( floatval(get_bloginfo('version')) >= "3.6" ) {
  152. wp_enqueue_script('wp-mediaelement');
  153. wp_enqueue_style('wp-mediaelement');
  154. }
  155. if (class_exists('WPBakeryVisualComposerAbstract') && defined( 'SALIENT_VC_ACTIVE')) {
  156. wp_register_script('progressCircle', vc_asset_url('lib/bower/progress-circle/ProgressCircle.min.js'));
  157. wp_register_script('vc_pie', vc_asset_url('lib/vc_chart/jquery.vc_chart.min.js'), array('jquery', 'progressCircle'));
  158. //wp_enqueue_script('vc_pie');
  159. }
  160. wp_enqueue_script('flickity');
  161. wp_enqueue_script('flexslider');
  162. wp_enqueue_script('stickykit');
  163. }
  164. $enable_ss = (!empty($options['blog_enable_ss'])) ? $options['blog_enable_ss'] : 'false';
  165. if( ($enable_ss == '1' && is_single() && $posttype == 'post') ||
  166. stripos( $post->post_content, '[vc_widget_sidebar') !== FALSE || stripos( $portfolio_extra_content, '[vc_widget_sidebar') !== FALSE ) {
  167. wp_enqueue_script('stickykit');
  168. }
  169. //nectarSlider
  170. if(stripos( $post_content, '[nectar_slider') !== FALSE || stripos( $portfolio_extra_content, '[nectar_slider') !== FALSE
  171. || stripos($post_content, 'type="nectarslider_style"') !== FALSE || stripos( $portfolio_extra_content, 'type="nectarslider_style"') !== FALSE) {
  172. wp_enqueue_script('nectarSlider');
  173. }
  174. //touch swipe
  175. $box_roll = get_post_meta($post->ID, '_nectar_header_box_roll', true);
  176. wp_enqueue_script('touchswipe');
  177. //flickity
  178. if(stripos($post_content, '[vc_gallery type="flickity"') !== FALSE || stripos( $portfolio_extra_content, '[vc_gallery type="flickity"') !== FALSE
  179. || stripos($post_content, 'style="multiple_visible"') !== FALSE || stripos( $portfolio_extra_content, 'style="multiple_visible"') !== FALSE
  180. || stripos($post_content, 'style="slider_multiple_visible"') !== FALSE || stripos( $portfolio_extra_content, 'style="slider_multiple_visible"') !== FALSE
  181. || stripos($post_content, 'script="flickity"') !== FALSE || stripos( $portfolio_extra_content, 'script="flickity"') !== FALSE
  182. || stripos($post_content, 'style="multiple_visible_minimal"') !== FALSE || stripos( $portfolio_extra_content, 'style="multiple_visible_minimal"') !== FALSE
  183. || stripos($post_content, 'style="slider"') !== FALSE || stripos( $portfolio_extra_content, 'style="slider"') !== FALSE) {
  184. wp_enqueue_script('flickity');
  185. }
  186. //fancy select
  187. $fancy_rcs = (!empty($options['form-fancy-select'])) ? $options['form-fancy-select'] : 'default';
  188. if($fancy_rcs == '1') {
  189. wp_enqueue_script('select2');
  190. }
  191. //svg icon animation
  192. if(strpos($post_content,'.svg') !== false || strpos($portfolio_extra_content,'.svg') !== false) {
  193. wp_enqueue_script('vivus');
  194. }
  195. //comments
  196. if ( is_singular() && comments_open() && get_option('thread_comments') )
  197. wp_enqueue_script('comment-reply');
  198. }
  199. add_action('wp_enqueue_scripts', 'nectar_page_specific_js');
  200. add_action( 'wp_head', 'nectar_javascript_check' );
  201. function nectar_javascript_check() {
  202. echo '<script type="text/javascript"> var root = document.getElementsByTagName( "html" )[0]; root.setAttribute( "class", "js" ); </script>';
  203. }
  204. if (!function_exists('remove_wp_open_sans')) :
  205. function remove_wp_open_sans() {
  206. wp_deregister_style( 'open-sans' );
  207. wp_register_style( 'open-sans', false );
  208. }
  209. add_action('wp_enqueue_scripts', 'remove_wp_open_sans');
  210. endif;
  211. #-----------------------------------------------------------------#
  212. # Register/Enqueue CSS
  213. #-----------------------------------------------------------------#
  214. //Main Styles
  215. function nectar_main_styles() {
  216. global $nectar_get_template_directory_uri;
  217. // Register
  218. wp_register_style('rgs', $nectar_get_template_directory_uri . '/css/rgs.css', '', '8.5.4');
  219. wp_register_style('orbit', $nectar_get_template_directory_uri . '/css/orbit.css');
  220. wp_register_style('twentytwenty', $nectar_get_template_directory_uri . '/css/twentytwenty.css');
  221. wp_register_style('woocommerce', $nectar_get_template_directory_uri . '/css/woocommerce.css','', '8.5.4');
  222. wp_register_style('font-awesome', $nectar_get_template_directory_uri . '/css/font-awesome.min.css', '', '4.6.3');
  223. wp_register_style('iconsmind', $nectar_get_template_directory_uri . '/css/iconsmind.css', '', '7.6');
  224. wp_register_style('linea', $nectar_get_template_directory_uri . '/css/fonts/svg/font/arrows_styles.css');
  225. wp_register_style('fullpage', $nectar_get_template_directory_uri . '/css/fullpage.css', '', '8.5.4');
  226. wp_register_style('nectarslider', $nectar_get_template_directory_uri . '/css/nectar-slider.css', '', '8.5.0');
  227. wp_register_style("main-styles", get_stylesheet_directory_uri() . "/style.css", '', '8.5.5');
  228. wp_register_style("nectar-portfolio", $nectar_get_template_directory_uri . "/css/portfolio.css", '', '8.5.5');
  229. wp_register_style("magnific", $nectar_get_template_directory_uri . "/css/magnific.css", '', '6.2');
  230. wp_register_style("fancyBox", $nectar_get_template_directory_uri . "/css/jquery.fancybox.css", '', '9.0');
  231. wp_register_style("responsive", $nectar_get_template_directory_uri . "/css/responsive.css", '', '8.5.5');
  232. wp_register_style("select2", $nectar_get_template_directory_uri . "/css/select2.css", '', '6.2');
  233. wp_register_style("non-responsive", $nectar_get_template_directory_uri . "/css/non-responsive.css");
  234. wp_register_style("skin-ascend", $nectar_get_template_directory_uri . "/css/ascend.css", '', '8.5.4');
  235. wp_register_style("skin-material", $nectar_get_template_directory_uri . "/css/skin-material.css", '', '8.5.4');
  236. wp_register_style("box-roll", $nectar_get_template_directory_uri . "/css/box-roll.css");
  237. wp_register_style("nectar-ie8", $nectar_get_template_directory_uri . "/css/ie8.css");
  238. global $options;
  239. $lightbox_script = (!empty($options['lightbox_script'])) ? $options['lightbox_script'] : 'magnific';
  240. if($lightbox_script == 'pretty_photo') { $lightbox_script = 'magnific'; }
  241. // Enqueue
  242. wp_enqueue_style('rgs');
  243. wp_enqueue_style('font-awesome');
  244. wp_enqueue_style('main-styles');
  245. if ($lightbox_script == 'magnific') {
  246. wp_enqueue_style('magnific');
  247. } else if($lightbox_script == 'fancybox') {
  248. wp_enqueue_style('fancyBox');
  249. }
  250. wp_enqueue_style('nectar-ie8');
  251. //responsive
  252. if( !empty($options['responsive']) && $options['responsive'] == 1 ) {
  253. wp_enqueue_style('responsive');
  254. } else {
  255. wp_enqueue_style('non-responsive');
  256. add_filter('body_class','salient_non_responsive');
  257. function salient_non_responsive($classes) {
  258. // add 'class-name' to the $classes array
  259. $classes[] = 'salient_non_responsive';
  260. // return the $classes array
  261. return $classes;
  262. }
  263. }
  264. ////Default fonts with extended chars
  265. global $options;
  266. if(!empty($options['extended-theme-font']) && $options['extended-theme-font'] != '0') {
  267. wp_enqueue_style( "options_typography_OpenSans_ext", "https://fonts.googleapis.com/css?family=Open+Sans%3A300%2C400%2C600%2C700&subset=latin%2Clatin-ext", false, null, 'all' );
  268. }
  269. //IE
  270. global $wp_styles;
  271. $wp_styles->add_data("nectar-ie8", 'conditional', 'lt IE 9');
  272. //ajaxify needed
  273. $transition_method = (!empty($options['transition-method'])) ? $options['transition-method'] : 'ajax';
  274. if(!empty($options['ajax-page-loading']) && $options['ajax-page-loading'] == '1' && $transition_method == 'ajax') {
  275. wp_enqueue_style('wp-mediaelement');
  276. wp_enqueue_style('fullpage');
  277. wp_enqueue_style('nectarslider');
  278. wp_enqueue_style('nectar-portfolio');
  279. }
  280. }
  281. add_action('wp_enqueue_scripts', 'nectar_main_styles');
  282. function nectar_page_sepcific_styles() {
  283. global $post;
  284. if(!is_object($post)) $post = (object) array('post_content'=>' ', 'ID' => ' ');
  285. $portfolio_extra_content = get_post_meta($post->ID, '_nectar_portfolio_extra_content', true);
  286. $post_content = $post->post_content;
  287. //home
  288. if ( is_page_template('template-home-1.php') || is_page_template('template-home-2.php') || is_page_template('template-home-3.php') || is_page_template('template-home-4.php')) {
  289. wp_enqueue_style('orbit');
  290. }
  291. //full page
  292. $page_full_screen_rows = (isset($post->ID)) ? get_post_meta($post->ID, '_nectar_full_screen_rows', true) : '';
  293. if($page_full_screen_rows == 'on') wp_enqueue_style('fullpage');
  294. //nectar slider
  295. if(stripos( $post_content, '[nectar_slider') !== FALSE || stripos( $portfolio_extra_content, '[nectar_slider') !== FALSE
  296. || stripos($post_content, 'type="nectarslider_style"') !== FALSE || stripos( $portfolio_extra_content, 'type="nectarslider_style"') !== FALSE) {
  297. wp_enqueue_style('nectarslider');
  298. }
  299. //portfolio
  300. if(stripos( $post_content, 'nectar_portfolio') !== FALSE || stripos( $portfolio_extra_content, 'nectar_portfolio') !== FALSE ||
  301. stripos( $post_content, 'recent_projects') !== FALSE || stripos( $portfolio_extra_content, 'recent_projects') !== FALSE ||
  302. stripos( $post_content, 'type="image_grid"') !== FALSE || stripos( $portfolio_extra_content, 'type="image_grid"') !== FALSE ||
  303. stripos( $post_content, "type='image_grid'") !== FALSE || stripos( $portfolio_extra_content, "type='image_grid'") !== FALSE ||
  304. is_page_template('template-portfolio.php') || is_post_type_archive('portfolio') || is_singular('portfolio') || is_tax('project-attributes') || is_tax('project-type')) {
  305. wp_enqueue_style('nectar-portfolio');
  306. }
  307. //WooCommerce
  308. if ( function_exists( 'is_woocommerce' ) ) {
  309. wp_enqueue_style('woocommerce');
  310. }
  311. if(strpos($post_content,'.svg') !== false && strpos($post_content,'icon color="Extra-Color-Gradient-1"') !== false ||
  312. strpos($post_content,'.svg') !== false && strpos($post_content,'icon color="Extra-Color-Gradient-2"') !== false ||
  313. strpos($post_content,'.svg') !== false && strpos($post_content,"icon color='Extra-Color-Gradient-1'") !== false ||
  314. strpos($post_content,'.svg') !== false && strpos($post_content,"icon color='Extra-Color-Gradient-2'") !== false ||
  315. strpos($portfolio_extra_content,'.svg') !== false && strpos($portfolio_extra_content,'icon color="Extra-Color-Gradient-1"') !== false ||
  316. strpos($portfolio_extra_content,'.svg') !== false && strpos($portfolio_extra_content,'icon color="Extra-Color-Gradient-2"') !== false ||
  317. strpos($portfolio_extra_content,'.svg') !== false && strpos($portfolio_extra_content,"icon color='Extra-Color-Gradient-1'") !== false ||
  318. strpos($portfolio_extra_content,'.svg') !== false && strpos($portfolio_extra_content,"icon color='Extra-Color-Gradient-2'") !== false ) {
  319. wp_enqueue_style('linea');
  320. }
  321. if(strpos($post_content,'iconsmind-') !== false ||
  322. strpos($portfolio_extra_content,'iconsmind-') !== false) {
  323. wp_enqueue_style('iconsmind');
  324. }
  325. global $options;
  326. $fancy_rcs = (!empty($options['form-fancy-select'])) ? $options['form-fancy-select'] : 'default';
  327. if($fancy_rcs == '1') {
  328. wp_enqueue_style('select2');
  329. }
  330. }
  331. add_action('wp_enqueue_scripts', 'nectar_page_sepcific_styles');
  332. $page_transition_bg = (!empty($options['transition-bg-color'])) ? $options['transition-bg-color'] : '#ffffff';
  333. $page_transition_bg_2 = (!empty($options['transition-bg-color-2'])) ? $options['transition-bg-color-2'] : $page_transition_bg;
  334. $page_transition_effect = (!empty($options['transition-effect'])) ? $options['transition-effect'] : 'standard';
  335. $transition_method = (!empty($options['transition-method'])) ? $options['transition-method'] : 'ajax';
  336. function nectar_page_transition_bg_fix() {
  337. global $page_transition_bg;
  338. global $page_transition_bg_2;
  339. global $page_transition_effect;
  340. //set html bg color to match preloading screen to avoid white flash in chrome
  341. if($page_transition_effect == 'horizontal_swipe') {
  342. $css = "html:not(.page-trans-loaded) { background-color: ".$page_transition_bg_2."; }";
  343. } else {
  344. $css = "html:not(.page-trans-loaded) { background-color: ".$page_transition_bg."; }";
  345. }
  346. wp_add_inline_style( 'main-styles', $css );
  347. }
  348. if(!empty($options['ajax-page-loading']) && $options['ajax-page-loading'] == '1' && $transition_method == 'standard') add_action('wp_enqueue_scripts', 'nectar_page_transition_bg_fix');
  349. #-----------------------------------------------------------------#
  350. # Dynamic Styles
  351. #-----------------------------------------------------------------#
  352. function nectar_quick_minify( $css ) {
  353. $css = preg_replace( '/\s+/', ' ', $css );
  354. $css = preg_replace( '/\/\*[^\!](.*?)\*\//', '', $css );
  355. $css = preg_replace( '/(,|:|;|\{|}) /', '$1', $css );
  356. $css = preg_replace( '/ (,|;|\{|})/', '$1', $css );
  357. $css = preg_replace( '/(:| )0\.([0-9]+)(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}.${2}${3}', $css );
  358. $css = preg_replace( '/(:| )(\.?)0(%|em|ex|px|in|cm|mm|pt|pc)/i', '${1}0', $css );
  359. return trim( $css );
  360. }
  361. if (!function_exists('nectar_colors_css_output')) {
  362. function nectar_colors_css_output(){
  363. include('css/colors.php');
  364. }
  365. }
  366. if (!function_exists('nectar_custom_css_output')) {
  367. function nectar_custom_css_output(){
  368. include('css/custom.php');
  369. }
  370. }
  371. if (!function_exists('nectar_fonts_output')) {
  372. function nectar_fonts_output(){
  373. include('css/fonts.php');
  374. }
  375. }
  376. if (!function_exists('nectar_page_specific_dynamic')) {
  377. function nectar_page_specific_dynamic(){
  378. ob_start();
  379. echo '<style type="text/css">';
  380. ////page header
  381. global $post;
  382. global $options;
  383. $font_color = get_post_meta($post->ID, '_nectar_header_font_color', true);
  384. if(!empty($font_color)) {
  385. echo '#page-header-bg h1, #page-header-bg .subheader, .nectar-box-roll .overlaid-content h1, .nectar-box-roll .overlaid-content .subheader, .page-header-no-bg h1, body .section-title #portfolio-nav a:hover i, .page-header-no-bg span, #page-header-bg #portfolio-nav a i, #page-header-bg span { color: '. $font_color .'!important; } ';
  386. echo 'body #page-header-bg a.pinterest-share i, body #page-header-bg a.facebook-share i, body #page-header-bg .twitter-share i, body #page-header-bg .google-plus-share i,
  387. body #page-header-bg .icon-salient-heart, body #page-header-bg .icon-salient-heart-2 { color: '. $font_color .'; }';
  388. } echo 'body .section-title #portfolio-nav a:hover i { opacity: 0.75; }';
  389. $logo_height = (!empty($options['use-logo']) && !empty($options['logo-height'])) ? intval($options['logo-height']) : 30;
  390. $header_padding = (!empty($options['header-padding'])) ? intval($options['header-padding']) : 28;
  391. $nav_font_size = (!empty($options['use-custom-fonts']) && $options['use-custom-fonts'] == 1 && !empty($options['navigation_font_size']) && $options['navigation_font_size'] != '-') ? intval(substr($options['navigation_font_size'],0,-2) *1.4 ) : 20;
  392. $dd_indicator_height = (!empty($options['use-custom-fonts']) && $options['use-custom-fonts'] == 1 && !empty($options['navigation_font_size']) && $options['navigation_font_size'] != '-') ? intval(substr($options['navigation_font_size'],0,-2)) -1 : 20;
  393. $padding_top = ceil(($logo_height/2)) - ceil(($nav_font_size/2));
  394. $padding_bottom = (ceil(($logo_height/2)) - ceil(($nav_font_size/2))) + $header_padding;
  395. $search_padding_top = ceil(($logo_height/2)) - ceil(21/2) +1;
  396. $search_padding_bottom = (ceil(($logo_height/2)) - ceil(21/2));
  397. $using_secondary = (!empty($options['header_layout'])) ? $options['header_layout'] : ' ';
  398. if($using_secondary == 'header_with_secondary'){
  399. $header_space = $logo_height + ($header_padding*2) + 34;
  400. }
  401. else {
  402. $header_space = $logo_height + ($header_padding*2);
  403. }
  404. //woo product title
  405. $wooSocial = ( !empty($options['woo_social']) && $options['woo_social'] == 1 ) ? '1' : '0';
  406. $wooSocialCount = 0;
  407. $wooProductTitlePadding = 0;
  408. if($wooSocial == '1') {
  409. if(!empty($options['woo-facebook-sharing']) && $options['woo-facebook-sharing'] == 1) $wooSocialCount++;
  410. if(!empty($options['woo-twitter-sharing']) && $options['woo-twitter-sharing'] == 1) $wooSocialCount++;
  411. if(!empty($options['woo-pinterest-sharing']) && $options['woo-pinterest-sharing'] == 1) $wooSocialCount++;
  412. if(!empty($options['woo-google-plus-sharing']) && $options['woo-google-plus-sharing'] == 1) $wooSocialCount++;
  413. if(!empty($options['woo-linkedin-sharing']) && $options['woo-linkedin-sharing'] == 1) $wooSocialCount++;
  414. $wooProductTitlePadding = ($wooSocialCount*52) + 50;
  415. }
  416. //hide scrollbar during loading if using fullpage option
  417. $page_full_screen_rows = (isset($post->ID)) ? get_post_meta($post->ID, '_nectar_full_screen_rows', true) : '';
  418. if($page_full_screen_rows == 'on') {
  419. echo 'body,html { overflow: hidden; height: 100%;}';
  420. }
  421. //body border
  422. $body_border = (!empty($options['body-border'])) ? $options['body-border'] : 'off';
  423. $body_border_size = (!empty($options['body-border-size'])) ? $options['body-border-size'] : '20';
  424. $body_border_color = (!empty($options['body-border-color'])) ? $options['body-border-color'] : '#ffffff';
  425. if($body_border == '1') {
  426. $headerColorScheme = (!empty($options['header-color'])) ? $options['header-color'] : 'light';
  427. $userSetBG = (!empty($options['header-background-color']) && $headerColorScheme == 'custom') ? $options['header-background-color'] : '#ffffff';
  428. $activate_transparency = using_page_header($post->ID);
  429. if(empty($options['transparent-header']))
  430. $activate_transparency = 'false';
  431. echo '@media only screen and (min-width: 690px) {
  432. body {padding-bottom: '.$body_border_size.'px; }
  433. .container-wrap { padding-right: '.$body_border_size.'px; padding-left: '.$body_border_size.'px; padding-bottom: '.$body_border_size.'px;}
  434. .midnightInner, #footer-outer[data-full-width="1"] { padding-right: '.$body_border_size.'px; padding-left: '.$body_border_size.'px; }
  435. #slide-out-widget-area.fullscreen .bottom-text[data-has-desktop-social="false"], #slide-out-widget-area.fullscreen-alt .bottom-text[data-has-desktop-social="false"] {bottom: '. intVal($body_border_size + 28) .'px;}
  436. #header-outer, body #header-outer-bg-only {box-shadow: none; -webkit-box-shadow: none;}
  437. .slide-out-hover-icon-effect.small, .slide-out-hover-icon-effect:not(.small) {margin-top: '.$body_border_size.'px; margin-right: '.$body_border_size.'px;}
  438. #slide-out-widget-area-bg.fullscreen-alt { padding: '.$body_border_size.'px; }
  439. #slide-out-widget-area.slide-out-from-right-hover {margin-right: '.$body_border_size.'px;}
  440. .orbit-wrapper div.slider-nav span.left, .swiper-container .slider-prev { margin-left: '.$body_border_size.'px;} .orbit-wrapper div.slider-nav span.right, .swiper-container .slider-next { margin-right: '.$body_border_size.'px;}
  441. .admin-bar #slide-out-widget-area-bg.fullscreen-alt { padding-top: '. intval($body_border_size+32) .'px; }
  442. #header-outer, body.ascend #search-outer, #header-secondary-outer, #slide-out-widget-area.slide-out-from-right, #slide-out-widget-area.fullscreen .bottom-text { margin-top: '.$body_border_size.'px; padding-right: '.$body_border_size.'px; padding-left: '.$body_border_size.'px; }
  443. #nectar_fullscreen_rows, body #slide-out-widget-area-bg:not(.fullscreen-alt) { margin-top: '.$body_border_size.'px; }
  444. body:not(.ascend) .cart-menu-wrap .cart-menu , #slide-out-widget-area.fullscreen .off-canvas-social-links { padding-right: '.$body_border_size.'px!important; }
  445. .section-down-arrow, #slide-out-widget-area.fullscreen .off-canvas-social-links, #slide-out-widget-area.fullscreen .bottom-text { padding-bottom: '.$body_border_size.'px; }
  446. .ascend #search-outer #search #close, body[data-smooth-scrolling="0"] #header-outer .widget_shopping_cart, #page-header-bg .pagination-navigation { margin-right: '.$body_border_size.'px; }
  447. #to-top { right: '. intval($body_border_size+17) .'px; margin-bottom: '.$body_border_size.'px; }
  448. body[data-dropdown-style="minimal"][data-header-color="light"] #header-outer:not(.transparent) .sf-menu > li > ul { border-top: none; }
  449. body:not(.ascend) #header-outer .cart-menu { background-color: '.$body_border_color.'; border-left: 1px solid rgba(0,0,0,0.1); }
  450. #fp-nav { padding-right: '.$body_border_size.'px; } .body-border-left {background-color: '.$body_border_color.'; width: '.$body_border_size.'px;} .body-border-right {background-color: '.$body_border_color.'; width: '.$body_border_size.'px;} .body-border-bottom { background-color: '.$body_border_color.'; height: '.$body_border_size.'px;}
  451. .body-border-top {background-color: '.$body_border_color.'; height: '.$body_border_size.'px;} } @media only screen and (max-width: 690px) { .body-border-right, .body-border-left, .body-border-top, .body-border-bottom { display: none; } }';
  452. if(($body_border_color == '#ffffff' && $headerColorScheme == 'light' || $headerColorScheme == 'custom' && $body_border_color == $userSetBG ) && $activate_transparency != 'true' ) {
  453. echo '#header-outer:not([data-using-secondary="1"]):not(.transparent), body.ascend #search-outer, body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer:not([data-using-secondary="1"]) { margin-top: 0!important; } .body-border-top { z-index: 9997; } #slide-out-widget-area.slide-out-from-right { z-index: 9997;}
  454. #nectar_fullscreen_rows, body #slide-out-widget-area-bg { margin-top: 0px!important; }
  455. body #header-outer, body[data-slide-out-widget-area-style="slide-out-from-right-hover"] #header-outer { z-index: 9998; }
  456. #header-outer[data-full-width="true"]:not([data-transparent-header="true"]) header > .container, #header-outer[data-full-width="true"][data-transparent-header="true"].pseudo-data-transparent header > .container { padding-left: 0; padding-right: 0; }
  457. @media only screen and (max-width: 1080px) and (min-width: 1000px) {
  458. .ascend[data-slide-out-widget-area="true"] #header-outer[data-full-width="true"]:not([data-transparent-header="true"]) header > .container { padding-left: 0!important; padding-right: 0!important; }
  459. }
  460. body[data-header-search="false"][data-slide-out-widget-area="false"].ascend #header-outer[data-full-width="true"][data-cart="true"]:not([data-transparent-header="true"]) header > .container { padding-right: 28px; }
  461. body:not(.ascend) #header-outer[data-full-width="true"] header#top nav > ul.product_added.buttons { padding-right: '.intval($body_border_size+80) .'px!important; }
  462. body.ascend[data-slide-out-widget-area="true"] #header-outer[data-full-width="true"] .cart-menu-wrap { right: '.intval($body_border_size+51) .'px!important; }
  463. body[data-slide-out-widget-area-style="slide-out-from-right"] #header-outer[data-header-resize="0"] {
  464. -ms-transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important;
  465. -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important;
  466. transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important;
  467. }
  468. @media only screen and (min-width: 690px) {
  469. body div.portfolio-items[data-gutter*="px"][data-col-num="elastic"] { padding: 0!important; }
  470. }
  471. body #header-outer[data-transparent-header="true"].transparent { transition: none; -webkit-transition: none; }
  472. body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer { transition: background-color 0.3s cubic-bezier(0.215,0.61,0.355,1); -webkit-transition: background-color 0.3s cubic-bezier(0.215,0.61,0.355,1); }
  473. body.ascend[data-slide-out-widget-area="false"] #header-outer[data-header-resize="0"][data-cart="true"]:not(.transparent) { z-index: 100000; }
  474. ';
  475. } else if($body_border_color == '#ffffff' && $headerColorScheme == 'light' || $headerColorScheme == 'custom' && $body_border_color == $userSetBG) {
  476. echo '#header-outer.small-nav:not(.transparent), #header-outer[data-header-resize="0"]:not([data-using-secondary="1"]).scrolled-down:not(.transparent), #header-outer.detached, body.ascend #search-outer.small-nav, body[data-slide-out-widget-area-style="slide-out-from-right-hover"] #header-outer:not([data-using-secondary="1"]):not(.transparent), body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer:not([data-using-secondary="1"]).scrolled-down, body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer:not([data-using-secondary="1"]).transparent.side-widget-open { margin-top: 0px; z-index: 100000; }
  477. body.ascend[data-slide-out-widget-area="true"] #header-outer[data-full-width="true"].transparent:not(.small-nav) .cart-menu-wrap,
  478. body.ascend[data-slide-out-widget-area="true"] #header-outer[data-full-width="true"].scrolled-down .cart-menu-wrap { right: '.intval($body_border_size+80) .'px!important; }
  479. body.ascend[data-slide-out-widget-area="true"] #header-outer[data-full-width="true"] .cart-menu-wrap,
  480. body.ascend[data-slide-out-widget-area="false"] #header-outer[data-full-width="true"][data-cart="true"] .cart-menu-wrap { transition: right 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); -webkit-transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1); }
  481. .ascend #header-outer.transparent .cart-menu-wrap {width: 130px;}
  482. body:not(.ascend) #header-outer[data-full-width="true"] header#top nav > ul.product_added.buttons { padding-right: '.intval($body_border_size+80) .'px!important; }
  483. #header-outer[data-full-width="true"][data-transparent-header="true"][data-header-resize="0"].scrolled-down:not(.transparent) .container,
  484. body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer[data-full-width="true"].scrolled-down .container,
  485. body[data-slide-out-widget-area-style="fullscreen-alt"] #header-outer[data-full-width="true"].transparent.side-widget-open .container { padding-left: 0!important; padding-right: 0!important; }
  486. body[data-header-search="false"][data-slide-out-widget-area="false"].ascend #header-outer[data-full-width="true"][data-cart="true"]:not(.transparent) header > .container { padding-right: 28px!important; }
  487. body.ascend[data-slide-out-widget-area="false"] #header-outer[data-full-width="true"][data-cart="true"].transparent .cart-menu-wrap { right: '.intval($body_border_size) .'px!important; }
  488. body.ascend[data-slide-out-widget-area="true"]:not([data-slide-out-widget-area-style="fullscreen"]):not([data-slide-out-widget-area-style="slide-out-from-right"]) #header-outer[data-full-width="true"][data-header-resize="0"].scrolled-down .cart-menu-wrap,
  489. body.ascend[data-slide-out-widget-area="true"][data-slide-out-widget-area-style="fullscreen"] #header-outer[data-full-width="true"][data-header-resize="0"].scrolled-down:not(.transparent) .cart-menu-wrap,
  490. body.ascend[data-slide-out-widget-area="true"][data-slide-out-widget-area-style="slide-out-from-right"] #header-outer[data-full-width="true"][data-header-resize="0"].scrolled-down:not(.transparent) .cart-menu-wrap,
  491. body[data-slide-out-widget-area-style="fullscreen-alt"].ascend #header-outer[data-full-width="true"].transparent.side-widget-open .cart-menu-wrap { right: '.intval($body_border_size+50) .'px!important; }
  492. @media only screen and (min-width: 690px) {
  493. body div.portfolio-items[data-gutter*="px"][data-col-num="elastic"] { padding: 0!important; }
  494. }
  495. #header-outer[data-full-width="true"][data-header-resize="0"].transparent { -ms-transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; }
  496. body #header-outer[data-transparent-header="true"][data-header-resize="0"] { -ms-transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; -webkit-transition: -webkit-transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; transition: transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.3s cubic-bezier(0.215,0.61,0.355,1), box-shadow 0.40s ease, margin 0.3s cubic-bezier(0.215,0.61,0.355,1)!important; }
  497. #header-outer[data-full-width="true"][data-header-resize="0"] header > .container { -ms-transition: padding 0.35s cubic-bezier(0.215,0.61,0.355,1); transition: padding 0.35s cubic-bezier(0.215,0.61,0.355,1); -webkit-transition: padding 0.35s cubic-bezier(0.215,0.61,0.355,1); }
  498. ';
  499. $trans_header = (!empty($options['transparent-header']) && $options['transparent-header'] == '1') ? $options['transparent-header'] : 'false';
  500. $bg_header = (!empty($post->ID) && $post->ID != 0) ? using_page_header($post->ID) : 0;
  501. $perm_trans = (!empty($options['header-permanent-transparent']) && $trans_header != 'false' && $bg_header == 'true') ? $options['header-permanent-transparent'] : 'false';
  502. if($perm_trans != '1') {
  503. echo '@media only screen and (max-width: 1000px) and (min-width: 690px) {
  504. #header-outer,#nectar_fullscreen_rows, body #slide-out-widget-area-bg { margin-top: 0!important; }
  505. }';
  506. }
  507. } else if ($body_border_color != '#ffffff' && $headerColorScheme == 'light' || $headerColorScheme == 'custom' && $body_border_color != $userSetBG ) {
  508. echo 'html body.ascend[data-user-set-ocm="off"] #header-outer[data-full-width="true"] .cart-outer[data-user-set-ocm="off"] .cart-menu-wrap { right: '.intval($body_border_size) .'px!important; }
  509. html body.ascend[data-user-set-ocm="1"] #header-outer[data-full-width="true"] .cart-outer[data-user-set-ocm="1"] .cart-menu-wrap { right: '.intval($body_border_size+77) .'px!important; }';
  510. }
  511. }
  512. //// header transparent option
  513. if(!empty($options['transparent-header']) && $options['transparent-header'] == '1') {
  514. $starting_color = (empty($options['header-starting-color'])) ? '#ffffff' : $options['header-starting-color'];
  515. $activate_transparency = using_page_header($post->ID);
  516. echo '
  517. #header-outer.transparent header#top #logo, #header-outer.transparent header#top #logo:hover {
  518. color: '.$starting_color.'!important;
  519. }
  520. #header-outer.transparent header#top nav > ul > li > a,
  521. #header-outer.transparent header#top nav ul #search-btn a span.icon-salient-search,
  522. #header-outer.transparent nav > ul > li > a > .sf-sub-indicator [class^="icon-"],
  523. #header-outer.transparent nav > ul > li > a > .sf-sub-indicator [class*=" icon-"],
  524. #header-outer.transparent .cart-menu .cart-icon-wrap .icon-salient-cart,
  525. .ascend #boxed #header-outer.transparent .cart-menu .cart-icon-wrap .icon-salient-cart
  526. {
  527. color: '.$starting_color.'!important;
  528. opacity: 0.75!important;
  529. transition: opacity 0.2s ease, color 0.2s ease;
  530. }
  531. #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav > ul > li > a:hover, #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav .sf-menu > li.sfHover > a, #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav .sf-menu > li.current_page_ancestor > a,
  532. #header-outer.transparent header#top nav .sf-menu > li.current-menu-item > a, #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav .sf-menu li.current-menu-item > a, #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav .sf-menu > li.current-menu-ancestor > a, #header-outer.transparent:not([data-lhe="animated_underline"]) header#top nav .sf-menu > li.current_page_item > a,
  533. #header-outer.transparent header#top nav > ul > li > a:hover > .sf-sub-indicator > i, #header-outer.transparent header#top nav > ul > li.sfHover > a > span > i, #header-outer.transparent header#top nav ul #search-btn a:hover span, #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle a:hover span,
  534. #header-outer.transparent header#top nav .sf-menu > li.current-menu-item > a i, #header-outer.transparent header#top nav .sf-menu > li.current-menu-ancestor > a i,
  535. #header-outer.transparent .cart-outer:hover .icon-salient-cart, .ascend #boxed #header-outer.transparent .cart-outer:hover .cart-menu .cart-icon-wrap .icon-salient-cart
  536. {
  537. opacity: 1!important;
  538. color: '.$starting_color.'!important;
  539. }
  540. #header-outer.transparent[data-lhe="animated_underline"] header#top nav > ul > li > a:hover, #header-outer.transparent[data-lhe="animated_underline"] header#top nav .sf-menu > li.sfHover > a,
  541. #header-outer.transparent[data-lhe="animated_underline"] header#top nav .sf-menu > li.current-menu-ancestor > a, #header-outer.transparent[data-lhe="animated_underline"] header#top nav .sf-menu > li.current_page_item > a {
  542. opacity: 1!important;
  543. }
  544. #header-outer[data-lhe="animated_underline"].transparent header#top nav > ul > li > a:after, #header-outer.transparent header#top nav>ul>li.button_bordered>a:before {
  545. border-color: '.$starting_color.'!important;
  546. }
  547. #header-outer.transparent:not(.directional-nav-effect) > header#top nav ul .slide-out-widget-area-toggle a i.lines,
  548. #header-outer.transparent:not(.directional-nav-effect) > header#top nav ul .slide-out-widget-area-toggle a i.lines:before,
  549. #header-outer.transparent:not(.directional-nav-effect) > header#top nav ul .slide-out-widget-area-toggle a i.lines:after,
  550. #header-outer.transparent:not(.directional-nav-effect) > header#top nav ul .slide-out-widget-area-toggle[data-icon-animation="simple-transform"] .lines-button:after,
  551. #header-outer.transparent.directional-nav-effect > header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i, #header-outer.transparent.directional-nav-effect > header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i:after, #header-outer.transparent.directional-nav-effect > header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i:before,
  552. #header-outer.transparent:not(.directional-nav-effect) .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a i.lines,
  553. #header-outer.transparent:not(.directional-nav-effect) .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a i.lines:before,
  554. #header-outer.transparent:not(.directional-nav-effect) .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a i.lines:after,
  555. #header-outer.transparent.directional-nav-effect .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i, #header-outer.transparent.directional-nav-effect .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i:after, #header-outer.transparent.directional-nav-effect .midnightHeader.nectar-slider header#top nav ul .slide-out-widget-area-toggle a span.light .lines-button i:before {
  556. background-color: '.$starting_color.'!important;
  557. }
  558. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle a i.lines,
  559. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle[data-icon-animation="simple-transform"] a i.lines-button:after {
  560. opacity: 0.75!important;
  561. }
  562. #header-outer.transparent.side-widget-open header#top nav ul .slide-out-widget-area-toggle a i.lines,
  563. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle[data-icon-animation="simple-transform"] a:hover i.lines-button:after,
  564. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle a:hover i.lines,
  565. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle a:hover i.lines:before,
  566. #header-outer.transparent header#top nav ul .slide-out-widget-area-toggle a:hover i.lines:after {
  567. opacity: 1!important;
  568. }
  569. ';
  570. $dark_header_color = (!empty($options['header-transparent-dark-color'])) ? $options['header-transparent-dark-color'] : '#000000';
  571. echo '#header-outer.transparent.dark-slide > header#top nav > ul > li > a,
  572. #header-outer.transparent.dark-row > header#top nav > ul > li > a,
  573. #header-outer.transparent.dark-slide:not(.directional-nav-effect) > header#top nav ul #search-btn a span,
  574. #header-outer.transparent.dark-row:not(.directional-nav-effect) > header#top nav ul #search-btn a span,
  575. #header-outer.transparent.dark-slide > header#top nav > ul > li > a > .sf-sub-indicator [class^="icon-"],
  576. #header-outer.transparent.dark-slide > header#top nav > ul > li > a > .sf-sub-indicator [class*=" icon-"],
  577. #header-outer.transparent.dark-row > header#top nav > ul > li > a > .sf-sub-indicator [class*=" icon-"],
  578. #header-outer.transparent.dark-slide:not(.directional-nav-effect) .cart-menu .cart-icon-wrap .icon-salient-cart,
  579. #header-outer.transparent.dark-row:not(.directional-nav-effect) .cart-menu .cart-icon-wrap .icon-salient-cart,
  580. body.ascend[data-header-color="custom"] #boxed #header-outer.transparent.dark-slide > header#top .cart-outer .cart-menu .cart-icon-wrap i,
  581. body.ascend #boxed #header-outer.transparent.dark-slide > header#top .cart-outer .cart-menu .cart

Large files files are truncated, but you can click here to view the full file