当前位置: 首页>>代码示例>>PHP>>正文


PHP Tribe__Events__Template_Factory::asset_package方法代码示例

本文整理汇总了PHP中Tribe__Events__Template_Factory::asset_package方法的典型用法代码示例。如果您正苦于以下问题:PHP Tribe__Events__Template_Factory::asset_package方法的具体用法?PHP Tribe__Events__Template_Factory::asset_package怎么用?PHP Tribe__Events__Template_Factory::asset_package使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tribe__Events__Template_Factory的用法示例。


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

示例1: enqueue_month_view_scripts

 function enqueue_month_view_scripts()
 {
     if (is_front_page()) {
         Tribe__Events__Template_Factory::asset_package('ajax-calendar');
         Tribe__Events__Template_Factory::asset_package('events-css');
     }
 }
开发者ID:woodwardtw,项目名称:rvarts_,代码行数:7,代码来源:functions.php

示例2: load_assets

 public function load_assets($hook)
 {
     if ('widgets.php' !== $hook) {
         return;
     }
     Tribe__Events__Template_Factory::asset_package('select2');
     wp_enqueue_script('tribe-admin-widget-countdown', tribe_events_pro_resource_url('admin-widget-countdown.js'), array('jquery'), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION));
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:8,代码来源:Countdown_Widget.php

示例3: load_scripts

 public function load_scripts($hook)
 {
     if ($hook != 'widgets.php') {
         return;
     }
     Tribe__Events__Template_Factory::asset_package('select2');
     wp_enqueue_script('calendar-widget-admin', tribe_events_pro_resource_url('calendar-widget-admin.js'), array(), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION));
 }
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:8,代码来源:Mini_Calendar_Widget.php

