onetone_custom_scripts

The Onetone onetone custom scripts function.

Description

onetone_custom_scripts(); 

Usage

  1. if ( !function_exists( 'onetone_custom_scripts' ) ) { 
  2. require_once '/includes/theme-setup.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = onetone_custom_scripts(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/theme-setup.php  
  1. function onetone_custom_scripts() { 
  2. global $page_meta, $post, $active_magee_shortcodes ; 
  3. if($post) { 
  4. $page_meta = get_post_meta( $post->ID , '_onetone_post_meta'); 
  5.  
  6. if( isset($page_meta[0]) && $page_meta[0]!='' ) 
  7. $page_meta = @json_decode( $page_meta[0], true ); 
  8.  
  9. $theme_info = wp_get_theme(); 
  10. $detect = new Mobile_Detect; 
  11.  
  12.  
  13. wp_enqueue_style('onetone-Yanone-Kaffeesatz', esc_url('//fonts.googleapis.com/css?family=Open+Sans:300, 400, 700|Yanone+Kaffeesatz|Lustria'), false, '', false ); 
  14. wp_enqueue_style('font-awesome', get_template_directory_uri() .'/plugins/font-awesome/css/font-awesome.min.css', false, '4.3.0', false); 
  15. wp_enqueue_style('bootstrap', get_template_directory_uri() .'/plugins/bootstrap/css/bootstrap.min.css', false, '3.3.4', false); 
  16. wp_enqueue_style('owl.carousel', get_template_directory_uri() .'/plugins/owl-carousel/assets/owl.carousel.css', false, '', false); 
  17. wp_enqueue_style('prettyPhoto', get_template_directory_uri() .'/css/prettyPhoto.css', false, '3.1.5', false); 
  18.  
  19. if( !onetone_is_plugin_active('magee-shortcodes/Magee.php') ) { 
  20. wp_enqueue_style('onetone-shortcodes', get_template_directory_uri() .'/css/shortcode.css', false, $theme_info->get( 'Version' ), false); 
  21.  
  22. wp_enqueue_style( 'onetone-main', get_stylesheet_uri(), array(), $theme_info->get( 'Version' ) ); 
  23.  
  24. wp_enqueue_style('onetone-onetone', get_template_directory_uri() .'/css/onetone.css', false, $theme_info->get( 'Version' ), false); 
  25. wp_enqueue_style('onetone-ms', get_template_directory_uri() .'/css/onetone-ms.css', false, $theme_info->get( 'Version' ), false); 
  26. wp_enqueue_style('onetone-scheme', get_template_directory_uri() .'/css/scheme.less', false, $theme_info->get( 'Version' ), false); 
  27. wp_enqueue_style('onetone-home', get_template_directory_uri() .'/css/home.css', false, $theme_info->get( 'Version' ), false); 
  28.  
  29. if ( is_rtl() ) { 
  30. wp_enqueue_style('onetone-rtl', get_template_directory_uri() .'/rtl.css', false, $theme_info->get( 'Version' ), false); 
  31.  
  32. $background_array = onetone_option("page_background"); 
  33. $background = onetone_get_background($background_array); 
  34. $header_image = get_header_image(); 
  35. $onetone_custom_css = ""; 
  36. if (isset($header_image) && ! empty( $header_image )) { 
  37. $onetone_custom_css .= ".home-header{background:url(".$header_image. ") repeat;}\n"; 
  38. if ( 'blank' != get_header_textcolor() && '' != get_header_textcolor() ) { 
  39. $header_color = ' color:#' . get_header_textcolor() . ';'; 
  40. $onetone_custom_css .= 'header .site-name, header .site-description, header .site-tagline{'.$header_color.'}'; 
  41. else{ 
  42. $onetone_custom_css .= 'header .site-name, header .site-description, header .site-tagline{display:none;}';  
  43.  
  44. $custom_css = onetone_option("custom_css"); 
  45. $onetone_custom_css .= '.site{'.$background.'}'; 
  46.  
  47. $links_color = onetone_option( 'links_color', '#963'); 
  48.  
  49. //scheme 
  50. $primary_color = esc_attr(onetone_option('primary_color', $links_color)); 
  51.  
  52. $links_color = onetone_option( 'links_color'); 
  53.  
  54. //if($links_color == "" || $links_color == null) 
  55. //$links_color = "#963"; 
  56. if($links_color ) 
  57. $onetone_custom_css .= '.entry-content a, .home-section-content a{color:'.$links_color.';}'; 
  58.  
  59.  
  60. $top_menu_font_color = onetone_option( 'font_color'); 
  61. if($top_menu_font_color !="" && $top_menu_font_color!=null) { 
  62. $onetone_custom_css .= 'header .site-nav > ul > li > a {color:'.$top_menu_font_color.'}'; 
  63.  
  64. // header 
  65. $sticky_header_background_color = esc_attr(onetone_option('sticky_header_background_color', '')); 
  66. $sticky_header_background_opacity = esc_attr(onetone_option('sticky_header_background_opacity', '1'));  
  67. $header_background_color = esc_attr(onetone_option('header_background_color', '')); 
  68. $header_background_opacity = esc_attr(onetone_option('header_background_opacity', '1'));  
  69. $header_border_color = esc_attr(onetone_option('header_border_color', ''));  
  70. $page_title_bar_background_color = esc_attr(onetone_option('page_title_bar_background_color', ''));  
  71. $page_title_bar_borders_color = esc_attr(onetone_option('page_title_bar_borders_color', ''));  
  72.  
  73. // sticky header background 
  74. if($sticky_header_background_color) { 
  75. $rgb = onetone_hex2rgb( $sticky_header_background_color ); 
  76. $onetone_custom_css .= ".fxd-header { 
  77. background-color: rgba(".$rgb[0].", ".$rgb[1].", ".$rgb[2].", ".$sticky_header_background_opacity."); 
  78. }"; 
  79.  
  80.  
  81. // main header background 
  82. if( $header_background_color ) { 
  83. $rgb = onetone_hex2rgb( $header_background_color ); 
  84. $onetone_custom_css .= ".main-header { 
  85. background-color: rgba(".$rgb[0].", ".$rgb[1].", ".$rgb[2].", ".$header_background_opacity."); 
  86. }"; 
  87.  
  88.  
  89. // sticky header 
  90.  
  91. $sticky_header_opacity = onetone_option('sticky_header_background_opacity', '1'); 
  92. $sticky_header_menu_item_padding = onetone_option('sticky_header_menu_item_padding', ''); 
  93. $sticky_header_navigation_font_size = onetone_option('sticky_header_navigation_font_size', ''); 
  94. $sticky_header_logo_width = onetone_option('sticky_header_logo_width', ''); 
  95. $logo_left_margin = onetone_option('logo_left_margin', ''); 
  96. $logo_right_margin = onetone_option('logo_right_margin', ''); 
  97. $logo_top_margin = onetone_option('logo_top_margin', ''); 
  98. $logo_bottom_margin = onetone_option('logo_bottom_margin', ''); 
  99.  
  100. if( $sticky_header_background_color ) { 
  101. $rgb = onetone_hex2rgb( $sticky_header_background_color ); 
  102. $onetone_custom_css .= ".fxd-header{background-color: rgba(".$rgb[0].", ".$rgb[1].", ".$rgb[2].", ".esc_attr($sticky_header_opacity).");}\r\n"; 
  103.  
  104.  
  105.  
  106. if( $sticky_header_menu_item_padding ) 
  107. $onetone_custom_css .= ".fxd-header .site-nav > ul > li > a {padding:".absint($sticky_header_menu_item_padding)."px;}\r\n"; 
  108. if( $sticky_header_navigation_font_size ) 
  109. $onetone_custom_css .= ".fxd-header .site-nav > ul > li > a {font-size:".absint($sticky_header_navigation_font_size)."px;}\r\n"; 
  110. if( $sticky_header_logo_width ) 
  111. $onetone_custom_css .= ".fxd-header img.site-logo{ width:".absint($sticky_header_logo_width)."px;}\r\n"; 
  112.  
  113. if( $logo_left_margin ) 
  114. $onetone_custom_css .= ".fxd-header img.site-logo{ margin-left:".absint($logo_left_margin)."px;}\r\n"; 
  115. if( $logo_right_margin ) 
  116. $onetone_custom_css .= ".fxd-header img.site-logo{ margin-right:".absint($logo_right_margin)."px;}\r\n"; 
  117. if( $logo_top_margin ) 
  118. $onetone_custom_css .= ".fxd-header img.site-logo{ margin-top:".absint($logo_top_margin)."px;}\r\n"; 
  119. if( $logo_bottom_margin ) 
  120. $onetone_custom_css .= ".fxd-header img.site-logo{ margin-bottom:".absint($logo_bottom_margin)."px;}\r\n"; 
  121.  
  122.  
  123. // top bar 
  124. $display_top_bar = onetone_option('display_top_bar', 'yes'); 
  125. $top_bar_background_color = onetone_option('top_bar_background_color', ''); 
  126. $top_bar_info_color = onetone_option('top_bar_info_color', ''); 
  127. $top_bar_menu_color = onetone_option('top_bar_menu_color', ''); 
  128.  
  129. if( $top_bar_background_color ) 
  130. $onetone_custom_css .= ".top-bar{background-color:".$top_bar_background_color.";}"; 
  131.  
  132. if( $display_top_bar == 'yes' ) 
  133. $onetone_custom_css .= ".top-bar{display:block;}"; 
  134.  
  135. if( $top_bar_info_color ) 
  136. $onetone_custom_css .= ".top-bar-info{color:".$top_bar_info_color.";}"; 
  137.  
  138. if( $top_bar_menu_color ) 
  139. $onetone_custom_css .= ".top-bar ul li a{color:".$top_bar_menu_color.";}"; 
  140.  
  141. // Header background 
  142. $header_background_image = onetone_option('header_background_image', ''); 
  143. $header_background_full = onetone_option('header_background_full', ''); 
  144. $header_background_repeat = onetone_option('header_background_repeat', ''); 
  145. $header_background_parallax = onetone_option('header_background_parallax', ''); 
  146.  
  147. $header_background = ''; 
  148. if( $header_background_image ) { 
  149. $header_background .= "header .main-header{\r\n"; 
  150.  
  151. $header_background .= "background-image: url(".esc_url($header_background_image).");\r\n"; 
  152. if( $header_background_full == 'yes' ) 
  153. $header_background .= "-webkit-background-size: cover; 
  154. -moz-background-size: cover; 
  155. -o-background-size: cover; 
  156. background-size: cover;\r\n"; 
  157. if( $header_background_parallax == 'no' )  
  158. $header_background .= "background-repeat:".$header_background_repeat.";"; 
  159. if( $header_background_parallax == 'yes' ) 
  160. $header_background .= "background-attachment: fixed; 
  161. background-position:top center; 
  162. background-repeat: no-repeat;"; 
  163.  
  164.  
  165. $header_background .= "}\r\n";  
  166.  
  167.  
  168. $onetone_custom_css .= $header_background; 
  169.  
  170. // Header Padding 
  171. $header_top_padding = onetone_option('header_top_padding', ''); 
  172. $header_bottom_padding = onetone_option('header_bottom_padding', ''); 
  173.  
  174. if( $header_top_padding ) 
  175. $onetone_custom_css .= ".site-nav > ul > li > a{padding-top:".$header_top_padding."}"; 
  176.  
  177. if( $header_bottom_padding ) 
  178. $onetone_custom_css .= ".site-nav > ul > li > a{padding-bottom:".$header_bottom_padding."}"; 
  179.  
  180. //background  
  181. $content_background_color = esc_attr(onetone_option('content_background_color', '')); 
  182. $sidebar_background_color = esc_attr(onetone_option('sidebar_background_color', '')); 
  183. $footer_background_color = esc_attr(onetone_option('footer_background_color', '')); 
  184. $copyright_background_color = esc_attr(onetone_option('copyright_background_color', '')); 
  185.  
  186. // content backgroud color 
  187.  
  188. if( $content_background_color ) 
  189. $onetone_custom_css .= ".col-main {background-color:".$content_background_color.";}"; 
  190.  
  191. if( $sidebar_background_color ) 
  192. $onetone_custom_css .= ".col-aside-left, .col-aside-right {background-color:".$sidebar_background_color.";}"; 
  193.  
  194. //footer background 
  195. if( $footer_background_color ) 
  196. $onetone_custom_css .= "footer .footer-widget-area{background-color:".$footer_background_color.";}"; 
  197.  
  198. if( $copyright_background_color ) 
  199. $onetone_custom_css .= "footer .footer-info-area{background-color:".$copyright_background_color."}"; 
  200.  
  201.  
  202. // Element Colors 
  203.  
  204. $form_background_color = esc_attr(onetone_option('form_background_color', '')); 
  205. $form_text_color = esc_attr(onetone_option('form_text_color', '')); 
  206. $form_border_color = esc_attr(onetone_option('form_border_color', '')); 
  207.  
  208.  
  209. if( $form_background_color ) 
  210. $onetone_custom_css .= "footer input, footer textarea{background-color:".$form_background_color.";}"; 
  211.  
  212. if( $form_text_color ) 
  213. $onetone_custom_css .= "footer input, footer textarea{color:".$form_text_color.";}"; 
  214.  
  215. if( $form_border_color ) 
  216. $onetone_custom_css .= "footer input, footer textarea{border-color:".$form_border_color.";}"; 
  217.  
  218.  
  219. //Layout Options 
  220.  
  221. $page_content_top_padding = esc_attr(onetone_option('page_content_top_padding', '')); 
  222. $page_content_bottom_padding = esc_attr(onetone_option('page_content_bottom_padding', '')); 
  223. $hundredp_padding = esc_attr(onetone_option('hundredp_padding', '')); 
  224. $sidebar_padding = esc_attr(onetone_option('sidebar_padding', '')); 
  225. $column_top_margin = esc_attr(onetone_option('column_top_margin', '')); 
  226. $column_bottom_margin = esc_attr(onetone_option('column_bottom_margin', '')); 
  227.  
  228. if( $page_content_top_padding ) 
  229. $onetone_custom_css .= ".post-inner, .page-inner{padding-top:".$page_content_top_padding.";}"; 
  230. if( $page_content_bottom_padding ) 
  231. $onetone_custom_css .= ".post-inner, .page-inner{padding-bottom:".$page_content_bottom_padding.";}"; 
  232.  
  233. if( isset($page_meta['padding_top']) && $page_meta['padding_top'] !='' ) 
  234. $onetone_custom_css .= ".post-inner, .page-inner{padding-top:".esc_attr($page_meta['padding_top']).";}"; 
  235. if( isset($page_meta['padding_bottom']) && $page_meta['padding_bottom'] !='' ) 
  236. $onetone_custom_css .= ".post-inner, .page-inner{padding-bottom:".esc_attr($page_meta['padding_bottom']).";}"; 
  237.  
  238.  
  239.  
  240. if( $sidebar_padding ) 
  241. $onetone_custom_css .= ".col-aside-left, .col-aside-right{padding:".$sidebar_padding.";}"; 
  242. if( $column_top_margin ) 
  243. $onetone_custom_css .= ".col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9{margin-top:".$column_top_margin.";}"; 
  244.  
  245. if( $column_bottom_margin ) 
  246. $onetone_custom_css .= ".col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9{margin-bottom:".$column_bottom_margin.";}"; 
  247.  
  248.  
  249. //fonts color 
  250.  
  251. $header_tagline_color = esc_attr(onetone_option('header_tagline_color', '')); 
  252. $page_title_color = esc_attr(onetone_option('page_title_color', '')); 
  253. $h1_color = esc_attr(onetone_option('h1_color', '')); 
  254. $h2_color = esc_attr(onetone_option('h2_color', '')); 
  255. $h3_color = esc_attr(onetone_option('h3_color', '')); 
  256. $h4_color = esc_attr(onetone_option('h4_color', '')); 
  257. $h5_color = esc_attr(onetone_option('h5_color', '')); 
  258. $h6_color = esc_attr(onetone_option('h6_color', '')); 
  259. $body_text_color = esc_attr(onetone_option('body_text_color', '')); 
  260. $link_color = esc_attr(onetone_option('link_color', '')); 
  261. $breadcrumbs_text_color = esc_attr(onetone_option('breadcrumbs_text_color', '')); 
  262. $sidebar_widget_headings_color = esc_attr(onetone_option('sidebar_widget_headings_color', '')); 
  263. $footer_headings_color = esc_attr(onetone_option('footer_headings_color', '')); 
  264. $footer_text_color = esc_attr(onetone_option('footer_text_color', '')); 
  265. $footer_link_color = esc_attr(onetone_option('footer_link_color', '')); 
  266.  
  267. if( $header_tagline_color ) 
  268. $onetone_custom_css .= ".site-tagline{color:".$header_tagline_color.";}"; 
  269. if( $page_title_color ) 
  270. $onetone_custom_css .= ".page-title h1{color:".$page_title_color.";}"; 
  271. if( $h1_color ) 
  272. $onetone_custom_css .= "h1{color:".$h1_color.";}"; 
  273. if( $h2_color ) 
  274. $onetone_custom_css .= "h2{color:".$h2_color.";}"; 
  275. if( $h3_color ) 
  276. $onetone_custom_css .= "h3{color:".$h3_color.";}"; 
  277. if( $h4_color ) 
  278. $onetone_custom_css .= "h4{color:".$h4_color.";}"; 
  279. if( $h5_color ) 
  280. $onetone_custom_css .= "h5{color:".$h5_color.";}"; 
  281. if( $h6_color ) 
  282. $onetone_custom_css .= "h6{color:".$h6_color.";}"; 
  283. if( $body_text_color ) 
  284. $onetone_custom_css .= ".entry-content, .entry-content p{color:".$body_text_color.";}"; 
  285. if( $link_color ) 
  286. $onetone_custom_css .= ".entry-summary a, .entry-content a{color:".$link_color.";}"; 
  287. if( $breadcrumbs_text_color ) 
  288. $onetone_custom_css .= ".breadcrumb-nav span, .breadcrumb-nav a{color:".$breadcrumbs_text_color.";}"; 
  289. if( $sidebar_widget_headings_color ) 
  290. $onetone_custom_css .= ".col-aside-left .widget-title, .col-aside-right .widget-title{color:".$sidebar_widget_headings_color.";}"; 
  291. if( $footer_headings_color ) 
  292. $onetone_custom_css .= ".footer-widget-area .widget-title{color:".$footer_headings_color.";}"; 
  293. if( $footer_text_color ) 
  294. $onetone_custom_css .= ".footer-widget-area, .footer-widget-area p, .footer-widget-area span{color:".$footer_text_color.";}"; 
  295. if( $footer_link_color ) 
  296. $onetone_custom_css .= ".footer-widget-area a{color:".$footer_link_color.";}"; 
  297.  
  298. //Main Menu Colors  
  299. $main_menu_background_color_1 = esc_attr(onetone_option('main_menu_background_color_1', '')); 
  300. $main_menu_font_color_1 = esc_attr(onetone_option('main_menu_font_color_1', '')); 
  301. $main_menu_font_hover_color_1 = esc_attr(onetone_option('main_menu_font_hover_color_1', '')); 
  302. $main_menu_background_color_2 = esc_attr(onetone_option('main_menu_background_color_2', '')); 
  303. $main_menu_font_color_2 = esc_attr(onetone_option('main_menu_font_color_2', '')); 
  304. $main_menu_font_hover_color_2 = esc_attr(onetone_option('main_menu_font_hover_color_2', '')); 
  305. $main_menu_separator_color_2 = esc_attr(onetone_option('main_menu_separator_color_2', '')); 
  306. $woo_cart_menu_background_color = esc_attr(onetone_option('woo_cart_menu_background_color', '')); 
  307. if( $main_menu_background_color_1 ) 
  308. $onetone_custom_css .= ".main-header{background-color:".$main_menu_background_color_1.";}"; 
  309. if( $main_menu_font_color_1 ) 
  310. $onetone_custom_css .= "#menu-main > li > a {color:".$main_menu_font_color_1.";}"; 
  311. if( $main_menu_font_hover_color_1 ) 
  312. $onetone_custom_css .= "#menu-main > li > a:hover{color:".$main_menu_font_hover_color_1.";}"; 
  313. if( $main_menu_background_color_2 ) 
  314. $onetone_custom_css .= ".main-header .sub-menu{background-color:".$main_menu_background_color_2.";}"; 
  315. if( $main_menu_font_color_2 ) 
  316. $onetone_custom_css .= "#menu-main li li a{color:".$main_menu_font_color_2.";}"; 
  317. if( $main_menu_font_hover_color_2 ) 
  318. $onetone_custom_css .= "#menu-main li li a:hover{color:".$main_menu_font_hover_color_2.";}"; 
  319. if( $main_menu_separator_color_2 ) 
  320. $onetone_custom_css .= ".site-nav ul li li a{border-color:".$main_menu_separator_color_2." !important;}"; 
  321.  
  322.  
  323. // home page sections  
  324.  
  325. $section_title_css = ''; 
  326. $section_content_css = ''; 
  327.  
  328.  
  329. $video_background_section = onetone_option( 'video_background_section' ); 
  330. for($i=0;$i<15;$i++): 
  331.  
  332. $section_css = ''; 
  333.  
  334. $section_background = onetone_option( 'section_background_'.$i ); 
  335. $background_size = onetone_option( 'background_size_'.$i ); 
  336. $section_padding = onetone_option( 'section_padding_'.$i , $i == 0?'':'50px 0'); 
  337. $text_align = onetone_option( 'text_align_'.$i); 
  338. $parallax_scrolling = onetone_option( 'parallax_scrolling_'.$i ); 
  339.  
  340. $section_title_typography = onetone_option( 'section_title_typography_'.$i); 
  341. $title_typography = onetone_get_typography( $section_title_typography ); 
  342.  
  343. $section_content_typography = onetone_option( 'section_content_typography_'.$i); 
  344. $content_typography = onetone_get_typography( $section_content_typography ); 
  345.  
  346.  
  347. if( $parallax_scrolling == "yes" || $parallax_scrolling == "1" ) { 
  348. $section_css .= "background-attachment:fixed;background-position:50% 0;background-repeat:repeat;\r\n"; 
  349.  
  350. if( $background_size == "yes" ) { 
  351. $section_css .= "-webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;\r\n"; 
  352. if( $section_padding ) { 
  353. $section_css .= "padding:".$section_padding.";\r\n";;  
  354.  
  355. if( $video_background_section != ($i+1) || $detect->isMobile() || $detect->isTablet() ) 
  356. $section_css .= onetone_get_background( $section_background ); 
  357.  
  358.  
  359. $section_title_css .= "section.home-section-".($i+1)." .section-title{text-align:center ;}\r\n"; 
  360.  
  361. if( $title_typography ) 
  362. $section_title_css .= "section.home-section-".($i+1)." .section-title{".$title_typography."}\r\n"; 
  363.  
  364. if( $content_typography ) 
  365. $section_content_css .= " 
  366. section.home-section-".($i+1)." .home-section-content,  
  367. section.home-section-".($i+1)." p{".$content_typography."}\r\n"; 
  368.  
  369. if( $i==0) 
  370. $section_title_css .= "section.home-section-".($i+1)." .magee-heading{".$title_typography."}\r\n"; 
  371.  
  372.  
  373. if( $text_align ) 
  374. $section_content_css .= "section.home-section-".($i+1)." .home-section-content{text-align:".$text_align."}\r\n"; 
  375. $section_content_css .= "section.home-section-".($i+1)." {".$section_css."}\r\n";  
  376.  
  377. endfor; 
  378.  
  379. // footer 
  380.  
  381. $footer_background_image = onetone_option('footer_background_image', '');  
  382. $footer_bg_full = onetone_option('footer_bg_full', 'yes');  
  383. $footer_background_repeat = onetone_option('footer_background_repeat', '');  
  384. $footer_background_position = onetone_option('footer_background_position', '');  
  385. $footer_top_padding = onetone_option('footer_top_padding', '');  
  386. $footer_bottom_padding = onetone_option('footer_bottom_padding', '');  
  387. $footer_background = ""; 
  388.  
  389. if( $footer_background_image ) { 
  390. $footer_background .= ".footer-widget-area{\r\n"; 
  391.  
  392. $footer_background .= "background-image: url(".esc_url($footer_background_image).");\r\n"; 
  393. if( $footer_bg_full == 'yes' ) 
  394. $footer_background .= "-webkit-background-size: cover; 
  395. -moz-background-size: cover; 
  396. -o-background-size: cover; 
  397. background-size: cover;\r\n"; 
  398.  
  399. $footer_background .= "background-repeat:".esc_attr($footer_background_repeat).";"; 
  400. $footer_background .= "background-position:".esc_attr($footer_background_position).";"; 
  401.  
  402.  
  403. $footer_background .= "}\r\n";  
  404.  
  405. $onetone_custom_css .= $footer_background ; 
  406.  
  407.  
  408.  
  409. $onetone_custom_css .= $section_title_css; 
  410. $onetone_custom_css .= $section_content_css; 
  411.  
  412.  
  413. $onetone_custom_css .= $custom_css; 
  414.  
  415. wp_add_inline_style( 'onetone-main', $onetone_custom_css ); 
  416.  
  417. wp_enqueue_style( 'onetone-bigvideo', get_template_directory_uri().'/plugins/YTPlayer/css/jquery.mb.YTPlayer.min.css', '', '', true ); 
  418. wp_enqueue_script( 'onetone-bigvideo', get_template_directory_uri().'/plugins/YTPlayer/jquery.mb.YTPlayer.js', array( 'jquery' ), '', true ); 
  419.  
  420. wp_enqueue_script( 'bootstrap', get_template_directory_uri().'/plugins/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.4 ', false ); 
  421. wp_enqueue_script( 'onetone-nav', get_template_directory_uri().'/plugins/jquery.nav.js', array( 'jquery' ), '1.4.14 ', false ); 
  422. wp_enqueue_script( 'onetone-scrollTo', get_template_directory_uri().'/plugins/jquery.scrollTo.js', array( 'jquery' ), '1.4.14 ', false ); 
  423. wp_enqueue_script( 'onetone-carousel', get_template_directory_uri().'/plugins/owl-carousel/owl.carousel.min.js', array( 'jquery' ), '', true ); 
  424. wp_enqueue_script( 'onetone-parallax', get_template_directory_uri().'/plugins/jquery.parallax-1.1.3.js', array( 'jquery' ), '1.1.3', true ); 
  425. wp_enqueue_script( 'onetone-respond', get_template_directory_uri().'/plugins/respond.min.js', array( 'jquery' ), '', true ); 
  426. wp_enqueue_script( 'onetone-less', get_template_directory_uri().'/plugins/less.min.js', array( 'jquery' ), '2.5.1', true ); 
  427. wp_enqueue_script( 'prettyPhoto', get_template_directory_uri().'/plugins/jquery.prettyPhoto.js', array( 'jquery' ), '3.1.5', true ); 
  428. wp_enqueue_script( 'onetone-default', get_template_directory_uri().'/js/onetone.js', array( 'jquery' ), $theme_info->get( 'Version' ), true ); 
  429.  
  430. if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {wp_enqueue_script( 'comment-reply' );} 
  431.  
  432. $slide_time = onetone_option("slide_time"); 
  433. $slide_time = is_numeric($slide_time)?$slide_time:"5000"; 
  434.  
  435. $isMobile = 0; 
  436. if( $detect->isMobile() && !$detect->isTablet() ) { 
  437. $isMobile = 1; 
  438.  
  439. $sticky_header = esc_attr(onetone_option('enable_sticky_header', 'yes')); 
  440.  
  441.  
  442.  
  443.  
  444. wp_localize_script( 'onetone-default', 'onetone_params', array( 
  445. 'ajaxurl' => admin_url('admin-ajax.php'),  
  446. 'themeurl' => get_template_directory_uri(),  
  447. 'slideSpeed' => $slide_time,  
  448. 'sticky_header' => $sticky_header,  
  449. 'isMobile' =>$isMobile,  
  450. 'primary_color' => $primary_color,  
  451.  
  452. ) ); 
  453.