• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP yit_enqueue_script函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中yit_enqueue_script函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_enqueue_script函数的具体用法?PHP yit_enqueue_script怎么用?PHP yit_enqueue_script使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了yit_enqueue_script函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: single_template

    /**
     * Load the single template file
     *
     * @return void
     * @since  1.0
     * @author Antonino Scarfi' <[email protected]>
     */
    public function single_template() {
        global $post, $wpdb;

//        if ( defined('DOING_AJAX') && DOING_AJAX && isset( $_REQUEST['post_id'] ) ) {
//            $post = get_post( $_REQUEST['post_id'] );
//        }

        if ( ( ( ! defined('DOING_AJAX') || ! DOING_AJAX ) && ! is_single() ) || ! isset( $post->post_type ) || ! $this->_is_valid( $post->post_type ) ) {
            return;
        }

        // add the javascript assets
        if ( $this->_args['manage_layouts'] ) {
            foreach ( $this->layouts[ 'single' ]['js'] as $asset ) {
                yit_enqueue_script( $asset['handle'], $this->locate_url( 'single' ) . $asset['src'], $asset['deps'], $asset['ver'], $asset['in_footer'] );
            }
        }

        $post_name = $wpdb->get_var( $wpdb->prepare( "SELECT p.post_name FROM $wpdb->postmeta AS pm INNER JOIN $wpdb->posts AS p ON p.ID = pm.post_id WHERE pm.meta_key = %s AND pm.meta_value = %s AND p.post_type = %s", '_post_type', $post->post_type, $this->_name ) );
        extract( apply_filters( 'yit_cptu_frontend_vars', array( 'name' => $post_name ), $this->_name ) );

        include( $this->locate_file( 'single', 'markup' ) );
    }
开发者ID:jabue,项目名称:wordpress,代码行数:30,代码来源:yit-cpt-unlimited.php


示例2: multisite_updater_script

 /**
  * Add the multisite updater scripts
  *
  * @return void
  *
  * @since    1.0
  * @author   Andrea Grillo <[email protected]>
  */
 public function multisite_updater_script()
 {
     $update_url = array();
     $changelogs = array();
     $strings = array('new_version' => __('There is a new version of %plugin_name% available.', 'yith-plugin-fw'), 'latest' => __('View version %latest% details.', 'yith-plugin-fw'), 'unavailable' => __('Automatic update is unavailable for this plugin,', 'yith-plugin-fw'), 'activate' => __('please <a href="%activate_link%">activate</a> your copy of %plugin_name%.', 'yith-plugin-fw'), 'update_now' => __('Update now.', 'yith-plugin-fw'));
     foreach ($this->_plugins as $init => $info) {
         YIT_Plugin_Licence()->check($init);
         $update_url[$init] = wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin-multisite&plugin=') . $init, 'upgrade-plugin-multisite_' . $init);
         $changelog_id = str_replace(array('/', '.php', '.'), array('-', '', '-'), $init);
         $details_url[$init] = '#TB_inline' . esc_url(add_query_arg(array('width' => 722, 'height' => 914, 'inlineId' => $changelog_id), ''));
         $plugin_changelog = isset($this->_plugins[$init]['info']['changelog']) ? $this->_plugins[$init]['info']['changelog'] : '';
         $changelogs[$init] = $this->in_theme_update_message($this->_plugins[$init], $plugin_changelog, $changelog_id, false);
     }
     $localize_script_args = array('registered' => $this->_plugins, 'activated' => YIT_Plugin_Licence()->get_activated_products(), 'licence_activation_url' => YIT_Plugin_Licence()->get_licence_activation_page_url(), 'update_url' => $update_url, 'details_url' => $details_url, 'strings' => $strings, 'changelogs' => $changelogs);
     yit_enqueue_script('yit-multisite-updater', YIT_CORE_PLUGIN_URL . '/assets/js/multisite-updater.min.js', array('jquery'), false, true);
     wp_localize_script('yit-multisite-updater', 'plugins', $localize_script_args);
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:25,代码来源:yit-upgrade.php


示例3: wp_nonce_field

    ?>
                </div>
            </li>
            <li>
                <input type="hidden" name="yit_mailpoet_newsletter_form_id" value="<?php 
    echo $post_id;
    ?>
"/>
                <input type="hidden" name="action" value="subscribe_mailpoet_user"/>
                <?php 
    wp_nonce_field('yit_mailpoet_newsletter_form_nonce', 'yit_mailpoet_newsletter_form_nonce');
    ?>
                <input class="button btn submit-field mailpoet-subscription-ajax-submit <?php 
    echo $button_class;
    ?>
" type="button" value="<?php 
    _e('Submit', 'yit');
    ?>
" />
            </li>
        </ul>
    </fieldset>
</form>

<?php 
    yit_enqueue_script('yit-mailpoet-ajax-send-form', YIT_Newsletter()->plugin_assets_url . '/js/mailpoet-ajax-subscribe.js', array('jquery'), '', true);
    wp_localize_script('yit-mailpoet-ajax-send-form', 'mailpoet_localization', array('url' => admin_url('admin-ajax.php'), 'error_message' => 'Ops! Something went wrong'));
}
?>

