/**
  * Prints HTML with meta information for the current post-date/time and author.
  */
 function square_posted_on()
 {
     $time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
     if (get_the_time('U') !== get_the_modified_time('U')) {
         $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
     }
     $time_string = sprintf($time_string, esc_attr(get_the_date('c')), esc_html(get_the_date()), esc_attr(get_the_modified_date('c')), esc_html(get_the_modified_date()));
     $posted_on = sprintf(esc_html_x('%s', 'post date', 'square'), '<a href="' . esc_url(get_permalink()) . '" rel="bookmark">' . $time_string . '</a>');
     $byline = sprintf(esc_html_x('by %s', 'post author', 'square'), '<span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '">' . esc_html(get_the_author()) . '</a></span>');
     $comment_count = get_comments_number();
     // get_comments_number returns only a numeric value
     if (comments_open()) {
         if ($comment_count == 0) {
             $comments = __('No Comments', 'square');
         } elseif ($comment_count > 1) {
             $comments = $comment_count . __(' Comments', 'square');
         } else {
             $comments = __('1 Comment', 'square');
         }
         $comment_link = '<a href="' . get_comments_link() . '">' . $comments . '</a>';
     } else {
         $comment_link = __(' Comment Closed', 'square');
     }
     echo '<span class="posted-on"><i class="fa fa-clock-o"></i>' . $posted_on . '</span><span class="byline"> ' . $byline . '</span><span class="comment-count"><i class="fa fa-comments-o"></i>' . $comment_link . "</span>";
     // WPCS: XSS OK.
 }
Example #2
0
/**
 * Register jQuery scripts and 
 * CSS Styles only for the front-end
 *
 * @package Magzilla
 * @since 	Magzilla 1.0
**/
function fave_theme_scripts()
{
    global $ft_option;
    /**
     * Register CSS styles
     */
    wp_register_style('fave-owl.carousel.all.min', get_template_directory_uri() . '/css/owl.carousel.all.min.css', array(), '2.0.0', 'all');
    wp_register_style('fave-bootstrap.min', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '', 'all');
    wp_register_style('fave-bootstrap-theme.min', get_template_directory_uri() . '/css/bootstrap-theme.min.css', array(), '', 'all');
    wp_register_style('fave-font-awesome.min', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.5.0', 'all');
    wp_register_style('fave-jquery.jscrollpane', get_template_directory_uri() . '/css/jquery.jscrollpane.css', array(), '', 'all');
    wp_register_style('fave-magnific-popup', get_template_directory_uri() . '/css/magnific-popup.css', array(), '1.0.0', 'all');
    wp_register_style('fave-main', get_template_directory_uri() . '/css/main.css', array(), '', 'all');
    wp_register_style('fave-options', get_template_directory_uri() . '/css/options.css', array(), '', 'all');
    wp_enqueue_style('fave-bootstrap.min');
    wp_enqueue_style('fave-bootstrap-theme.min');
    wp_enqueue_style('fave-font-awesome.min');
    wp_enqueue_style('fave-jquery.jscrollpane');
    wp_enqueue_style('fave-owl.carousel.all.min');
    wp_enqueue_style('fave-magnific-popup');
    wp_enqueue_style('fave-main');
    wp_enqueue_style('fave-options');
    wp_enqueue_style('style', get_stylesheet_uri(), array(), '1', 'all');
    if (is_rtl()) {
        wp_enqueue_style('magzilla-rtl', get_template_directory_uri() . "/css/rtl.css", array(), '1', 'screen');
    }
    wp_enqueue_script('fave-bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), THEME_VERSION, true);
    wp_enqueue_script('fave-plugins', get_template_directory_uri() . '/js/plugins.js', array('jquery'), THEME_VERSION, true);
    wp_enqueue_script('fave-custom.min', get_template_directory_uri() . '/js/custom.min.js', array('jquery'), THEME_VERSION, true);
    if ((is_singular('post') || is_singular('gallery') || is_singular('video')) && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #3
0
 /**
  * Prints HTML with meta information for the current post-date/time, author, comment count and categories.
  */
 function ultra_posted_on()
 {
     echo '<div class="entry-meta-inner">';
     if (is_sticky() && is_home() && !is_paged()) {
         echo '<span class="featured-post">' . __('Sticky', 'ultra') . '</span>';
     }
     if (is_home() && siteorigin_setting('blog_post_date') || is_archive() && siteorigin_setting('blog_post_date') || is_search() && siteorigin_setting('blog_post_date')) {
         echo '<span class="entry-date"><a href="' . esc_url(get_permalink()) . '" rel="bookmark"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span></a>';
     }
     if (is_single() && siteorigin_setting('blog_post_date')) {
         echo '<span class="entry-date"><time class="published" datetime="' . esc_attr(get_the_date('c')) . '">' . esc_html(get_the_date('j F Y')) . '</time><time class="updated" datetime="' . esc_attr(get_the_modified_date('c')) . '">' . esc_html(get_the_modified_date()) . '</time></span>';
     }
     if (siteorigin_setting('blog_post_author')) {
         echo '<span class="byline"><span class="author vcard"><a class="url fn n" href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" rel="author">' . esc_html(get_the_author()) . '</a></span></span>';
     }
     if (comments_open() && siteorigin_setting('blog_post_comment_count')) {
         echo '<span class="comments-link">';
         comments_popup_link(__('Leave a comment', 'ultra'), __('1 Comment', 'ultra'), __('% Comments', 'ultra'));
         echo '</span>';
     }
     echo '</div>';
     if (is_single() && siteorigin_setting('navigation_post_nav')) {
         the_post_navigation($args = array('prev_text' => '', 'next_text' => ''));
     }
 }
/**
 * Register jquery scripts
 */
function spacious_scripts_styles_method()
{
    /**
     * Loads our main stylesheet.
     */
    wp_enqueue_style('spacious_style', get_stylesheet_uri());
    if (of_get_option('spacious_color_skin', 'light') == 'dark') {
        wp_enqueue_style('spacious_dark_style', SPACIOUS_CSS_URL . '/dark.css');
    }
    /**
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    /**
     * Register JQuery cycle js file for slider.
     */
    wp_register_script('jquery_cycle', SPACIOUS_JS_URL . '/jquery.cycle.all.min.js', array('jquery'), '2.9999.5', true);
    //   wp_register_style( 'google_fonts', 'http://fonts.googleapis.com/css?family=Lato' );
    /**
     * Enqueue Slider setup js file.	 
     */
    if (is_home() || is_front_page() && of_get_option('spacious_activate_slider', '0') == '1') {
        wp_enqueue_script('spacious_slider', SPACIOUS_JS_URL . '/spacious-slider-setting.js', array('jquery_cycle'), false, true);
    }
    wp_enqueue_script('spacious-navigation', SPACIOUS_JS_URL . '/navigation.js', array('jquery'), false, true);
    wp_enqueue_script('spacious-custom', SPACIOUS_JS_URL . '/spacious-custom.js', array('jquery'));
    wp_enqueue_style('google_fonts');
    $spacious_user_agent = strtolower($_SERVER['HTTP_USER_AGENT']);
    if (preg_match('/(?i)msie [1-8]/', $spacious_user_agent)) {
        wp_enqueue_script('html5', SPACIOUS_JS_URL . '/html5.js', true);
    }
}
function localedge_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // modernizr (without media query polyfill)
    wp_enqueue_script('localedge-modernizr', '//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js', false, null);
    // respondjs
    wp_enqueue_script('localedge-respondjs', '//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.js', false, null);
    // register main stylesheet
    wp_enqueue_style('localedge-stylesheet', get_stylesheet_directory_uri() . '/css/style.css', array(), '', 'all');
    // ie-only style sheet
    wp_enqueue_style('localedge-ie-only', get_stylesheet_directory_uri() . '/css/ie.css', array(), '');
    $wp_styles->add_data('localedge-ie-only', 'conditional', 'lt IE 9');
    // add conditional wrapper around ie stylesheet
    //Magnific Popup (LightBox)
    wp_enqueue_script('localedge-magnific-popup-js', '//cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/0.9.9/jquery.magnific-popup.min.js', array('jquery'), '0.9.9', true);
    //Font Awesome (icon set)
    wp_enqueue_style('localedge-font-awesome', '//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3');
    // iCheck (better radio and checkbox inputs)
    wp_enqueue_script('localedge-icheck', '//cdnjs.cloudflare.com/ajax/libs/iCheck/1.0.1/icheck.min.js', array('jquery'), '1.0.1', true);
    //Chosen - http://harvesthq.github.io/chosen/
    wp_enqueue_script('chosen-js', '//cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.jquery.min.js', array('jquery'), '1.1.0', true);
    // comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
    //adding scripts file in the footer
    wp_enqueue_script('localedge-js', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), '', true);
}
 public function widget($args, $instance)
 {
     if (!is_singular()) {
         return;
     }
     $the_id = get_the_ID();
     if (!comments_open($the_id)) {
         return;
     } else {
         $html = $args['before_widget'];
         if (!empty($instance['title'])) {
             $html .= $args['before_title'] . apply_filters('widget_title', $instance['title']) . $args['after_title'];
         }
         $api_url = esc_url(home_url('/')) . 'wp-json/wp/v2/comments';
         $author = __('NAME:', 'rest-api-widgets');
         $mailaddress = __('MAIL:', 'rest-api-widgets');
         $content = __('COMMENTS:', 'rest-api-widgets');
         $send_btn = __('SEND', 'rest-api-widgets');
         $success_text = __('Success! Reload now.', 'rest-api-widgets');
         $fail_text = __('Fail :(', 'rest-api-widgets');
         $html .= "<form action={$api_url} method='post' id='rest-api-widgets-comment'>";
         $html .= '<dl>';
         $html .= "<dt>{$author}</dt><dd><input name='author_name' value=''></dd>";
         $html .= "<dt>{$mailaddress}</dt><dd><input name='author_email' value=''></dd>";
         $html .= "<dt>{$content}</dt><dd><textarea name='content' id=' cols='30' rows='10'></textarea></dd>";
         $html .= '</dl>';
         $html .= "<input type='hidden' name='post' value='{$the_id}'>";
         $html .= "<input type='hidden' name='success_text' value='{$success_text}'>";
         $html .= "<input type='hidden' name='fail_text' value='{$fail_text}'>";
         $html .= "<button>{$send_btn}</button>";
         $html .= '</form>';
     }
     echo $html . $args['after_widget'];
 }
Example #7
0
function comments()
{
    // If comments are open or we have at least one comment, load up the comment template.
    if (comments_open() || get_comments_number()) {
        comments_template();
    }
}
Example #8
0
/**
 * Enqueue scripts and styles.
 */
function _s_scripts()
{
    /**
     * If WP is in script debug, or we pass ?script_debug in a URL - set debug to true.
     */
    $debug = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG == true || isset($_GET['script_debug']) ? true : false;
    /**
     * If we are debugging the site, use a unique version every page load so as to ensure no cache issues.
     */
    $version = '1.0.0';
    /**
     * Should we load minified scripts? Also enqueue live reload to allow for extensionless reloading.
     */
    $suffix = '.min';
    if (true === $debug) {
        $suffix = '';
        wp_enqueue_script('live-reload', '//localhost:35729/livereload.js', array(), $version, true);
    }
    wp_enqueue_style('_s-google-font', _s_font_url(), array(), null);
    wp_enqueue_style('_s-style', get_stylesheet_directory_uri() . '/style' . $suffix . '.css', array(), $version);
    wp_enqueue_script('_s-project', get_template_directory_uri() . '/assets/js/project' . $suffix . '.js', array('jquery'), $version, true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #9
0
/**
 * Scripts and stylesheets
 *
 * Enqueue stylesheets in the following order:
 * 1. /theme/assets/css/main.css
 *
 * Enqueue scripts in the following order:
 * 1. jquery-1.11.1.min.js via Google CDN
 * 2. /theme/assets/js/vendor/modernizr.min.js
 * 3. /theme/assets/js/scripts.js (in footer)
 *
 * Google Analytics is loaded after enqueued scripts if:
 * - An ID has been defined in config.php
 * - You're not logged in as an administrator
 */
function roots_scripts()
{
    /**
     * The build task in Grunt renames production assets with a hash
     * Read the asset names from assets-manifest.json
     */
    if (WP_ENV === 'development') {
        $assets = array('css' => '/assets/css/main.css', 'js' => '/assets/js/scripts.js', 'modernizr' => '/assets/vendor/modernizr/modernizr.js', 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js');
    } else {
        $get_assets = file_get_contents(get_template_directory() . '/assets/manifest.json');
        $assets = json_decode($get_assets, true);
        $assets = array('css' => '/assets/css/main.min.css' . '?' . $assets['assets/css/main.min.css']['hash'], 'js' => '/assets/js/scripts.min.js' . '?' . $assets['assets/js/scripts.min.js']['hash'], 'modernizr' => '/assets/js/vendor/modernizr.min.js', 'jquery' => '//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js');
    }
    wp_enqueue_style('roots_css', get_template_directory_uri() . $assets['css'], false, null);
    /**
     * jQuery is loaded using the same method from HTML5 Boilerplate:
     * Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
     * It's kept in the header instead of footer to avoid conflicts with plugins.
     */
    if (!is_admin() && current_theme_supports('jquery-cdn')) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', $assets['jquery'], array(), null, false);
        add_filter('script_loader_src', 'roots_jquery_local_fallback', 10, 2);
    }
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('modernizr', get_template_directory_uri() . $assets['modernizr'], array(), null, false);
    wp_enqueue_script('jquery');
    wp_enqueue_script('roots_js', get_template_directory_uri() . $assets['js'], array(), null, true);
}
Example #10
0
 /**
  * Register the stylesheets for the public-facing side of the site.
  *
  * @since    1.0.0
  */
 public function enqueue_scripts()
 {
     wp_enqueue_script('platypuslocal-script', trailingslashit(get_template_directory_uri()) . 'assets/public/js/main.js', array('jquery'), false, true);
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
 }
Example #11
0
    function airballoon_display_postmeta()
    {
        ?>
		
		<span class="meta-date">
		<?php 
        printf('<a href="%1$s" title="%2$s" rel="bookmark"><time datetime="%3$s">%4$s</time></a>', esc_url(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_date('c')), esc_html(get_the_date()));
        ?>
		</span>
		<span class="meta-author">
		<?php 
        printf('<a href="%1$s" title="%2$s" rel="author">%3$s</a>', esc_url(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'airballoon-lite'), get_the_author())), get_the_author());
        ?>
		</span>
		
	<?php 
        if (comments_open()) {
            ?>
			<span class="meta-comments">
				<?php 
            comments_popup_link(__('Leave a comment', 'airballoon-lite'), __('One comment', 'airballoon-lite'), __('% comments', 'airballoon-lite'));
            ?>
			</span>
<?php 
        }
        edit_post_link(__('Edit Post', 'airballoon-lite'));
    }
Example #12
0
/**
 * Enqueue scripts and styles for front-end.
 */
function twentytwelve_scripts_styles()
{
    global $wp_styles;
    /*
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    // Adds JavaScript for handling the navigation menu hide-and-show behavior.
    wp_enqueue_script('twentytwelve-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true);
    $font_url = twentytwelve_get_font_url();
    if (!empty($font_url)) {
        wp_enqueue_style('twentytwelve-fonts', esc_url_raw($font_url), array(), null);
    }
    // Loads our main stylesheet.
    wp_enqueue_style('twentytwelve-style', get_stylesheet_uri());
    // Loads the Flexslider
    wp_enqueue_style('twentytwelve-flex', get_template_directory_uri() . '/css/flexslider.css', array('twentytwelve-style'), '20121010');
    // Loads the Colorbox
    wp_enqueue_style('twentytwelve-color', get_template_directory_uri() . '/css/colorbox.css', array('twentytwelve-style'), '20121010');
    // Loads the Internet Explorer specific stylesheet.
    wp_enqueue_style('twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array('twentytwelve-style'), '20121010');
    $wp_styles->add_data('twentytwelve-ie', 'conditional', 'lt IE 9');
}
Example #13
0
function joints_scripts_and_styles()
{
    global $wp_styles;
    // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    if (!is_admin()) {
        $theme_version = wp_get_theme()->Version;
        // Removes WP version of jQuery
        wp_deregister_script('jquery');
        // Loads jQuery from bower_components
        wp_enqueue_script('jquery', get_template_directory_uri() . '/bower_components/foundation/js/vendor/jquery.js', array(), '2.1.3', true);
        // Modernizr from bower_components
        wp_enqueue_script('modernizr', get_template_directory_uri() . '/bower_components/foundation/js/vendor/modernizr.js', array(), '2.8.3', true);
        // Adding Foundation scripts file in the footer
        wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/min/foundation.min.js', array('jquery'), '', true);
        // Adding scripts file in the footer
        wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/min/scripts.min.js', array('jquery'), '', true);
        // Register main stylesheet
        wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all');
        // Register foundation icons
        // wp_enqueue_style( 'foundation-icons', get_template_directory_uri() . '/assets/css/icons/foundation-icons.css', array(), '3.0', 'all' );
        // Comment reply script for threaded comments
        if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
            wp_enqueue_script('comment-reply');
        }
    }
}
function tie_register()
{
    ## Register Main style.css file
    wp_register_style('tie-style', get_stylesheet_uri(), array(), '', 'all');
    wp_enqueue_style('tie-style');
    ## Register All Scripts
    wp_register_script('tie-scripts', get_template_directory_uri() . '/js/tie-scripts.js', array('jquery'), false, true);
    wp_register_script('tie-tabs', get_template_directory_uri() . '/js/tabs.min.js', array('jquery'), false, true);
    wp_register_script('tie-cycle', get_template_directory_uri() . '/js/jquery.cycle.all.js', array('jquery'), false, true);
    wp_register_script('tie-validation', get_template_directory_uri() . '/js/validation.js', array('jquery'), false, true);
    wp_register_script('tie-flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery'), false, true);
    ## Get Global Scripts
    wp_enqueue_script('tie-scripts');
    ## Register WooCommerce css file
    wp_register_style('tie-woocommerce', get_template_directory_uri() . '/css/woocommerce.css', array(), '', 'all');
    if (class_exists('Woocommerce')) {
        wp_enqueue_style('tie-woocommerce');
    }
    ## Get Validation Script
    if (tie_get_option('comment_validation') && (is_page() || is_single()) && comments_open()) {
        wp_enqueue_script('tie-validation');
    }
    ## For facebook & Google + share
    if (is_singular() && tie_get_option('post_og_cards') && (!function_exists('bp_current_component') || function_exists('bp_current_component') && !bp_current_component())) {
        tie_og_data();
    }
}
Example #15
0
function themonic_scripts_styles()
{
    global $wp_styles;
    /*
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    /*
     * Adds Selectnav.js JavaScript for handling the navigation menu and creating a select based navigation for reposive layout.
     */
    wp_enqueue_script('themonic-mobile-navigation', get_template_directory_uri() . '/js/selectnav.js', array(), '1.0', true);
    /*
         * Loads the awesome readable ubuntu font CSS file for Iconic One.
    */
    if ('off' !== _x('on', 'Ubuntu font: on or off', 'themonic')) {
        $subsets = 'latin,latin-ext';
        $protocol = is_ssl() ? 'https' : 'http';
        $query_args = array('family' => 'Ubuntu:400,700', 'subset' => $subsets);
        wp_enqueue_style('themonic-fonts', add_query_arg($query_args, "{$protocol}://fonts.googleapis.com/css"), array(), null);
    }
    /*
     * Loads Themonic's main stylesheet and the custom stylesheet.
     */
    wp_enqueue_style('themonic-style', get_stylesheet_uri());
    wp_enqueue_style('custom-style', get_template_directory_uri() . '/custom.css');
    /*
     * Loads the Internet Explorer specific stylesheet.
     */
    wp_enqueue_style('themonic-ie', get_template_directory_uri() . '/css/ie.css', array('themonic-style'), '20130305');
    $wp_styles->add_data('themonic-ie', 'conditional', 'lt IE 9');
}
function site_scripts()
{
    global $wp_styles;
    // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // Removes WP version of jQuery
    wp_deregister_script('jquery');
    // Load jQuery files in header - load in header to avoid issues with plugins
    wp_enqueue_script('jquery', get_template_directory_uri() . '/vendor/jquery/dist/jquery.min.js', array(), '', true);
    // Load What-Input files in footer
    wp_enqueue_script('what-input', get_template_directory_uri() . '/vendor/what-input/what-input.min.js', array(), '', true);
    // Adding Foundation scripts file in the footer
    wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/foundation.min.js', array('jquery'), '6.0', true);
    // Adding scripts file in the footer
    wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
    // Register main stylesheet
    wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.min.css', array(), '', 'all');
    // Register custom stylesheet
    wp_enqueue_style('dragoncove-css', get_template_directory_uri() . '/assets/css/dragoncove-style.css', array(), '', 'all');
    // Register custom stylesheet
    wp_enqueue_style('dragoncove-woocommerce-css', get_template_directory_uri() . '/assets/css/dragoncove-woocommerce.css', array(), '', 'all');
    // Comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
}
Example #17
0
function bones_scripts_and_styles()
{
    global $wp_styles;
    // call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    if (!is_admin()) {
        // modernizr and main stylesheets
        wp_register_script('bones-modernizr', get_stylesheet_directory_uri() . '/assets/js/libs/modernizr.custom.min.js', array(), '2.5.3', false);
        wp_register_style('bones-stylesheet', get_stylesheet_directory_uri() . '/assets/css/style.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-css', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.carousel.min.css', array(), '', 'all');
        wp_register_style('bones-owlcarousel-theme', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/assets/owl.theme.default.min.css', array(), '', 'all');
        wp_register_style('bones-ie-only', get_stylesheet_directory_uri() . '/assets/css/ie.min.css', array(), '');
        // comment reply script for threaded comments
        if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
            wp_enqueue_script('comment-reply');
        }
        //adding scripts file in the footer
        wp_register_script('bones-js', get_stylesheet_directory_uri() . '/assets/js/scripts.js', array('jquery'), '', true);
        wp_register_script('bones-quickshare', get_stylesheet_directory_uri() . '/assets/vendor/quickshare/dist/quickshare.min.js', array('jquery'), '', true);
        wp_register_script('bones-owlcarousel-js', get_stylesheet_directory_uri() . '/assets/vendor/owl.carousel/dist/owl.carousel.min.js', array('jquery'), '', true);
        wp_enqueue_script('bones-modernizr');
        wp_enqueue_style('bones-stylesheet');
        wp_enqueue_style('bones-owlcarousel-css');
        wp_enqueue_style('bones-owlcarousel-theme');
        wp_enqueue_style('bones-ie-only');
        $wp_styles->add_data('bones-ie-only', 'conditional', 'lt IE 9');
        // add conditional wrapper around ie stylesheet
        wp_enqueue_script('jquery');
        wp_enqueue_script('bones-js');
        wp_enqueue_script('bones-quickshare');
        wp_enqueue_script('bones-owlcarousel-js');
    }
}
Example #18
0
function barcelona_enqueue_scripts()
{
    wp_enqueue_script('jquery');
    if (!is_admin()) {
        $barcelona_post_id = NULL;
        if (is_singular()) {
            global $post;
            $barcelona_post_id = $post->ID;
        }
        /*
         * Enqueue Styles
         */
        $barcelona_font = barcelona_get_font();
        wp_register_style('barcelona-font', esc_url($barcelona_font[0]));
        wp_enqueue_style('barcelona-font');
        wp_register_style('bootstrap', BARCELONA_THEME_PATH . 'assets/css/bootstrap.min.css', array(), '3.3.4');
        wp_enqueue_style('bootstrap');
        wp_register_style('font-awesome', BARCELONA_THEME_PATH . 'assets/css/font-awesome.min.css', array(), '4.4.0');
        wp_enqueue_style('font-awesome');
        wp_register_style('vs-preloader', BARCELONA_THEME_PATH . 'assets/css/vspreloader.min.css');
        wp_enqueue_style('vs-preloader');
        wp_register_style('owl-carousel', BARCELONA_THEME_PATH . 'assets/lib/owl-carousel/assets/owl.carousel.min.css', array(), '2.0.0');
        wp_enqueue_style('owl-carousel');
        wp_register_style('owl-theme', BARCELONA_THEME_PATH . 'assets/lib/owl-carousel/assets/owl.theme.default.min.css', array(), '2.0.0');
        wp_enqueue_style('owl-theme');
        wp_register_style('jquery-boxer', BARCELONA_THEME_PATH . 'assets/css/jquery.fs.boxer.min.css', array(), '3.3.0');
        wp_enqueue_style('jquery-boxer');
        wp_register_style('barcelona-stylesheet', BARCELONA_THEME_PATH . 'style.css', array(), BARCELONA_THEME_VERSION);
        wp_enqueue_style('barcelona-stylesheet');
        if (is_rtl()) {
            wp_register_style('barcelona-rtl', BARCELONA_THEME_PATH . 'assets/css/barcelona-rtl.css', array(), BARCELONA_THEME_VERSION);
            wp_enqueue_style('barcelona-rtl');
        }
        /*
         * Enqueue Scripts
         */
        wp_register_script('ie-html5', BARCELONA_THEME_PATH . 'assets/js/html5.js');
        wp_enqueue_script('ie-html5');
        wp_register_script('bootstrap', BARCELONA_THEME_PATH . 'assets/js/bootstrap.min.js', array('jquery'), '3.3.4', true);
        wp_enqueue_script('bootstrap');
        wp_register_script('retina-js', BARCELONA_THEME_PATH . 'assets/js/retina.min.js');
        wp_enqueue_script('retina-js');
        wp_register_script('picturefill', BARCELONA_THEME_PATH . 'assets/js/picturefill.min.js', array(), false, true);
        wp_enqueue_script('picturefill');
        wp_register_script('owl-carousel', BARCELONA_THEME_PATH . 'assets/lib/owl-carousel/owl.carousel.min.js', array('jquery'), '2.0.0', true);
        wp_enqueue_script('owl-carousel');
        wp_register_script('boxer', BARCELONA_THEME_PATH . 'assets/js/jquery.fs.boxer.min.js', array('jquery'), '3.3.0', true);
        wp_enqueue_script('boxer');
        if (is_active_widget(false, false, 'barcelona-gplus-box')) {
            wp_register_script('google-platform', esc_url('//apis.google.com/js/platform.js'), false, true);
            wp_enqueue_script('google-platform');
        }
        if (is_singular() && comments_open() && get_option('thread_comments')) {
            wp_enqueue_script('comment-reply');
        }
        wp_register_script('barcelona-main', BARCELONA_THEME_PATH . 'assets/js/barcelona-main.js', array('jquery'), BARCELONA_THEME_VERSION, true);
        wp_enqueue_script('barcelona-main');
        wp_localize_script('barcelona-main', 'barcelonaParams', array('ajaxurl' => esc_url(admin_url('admin-ajax.php')), 'post_id' => $barcelona_post_id, 'i18n' => array('login_to_vote' => esc_html__('Please login to vote!', 'barcelona'))));
    }
}
function cleansimplewhite_scripts()
{
    wp_enqueue_style('cleansimplewhite-style', get_stylesheet_uri(), array(), '1.4.2');
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #20
0
/**
 * Enqueue scripts and styles.
 */
function musik_scripts()
{
    wp_enqueue_style('musik-style', get_stylesheet_uri());
    wp_enqueue_script('musik-navigation', get_template_directory_uri() . '/js/navigation.js', array('jquery'), '', true);
    wp_enqueue_script('musik-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array('jquery'), '', true);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_style('animate', get_template_directory_uri() . '/assets/css/animate.css');
    wp_enqueue_style('font-awesome', get_template_directory_uri() . '/assets/css/font-awesome.min.css');
    wp_enqueue_style('simple-line-icons', get_template_directory_uri() . '/assets/css/simple-line-icons.css');
    wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css');
    wp_enqueue_style('app', get_template_directory_uri() . '/assets/css/app.css');
    wp_enqueue_style('font', get_template_directory_uri() . '/assets/css/font.css');
    wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '', true);
    wp_enqueue_script('app', get_template_directory_uri() . '/assets/js/app.js', array('jquery'), '', true);
    wp_enqueue_style('jplayer', get_template_directory_uri() . '/assets/js/jPlayer/jplayer.flat.css');
    wp_enqueue_script('jplayer', get_template_directory_uri() . '/assets/js/jPlayer/jquery.jplayer.min.js', array('jquery'), '', true);
    wp_enqueue_script('playlist', get_template_directory_uri() . '/assets/js/jPlayer/add-on/jplayer.playlist.min.js', array('jquery'), '', true);
    wp_enqueue_script('storage', get_template_directory_uri() . '/assets/js/jquery.storageapi.min.js', array('jquery'), '', true);
    wp_enqueue_script('player', get_template_directory_uri() . '/assets/js/player.js', array('jquery'), '', true);
    wp_enqueue_script('playlists', get_template_directory_uri() . '/assets/js/playlist.js', array('jquery'), '', true);
    wp_localize_script('player', 'ajax_object', array('ajaxurl' => admin_url('admin-ajax.php')), '', true);
    wp_enqueue_style('wp-mediaelement');
    wp_enqueue_script('wp-mediaelement', false, array('jquery'), false, true);
    wp_enqueue_script('tile', get_template_directory_uri() . '/assets/js/masonry/tiles.min.js', array('jquery'), '', true);
    wp_enqueue_script('tile-init', get_template_directory_uri() . '/assets/js/tile.js', array('jquery'), '', true);
    if (get_theme_mod('hide-loading') == 0) {
        wp_enqueue_script('nprogress', get_template_directory_uri() . '/assets/js/nprogress/nprogress.js', array('jquery'), '', true);
        wp_enqueue_style('nprogress', get_template_directory_uri() . '/assets/js/nprogress/nprogress.css');
        wp_enqueue_script('pjax', get_template_directory_uri() . '/assets/js/jquery.pjax.js', array('jquery'), '', true);
        wp_enqueue_script('pjaxinit', get_template_directory_uri() . '/assets/js/ajax.js', array('jquery'), '', true);
    }
}
Example #21
0
function site_scripts()
{
    global $wp_styles;
    // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
    // Load What-Input files in footer
    wp_enqueue_script('what-input', get_template_directory_uri() . '/vendor/what-input/what-input.min.js', array(), '', true);
    // Adding Foundation scripts file in the footer
    wp_enqueue_script('foundation-js', get_template_directory_uri() . '/assets/js/foundation.min.js', array('jquery'), '6.0', true);
    // Adding scripts file in the footer
    wp_enqueue_script('site-js', get_template_directory_uri() . '/assets/js/scripts.js', array('jquery', 'masonry'), '', true);
    // Adding scripts file in the footer
    wp_enqueue_script('slick', get_template_directory_uri() . '/assets/js/slick.min.js', array('jquery'), '', true);
    // Adding imagesLoaded
    wp_enqueue_script('imagesLoaded', get_template_directory_uri() . '/node_modules/imagesloaded/imagesloaded.pkgd.min.js', array('jquery'), '', true);
    // Adding Slick Nav
    wp_enqueue_script('slicknav', get_template_directory_uri() . '/assets/js/slicknav/dist/jquery.slicknav.min.js', array('jquery'), '', true);
    // Smooth Scroll
    wp_enqueue_script('smoscroll', get_template_directory_uri() . '/assets/js/jquery.smooth-scroll.min.js', array("jquery"), '3.3.2', true);
    // Register main stylesheet
    wp_enqueue_style('site-css', get_template_directory_uri() . '/assets/css/style.css', array(), '', 'all');
    // Register main stylesheet
    wp_enqueue_style('slicknav-css', get_template_directory_uri() . '/assets/css/slicknav.css', array(), '', 'all');
    // Register Foundation Icons
    wp_enqueue_style('icons', get_template_directory_uri() . '/assets/css/social_foundicons.css', array(), '', 'all');
    wp_enqueue_style('iconsie7', get_template_directory_uri() . '/assets/css/social_foundicons_ie7.css', array(), '', 'all');
    // Comment reply script for threaded comments
    if (is_singular() and comments_open() and get_option('thread_comments') == 1) {
        wp_enqueue_script('comment-reply');
    }
}
 /**
  * Front-end scripts
  */
 public function scripts()
 {
     if (is_admin() || WpvTemplates::is_login()) {
         return;
     }
     global $is_IE, $content_width;
     $theme_version = WpvFramework::get_version();
     $gmap_key = wpv_get_option('gmap_api_key');
     // modernizr should be on top
     wp_enqueue_script('modernizr', WPV_JS . 'modernizr.min.js');
     if (is_singular() && comments_open()) {
         wp_enqueue_script('comment-reply', false, false, false, true);
     }
     if ($is_IE) {
         // wp_enqueue_script( 'vamtam-respondjs', WPV_JS .'plugins/thirdparty/respond.min.js', array(), $theme_version, true); // only IE 8
         wp_enqueue_script('vamtam-selectivizr', WPV_JS . 'plugins/thirdparty/selectivizr.min.js', array(), $theme_version, true);
     }
     wp_enqueue_script('jquery-transit', WPV_JS . 'plugins/thirdparty/jquery.transit.min.js', array(), '0.9.9', true);
     wp_enqueue_script('jquery-match-height', WPV_JS . 'plugins/thirdparty/jquery.matchheight.min.js', array(), '0.5.1', true);
     wp_enqueue_script('jquery-bxslider', WPV_JS . 'plugins/thirdparty/jquery.bxslider.js', array(), '4.1.2', true);
     $all_js_path = WP_DEBUG || defined('SCRIPT_DEBUG') && SCRIPT_DEBUG || defined('WPV_SCRIPT_DEBUG') && WPV_SCRIPT_DEBUG ? 'all.js' : 'all.min.js';
     $all_js_deps = array('jquery', 'jquery-migrate', 'jquery-ui-core', 'jquery-effects-core', 'jquery-ui-widget', 'jquery-ui-accordion', 'jquery-ui-tabs', 'underscore', 'jquery-match-height', 'jquery-transit');
     wp_enqueue_script('vamtam-all', WPV_JS . $all_js_path, $all_js_deps, $theme_version, true);
     self::inject_dependency('wc-cart-fragments', 'vamtam-all');
     wp_register_script('vamtam-fastslider', WPV_JS . 'plugins/vamtam/jquery.fastslider.js', array('jquery', 'vamtam-all'), $theme_version, true);
     wp_register_script('vamtam-slider', WPV_JS . 'plugins/vamtam/jquery.vamtam.slider.js', array('jquery', 'vamtam-all'), $theme_version, true);
     wp_register_script('vamtam-portfolioslider', WPV_JS . 'plugins/vamtam/jquery.vamtam.portfolioslider.js', array('jquery', 'vamtam-slider'), $theme_version, true);
     $script_vars = array('content_width' => $content_width);
     if (!empty($gmap_key)) {
         $script_vars['gmap_api_key'] = $gmap_key;
     }
     wp_localize_script('vamtam-all', 'WPV_FRONT', $script_vars);
 }
Example #23
0
/**
 * Enqueue scripts
 */
function mb_scripts()
{
    wp_enqueue_style('_mbbasetheme-style', get_stylesheet_uri());
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #24
0
/**
 * Enqueue scripts and styles.
 */
function jbaths_scripts()
{
    $theme = wp_get_theme();
    // wtf
    wp_enqueue_style('wtf-forms', get_template_directory_uri() . '/css/wtf-forms.css', array(), '2.2.0');
    // and then
    wp_enqueue_style('jbaths', get_stylesheet_uri(), array(), $theme->Version . '.1');
    // store locator plus - specialty css
    if (is_page('find-a-showroom')) {
        wp_enqueue_style('jbaths-slp', get_template_directory_uri() . '/css/slp-baths.css', array(), $theme->Version);
        // store locator plus
    }
    if (!is_admin()) {
        wp_register_script('jbaths.modernizr', get_stylesheet_directory_uri() . '/js/modernizr.min.js', array(), '2.8.3', true);
        wp_register_script('jquery.cookie', get_stylesheet_directory_uri() . '/js/jquery.cookie.js', array('jquery'), $theme->Version);
        wp_register_script('scrollupforwhat', get_stylesheet_directory_uri() . '/js/jquery.scrollupforwhat.min.js', array('jquery'), '1.2', true);
        wp_register_script('matchHeight', get_template_directory_uri() . '/js/jquery.matchHeight.js', array('jquery'), '0.5.2', true);
        $jbaths_deps = array('jquery', 'jbaths.modernizr', 'jquery.cookie', 'scrollupforwhat', 'matchHeight');
        if (is_singular('bathtubs') || is_singular('faucets')) {
            if (get_option('ultimate_row') == "enable") {
                //$jbaths_deps[] = 'ultimate-row-bg';
            }
        }
        wp_enqueue_script('jbaths', get_template_directory_uri() . '/js/baths.js', $jbaths_deps, '20140718', true);
    }
    wp_enqueue_script('skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);
    // Omniture SiteCatalyst
    wp_enqueue_script('sitecatalyst', get_template_directory_uri() . '/js/s_code.js', array(), $theme->Version, true);
    if (is_singular('post') && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #25
0
/**
 * Enqueue scripts and stylesheets
 *
 * Enqueue stylesheets in the following order:
 * 1. /theme/assets/css/main.min.css
 *
 * Enqueue scripts in the following order:
 * 1. jquery-1.11.0.min.js via Google CDN
 * 2. /theme/assets/js/vendor/modernizr-2.7.2.min.js
 * 3. /theme/assets/js/main.min.js (in footer)
 */
function alfath_scripts()
{
    wp_enqueue_style('alfath_main', get_template_directory_uri() . '/assets/css/main.min.css', false, '1.0.0');
    wp_enqueue_style('alfath_fa-icon', get_template_directory_uri() . '/assets/css/font-awesome.min.css', false, '4.0.3');
    wp_enqueue_style('alfath-icon', get_template_directory_uri() . '/assets/css/alfath-icon.min.css', false, '1.0.0');
    if (file_exists(get_template_directory() . '/assets/css/custom.css')) {
        wp_enqueue_style('alfath_custom', get_template_directory_uri() . '/assets/css/custom.css', array('alfath_main'), filemtime(get_template_directory() . '/assets/css/custom.css'), 'all');
    }
    // jQuery is loaded using the same method from HTML5 Boilerplate:
    // Grab Google CDN's latest jQuery with a protocol relative URL; fallback to local if offline
    // It's kept in the header instead of footer to avoid conflicts with plugins.
    if (!is_admin() && current_theme_supports('jquery-cdn')) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, null, false);
        add_filter('script_loader_src', 'alfath_jquery_local_fallback', 10, 2);
    }
    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_register_script('modernizr', get_template_directory_uri() . '/assets/js/vendor/modernizr-2.7.2.min.js', false, null, false);
    wp_register_script('jquery-migrate', get_template_directory_uri() . '/assets/js/vendor/jquery-migrate-1.2.1.min.js', array('jquery'), null, false);
    wp_register_script('alfath_scripts', get_template_directory_uri() . '/assets/js/scripts.min.js', false, '1.0.0', true);
    wp_enqueue_script('modernizr');
    wp_enqueue_script('jquery');
    wp_enqueue_script('jquery-migrate');
    wp_enqueue_script('alfath_scripts');
}
Example #26
0
 function kasa_of_register_js()
 {
     wp_enqueue_script('main', esc_url(get_template_directory_uri() . '/js/main.js'), array('jquery'), '1.0', true);
     if (is_singular() && comments_open() && get_option('thread_comments')) {
         wp_enqueue_script('comment-reply');
     }
 }
Example #27
0
/**
 * understrap enqueue scripts
 *
 * @package understrap
 */
function understrap_scripts()
{
    // wp_enqueue_style( 'understrap-theme', get_stylesheet_directory_uri() . '/css/theme.min.css', array(), '0.2.8', false );
    wp_enqueue_style('understrap-theme', get_stylesheet_directory_uri() . '/css/theme.css', array(), '0.2.8', false);
    // wp_enqueue_script('jquery');
    wp_enqueue_script('jquery', get_template_directory_uri() . '/js/jquery.js', array(), '2.1.4', false);
    wp_enqueue_script('understrap-navigation', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '20120206', true);
    wp_enqueue_script('understrap-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);
    // angular relations
    wp_enqueue_script('angular', get_template_directory_uri() . '/js/angular.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-ui-router', '//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.17/angular-ui-router.min.js', array(), '0.2.17', true);
    wp_enqueue_script('angular-animate', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-animate.js', array(), '1.4.9', true);
    wp_enqueue_script('angular-sanitize', '//ajax.googleapis.com/ajax/libs/angularjs/1.4.9/angular-sanitize.min.js', array(), '1.4.9', true);
    wp_enqueue_script('ui-bootstrap', '//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-1.1.2.js', array(), '1.1.2', true);
    // Angualr APP
    wp_enqueue_script('app', get_template_directory_uri() . '/js/app.js', array(), null, true);
    // Custom JS
    wp_enqueue_script('script', get_template_directory_uri() . '/js/script.js', array(), null, true);
    // NON SASS CSS
    wp_enqueue_style('animate', get_stylesheet_directory_uri() . '/css/animate.css', array(), '0.2.8', false);
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    if (is_active_sidebar('hero')) {
        wp_enqueue_style('understrap-carousel-style', get_template_directory_uri() . '/css/owl.carousel.css', array(), '20024', false);
        wp_enqueue_script('understrap-carousel-script', get_template_directory_uri() . '/js/owl.carousel.min.js', array(), '20024', true);
    }
}
/**
 * Enqueue scripts and styles for the theme.
 */
function fast_scripts()
{
    //LOAD style.css via filesystem. Uses Sass to ompile '/assets/scss/style.scss' to: 'styl.css'
    wp_enqueue_style('fast-sass', get_stylesheet_uri(), array(), '1.0.0');
    //LOAD jQuery.min.js via CDN JS
    wp_enqueue_script('fast-jquery', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), '1.0.0', true);
    //LOAD Boostrap.min.js via CDN JS
    wp_enqueue_script('fast-bootstrap', 'https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js', array(), '1.0.0', true);
    //LOAD navigation.js via filesystem
    wp_enqueue_script('fast-navigation', get_template_directory_uri() . '/assets/js/navigation.js', array(), '1.0.0', true);
    //LOAD fast-skip-link-focus.js via filesystem
    //wp_enqueue_script( 'fast-skip-link-focus-fix', get_template_directory_uri() . '/assets/js/skip-link-focus-fix.js', array(), '1.0.0', true );
    //LOAD instantclick.js via CDN JS
    wp_enqueue_script('fast-instantclick', 'https://cdnjs.cloudflare.com/ajax/libs/instantclick/3.0.1/instantclick.min.js', array(), '1.0.0', true);
    //CALL instant click into end of footer scripts, for init
    function call_instant_click()
    {
        echo '<script data-no-instant>InstantClick.init();</script>';
    }
    add_action('wp_footer', 'call_instant_click', 200);
    //load at end
    //IF IS singlular & comments are enabled, load comment-reply.js via filesystem
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
}
Example #29
0
/**
 * Enqueues scripts and styles for front-end.
 */
function smartadapt_scripts_styles()
{
    global $wp_styles;
    /*
     * Adds JavaScript to pages with the comment form to support
     * sites with threaded comments (when in use).
     */
    if (is_singular() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }
    wp_enqueue_script('modernizr-foundation', get_template_directory_uri() . '/js/foundation/modernizr.foundation.js', array('jquery'), '1.0', false);
    wp_enqueue_script('smartadapt-navigation', get_template_directory_uri() . '/js/foundation/jquery.foundation.navigation.js', array('jquery'), '1.0', true);
    wp_enqueue_script('foundation-buttons', get_template_directory_uri() . '/js/foundation/jquery.foundation.buttons.js', array('jquery'), '1.0', true);
    wp_enqueue_script('foundation-topbar', get_template_directory_uri() . '/js/foundation/jquery.foundation.topbar.js', array('jquery'), '1.0', true);
    wp_enqueue_script('foundation-tooltips', get_template_directory_uri() . '/js/foundation/jquery.foundation.tooltips.js', array('jquery'), '1.0', true);
    wp_enqueue_script('smartadapt-photoswipe-lib', get_template_directory_uri() . '/js/photoswipe/lib/klass.min.js', array('jquery'), '1.0', true);
    wp_enqueue_script('smartadapt-photoswipe', get_template_directory_uri() . '/js/photoswipe/code.photoswipe.jquery-3.0.5.min.js', array('jquery'), '1.0', true);
    wp_enqueue_script('smartadapt-flexslider', get_template_directory_uri() . '/js/flexslider/jquery.flexslider-min.js', array('jquery'), '1.0', false);
    wp_enqueue_script('smartadapt-responsive-tables', get_template_directory_uri() . '/js/responsive-tables.js', array('jquery'), '1.0', true);
    wp_enqueue_script('smartadapt-main', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0', false);
    /* Adds foundation app.js*/
    wp_enqueue_script('app-foundation', get_template_directory_uri() . '/js/foundation/app.js', array(), '1.0', true);
    /*register pinterest script*/
    wp_register_script('pinterest', '//assets.pinterest.com/js/pinit.js');
    /* Loads foundation stylesheet. */
    wp_enqueue_style('smartadapt-foundation', get_template_directory_uri() . '/css/foundation.min.css');
    /* Loads font stylesheet.*/
    wp_enqueue_style('smartadapt-font-icon', get_template_directory_uri() . '/font/css/font-awesome.min.css');
    wp_enqueue_style('smartadapt-photoswipe-css', get_stylesheet_directory_uri() . '/css/photoswipe/photoswipe.css', array('smartadapt-foundation'));
    wp_enqueue_style('smartadapt-flexslider', get_stylesheet_directory_uri() . '/css/flexslider/flexslider.css');
    /*load responsive tables css*/
    wp_enqueue_style('smartadapt-responsive-tables', get_stylesheet_directory_uri() . '/css/responsive-tables.css');
    /* Loads structure stylesheet. */
    wp_enqueue_style('smartadapt-structure', get_stylesheet_directory_uri() . '/style.css', array('smartadapt-foundation'));
}
Example #30
-1
 /**
  * Prints HTML with meta information for the categories, tags and comments.
  */
 function xmaps_entry_footer()
 {
     // Hide category and tag text for pages.
     if ('post' === get_post_type()) {
         /* translators: used between list items, there is a space after the comma */
         $categories_list = get_the_category_list(esc_html__(', ', 'xmaps'));
         if ($categories_list && xmaps_categorized_blog()) {
             printf('<span class="cat-links">' . esc_html__('Posted in %1$s', 'xmaps') . '</span>', $categories_list);
             // WPCS: XSS OK.
         }
         /* translators: used between list items, there is a space after the comma */
         $tags_list = get_the_tag_list('', esc_html__(', ', 'xmaps'));
         if ($tags_list) {
             printf('<span class="tags-links">' . esc_html__('Tagged %1$s', 'xmaps') . '</span>', $tags_list);
             // WPCS: XSS OK.
         }
     }
     if (!is_single() && !post_password_required() && (comments_open() || get_comments_number())) {
         echo '<span class="comments-link">';
         /* translators: %s: post title */
         comments_popup_link(sprintf(wp_kses(__('Leave a Comment<span class="screen-reader-text"> on %s</span>', 'xmaps'), array('span' => array('class' => array()))), get_the_title()));
         echo '</span>';
     }
     edit_post_link(sprintf(esc_html__('Edit %s', 'xmaps'), the_title('<span class="screen-reader-text">"', '"</span>', false)), '<span class="edit-link">', '</span>');
 }