本文整理汇总了PHP中Tribe__Events__Template_Factory::getMinFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Tribe__Events__Template_Factory::getMinFile方法的具体用法?PHP Tribe__Events__Template_Factory::getMinFile怎么用?PHP Tribe__Events__Template_Factory::getMinFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tribe__Events__Template_Factory
的用法示例。
在下文中一共展示了Tribe__Events__Template_Factory::getMinFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
public function handle()
{
$ajax_data = array('ajaxurl' => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'), 'post_type' => Tribe__Events__Main::POSTTYPE);
$path = Tribe__Events__Template_Factory::getMinFile(tribe_events_resource_url('tribe-events-ajax-day.js'), true);
$handle = 'tribe-events-ajax-day';
wp_enqueue_script($handle, $path, array('tribe-events-bar'), $this->filter_js_version(), true);
wp_localize_script($handle, 'TribeCalendar', $ajax_data);
}
示例2: handle
public function handle()
{
$deps = array_merge($this->deps, array('jquery'));
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'jquery-placeholder/jquery.placeholder.js', true);
$placeholder_handle = Tribe__Events__Template_Factory::get_placeholder_handle();
wp_enqueue_script($placeholder_handle, $path, $deps, '2.0.7', false);
Tribe__Events__Template_Factory::add_vendor_script($placeholder_handle);
}
示例3: handle
public function handle()
{
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'jquery-resize/jquery.ba-resize.js', true);
$deps = array_merge($this->deps, array('jquery'));
$handle = $this->prefix . '-jquery-resize';
wp_enqueue_script($handle, $path, $deps, '1.1', false);
Tribe__Events__Template_Factory::add_vendor_script($handle);
}
示例4: handle
public function handle()
{
$deps = array_merge($this->deps, array('jquery'), Tribe__Events__Template_Factory::get_vendor_scripts());
$path = Tribe__Events__Template_Factory::getMinFile(tribe_events_resource_url('tribe-events.js'), true);
$handle = $this->prefix . '-calendar-script';
wp_enqueue_script($handle, $path, $deps, $this->filter_js_version());
$js_config_array = array('permalink_settings' => get_option('permalink_structure'), 'events_post_type' => Tribe__Events__Main::POSTTYPE, 'events_base' => tribe_get_events_link());
wp_localize_script($handle, 'tribe_js_config', $js_config_array);
}
示例5: handle
public function handle()
{
$ajax_data = array('ajaxurl' => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'), 'post_type' => Tribe__Events__Main::POSTTYPE);
$path1 = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'nanoscroller/jquery.nanoscroller.js', true);
wp_enqueue_script('tribe-events-pro-slimscroll', $path1, array('tribe-events-pro', 'jquery-ui-draggable'), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION), true);
$path2 = Tribe__Events__Template_Factory::getMinFile(tribe_events_pro_resource_url('tribe-events-week.js'), true);
wp_enqueue_script('tribe-events-pro-week', $path2, array('tribe-events-pro-slimscroll'), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION), true);
wp_localize_script('tribe-events-pro-week', 'TribeWeek', $ajax_data);
}
示例6: handle
public function handle()
{
$deps = array_merge($this->deps, array('jquery', $this->prefix . '-bootstrap-datepicker', $this->prefix . '-calendar-script'));
$ajax_data = array("ajaxurl" => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'));
$path = Tribe__Events__Template_Factory::getMinFile(tribe_events_resource_url('tribe-events-ajax-calendar.js'), true);
$handle = 'tribe-events-calendar';
wp_enqueue_script($handle, $path, $deps, $this->filter_js_version(), true);
wp_localize_script($handle, 'TribeCalendar', $ajax_data);
}
示例7: handle
public function handle()
{
$css_path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'select2/select2.css', true);
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'select2/select2.js', true);
wp_enqueue_style($this->prefix . '-select2-css', $css_path);
$script_handle = $this->prefix . '-select2';
wp_enqueue_script($script_handle, $path, 'jquery', '3.2');
Tribe__Events__Template_Factory::add_vendor_script($script_handle);
}
示例8: handle
public function handle()
{
$tribe_paged = !empty($_REQUEST['tribe_paged']) ? $_REQUEST['tribe_paged'] : 0;
$ajax_data = array('ajaxurl' => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'), 'tribe_paged' => $tribe_paged);
$path1 = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'isotope/jquery.isotope.js', true);
$path2 = Tribe__Events__Template_Factory::getMinFile(tribe_events_pro_resource_url('tribe-events-photo-view.js'), true);
wp_enqueue_script('tribe-events-pro-isotope', $path1, array('tribe-events-pro'), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION), true);
wp_enqueue_script('tribe-events-pro-photo', $path2, array('tribe-events-pro-isotope'), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION), true);
wp_localize_script('tribe-events-pro-photo', 'TribePhoto', $ajax_data);
}
示例9: handle
public function handle()
{
$deps = array_merge($this->deps, array('jquery', $this->prefix . '-calendar-script'));
$tribe_paged = !empty($_REQUEST['tribe_paged']) ? $_REQUEST['tribe_paged'] : 0;
$ajax_data = array('ajaxurl' => admin_url('admin-ajax.php', is_ssl() ? 'https' : 'http'), 'tribe_paged' => $tribe_paged);
$path = Tribe__Events__Template_Factory::getMinFile(tribe_events_resource_url('tribe-events-ajax-list.js'), true);
$handle = 'tribe-events-list';
wp_enqueue_script($handle, $path, $deps, $this->filter_js_version(), true);
wp_localize_script($handle, 'TribeList', $ajax_data);
}
示例10: handle
public function handle()
{
$deps = array_merge($this->deps, array('jquery'));
$css_path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'chosen/public/chosen.css', true);
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'chosen/public/chosen.jquery.js', true);
wp_enqueue_style($this->prefix . '-chosen-style', $css_path);
$handle = $this->prefix . '-chosen-jquery';
wp_enqueue_script($handle, $path, $deps, '0.9.5', false);
Tribe__Events__Template_Factory::add_vendor_script($handle);
}
示例11: embed_head
/**
* Adds content to the embed head tag
*
* The embed header DOES NOT have wp_head() executed inside of it. Instead, any scripts/styles
* are explicitly output
*/
public function embed_head()
{
$css_path = Tribe__Events__Template_Factory::getMinFile(Tribe__Events__Main::instance()->plugin_url . 'src/resources/css/tribe-events-embed.css', true);
$css_path = add_query_arg('ver', Tribe__Events__Main::VERSION, $css_path);
?>
<link rel="stylesheet" id="tribe-events-embed-css" href="<?php
echo esc_url($css_path);
?>
" type="text/css" media="all">
<?php
}
示例12: handle
public function handle()
{
$css_path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'bootstrap-datepicker/css/datepicker.css', true);
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'bootstrap-datepicker/js/bootstrap-datepicker.min.js', true);
wp_enqueue_style($this->prefix . '-bootstrap-datepicker-css', $css_path);
$handle = $this->prefix . '-bootstrap-datepicker';
wp_enqueue_script($handle, $path, 'jquery', '3.2');
Tribe__Events__Template_Factory::add_vendor_script($handle);
$localized_datepicker_array = array('days' => array_merge($this->tec->daysOfWeek, array($this->tec->daysOfWeek[0])), 'daysShort' => array_merge($this->tec->daysOfWeekShort, array($this->tec->daysOfWeekShort[0])), 'daysMin' => array_merge($this->tec->daysOfWeekMin, array($this->tec->daysOfWeekMin[0])), 'months' => array_values($this->tec->monthsFull), 'monthsShort' => array_values($this->tec->monthsShort), 'clear' => __('Clear', 'the-events-calendar'), 'today' => __('Today', 'the-events-calendar'));
wp_localize_script($handle, 'tribe_bootstrap_datepicker_strings', array('dates' => $localized_datepicker_array));
}
示例13: handle
public function handle()
{
$http = is_ssl() ? 'https' : 'http';
$url = apply_filters('tribe_events_pro_google_maps_api', $http . '://maps.google.com/maps/api/js');
wp_register_script('tribe-gmaps', $url, array('tribe-events-pro'));
$path = Tribe__Events__Template_Factory::getMinFile(tribe_events_pro_resource_url('tribe-events-ajax-maps.js'), true);
wp_register_script('tribe-events-pro-geoloc', $path, array('tribe-gmaps', Tribe__Events__Template_Factory::get_placeholder_handle()), apply_filters('tribe_events_pro_js_version', Tribe__Events__Pro__Main::VERSION));
wp_enqueue_script('tribe-events-pro-geoloc');
$geoloc = Tribe__Events__Pro__Geo_Loc::instance();
$data = array('ajaxurl' => admin_url('admin-ajax.php', $http), 'nonce' => wp_create_nonce('tribe_geosearch'), 'map_view' => 'map' == Tribe__Events__Main::instance()->displaying ? true : false);
wp_localize_script('tribe-events-pro-geoloc', 'GeoLoc', $data);
}
示例14: handle
public function handle()
{
$css_path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'select2/select2.css', true);
$path = Tribe__Events__Template_Factory::getMinFile($this->vendor_url . 'select2/select2.js', true);
wp_enqueue_style($this->prefix . '-select2-css', $css_path);
// we know of other plugins loading a version of select2 compatible with our needs
// let's not queue the script twice.
if (!$this->has_script_alias('select2')) {
$script_handle = $this->prefix . '-select2';
wp_enqueue_script($script_handle, $path, 'jquery', '3.2');
Tribe__Events__Template_Factory::add_vendor_script($script_handle);
}
}
示例15: handle
public function handle()
{
// check if responsive should be killed
if (apply_filters('tribe_events_kill_responsive', false)) {
add_filter('tribe_events_mobile_breakpoint', '__return_zero');
}
$stylesheets = array();
$mobile_break = tribe_get_mobile_breakpoint();
// Get the selected style option
$style_option = tribe_get_option('stylesheetOption', 'tribe');
// from `some-style-option`
// to `Tribe__Events__Asset__Events_Css_Some_Style_Option`
$child_class_name = $this->get_child_class_name($style_option);
/**
* @var Tribe__Events__Asset__Abstract_Events_Css
*/
$child_class_instance = new $child_class_name();
// `$stylesheets` passed by reference
$child_class_instance->handle($stylesheets, $mobile_break);
// put override css at the end of the array
$stylesheets['tribe-events-calendar-override-style'] = 'tribe-events/tribe-events.css';
// do the enqueues
foreach ($stylesheets as $name => $css_file) {
if ($name == 'tribe-events-calendar-override-style') {
$user_stylesheet_url = Tribe__Events__Templates::locate_stylesheet('tribe-events/tribe-events.css');
if ($user_stylesheet_url) {
wp_enqueue_style($name, $user_stylesheet_url);
}
} else {
// get full URL
$url = tribe_events_resource_url($css_file);
// get the minified file
$url = Tribe__Events__Template_Factory::getMinFile($url, true);
// apply filters
$url = apply_filters('tribe_events_stylesheet_url', $url, $name);
// set the $media attribute
if ($name == 'tribe-events-calendar-mobile-style' || $name == 'tribe-events-calendar-full-mobile-style') {
$media = "only screen and (max-width: {$mobile_break}px)";
wp_enqueue_style($name, $url, array('tribe-events-calendar-style'), Tribe__Events__Main::VERSION, $media);
} else {
wp_register_style($name, $url, array(), Tribe__Events__Main::VERSION);
wp_enqueue_style($name);
}
}
}
}