本文整理汇总了PHP中tribe_is_venue函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_is_venue函数的具体用法?PHP tribe_is_venue怎么用?PHP tribe_is_venue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tribe_is_venue函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: dt_the_events_calendar_template_config
/**
* Theme basic config.
*
* @see https://gist.github.com/jo-snips/2415009
*/
function dt_the_events_calendar_template_config()
{
// detect calendar pages
if (tribe_is_month() && !is_tax() || tribe_is_month() && is_tax() || (tribe_is_past() || tribe_is_upcoming() && !is_tax()) || (tribe_is_past() || tribe_is_upcoming() && is_tax()) || tribe_is_day() && !is_tax() || tribe_is_day() && is_tax() || tribe_is_event() && is_single() || tribe_is_venue() || function_exists('tribe_is_week') && tribe_is_week() || function_exists('tribe_is_photo') && tribe_is_photo() || function_exists('tribe_is_map') && tribe_is_map() || get_post_type() == 'tribe_organizer' && is_single()) {
// remove theme title controller
remove_action('presscore_before_main_container', 'presscore_page_title_controller', 16);
}
}
开发者ID:severnrescue,项目名称:web,代码行数:13,代码来源:mod-the-events-calendar.php
示例2: tribe_get_venue_id
/**
* Venue ID
*
* Returns the event Venue ID.
*
* @param int $postId can supply either event id or venue id, if none specified, current post is used
*
* @return int Venue ID
*/
function tribe_get_venue_id($postId = null)
{
$postId = Tribe__Events__Main::postIdHelper($postId);
if (tribe_is_venue($postId)) {
return $postId;
} else {
return apply_filters('tribe_get_venue_id', tribe_get_event_meta($postId, '_EventVenueID', true));
}
}
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:18,代码来源:venue.php
示例3: tribe_get_venue_id
/**
* Venue ID
*
* Returns the event Venue ID.
*
* @param int $postId can supply either event id or venue id, if none specified, current post is used
* @return int Venue ID
* @since 2.0
*/
function tribe_get_venue_id($postId = null)
{
$postId = TribeEvents::postIdHelper($postId);
if (tribe_is_venue($postId)) {
return $postId;
} else {
return tribe_get_event_meta($postId, '_EventVenueID', true);
}
}
开发者ID:mpaskew,项目名称:isc-dev,代码行数:18,代码来源:venue.php
示例4: use_venue_coords
/**
* Update the location information associated with the venue map to use coordinates
* in place of a street address, if possible.
*
* @param $map_index
* @param $venue_id
*/
public function use_venue_coords($map_index, $venue_id)
{
// If we don't have a venue to work with, bail
if (!tribe_is_venue($venue_id)) {
return;
}
// Try to load the coordinates - it's possible none will be set
$this->lat = get_post_meta($venue_id, Tribe__Events__Pro__Geo_Loc::LAT, true);
$this->lng = get_post_meta($venue_id, Tribe__Events__Pro__Geo_Loc::LNG, true);
// If we have valid coordinates let's put them to work
if (!$this->are_coords_valid()) {
return;
}
$this->setup_coords($map_index);
}
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:22,代码来源:Embedded_Maps.php
示例5: tribe_get_embedded_map
/**
* Google Map Embed
*
* Returns an embedded google maps for an event
*
* @param string $postId
* @param int $width
* @param int $height
* @param bool $force_load If true, then load the map even if an address is not provided.
* @return string An iframe pulling http://maps.google.com/ for this event
* @since 2.0
*/
function tribe_get_embedded_map($postId = null, $width = '', $height = '', $force_load = false)
{
$postId = TribeEvents::postIdHelper($postId);
if (!tribe_is_venue($postId) && !tribe_is_event($postId)) {
return false;
}
$postId = tribe_is_venue($postId) ? $postId : tribe_get_venue_id($postId);
$locationMetaSuffixes = array('address', 'city', 'state', 'province', 'zip', 'country');
$toUrlEncode = "";
foreach ($locationMetaSuffixes as $val) {
$metaVal = call_user_func('tribe_get_' . $val);
if ($metaVal) {
$toUrlEncode .= $metaVal . " ";
}
}
if ($toUrlEncode) {
$address = $toUrlEncode;
} else {
$address = null;
}
if (!$height) {
$height = tribe_get_option('embedGoogleMapsHeight', '350');
}
if (!$width) {
$width = tribe_get_option('embedGoogleMapsWidth', '100%');
}
if ($address || $force_load) {
ob_start();
include TribeEvents::instance()->pluginPath . 'admin-views/event-map.php';
$google_map = ob_get_contents();
ob_get_clean();
return $google_map;
} else {
return '';
}
}
开发者ID:mpaskew,项目名称:isc-dev,代码行数:48,代码来源:google-map.php
示例6: body_class
public function body_class($c)
{
if (get_query_var('post_type') == self::POSTTYPE) {
if (!is_single()) {
if (tribe_is_upcoming() || tribe_is_past()) {
$c[] = 'events-list';
} else {
$c[] = 'events-gridview';
}
}
if (is_tax(self::TAXONOMY)) {
$c[] = 'events-category';
$category = get_term_by('name', single_cat_title('', false), self::TAXONOMY);
$c[] = 'events-category-' . $category->slug;
}
if (!is_single() || tribe_is_showing_all()) {
$c[] = 'events-archive';
} else {
$c[] = 'events-single';
}
}
global $post;
if (is_object($post) && tribe_is_venue($post->ID)) {
$c[] = 'events-venue';
}
return $c;
}
开发者ID:kevinreilly,项目名称:redwood-city-chamber-wp,代码行数:27,代码来源:the-events-calendar.class.php
示例7: 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
示例8: 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
示例9: get_ids
protected function get_ids($post_id)
{
$post_id = $post_id = Tribe__Events__Main::postIdHelper($post_id);
$this->event_id = tribe_is_event($post_id) ? $post_id : 0;
$this->venue_id = tribe_is_venue($post_id) ? $post_id : tribe_get_venue_id($post_id);
}
开发者ID:partisan-collective,项目名称:partisan,代码行数:6,代码来源:Embedded_Maps.php
示例10: 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
示例11: get_the_ID
$venue_id = get_the_ID();
$full_region = tribe_get_full_region($venue_id);
?>
<span class="address-details">
<?php
// This location's street address.
if (tribe_get_address($venue_id)) {
?>
<span class="street-address"><?php
echo tribe_get_address($venue_id);
?>
</span>
<?php
if (!tribe_is_venue()) {
?>
<?php
}
?>
<?php
}
?>
<?php
// This locations's city.
if (tribe_get_city($venue_id)) {
if (tribe_get_address($venue_id)) {
?>
<?php
}
开发者ID:alexmacarthur,项目名称:LyonCountyRepublicans,代码行数:31,代码来源:address.php
示例12: use_coords
/**
* Update the location information associated with the venue map to use coordinates
* in place of a street address, if possible.
*
* @param $map_index
* @param $venue_id
*/
public function use_coords($map_index, $venue_id)
{
// Sanity checks: we need a venue to work with and the correct version of TEC
if (!tribe_is_venue($venue_id)) {
return;
}
if (!class_exists('Tribe__Events__Embedded_Maps')) {
return;
}
// Try to load the coordinates - it's possible none will be set
$lat = get_post_meta($venue_id, $this->lat_key, true);
$lng = get_post_meta($venue_id, $this->lng_key, true);
if (!$this->valid_coords($lat, $lng)) {
return;
}
// If we have valid coordinates let's put them to work
$mapping = Tribe__Events__Embedded_Maps::instance();
$venue_data = $mapping->get_map_data($map_index);
$venue_data['coords'] = array($lat, $lng);
$mapping->update_map_data($map_index, $venue_data);
}
开发者ID:simple-beck,项目名称:project-gc,代码行数:28,代码来源:venue-positioning.php
示例13: tribe_community_events_is_venue_edit_screen
/**
* Test to see if this is the Venue edit screen
*
* @param int|null $venue_id (optional)
* @return bool
* @author Peter Chester
* @since 3.1
*/
function tribe_community_events_is_venue_edit_screen($venue_id = null)
{
$venue_id = TribeEvents::postIdHelper($venue_id);
return tribe_is_venue($venue_id);
}
开发者ID:donwea,项目名称:nhap.org,代码行数:13,代码来源:tribe-community-events-template-tags.php
注:本文中的tribe_is_venue函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论