开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:29,代码来源:mailpoet.php


示例4: wp_nonce_field

    echo '<label for="yit_mailchimp_newsletter_form_email">' . $email_label . '</label>';
}
?>
                <div class="newsletter_form_email">
                    <input type="text" <?php 
echo $placeholder_email;
?>
 name="yit_mailchimp_newsletter_form_email" id="yit_mailchimp_newsletter_form_email" class="email-field text-field autoclear" />
                </div>
            </li>
            <li class="ypop-submit">
                <input type="hidden" name="yit_mailchimp_newsletter_form_id" value="<?php 
echo $popup_id;
?>
"/>
                <input type="hidden" name="action" value="ypop_subscribe_mailchimp_user"/>
                <?php 
wp_nonce_field('yit_mailchimp_newsletter_form_nonce', 'yit_mailchimp_newsletter_form_nonce');
?>
                <button type="submit" class="btn submit-field mailchimp-subscription-ajax-submit"><?php 
echo $submit_icon . $submit_label;
?>
</button>
            </li>
        </ul>
    </fieldset>
</form>
</div>
<?php 
yit_enqueue_script('yit-mailchimp-ajax-send-form', YITH_YPOP_ASSETS_URL . '/js/mailchimp-ajax-subscribe.js', array('jquery'), '', true);
wp_localize_script('yit-mailchimp-ajax-send-form', 'mailchimp_localization', array('url' => admin_url('admin-ajax.php'), 'error_message' => 'Ops! Something went wrong'));
开发者ID:JacerOmri,项目名称:yith-woocommerce-popup,代码行数:31,代码来源:mailchimp.php


示例5: yit_enqueue_script

<?php

/**
 * This file belongs to the YIT Plugin Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
yit_enqueue_script('yit-testimonial', YIT_Testimonial()->plugin_assets_url . '/js/yit-testimonial-frontend.min.js', array('jquery'), null, true);
yit_enqueue_script('owl-carousel', YIT_Testimonial()->plugin_assets_url . '/js/owl.carousel.min.js', array('jquery'));
wp_reset_query();
$args = array('post_type' => 'testimonial');
$args['posts_per_page'] = isset($items) && $items != '' ? $items : -1;
if (isset($cat) && !empty($cat)) {
    $cat = array_map('trim', explode(',', $cat));
    $args['tax_query'] = array(array('taxonomy' => 'category-testimonial', 'field' => 'id', 'terms' => $cat));
}
$options = get_option('yit_testimonial_options');
$text_type = YIT_Testimonial()->get_option('text-type-testimonials');
$limit_words = YIT_Testimonial()->get_option('limit-words-testimonials');
$limit = $limit_words != '' ? $limit_words : 50;
$thumbnail = YIT_Testimonial()->get_option('thumbnail-testimonials') == '' ? 'yes' : YIT_Testimonial()->get_option('thumbnail-testimonials');
$tests = new WP_Query($args);
if (!$tests->have_posts()) {
    return false;
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:testimonial.php


示例6: get_post_thumbnail_id

        echo '<a href="#" class="bwWrapper" >';
    }
    $image_id = get_post_thumbnail_id();
    $image_url = wp_get_attachment_image_src($image_id, 'full');
    $image_url = $image_url[0];
    echo '<img src="' . $image_url . '" style="max-height: ' . $height . 'px;" class="logo" />';
    echo '</a>';
    ?>
                    </li>
                <?php 
}
wp_reset_query();
?>
            </ul>
        </div>
        <div class="clear"></div>

        <div class="clear"></div>
    </div>
    <div class="clear"></div>
</div>
<div class="clear"></div>

<?php 
yit_enqueue_script('jquery-imagesloaded', YIT_Logos()->plugin_assets_url . '/js/jquery.imagesloaded.min.js', array('jquery'), '', true);
yit_enqueue_script('owl-carousel', YIT_Logos()->plugin_assets_url . '/js/owl.carousel.min.js', array('jquery'), '', true);
if ($active_bw == 'yes') {
    yit_enqueue_script('black-and-white', YIT_Logos()->plugin_assets_url . '/js/jQuery.BlackAndWhite.js', array('jquery'), '', true);
}
echo $html;
add_action('wp_footer', array(YIT_Logos(), 'add_handler'), 30);
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:logos_slider.php


示例7: enqueue_scripts

 /**
  * Enqueue script and styles in frontend side
  *
  * Add style and scripts to frontend
  *
  * @return void
  * @since    1.0
  * @author   Emanuela Castorina <[email protected]>
  */
 public function enqueue_scripts() {
     yit_enqueue_script( 'yit-faq-frontend', $this->plugin_assets_url . '/js/yit-faq-frontend.min.js', array( 'jquery' ), $this->version, true );
     yit_enqueue_style( 'yit-faq', $this->plugin_assets_url . '/css/yit-faq.css', $this->version );
 }