示例4: setup

 protected function setup()
 {
     Tribe__Events__Main::instance()->displaying = 'month';
     $this->set_current_month();
     $this->shortcode->prepare_default();
     Tribe__Events__Template_Factory::asset_package('ajax-calendar');
     $this->shortcode->set_template_object(new Tribe__Events__Template__Month($this->shortcode->get_query_args()));
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:8,代码来源:Month.php

示例5: setup

 protected function setup()
 {
     Tribe__Events__Main::instance()->displaying = 'list';
     $this->shortcode->set_current_page();
     $this->shortcode->prepare_default();
     Tribe__Events__Template_Factory::asset_package('ajax-list');
     $this->template = new Tribe__Events__Template__List($this->shortcode->get_query_args());
     $this->shortcode->set_template_object($this->template);
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:9,代码来源:List.php

示例6: setup

 protected function setup()
 {
     Tribe__Events__Main::instance()->displaying = 'map';
     $this->shortcode->set_current_page();
     $this->shortcode->prepare_default();
     Tribe__Events__Pro__Main::instance()->enqueue_pro_scripts();
     Tribe__Events__Pro__Template_Factory::asset_package('events-pro-css');
     Tribe__Events__Template_Factory::asset_package('jquery-placeholder');
     Tribe__Events__Pro__Template_Factory::asset_package('ajax-maps');
     $this->shortcode->set_template_object(new Tribe__Events__Pro__Templates__Map($this->shortcode->get_query_args()));
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:11,代码来源:Map.php

示例7: load_scripts

 /**
  * @param $hook
  */
 public function load_scripts($hook)
 {
     if ('widgets.php' != $hook) {
         return;
     }
     //JS for Taxonomy Filter Select
     Tribe__Events__Template_Factory::asset_package('select2');
     wp_enqueue_script('calendar-widget-admin', tribe_events_pro_resource_url('calendar-widget-admin.js'), array(), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION));
     //Need for Customizer and to prevent errors in Widgets Section with Color Picker
     wp_enqueue_script('underscore');
     //Colorpicker
     wp_enqueue_style('wp-color-picker');
     wp_enqueue_script('wp-color-picker');
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:17,代码来源:This_Week_Widget.php

示例8: loadStyle

 /**
  * Load asset packages.
  *
  * @return void
  */
 public function loadStyle()
 {
     if (tribe_is_event_query() || tribe_is_event_organizer() || tribe_is_event_venue()) {
         // jquery-resize
         Tribe__Events__Template_Factory::asset_package('jquery-resize');
         // smoothness
         Tribe__Events__Template_Factory::asset_package('smoothness');
         // Tribe Calendar JS
         Tribe__Events__Template_Factory::asset_package('calendar-script');
         Tribe__Events__Template_Factory::asset_package('events-css');
     } else {
         if (is_active_widget(false, false, 'tribe-events-list-widget')) {
             Tribe__Events__Template_Factory::asset_package('events-css');
         }
     }
 }
开发者ID:kevinaxu,项目名称:99boulders,代码行数:21,代码来源:Main.php

示例9: do_shortcode

 /**
  * Actually create the shortcode output
  *
  * @since  4.1
  *
  * @param  array $args    The Shortcode arguments
  *
  * @return string
  */
 public function do_shortcode($args)
 {
     $tag = $this->get_shortcode_tag();
     $slug = $this->get_shortcode_slug();
     $args = (object) shortcode_atts(array('align' => 'left', 'id' => null), $args, $tag);
     if (!is_null($args->id) && is_numeric($args->id)) {
         $event = get_post($args->id);
         // Then If Event was fetch correctly we set the global
         if ($event) {
             global $post;
             // Store the Original we will restore it later
             $original_event = $post;
             // Set the new Event for now
             $post = $event;
             // Use WP to config the Post Data
             setup_postdata($post);
         }
     }
     // Set the Container Classes
     $classes = array('tribe-shortcode', 'tribe-events-single-section', 'tribe-events-event-meta', 'tribe-clearfix');
     // Add Alignment
     if (in_array($args->align, array('center', 'left', 'right'))) {
         $classes[] = 'tribe-shortcode-align-' . $args->align;
     }
     /**
      * Use this hook to filter the classes for this shortcode container
      *
      * @since 4.1
      *
      * @param array  Array of classes used on the Container
      * @param object Arguments set on the shortcode
      * @param string Shortcode tag
      */
     $classes = apply_filters('tribe_events_shortcode_' . $slug . '_container_classes', $classes, $args, $tag);
     // Ensure the expected CSS is available to style the shortcode output (this will
     // happen automatically in event views, but not elsewhere)
     Tribe__Events__Template_Factory::asset_package('events-css');
     // Start to record the Output
     ob_start();
     echo '<div class="' . esc_attr(implode(' ', $classes)) . '">';
     // Print the Actual HTML
     tribe_get_template_part('modules/meta/details');
     echo '</div>';
     // Save it to a variable
     $html = ob_get_clean();
     if (isset($original_event)) {
         $post = $original_event;
         // Use WP method to restore it back to original
         setup_postdata($post);
     }
     return $html;
 }
开发者ID:partisan-collective,项目名称:partisan,代码行数:61,代码来源:Event_Details.php

示例10: load_script

 /**
  *    Load the CSSs and JSs only if the Bar will be shown
  */
 public function load_script()
 {
     if ($this->should_show()) {
         Tribe__Events__Template_Factory::asset_package('jquery-placeholder');
         Tribe__Events__Template_Factory::asset_package('bootstrap-datepicker');
         Tribe__Events__Template_Factory::asset_package('tribe-events-bar');
         do_action('tribe-events-bar-enqueue-scripts');
     }
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:12,代码来源:Bar.php

示例11: enqueueStylesAndScripts

 /**
  * Enqueue the plugin stylesheet(s).
  *
  * @author PaulHughes01
  * @since 3.4
  * @return void
  */
 public function enqueueStylesAndScripts()
 {
     if (tribe_is_event_query() || tribe_is_event_organizer() || tribe_is_event_venue()) {
         $show_filter = apply_filters('tribe_events_filters_should_show', in_array(get_post_type(), array(Tribe__Events__Main::VENUE_POST_TYPE, Tribe__Events__Main::ORGANIZER_POST_TYPE)) ? false : true);
         if ($show_filter) {
             //Only display filters before template if the layout is horizontal
             if (tribe_get_option('events_filters_layout', 'vertical') == 'vertical') {
                 add_action('tribe_events_bar_after_template', array($this, 'displaySidebar'), 25);
             } else {
                 if (tribe_get_option('tribeDisableTribeBar', false) == true) {
                     add_action('tribe_events_before_template', array($this, 'displaySidebar'), 25);
                 } else {
                     add_action('tribe_events_bar_after_template', array($this, 'displaySidebar'), 25);
                 }
             }
         }
         // enqueue chosen for tag multi-select
         Tribe__Events__Template_Factory::asset_package('chosen');
         Tribe__Events__Template_Factory::asset_package('calendar-script', array('jquery-ui-slider'));
         wp_enqueue_style('custom-jquery-styles');
         wp_enqueue_style('Tribe__Events__Filterbar__View-css', Tribe__Events__Template_Factory::getMinFile($this->pluginUrl . 'src/resources/css/filter-view.css', true), array(), apply_filters('tribe_events_filters_css_version', self::VERSION));
         wp_enqueue_script('jquery-ui-slider');
         wp_enqueue_script('Tribe__Events__Filterbar__View-scripts', Tribe__Events__Template_Factory::getMinFile($this->pluginUrl . 'src/resources/js/filter-scripts.js', true), array(), apply_filters('tribe_events_filters_js_version', self::VERSION));
         //Check for override stylesheet
         $user_stylesheet_url = Tribe__Events__Templates::locate_stylesheet('tribe-events/filterbar/filter-view.css');
         $user_stylesheet_url = apply_filters('tribe_events_filterbar_stylesheet_url', $user_stylesheet_url);
         //If override stylesheet exists, then enqueue it
         if ($user_stylesheet_url) {
             wp_enqueue_style('tribe-events-filterbar-override-style', $user_stylesheet_url);
         }
     }
 }
开发者ID:jamestrevorlees,项目名称:odd-web-v1.00,代码行数:39,代码来源:View.php

示例12: prepare_default

 /**
  * Take care of common setup needs including enqueing various assets required by the default views.
  */
 public function prepare_default()
 {
     global $wp_query;
     /**
      * We overwrite the global $wp_query object to facilitate embedding the requested view (the
      * original will be restored during tribe_events_pro_tribe_events_shortcode_post_render):
      * this isn't ideal, but further restructuring of our template classes and event views would
      * be needed to avoid it.
      *
      * @see $this->reset_query()
      * @todo revise in a future release
      */
     $wp_query = new WP_Query($this->query_args);
     // Assets required by all our supported views
     wp_enqueue_script('jquery');
     Tribe__Events__Template_Factory::asset_package('bootstrap-datepicker');
     Tribe__Events__Template_Factory::asset_package('calendar-script');
     Tribe__Events__Template_Factory::asset_package('jquery-resize');
     Tribe__Events__Template_Factory::asset_package('events-css');
     Tribe__Events__Pro__Template_Factory::asset_package('events-pro-css');
     // Tribe Events Bar support
     if ($this->is_attribute_truthy('tribe-bar', true)) {
         add_filter('tribe_get_option', array($this, 'filter_tribe_disable_bar'), 10, 2);
         // Make sure the filters have been initialized
         tribe_events_get_filters();
         add_filter('tribe-events-bar-should-show', array($this, 'enable_tribe_bar'));
         remove_action('tribe_events_bar_before_template', array(Tribe__Events__Bar::instance(), 'disabled_bar_before'));
         remove_action('tribe_events_bar_after_template', array(Tribe__Events__Bar::instance(), 'disabled_bar_after'));
         Tribe__Events__Template_Factory::asset_package('jquery-placeholder');
         Tribe__Events__Pro__Template_Factory::asset_package('ajax-maps');
         Tribe__Events__Template_Factory::asset_package('jquery-resize');
         add_action('tribe_events_bar_before_template', array(Tribe__Events__Bar::instance(), 'disabled_bar_before'));
         add_action('tribe_events_bar_after_template', array(Tribe__Events__Bar::instance(), 'disabled_bar_after'));
         remove_filter('tribe_get_option', array($this, 'filter_tribe_disable_bar'));
     }
     // Add the method responsible for rendering each of the default supported views
     add_filter('tribe_events_pro_tribe_events_shortcode_output', array($this, 'render_view'));
     // View selector URLs will need to be adjusted (so that the user is not taken to /events/new-view/)
     add_filter('tribe-events-bar-views', array($this, 'modify_view_urls'), 100);
 }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:43,代码来源:Tribe_Events.php


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