本文整理汇总了PHP中tribe_is_event_query函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_is_event_query函数的具体用法?PHP tribe_is_event_query怎么用?PHP tribe_is_event_query使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_is_event_query函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: is_event_404
protected function is_event_404($status)
{
if (false === strpos($status, '404 Not Found')) {
return false;
}
if (!tribe_is_event_query()) {
return false;
}
return true;
}
开发者ID:michael-pratt,项目名称:event-rocket,代码行数:10,代码来源:404-helper.php
示例2: tribe_events
/**
* Handler for the [tribe_events] shortcode.
*
* Please note that the shortcode should not be used alongside a regular event archive
* view nor should it be used more than once in the same request - or else breakages may
* occur. We try to limit accidental breakages by returning an empty string if we detect
* any of the above scenarios.
*
* This limitation can be lifted once our CSS, JS and template classes are refactored to
* support multiple instances of each view in the same request.
*
* @param $atts
*
* @return string
*/
public function tribe_events($atts)
{
static $deployed = false;
if (tribe_is_event_query() || $deployed) {
return '';
}
$shortcode = new Tribe__Events__Pro__Shortcodes__Tribe_Events($atts);
$deployed = true;
return $shortcode->output();
}
开发者ID:TakenCdosG,项目名称:chefs,代码行数:25,代码来源:Register.php
示例3: mfn_breadcrumbs
function mfn_breadcrumbs($class = false)
{
global $post;
$translate['home'] = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme');
$homeLink = home_url();
$separator = ' <span><i class="icon-right-open"></i></span>';
// Plugin | bbPress -----------------------------------
if (function_exists('is_bbpress') && is_bbpress()) {
bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => '<i class="icon-right-open"></i>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => $translate['home']));
return true;
}
// end: bbPress -------------------------------------
// Default breadcrumbs --------------------------------
$breadcrumbs = array();
// Home prefix --------------------------------
$breadcrumbs[] = '<a href="' . $homeLink . '">' . $translate['home'] . '</a>';
// Blog -------------------------------------------
if (get_post_type() == 'post') {
$blogID = false;
if (get_option('page_for_posts')) {
$blogID = get_option('page_for_posts');
// Setings / Reading
} elseif (mfn_opts_get('blog-page')) {
$blogID = mfn_opts_get('blog-page');
// Theme Options / Getting Started / Blog
}
if ($blogID) {
$breadcrumbs[] = '<a href="' . get_permalink($blogID) . '">' . get_the_title($blogID) . '</a>';
}
}
// Plugin | Events Calendar -------------------------------------------
if (function_exists('tribe_is_month') && (tribe_is_event_query() || tribe_is_month() || tribe_is_event() || tribe_is_day() || tribe_is_venue())) {
if (function_exists('tribe_get_events_link')) {
$breadcrumbs[] = '<a href="' . tribe_get_events_link() . '">' . tribe_get_events_title() . '</a>';
}
} elseif (is_front_page() || is_home()) {
// do nothing
// Blog | Tag -------------------------------------
} elseif (is_tag()) {
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_tag_title('', false) . '</a>';
// Blog | Category --------------------------------
} elseif (is_category()) {
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
// Blog | Author ----------------------------------
} elseif (is_author()) {
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_author() . '</a>';
// Blog | Day -------------------------------------
} elseif (is_day()) {
$breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
$breadcrumbs[] = '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a>';
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('d') . '</a>';
// Blog | Month -----------------------------------
} elseif (is_month()) {
$breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('F') . '</a>';
// Blog | Year ------------------------------------
} elseif (is_year()) {
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('Y') . '</a>';
// Single -----------------------------------------
} elseif (is_single() && !is_attachment()) {
// Custom Post Type -----------------
if (get_post_type() != 'post') {
$post_type = get_post_type_object(get_post_type());
$slug = $post_type->rewrite;
$portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page'));
// Portfolio Page ------------
if ($slug['slug'] == mfn_opts_get('portfolio-slug', 'portfolio-item') && $portfolio_page_id) {
$breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
}
// Category ----------
if ($portfolio_page_id) {
$terms = get_the_terms(get_the_ID(), 'portfolio-types');
if (!empty($terms) && !is_wp_error($terms)) {
$term = $terms[0];
$breadcrumbs[] = '<a href="' . get_term_link($term) . '">' . $term->name . '</a>';
}
}
// Single Item --------
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
// Blog | Single --------------------
} else {
$cat = get_the_category();
if (!empty($cat)) {
$breadcrumbs[] = get_category_parents($cat[0], true, $separator);
}
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
}
// Taxonomy ---------------------------------------
} elseif (!is_page() && get_post_taxonomies()) {
// Portfolio ------------------------
$post_type = get_post_type_object(get_post_type());
if ($post_type->name == 'portfolio' && ($portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page')))) {
$breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
}
$breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
// Page with parent -------------------------------
} elseif (is_page() && $post->post_parent) {
$parent_id = $post->post_parent;
$parents = array();
while ($parent_id) {
//.........这里部分代码省略.........
开发者ID:Qualitair,项目名称:ecommerce,代码行数:101,代码来源:theme-functions.php
示例4: single_cat_title
*/
global $wpv_title;
if (!is_404()) {
if (wpv_has_woocommerce() && is_woocommerce() && !is_single()) {
if (is_product_category()) {
$wpv_title = single_cat_title('', false);
} elseif (is_product_tag()) {
$wpv_title = single_tag_title('', false);
} else {
$wpv_title = woocommerce_get_page_id('shop') ? get_the_title(woocommerce_get_page_id('shop')) : '';
}
}
}
$page_header_bg = WpvTemplates::page_header_background();
$global_page_header_bg = wpv_get_option('page-title-background-image') . wpv_get_option('page-title-background-color');
if (!WpvTemplates::has_breadcrumbs() && !WpvTemplates::has_page_header() && !WpvTemplates::has_post_siblings_buttons() || is_404() && (!function_exists('tribe_is_event_query') || !tribe_is_event_query())) {
return;
}
if (is_page_template('page-blank.php')) {
return;
}
?>
<div id="sub-header" class="layout-<?php
echo WpvTemplates::get_layout();
?>
<?php
if (!empty($page_header_bg) || !empty($global_page_header_bg)) {
echo 'has-background';
}
?>
">
开发者ID:amitmula,项目名称:amitandaastha.in,代码行数:31,代码来源:sub-header.php
示例5: mfn_sidebar_classes
function mfn_sidebar_classes()
{
$classes = false;
if (mfn_ID()) {
if (get_post_type() == 'page' && mfn_opts_get('single-page-layout')) {
// Theme Options | Page
$layout = mfn_opts_get('single-page-layout');
} elseif (get_post_type() == 'post' && is_single() && mfn_opts_get('single-layout')) {
// Theme Options | Single Post
$layout = mfn_opts_get('single-layout');
} else {
// Post Meta
$layout = get_post_meta(mfn_ID(), 'mfn-post-layout', true);
}
switch ($layout) {
case 'left-sidebar':
$classes = ' with_aside aside_left';
break;
case 'right-sidebar':
$classes = ' with_aside aside_right';
break;
}
// demo
if ($_GET && key_exists('mfn-s', $_GET)) {
if ($_GET['mfn-s']) {
$classes = ' with_aside aside_right';
} else {
$classes = false;
}
}
}
// bbPress
if (function_exists('is_bbpress') && is_bbpress() && is_active_sidebar('forum')) {
$classes = ' with_aside aside_right';
}
// Events Calendar
if (function_exists('tribe_is_month') && is_active_sidebar('events')) {
if (tribe_is_month() || tribe_is_day() || tribe_is_event() || tribe_is_event_query() || tribe_is_venue()) {
$classes = ' with_aside aside_right';
}
}
return $classes;
}
开发者ID:plowzzer,项目名称:betheme_derma,代码行数:43,代码来源:theme-head.php
示例6: tribe_is_list_view
/**
* Determines if we are in list view.
*
* @return bool
* @since 2.1
*/
function tribe_is_list_view()
{
if (tribe_is_event_query() && (tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || is_single() && tribe_is_showing_all())) {
$return = true;
} else {
$return = false;
}
return apply_filters('tribe_is_list_view', $return);
}
开发者ID:robertark,项目名称:the-events-calendar,代码行数:15,代码来源:loop.php
示例7: maybeSpoofQuery
/**
* Decide if we need to spoof the query.
*/
public static function maybeSpoofQuery()
{
// hijack this method right up front if it's a password protected post and the password isn't entered
if (is_single() && post_password_required()) {
return;
}
global $wp_query;
if ($wp_query->is_main_query() && tribe_is_event_query() && tribe_get_option('tribeEventsTemplate', 'default') != '') {
// we need to ensure that we always enter the loop, whether or not there are any events in the actual query
$spoofed_post = self::spoofed_post();
$GLOBALS['post'] = $spoofed_post;
$wp_query->posts[] = $spoofed_post;
$wp_query->post_count = count($wp_query->posts);
$wp_query->spoofed = true;
$wp_query->rewind_posts();
}
}
开发者ID:TyRichards,项目名称:river_of_life,代码行数:20,代码来源:tribe-templates.class.php
示例8: styles
/**
* Front-end styles
*/
public function styles()
{
if (is_admin() || WpvTemplates::is_login()) {
return;
}
$theme_version = WpvFramework::get_version();
$external_fonts = maybe_unserialize(wpv_get_option('external-fonts'));
if (is_array($external_fonts) && !empty($external_fonts)) {
foreach ($external_fonts as $name => $url) {
wp_enqueue_style('wpv-' . $name, $url, array(), $theme_version);
}
}
wp_enqueue_style('front-magnific-popup', wpv_prepare_url(WPV_THEME_CSS . 'magnific.css'));
$cache_timestamp = wpv_get_option('css-cache-timestamp');
$generated_deps = array('front-magnific-popup');
if (wpv_has_woocommerce()) {
$generated_deps[] = 'woocommerce-layout';
$generated_deps[] = 'woocommerce-smallscreen';
$generated_deps[] = 'woocommerce-general';
}
if (class_exists('Tribe__Events__Main') && (tribe_is_event_query() || tribe_is_event_organizer() || tribe_is_event_venue())) {
$generated_deps[] = 'tribe-events-calendar-style';
$generated_deps[] = 'tribe-events-full-calendar-style';
}
$suffix = is_multisite() ? $GLOBALS['blog_id'] : '';
$css_file = 'all' . $suffix . '.css';
$css_path = WPV_CACHE_URI . $css_file;
if (!file_exists(WPV_CACHE_DIR . $css_file)) {
$css_path = WPV_SAMPLES_URI . 'all-default.css';
}
wp_enqueue_style('front-all', wpv_prepare_url($css_path), $generated_deps, $cache_timestamp);
global $wpv_is_shortcode_preview;
if ($wpv_is_shortcode_preview) {
wp_enqueue_style('vamtam-shortcode-preview', WPV_ADMIN_ASSETS_URI . 'css/shortcode-preview.css');
}
$custom_icons = get_option('vamtam-custom-icons-map');
if ($custom_icons) {
$icons_path = trailingslashit(WP_CONTENT_URL) . 'vamtam/custom-icon-font/';
$custom_icons_css = "\n\t\t\t\t@font-face {\n\t\t\t\t\tfont-family: 'vamtam-custom-icons';\n\t\t\t\t\tsrc: url({$icons_path}custom-icons.eot);\n\t\t\t\t\tsrc: url({$icons_path}custom-icons.eot?#iefix) format('embedded-opentype'),\n\t\t\t\t\t\turl({$icons_path}custom-icons.ttf) format('truetype');\n\t\t\t\t\tfont-weight: normal;\n\t\t\t\t\tfont-style: normal;\n\t\t\t\t}\n\t\t\t";
wp_add_inline_style('front-all', $custom_icons_css);
}
}
开发者ID:petrfaitl,项目名称:wordpress-event-theme,代码行数:45,代码来源:enqueues.php
示例9: tribe_has_next_event
/**
* Are there any events next (in the future) to the current events in $wp_query
*
* @param string $return what to return, 'bool' or 'event'
*
* @return mixed
*/
function tribe_has_next_event($return = 'bool')
{
global $wp_query;
$next_event = false;
if (tribe_is_event_query() && !empty($wp_query->posts)) {
// Edit the current event query to look for an upcoming event
$args = (array) $wp_query->query;
if (tribe_is_past()) {
if ($wp_query->get('paged') > 1) {
$args['eventDisplay'] = 'past';
$args['paged'] = $wp_query->get('paged') - 1;
} else {
// if we're on page one of the past, next events will be on page 1 of regular list view
$args['eventDisplay'] = 'list';
$args['paged'] = 1;
}
} else {
$args['eventDisplay'] = 'list';
$args['paged'] = $wp_query->get('paged') ? $wp_query->get('paged') + 1 : 2;
}
$events = tribe_get_events($args);
$next_event = count($events) > 0;
}
// @todo 'tribe_has_past_events' filter is @deprecated as of 3.7
return apply_filters('tribe_has_next_event', apply_filters('tribe_has_next_events', $next_event));
}
开发者ID:chicosilva,项目名称:olharambiental,代码行数:33,代码来源:loop.php
示例10: get_template_part
get_template_part('slider/default', 'slider');
}
}
if (is_front_page()) {
atp_generator('teaser_option');
}
wp_reset_query();
}
/**
* Custom Search for Albums, Tracks and Artists
* since - Musicplay 2.4.1
*/
if (!is_front_page()) {
get_template_part('custom', 'search');
}
if (!is_front_page()) {
if (function_exists('tribe_is_event_query')) {
if (!tribe_is_event_query() || tribe_is_event_query() && is_singular() and !is_singular("albums") and !is_404() and !is_singular("artists") and !is_singular("gallery") and !is_singular("video")) {
echo atp_generator('subheader', $frontpageid);
}
} else {
if (!is_404()) {
echo atp_generator('subheader', $frontpageid);
}
}
}
?>
<div id="main" class="<?php
echo atp_generator('sidebaroption', $frontpageid);
?>
">
开发者ID:pryspry,项目名称:MusicPlay,代码行数:31,代码来源:header.php
示例11: tc_is_tec_events_list
function tc_is_tec_events_list()
{
return function_exists('tribe_is_event_query') && tribe_is_event_query() && is_post_type_archive();
}
开发者ID:vesteves,项目名称:bebe_wp,代码行数:4,代码来源:class-fire-plugins_compat.php
示例12: tc_events_calendar_comp
function tc_events_calendar_comp()
{
if (!tribe_is_event_query()) {
return;
}
if (method_exists('TC_headings', 'tc_content_heading_title')) {
remove_filter('the_title', array(TC_Headings::$instance, 'tc_content_heading_title'), 0);
}
if (method_exists('TC_headings', 'tc_add_edit_link_after_title')) {
remove_filter('the_title', array(TC_Headings::$instance, 'tc_add_edit_link_after_title'), 2);
}
if (method_exists('TC_headings', 'tc_add_comment_bubble_after_title')) {
remove_filter('the_title', array(TC_Headings::$instance, 'tc_add_comment_bubble_after_title'), 1);
}
}
开发者ID:eq0rip,项目名称:Hamroreview.com,代码行数:15,代码来源:class-fire-init.php
示例13: enqueue_pro_scripts
/**
* Enqueue the proper PRO scripts as necessary.
*
* @return void
*/
public function enqueue_pro_scripts()
{
if (tribe_is_event_query()) {
// @TODO filter the tribe_events_resource_url() function
$resources_url = trailingslashit($this->pluginUrl) . 'resources/';
$path = Tribe_Template_Factory::getMinFile($resources_url . 'tribe-events-pro.js', true);
wp_enqueue_script('tribe-events-pro', $path, array('jquery', 'tribe-events-calendar-script'), apply_filters('tribe_events_pro_js_version', TribeEventsPro::VERSION), false);
$geoloc = TribeEventsGeoLoc::instance();
$data = array('geocenter' => $geoloc->estimate_center_point(), 'map_tooltip_event' => __('Event: ', 'tribe-events-calendar-pro'), 'map_tooltip_address' => __('Address: ', 'tribe-events-calendar-pro'));
$data = apply_filters('tribe_events_pro_localize_script', $data, 'TribeEventsPro', 'tribe-events-pro');
wp_localize_script('tribe-events-pro', 'TribeEventsPro', $data);
}
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:18,代码来源:events-calendar-pro.php
示例14: axiom_is_tribe_events_page
function axiom_is_tribe_events_page()
{
return class_exists('TribeEvents') ? tribe_is_event() || tribe_is_event_query() || tribe_is_event_category() || tribe_is_event_venue() || tribe_is_event_organizer() : false;
}
开发者ID:pcuervo,项目名称:odc,代码行数:4,代码来源:plugin.tribe-events.php
示例15: mfn_sidebar_classes
function mfn_sidebar_classes($has_both = false)
{
$classes = false;
$both = false;
if (mfn_ID()) {
if (get_post_type() == 'page' && mfn_opts_get('single-page-layout')) {
// Theme Options | Single - Page
$layout = mfn_opts_get('single-page-layout');
} elseif (get_post_type() == 'post' && is_single() && mfn_opts_get('single-layout')) {
// Theme Options | Single - Post
$layout = mfn_opts_get('single-layout');
} elseif (get_post_type() == 'portfolio' && is_single() && mfn_opts_get('single-portfolio-layout')) {
// Theme Options | Single - Portfolio
$layout = mfn_opts_get('single-portfolio-layout');
} else {
// Post Meta
$layout = get_post_meta(mfn_ID(), 'mfn-post-layout', true);
}
switch ($layout) {
case 'left-sidebar':
$classes = ' with_aside aside_left';
break;
case 'right-sidebar':
$classes = ' with_aside aside_right';
break;
case 'both-sidebars':
$classes = ' with_aside aside_both';
$both = true;
break;
}
// demo
if ($_GET && key_exists('mfn-s', $_GET)) {
if ($_GET['mfn-s']) {
$classes = ' with_aside aside_right';
} else {
$classes = false;
}
}
}
// WooCommerce
if (function_exists('is_woocommerce')) {
if (is_woocommerce()) {
if ($layout == 'both-sidebars') {
// Only one sidebar for shop
$classes = ' with_aside aside_right';
} elseif (!$layout) {
// BeTheme version < 6.4 | DO NOT DELETE
if (is_active_sidebar('shop')) {
$classes = ' with_aside aside_right';
}
}
}
if (is_product() && mfn_opts_get('shop-sidebar') == 'shop') {
$classes = false;
}
}
// bbPress
if (function_exists('is_bbpress') && is_bbpress() && is_active_sidebar('forum')) {
$classes = ' with_aside aside_right';
}
// BuddyPress
if (function_exists('is_buddypress') && is_buddypress() && is_active_sidebar('buddy')) {
$classes = ' with_aside aside_right';
}
// Events Calendar
if (function_exists('tribe_is_month') && is_active_sidebar('events')) {
if (tribe_is_month() || tribe_is_day() || tribe_is_event() || tribe_is_event_query() || tribe_is_venue()) {
$classes = ' with_aside aside_right';
}
}
// check if has both sidebars
if ($has_both) {
return $both;
}
// Page Template: Blank Page, Under Construction
if (is_page_template('template-blank.php') || is_page_template('under-construction.php')) {
$classes = false;
}
return $classes;
}
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:80,代码来源:theme-head.php
示例16: setSidebarDisplayed
public function setSidebarDisplayed($query)
{
if (tribe_is_event_query() && (!is_single() || tribe_is_showing_all()) && !is_admin()) {
$active_filters = $this->get_active_filters();
if (!empty($active_filters)) {
$this->sidebarDisplayed = true;
}
}
}
开发者ID:TMBR,项目名称:johnjohn,代码行数:9,代码来源:tribe-filter-view.class.php
示例17: enqueue_pro_scripts
/**
* Enqueue the proper PRO scripts as necessary.
*
* @return void
* @author Paul Hughes
* @since 3.0
*/
public function enqueue_pro_scripts()
{
if (tribe_is_event_query()) {
$resources_url = trailingslashit($this->pluginUrl) . 'resources/';
$path = Tribe_Template_Factory::getMinFile($resources_url . 'tribe-events-pro.js', true);
wp_enqueue_script('tribe-events-pro', $path, array('jquery', 'tribe-events-calendar-script'), false, false);
$geoloc = TribeEventsGeoLoc::instance();
$data = array('geocenter' => $geoloc->estimate_center_point());
wp_localize_script('tribe-events-pro', 'TribeEventsPro', $data);
}
}
开发者ID:TyRichards,项目名称:river_of_life,代码行数:18,代码来源:events-calendar-pro.php
示例18: scripts
/**
* Enqueue the maps JS in all the views (Needed for the location filter in the Tribe Bar)
*/
public function scripts()
{
if (tribe_is_event_query() && !is_single()) {
Tribe_PRO_Template_Factory::asset_package('ajax-maps');
}
}
开发者ID:pellio11,项目名称:ns-select-project,代码行数:9,代码来源:tribe-geoloc.class.php
示例19: 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
示例20: tc_is_tec_single_event
function tc_is_tec_single_event()
{
return function_exists('tribe_is_event_query') && tribe_is_event_query() && is_single();
}
开发者ID:zhaoshengloveqingqing,项目名称:blog,代码行数:4,代码来源:class-fire-plugins_compat.php
注:本文中的tribe_is_event_query函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论