本文整理汇总了PHP中wpcf7_enqueue_scripts函数的典型用法代码示例。如果您正苦于以下问题:PHP wpcf7_enqueue_scripts函数的具体用法?PHP wpcf7_enqueue_scripts怎么用?PHP wpcf7_enqueue_scripts使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wpcf7_enqueue_scripts函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: brianzotoole2_0_scripts
/**
* Enqueue scripts and styles.
*/
function brianzotoole2_0_scripts()
{
wp_enqueue_style('main', get_stylesheet_uri(), array(), '2.0');
//wp_enqueue_script( 'js', get_template_directory_uri() . '/js/instantclick.js', array(), '3.1.0', true );
//show contact form 7 plugin scripts, only on contact & donate pages...
if (is_page('home')) {
wpcf7_enqueue_scripts();
wpcf7_enqueue_styles();
}
//if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
// wp_enqueue_script( 'comment-reply' );
//}
}
示例2: my_contact_enqueue_scripts
function my_contact_enqueue_scripts()
{
wp_deregister_script('contact-form-7');
wp_deregister_style('contact-form-7');
if (is_page('contact' || 'home')) {
if (function_exists('wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
if (function_exists('wpcf7_enqueue_styles')) {
wpcf7_enqueue_styles();
}
}
}
示例3: vf_scripts
/**
* Enqueue scripts and styles.
*/
function vf_scripts()
{
wp_enqueue_style('sass', get_stylesheet_uri(), null, null);
//show contact form 7 plugin scripts, only on certain pages...
if (is_page('contact') || is_page('donate')) {
wpcf7_enqueue_scripts();
wpcf7_enqueue_styles();
}
//wp_enqueue_script('jquery');
wp_enqueue_script('site-scripts', get_template_directory_uri() . '/js/site.min.js', array(), '2.0.0', true);
//wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
//wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/vf.scripts.js', array(), false, true );
if (is_singular() && comments_open() && get_option('thread_comments')) {
//wp_enqueue_script( 'comment-reply' );
}
}
示例4: hitched_scripts
function hitched_scripts()
{
$js_dir = get_stylesheet_directory_uri() . '/js/src';
$deps = ['jquery', Site::prefix('stdlib')];
wp_register_script(Site::prefix('stdlib'), $js_dir . '/inc/stdlib.js', [], false, true);
wp_register_script(Site::prefix('slideshow'), $js_dir . '/inc/slideshow.js', [], false, true);
wp_register_script(Site::prefix('appointment-slider'), $js_dir . '/hitched/appointment-slider.js', [], false, true);
wp_register_script(Site::prefix('hitched'), $js_dir . '/hitched/hitched.js', [], false, true);
wp_register_script(Site::prefix('lightbox'), $js_dir . '/../dist/vendor/lightbox-plus-jquery.min.js', [], false, true);
if (is_page('sample-sale')) {
$deps[] = Site::prefix('lightbox');
}
if (is_front_page()) {
$deps[] = Site::prefix('slideshow');
}
foreach (['appointment-slider', 'hitched'] as $name) {
$deps[] = Site::prefix($name);
}
wp_localize_script(Site::prefix('hitched'), 'WP', ['HOME_URL' => get_option('home'), 'WP_URL' => get_option('siteurl'), 'AJAX_URL' => admin_url('admin-ajax.php'), 'LOADING_SPINNER_URL' => admin_url('images/loading.gif'), 'USER_ID' => wp_get_current_user()->ID]);
wpcf7_enqueue_scripts();
wp_enqueue_script(Site::prefix('main'), $js_dir . '/main.js', $deps, false, true);
}
示例5: wpcf7_do_enqueue_scripts
function wpcf7_do_enqueue_scripts()
{
if (wpcf7_load_js()) {
wpcf7_enqueue_scripts();
}
if (wpcf7_load_css()) {
wpcf7_enqueue_styles();
}
}
示例6: sensible_scripts
/**
* Enqueue scripts and styles.
*/
function sensible_scripts()
{
wp_enqueue_style('sass', get_stylesheet_uri(), array(), '2');
//wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/flexslider.css' );
//wp_enqueue_style( 'jPushMenu', get_template_directory_uri() . '/css/jPushMenu.css' );
//show contact form 7 plugin scripts, only on contact & donate pages...
if (is_page('contact') || is_page('donate')) {
wpcf7_enqueue_scripts();
wpcf7_enqueue_styles();
}
//if ( get_theme_mod('sensible_animate') != 1 ) {
//wp_enqueue_script( 'wowjs', get_template_directory_uri() . '/js/wow.js', array('jquery'), true );
//wp_enqueue_style( 'animations', get_stylesheet_directory_uri() . '/css/animate.css', array() );
//wp_enqueue_script( 'wow-init', get_template_directory_uri() . '/js/wow-init.js', array( 'jquery' ), true );
//}
//if ( is_admin() ) {
//wp_enqueue_style( 'control', get_template_directory_uri() . '/js/sensible_control.js', array(), false, true );
//}
//wp_enqueue_script('jquery');
wp_enqueue_script('site-scripts', get_template_directory_uri() . '/assets/js/min/site-ck.js', array(), '2', true);
//wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '1.0', true );
//wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
//wp_enqueue_script( 'parallax', get_template_directory_uri() . '/js/parallax.js', array('jquery'), false, false );
//TO DO: flex slider if...
//wp_enqueue_script( 'slider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array(), '1.0', true );
//wp_enqueue_script( 'pushmenu', get_template_directory_uri() . '/js/jPushMenu.js', array('jquery'), false, true );
//wp_enqueue_script( 'sensible-placeholder', get_template_directory_uri() . '/js/jquery.placeholder.js', array('jquery'), false, true);
//wp_enqueue_script( 'sensible-placeholdertext', get_template_directory_uri() . '/js/placeholdertext.js', array('jquery'), false, true);
//wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/sensible.scripts.js', array(), false, true );
if (is_singular() && comments_open() && get_option('thread_comments')) {
//wp_enqueue_script( 'comment-reply' );
}
}
示例7: wpcf7_enqueue_scripts
<?php
/*
Template Name: Contact
*/
if (function_exists('wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main row" role="main">
<?php
while (have_posts()) {
the_post();
?>
<?php
$settings = get_option('my_options');
?>
<article id="post-<?php
the_ID();
?>
" <?php
post_class();
?>
>
<header class="entry-header">
示例8: cf7_scripts_laden
function cf7_scripts_laden()
{
global $post;
$p = $post->post_name;
if (function_exists('wpcf7_enqueue_scripts') && ($p == "contact-met-lvk" || $p == "webshop-vermelding")) {
wpcf7_enqueue_scripts();
wpcf7_enqueue_styles();
print '<meta name="wpcf7" content="' . $p . '" />';
}
}
示例9: clea_atout_c_add_on_contact_form_7
function clea_atout_c_add_on_contact_form_7()
{
// disable load js and load css for wpcf7
add_filter('wpcf7_load_js', '__return_false');
add_filter('wpcf7_load_css', '__return_false');
// enable cf7 js and css on specific pages
// wpcf7_enqueue_scripts() and wpcf7_enqueue_styles() must be called before wp_head()
// only on the contact form page
if (is_page('contactez-nous')) {
if (function_exists('wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
if (function_exists('wpcf7_enqueue_styles')) {
wpcf7_enqueue_styles();
}
if (function_exists('wpcf7_support_html5_fallback')) {
add_filter('wpcf7_support_html5_fallback', '__return_true');
}
}
}
示例10: add_wpcf7_scripts
function add_wpcf7_scripts()
{
if (is_page('contact')) {
wpcf7_enqueue_scripts();
}
}
示例11: pspark_conditional_scripts
function pspark_conditional_scripts()
{
if (is_page('contact')) {
if (function_exists('wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
if (function_exists('wpcf7_enqueue_styles')) {
wpcf7_enqueue_styles();
}
}
}
示例12: nm_scripts
function nm_scripts()
{
if (!is_admin()) {
global $nm_theme_options, $nm_globals, $nm_page_includes;
// Script path and suffix setup (debug mode loads un-minified scripts)
if (defined('NM_SCRIPT_DEBUG') && NM_SCRIPT_DEBUG) {
$script_path = NM_THEME_URI . '/js/dev/';
$suffix = '';
} else {
$script_path = NM_THEME_URI . '/js/';
$suffix = '.min';
}
// Enqueue scripts
wp_enqueue_script('modernizr', NM_THEME_URI . '/js/plugins/modernizr.min.js', array('jquery'), '2.8.3');
wp_enqueue_script('unveil', NM_THEME_URI . '/js/plugins/jquery.unveil.min.js', array('jquery'), '1.0');
wp_enqueue_script('slick-slider', NM_THEME_URI . '/js/plugins/slick.min.js', array('jquery'), '1.5.5');
wp_enqueue_script('magnific-popup', NM_THEME_URI . '/js/plugins/jquery.magnific-popup.min.js', array('jquery'), '0.9.9');
wp_enqueue_script('nm-core', $script_path . 'nm-core' . $suffix . '.js', array('jquery'), NM_THEME_VERSION);
// Enqueue blog-grid scripts
if (isset($nm_page_includes['blog-grid'])) {
wp_enqueue_script('packery', NM_THEME_URI . '/js/plugins/packery.pkgd.min.js', array(), '1.3.2', true);
}
// WP comments script
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
// Enqueue "Contact form 7" scripts
if (isset($nm_page_includes['contact-form-7'])) {
wpcf7_enqueue_scripts();
}
if (nm_woocommerce_activated()) {
// Register shop/product scripts
wp_register_script('selectod', NM_THEME_URI . '/js/plugins/selectod.custom.min.js', array('jquery'), '3.8.1');
wp_register_script('nm-shop-add-to-cart', $script_path . 'nm-shop-add-to-cart' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
wp_register_script('nm-shop', $script_path . 'nm-shop' . $suffix . '.js', array('jquery', 'nm-core', 'selectod'), NM_THEME_VERSION);
wp_register_script('wc-add-to-cart-variation', NM_THEME_URI . '/js/woocommerce/add-to-cart-variation.min.js', array('jquery'), '2.x', true);
// Needed for variation product quick views
wp_register_script('nm-shop-quickview', $script_path . 'nm-shop-quickview' . $suffix . '.js', array('jquery', 'nm-shop', 'wc-add-to-cart-variation'), NM_THEME_VERSION);
// Enqueue shop/product scripts
if (isset($nm_page_includes['products'])) {
wp_enqueue_script('selectod');
wp_enqueue_script('nm-shop-add-to-cart');
if ($nm_theme_options['product_quickview']) {
wp_enqueue_script('wc-add-to-cart-variation');
// Needed for variation product quick views
wp_enqueue_script('nm-shop-quickview');
}
} else {
if (isset($nm_page_includes['wishlist-home'])) {
wp_enqueue_script('nm-shop-add-to-cart');
}
}
// Register shop scripts
wp_register_script('nm-shop-infload', $script_path . 'nm-shop-infload' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
wp_register_script('nm-shop-filters', $script_path . 'nm-shop-filters' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
wp_register_script('nm-shop-search', $script_path . 'nm-shop-search' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
// WooCommerce page - Note: Does not include the Cart, Checkout or Account pages
if (is_woocommerce()) {
// Single product page
if (is_product()) {
// Single product page: Modal gallery
if ($nm_theme_options['product_image_zoom']) {
wp_enqueue_script('photoswipe', NM_THEME_URI . '/js/plugins/photoswipe.min.js', array('jquery'), '4.0.0');
wp_enqueue_script('photoswipe-ui', NM_THEME_URI . '/js/plugins/photoswipe-ui-default.min.js', array('jquery'), '4.0.0');
}
// Single product page: Hover image-zoom
if ($nm_globals['product_image_hover_zoom']) {
wp_enqueue_script('easyzoom', NM_THEME_URI . '/js/plugins/easyzoom.min.js', array('jquery'), '2.3.0');
}
wp_enqueue_script('nm-shop-add-to-cart');
wp_enqueue_script('nm-shop-single-product', $script_path . 'nm-shop-single-product' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
} else {
wp_enqueue_script('smartscroll', NM_THEME_URI . '/js/plugins/jquery.smartscroll.min.js', array('jquery'), '1.0');
wp_enqueue_script('nm-shop-infload');
wp_enqueue_script('nm-shop-filters');
if ($nm_globals['shop_filters_scrollbar_custom']) {
wp_enqueue_script('nm-shop-filters-scrollbar', $script_path . 'nm-shop-filters-scrollbar' . $suffix . '.js', array('jquery', 'nm-shop-filters'), NM_THEME_VERSION);
}
wp_enqueue_script('nm-shop-search');
}
} else {
// Cart page
if (is_cart()) {
wp_enqueue_script('nm-shop-cart', $script_path . 'nm-shop-cart' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
} else {
if (is_checkout()) {
wp_enqueue_script('nm-shop-checkout', $script_path . 'nm-shop-checkout' . $suffix . '.js', array('jquery', 'nm-shop'), NM_THEME_VERSION);
} else {
if (is_account_page()) {
wp_enqueue_script('nm-shop-myaccount', $script_path . 'nm-shop-myaccount' . $suffix . '.js', array('jquery'), NM_THEME_VERSION);
}
}
}
}
}
// Add local Javascript variables
$local_js_vars = array('themeDir' => NM_THEME_DIR, 'themeUri' => NM_THEME_URI, 'ajaxUrl' => admin_url('admin-ajax.php'), 'searchUrl' => home_url('?s='), 'shopFiltersAjax' => isset($_GET['ajax_filters']) ? esc_attr($_GET['ajax_filters']) : esc_attr($nm_theme_options['shop_filters_enable_ajax']), 'shopFilterScrollbars' => $nm_globals['shop_filters_scrollbar_custom'] ? 1 : 0, 'shopImageLazyLoad' => intval($nm_theme_options['product_image_lazy_loading']), 'shopScrollOffset' => intval($nm_theme_options['shop_scroll_offset']), 'shopSearch' => esc_attr($nm_globals['shop_search_layout']), 'shopSearchMinChar' => intval($nm_theme_options['shop_search_min_char']), 'shopAjaxAddToCart' => get_option('woocommerce_enable_ajax_add_to_cart') == 'yes' && get_option('woocommerce_cart_redirect_after_add') == 'no' ? 1 : 0);
wp_localize_script('nm-core', 'nm_wp_vars', $local_js_vars);
}
}
示例13: mjpaa_scripts
/**
* Enqueue scripts and styles.
*/
function mjpaa_scripts() {
wp_enqueue_style( 'sass', get_stylesheet_uri(), array(), '1.0.0');
//show contact form 7 plugin scripts, only on contact page...
if (is_page('contact') ) {
wpcf7_enqueue_scripts();
wpcf7_enqueue_styles();
}
//if is UM page (used id 7, in case name changes), show...
if (is_page(7) ) {
wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array(), '', true );
}
//wp_enqueue_script('jquery');
wp_enqueue_script( 'site-scripts', get_template_directory_uri() . '/js/site.min.js', array(), '1.0.0', true );
//wp_enqueue_script( 'skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
//wp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/mjpaa.scripts.js', array(), false, true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
//wp_enqueue_script( 'comment-reply' );
}
}
示例14: _hw_add_wpcf7_scripts
/**
* enqueue wpcf7 resource
*/
public function _hw_add_wpcf7_scripts()
{
$exclude = hw_wpcf7_option('exclude_pages');
if (is_page($exclude) && function_exists('wpcf7_enqueue_scripts')) {
//wpcf7 js only for thoes pages
wpcf7_enqueue_scripts();
}
}
示例15: mcu_scripts
/**
* Enqueue scripts and styles.
*/
function mcu_scripts()
{
wp_enqueue_style('mcu-style', get_stylesheet_uri());
/**
* Enqueue scripts and styles for loan apps & calcualtors.
*/
if (is_page(array(22, 155, 482, 536, 182, 165, 147)) || in_category('forms')) {
//recaptcha on user forms
if (is_page(array(22, 155, 482, 536, 1186, 1235))) {
wp_register_script('nocaptcha', 'https://www.google.com/recaptcha/api.js', false, '1.0', true);
wp_enqueue_script('nocaptcha');
}
remove_filter('the_content', 'wpautop');
wp_enqueue_style('form-styles', get_template_directory_uri() . '/forms.css');
wp_register_script('popup-js', get_template_directory_uri() . '/js/popup.js', false, '1.0', true);
wp_enqueue_script('popup-js');
wp_register_script('validate-js', get_template_directory_uri() . '/js/jquery.validate.min.js', false, '1.0', true);
wp_enqueue_script('validate-js');
}
if (is_page(147)) {
remove_filter('the_content', 'wpautop');
wp_enqueue_style('form-styles', get_template_directory_uri() . '/forms.css');
if (function_exists('wpcf7_enqueue_scripts')) {
wpcf7_enqueue_scripts();
}
if (function_exists('wpcf7_enqueue_styles')) {
wpcf7_enqueue_styles();
}
}
if (is_page(122)) {
wp_register_script('rvr-js', get_template_directory_uri() . '/js/rvrcalc.js', false, '1.0', true);
wp_enqueue_style('rvr-styles', get_template_directory_uri() . '/forms.css');
wp_enqueue_script('rvr-js');
}
/**
* END
*/
wp_deregister_script('jquery');
wp_register_script('jquery', '/wp-includes/js/jquery/jquery-3.1.0.min.js', FALSE, '3.1.0', TRUE);
wp_enqueue_script('jquery');
wp_deregister_script('jquery-migrate');
wp_register_script('jquery-migrate', '/wp-includes/js/jquery/jquery-migrate.min.js', FALSE, '1.4.1', TRUE);
wp_enqueue_script('jquery-migrate');
wp_register_script('mcu-bgpos-js', get_template_directory_uri() . '/js/bgpos.js', false, '1.0', true);
wp_enqueue_script('mcu-bgpos-js');
wp_register_script('mcu-global-js', get_template_directory_uri() . '/js/global.js', false, '1.0', true);
wp_enqueue_script('mcu-global-js');
wp_register_script('mcu-carousel-js', get_template_directory_uri() . '/js/jquery.carouFredSel-6.2.1-packed.js', 'mcu-jq-js', '1.0', true);
wp_enqueue_script('mcu-carousel-js');
wp_enqueue_script('mcu-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true);
//Trozolo CMS
//wp_register_script('mcu-jq-js', get_template_directory_uri() . '/js/jquery-2.1.3.min.js', false, '1.0', true );
//wp_enqueue_script('mcu-jq-js');
//Trozolo CMS
//wp_register_script('mcu-main-js', get_template_directory_uri() . '/js/main.js', false, '1.0', true );
//wp_enqueue_script('mcu-main-js');
//Trozolo CMS
//wp_register_script('mcu-jqui-js', get_template_directory_uri() . '/js/jquery-ui-1.10.3.custom.js', 'mcu-jq-js', '1.0', true );
//wp_enqueue_script('mcu-jqui-js');
wp_enqueue_script('mcu-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true);
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
}