function __construct($background_parameters) { // save a local copy $this->background_parameters = $background_parameters; // bg click ad td_js_buffer::add_variable('td_ad_background_click_link', stripslashes($this->background_parameters['td_ad_background_click_link'])); // the slashes are added by wp in the panel submit td_js_buffer::add_variable('td_ad_background_click_target', $this->background_parameters['td_ad_background_click_target']); // add the css if needed - the css knows about the stretched background! if ($this->background_parameters['theme_bg_image'] != '' or $this->background_parameters['theme_bg_color'] != '') { td_css_buffer::add_to_header($this->add_css_custom_background()); } // add the js if needed - needed only for stretch background if (!empty($this->background_parameters['theme_bg_image']) and $this->background_parameters['is_stretched_bg'] == true) { td_js_buffer::add_to_footer($this->add_js_hook()); } // here we manipulate the body_class-es, we remove the WordPress ones and add our own + boxed version class add_filter('body_class', array($this, 'add_slug_to_body_class')); }
/** --------------------------------------------------------------------------- * front end user compiled css @see td_css_generator.php */ function td_include_user_compiled_css() { if (!is_admin()) { // add the global css compiler td_css_buffer::add_to_header(PHP_EOL . '/* Style generated by theme (global compiled style) */' . PHP_EOL); if (TD_DEPLOY_MODE == 'dev') { // get it live td_css_buffer::add_to_header(td_css_generator()); } else { // get it from the cache - do not compile at runtime td_css_buffer::add_to_header(td_util::get_option('tds_user_compile_css')); } // add the demo specific css compiler $demo_state = get_option(TD_THEME_NAME . '_demo_state'); // get the current loaded demo if (isset($demo_state['demo_id'])) { $demo_id = $demo_state['demo_id']; if (td_global::$demo_list[$demo_id]['td_css_generator_demo'] === true) { require_once td_global::$demo_list[$demo_id]['folder'] . 'td_css_generator_demo.php'; td_css_buffer::add_to_header(PHP_EOL . PHP_EOL . PHP_EOL . '/* Style generated by theme for demo: ' . $demo_id . ' */' . PHP_EOL); td_css_buffer::add_to_header(td_css_demo_gen()); } } } }
/** --------------------------------------------------------------------------- * front end user compiled css @see td_css_generator.php */ function td_include_user_compiled_css() { if (!is_admin()) { td_css_buffer::add_to_header(td_util::get_option('tds_user_compile_css')); } }