function load_custom_scripts() { if (!get_option('thread_comments')) { return; } wp_enqueue_script('fastfood-comment-reply', fastfood_get_minified('%1$s/js/comment-reply%2$s.js'), array('jquery-ui-draggable', 'hoverIntent'), fastfood_get_info('version'), true); $data = array('replytopost' => esc_attr(__('Leave a comment', 'fastfood')), 'replytocomment' => esc_attr(__('Reply to Comment', 'fastfood')), 'close' => esc_attr(__('Close', 'fastfood'))); wp_localize_script('fastfood-comment-reply', '_fastfoodCommentReplyL10n', $data); }
/** * Display the featured content * * @since Fastfood 0.37 */ function featured_content() { global $post; if (!$this->is_active) { return; } $featured_posts = apply_filters('fastfood_get_featured_posts', array()); if (!(bool) $featured_posts) { return; } ?> <div id="featured-content" class="featured-content"> <div class="featured-content-inner viewport"> <div class="overview"> <?php /** * Fires before the Twenty Fourteen featured content. * * @since Twenty Fourteen 1.0 */ do_action('fastfood_featured_posts_before'); foreach ((array) $featured_posts as $order => $post) { setup_postdata($post); // Include the featured content template. get_template_part('post', 'featured'); } /** * Fires after the Twenty Fourteen featured content. * * @since Twenty Fourteen 1.0 */ do_action('fastfood_featured_posts_after'); wp_reset_postdata(); ?> </div> </div> <div class="featured-label"><?php echo esc_html(FastfoodOptions::get_opt('fastfood_featured_content_label')); ?> </div> <div class="featured-navigation"> <ul class="bullets"> <?php for ($i = 0; $i < count($featured_posts); $i++) { echo '<li><a data-slide="' . $i . '" class="bullet" href="#"><i class="el-icon-stop"></i></a></li>'; } ?> </ul> </div> </div><!-- #featured-content .featured-content --> <?php if (count($featured_posts) === 1) { return; } wp_enqueue_script('tinycarousel', fastfood_get_minified('%1$s/js/tinycarousel/jquery.tinycarousel%2$s.js'), array('jquery'), '2.1.8', true); add_filter('fastfood_scripts_l10n', array($this, 'localize_script')); ?> <?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); }
function widget($args, $instance) { extract($args); echo $before_widget; echo '<a class="fontresizer-minus" href="javascript:void(0)" title="' . esc_attr(__('Decrease font size', 'fastfood')) . '">-</a> '; echo '<a class="fontresizer-reset" href="javascript:void(0)" title="' . esc_attr(__('Reset font size', 'fastfood')) . '">' . esc_html__('A', 'fastfood') . '</a> '; echo '<a class="fontresizer-plus" href="javascript:void(0)" title="' . esc_attr(__('Increase font size', 'fastfood')) . '">+</a> '; echo $after_widget; wp_enqueue_script('fastfood-font-resize', fastfood_get_minified('%1$s/js/font-resize%2$s.js'), array('jquery'), '', true); }