开发者ID:jabue,项目名称:wordpress,代码行数:13,代码来源:yit-faq.php


示例8: yit_enqueue_script

/**
 * This file belongs to the YIT Framework.
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
/**
 * @use \YIT_Feature_Tab_Object $features_tab
 */
if (!defined('ABSPATH')) {
    exit;
}
// Exit if accessed directly
yit_enqueue_script('yit-feature-tab', $baseurl . '/assets/js/featurestab.min.js', array('jquery'), '', true);
$features_label = '';
$features_content = '';
$i = 0;
if ($features_tab->have_posts()) {
    while ($features_tab->have_posts()) {
        $features_tab->the_post();
        $current = $i == 0 ? ' current-feature' : '';
        $the_label = '<li class="features-tab-' . $i . $current . '"><h4><a href="javascript:void();">';
        if (has_post_thumbnail()) {
            $the_label .= $features_tab->get_image();
        }
        $the_label .= $features_tab->get('title');
        $the_label .= '</a></h4></li>';
        $the_content = '<div class="features-tab-content features-tab-' . $i . ' ' . $current . '">' . apply_filters('the_content', $features_tab->get('content')) . '</div>';
        $features_label .= $the_label;
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:markup.php


示例9: enqueue_scripts

 /**
  * Enqueue script and styles in frontend side
  *
  * Add style and scripts to frontend
  *
  * @return void
  * @since    1.0
  * @author   Emanuela Castorina <[email protected]>
  */
 public function enqueue_scripts()
 {
     yit_enqueue_style('yit-testimonial', $this->plugin_assets_url . '/css/yit-testimonial.css', $this->version);
     yit_enqueue_script('yit-testimonial', $this->plugin_assets_url . '/js/yit-testimonial-frontend.js', $this->version);
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:14,代码来源:yit-testimonials.php


示例10: enqueue

 /**
  * Enqueue scripts and stylesheets
  *
  * @param $hook
  *
  * @since  Version 2.0.0
  * @author Simone D'Amico <[email protected]>
  * @return void
  */
 public function enqueue($hook)
 {
     wp_enqueue_style('yit-panel', YIT_CORE_ASSETS_URL . '/css/panel.css');
     if (strpos(YIT_Request()->get('page'), 'yit_panel') !== false) {
         wp_enqueue_style('jquery-ui-overcast', YIT_CORE_ASSETS_URL . '/css/overcast/jquery-ui-1.8.9.custom.css', false, '1.8.9', 'all');
         wp_enqueue_style('yit-font-awesome', YIT_CORE_ASSETS_URL . '/css/font-awesome.min.css', false, '', 'all');
         wp_enqueue_style('wp-color-picker');
         wp_enqueue_media();
         wp_enqueue_script('jquery-ui');
         wp_enqueue_script('jquery-ui-core');
         wp_enqueue_script('jquery-ui-mouse');
         wp_enqueue_script('jquery-ui-button');
         wp_enqueue_script('jquery-ui-dialog');
         wp_enqueue_script('jquery-ui-slider');
         wp_enqueue_script('jquery-ui-widget');
         wp_enqueue_script('jquery-ui-sortable');
         yit_enqueue_script('yit-panel', YIT_CORE_ASSETS_URL . '/js/admin/panel.js', array('jquery'), YIT_CORE_VERSION, true);
         yit_enqueue_script('yit-spinner', YIT_CORE_ASSETS_URL . '/js/admin/panel.spinner.js', array('jquery'), '0.0.1', true);
         yit_enqueue_script('yit-typography', YIT_CORE_ASSETS_URL . '/js/admin/panel.typography.js', array('jquery'), '0.0.1', true);
         yit_enqueue_script('yit-types', YIT_CORE_ASSETS_URL . '/js/admin/panel.types.js', array('jquery', 'wp-color-picker'), YIT_CORE_VERSION, true);
         wp_localize_script('yit-panel', 'yit_panel_l10n', array('submit_loading' => __('Loading...', 'yit'), 'yit_panel_refresh_color_nonce' => YIT_Request()->create_nonce('refresh-color')));
     }
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:32,代码来源:Panel.php



注:本文中的yit_enqueue_script函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP yit_enqueue_style函数代码示例发布时间:2022-05-23
下一篇:
PHP yit_decode_title函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap