function init() { if (fastfood_is_mobile()) { return; } //Infinite Scroll if (Jetpack::is_module_active('infinite-scroll')) { //nop } //Sharedaddy if (Jetpack::is_module_active('sharedaddy')) { remove_filter('the_content', 'sharing_display', 19); remove_filter('the_excerpt', 'sharing_display', 19); add_action('fastfood_hook_entry_bottom', array($this, 'sharedaddy')); } //Carousel if (Jetpack::is_module_active('carousel')) { //nop } //Likes if (Jetpack::is_module_active('likes')) { add_action('fastfood_hook_entry_bottom', array($this, 'likes')); remove_filter('the_content', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); add_filter('fastfood_filter_likes', array(Jetpack_Likes::init(), 'post_likes'), 30, 1); } }
function init() { if (is_admin() || fastfood_is_mobile() || fastfood_is_printpreview()) { return; } if (!FastfoodOptions::get_opt('fastfood_cust_comrep') || !FastfoodOptions::get_opt('fastfood_jsani')) { add_action('comment_form_before', array($this, 'load_standard_scripts')); } else { add_action('comment_form_before', array($this, 'load_custom_scripts')); add_action('comment_form_after', array($this, 'hide_form')); } }
/** * Prepare the hooks * * @since Fastfood 0.37 */ function hooks() { if (fastfood_is_mobile()) { return; } add_action('fastfood_hook_body_bottom', array($this, 'the_fixed_footer')); if (FastfoodOptions::get_opt('fastfood_qbar')) { add_action('fastfood_hook_fixed_footer', array($this, 'the_quickbar')); } if (FastfoodOptions::get_opt('fastfood_statusbar')) { add_action('fastfood_hook_fixed_footer', array($this, 'the_statusbar')); } if (FastfoodOptions::get_opt('fastfood_navbuttons')) { add_action('fastfood_hook_fixed_footer', array($this, 'the_navbuttons')); } }
function header_style_front() { if (fastfood_is_mobile()) { return; } if ('blank' == get_header_textcolor()) { $style = 'display: none;'; } else { $style = 'color: #' . get_header_textcolor() . ';'; } $header_text_background = ltrim(get_theme_mod('header_text_background', 'transparent'), '#'); $header_text_background_rgba = $header_text_background; $filter = ''; if ($header_text_background_rgba && 'transparent' != $header_text_background_rgba) { $header_text_background_rgba = fastfood_hex2rgb($header_text_background_rgba); $header_text_background_rgba = vsprintf('rgba( %1$s, %2$s, %3$s, 0.7)', $header_text_background_rgba); $filter = "filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b3{$header_text_background}', endColorstr='#b3{$header_text_background}',GradientType=0 ); /* IE6-9 */"; } ?> <style type="text/css"> #site-heading a, #site-heading { <?php echo $style; ?> } #site-image { max-height: <?php echo absint(FastfoodOptions::get_opt('fastfood_head_h')); ?> px; } .has-header-image #site-heading { background-color: <?php echo $header_text_background_rgba; ?> ; <?php echo $filter; ?> } </style> <?php }
function fastfood_scripts() { if (is_admin() || fastfood_is_mobile() || fastfood_is_printpreview() || !FastfoodOptions::get_opt('fastfood_jsani')) { return; } //no scripts in admin, print preview, mobile view //tinynav script if (FastfoodOptions::get_opt('fastfood_tinynav')) { wp_enqueue_script('tinynav', fastfood_get_minified('%1$s/js/tinynav/tinynav%2$s.js'), array('jquery'), fastfood_get_info('version'), true); } $deps = array('jquery', 'jquery-effects-core', 'hoverIntent'); if (FastfoodOptions::get_opt('fastfood_gallery_preview')) { $deps[] = 'thickbox'; } wp_enqueue_script('fastfood', fastfood_get_minified('%1$s/js/fastfood%2$s.js'), $deps, fastfood_get_info('version'), true); }