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


PHP tribe_get_gcal_link函数代码示例

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


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

示例1: customized_tribe_single_event_links

function customized_tribe_single_event_links()
{
    if (is_single() && post_password_required()) {
        return;
    }
    echo '<div class="tribe-events-cal-links">';
    echo '<a class="tribe-events-ical tribe-events-button button" href="' . tribe_get_single_ical_link() . '">+ Add to Calendar </a>';
    echo '<a class="tribe-events-gcal tribe-events-button button" href="' . tribe_get_gcal_link() . '" title="' . __('Add to Google', 'tribe-events-calendar-pro') . '"><i class="fa fa-google-plus"></i> Add to Google </a>';
    echo '</div><!-- .tribe-events-cal-links -->';
}
开发者ID:CityOfPrescott,项目名称:sandbox_tabula-rasa,代码行数:10,代码来源:functions-tribe_events.php

示例2: single_event_links

 /**
  * Generates the markup for iCal and gCal single event links
  *
  * @return void
  * @since 3.0
  **/
 public static function single_event_links()
 {
     // don't show on password protected posts
     if (is_single() && post_password_required()) {
         return;
     }
     echo '<div class="tribe-events-cal-links">';
     echo '<a class="tribe-events-gcal tribe-events-button" href="' . tribe_get_gcal_link() . '" title="' . __('Add to Google Calendar', 'tribe-events-calendar-pro') . '">+ ' . __('Google Calendar', 'tribe-events-calendar-pro') . '</a>';
     echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">+ ' . __('iCal Import', 'tribe-events-calendar-pro') . '</a>';
     echo '</div><!-- .tribe-events-cal-links -->';
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:17,代码来源:tribe-ical.class.php

示例3: single_event_links

 /**
  * Generates the markup for iCal and gCal single event links
  *
  * @return void
  **/
 public static function single_event_links()
 {
     // don't show on password protected posts
     if (is_single() && post_password_required()) {
         return;
     }
     echo '<div class="tribe-events-cal-links">';
     echo '<a class="tribe-events-gcal tribe-events-button" href="' . Tribe__Events__Main::instance()->esc_gcal_url(tribe_get_gcal_link()) . '" title="' . esc_attr__('Add to Google Calendar', 'tribe-events-calendar') . '">+ ' . esc_html__('Google Calendar', 'tribe-events-calendar') . '</a>';
     echo '<a class="tribe-events-ical tribe-events-button" href="' . esc_url(tribe_get_single_ical_link()) . '" title="' . esc_attr__('Download .ics file', 'tribe-events-calendar') . '" >+ ' . esc_html__('iCal Export', 'tribe-events-calendar') . '</a>';
     echo '</div><!-- .tribe-events-cal-links -->';
 }
开发者ID:simple-beck,项目名称:project-gc,代码行数:16,代码来源:iCal.php

示例4: widget

 /**
  * Front-end display of widget.
  *
  * @see WP_Widget::widget()
  *
  * @param array $args     Widget arguments.
  * @param array $instance Saved values from database.
  */
 public function widget($args, $instance)
 {
     // nombre de boutons ?
     if (!empty($instance['totalbts'])) {
         $totalbts = $instance['totalbts'];
     } else {
         $totalbts = 0;
         // masque tout si pas de données
     }
     echo $args['before_widget'];
     echo "<div class='pbuttons_group'>";
     for ($x = 1; $x <= $instance['totalbts']; $x++) {
         if (!empty($instance['title' . $x])) {
             $title = "<span class='title'>" . apply_filters('widget_title', $instance['title' . $x]) . "</span>";
         } else {
             $title = '';
         }
         if (!empty($instance['subtitle' . $x])) {
             $subtitle = "<span class='subtitle'>" . apply_filters('widget_title', $instance['subtitle' . $x]) . "</span>";
         } else {
             $subtitle = '';
         }
         if (!empty($instance['link' . $x])) {
             $hrefBlock = 'href="' . stripslashes($instance['link' . $x]) . '"';
         } else {
             $hrefBlock = '';
         }
         if (!empty($instance['type' . $x])) {
             $type = $instance['type' . $x];
         } else {
             $type = "simple";
         }
         if (!empty($instance['blank' . $x])) {
             $blank = $instance['blank' . $x] ? " target='_blank' " : "";
         } else {
             $blank = '';
         }
         switch ($type) {
             case 'simple':
                 $addclass = "simple-btn";
                 $finaltitle = $title . "<br/>" . $subtitle;
                 break;
             case 'telechargement':
                 $addclass = "dl-btn";
                 $title = $title . "<br/>" . $subtitle;
                 //if (preg_match("#guitare#", $title)) {
                 $finaltitle = preg_replace('/(\\(.+\\))/i', "<span class='filetype'>\$1</span>", $title);
                 break;
             case 'iCal':
                 $addclass = "cal-btn";
                 $finaltitle = $title . "<br/>" . $subtitle;
                 $hrefBlock = 'href="' . tribe_get_single_ical_link() . '"';
                 break;
             case 'googleCal':
                 $addclass = "cal-btn";
                 $finaltitle = $title . "<br/>" . $subtitle;
                 $hrefBlock = 'href="' . tribe_get_gcal_link() . '"';
                 break;
         }
         echo '<a ' . $hrefBlock . ' title="' . addslashes($title) . '" class="button groupe long ih-item ' . $addclass . '" ' . $blank . '>' . $finaltitle . '</a>';
     }
     echo "</div>";
     echo $args['after_widget'];
 }
开发者ID:studiopengpeng,项目名称:ASCOMETAL,代码行数:72,代码来源:plaste-buttons.php

示例5: get_the_terms

}
//Get Course(s) list
$classes = get_the_terms($event_id, 'tribe_events_cat');
if ($classes && !is_wp_error($classes)) {
    $draught_links = array();
    foreach ($classes as $class) {
        $class_links[] = $class->name;
    }
    $course_list = join(", ", $class_links);
}
?>


                                    <?php 
//do_action( 'tribe_events_single_event_after_the_content' );
$gcal = tribe_get_gcal_link();
?>
                                    
                                    <div style="display:inline-flex">
                                        <div id="inst-buttons" style="padding:10px;">
                                            <a href="<?php 
echo $gcal;
?>
" target="_blank" style="padding:10px; background:gray; color: white; border-radius: 4px; text-decoration: none;">+Google Calendar</a>
                                        </div>

                                        <div id="inst-buttons" style="padding:10px;">
                                            <a href="<?php 
echo get_permalink($event_id);
?>
?ical=1" target="_blank" style="padding:10px; background:gray; color: white; border-radius: 4px; text-decoration: none;">+iCal Export</a>
开发者ID:csteines,项目名称:Complete-Training-Plugin,代码行数:31,代码来源:inst-notifications-body.php

示例6: sp_get_add_to_gcal_link

 /**
  * @deprecated
  */
 function sp_get_add_to_gcal_link()
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_get_gcal_link()');
     return tribe_get_gcal_link();
 }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:8,代码来源:deprecated.php

示例7: tribe_get_single_ical_link

<?php 
if (function_exists('tribe_get_single_ical_link')) {
    ?>
   <a class="ical single" href="<?php 
    echo tribe_get_single_ical_link();
    ?>
"><?php 
    _e('iCal Import', 'tribe-events-calendar');
    ?>
</a>
<?php 
}
if (function_exists('tribe_get_gcal_link')) {
    ?>
   <a href="<?php 
    echo tribe_get_gcal_link();
    ?>
" class="gcal-add" title="<?php 
    _e('Add to Google Calendar', 'tribe-events-calendar');
    ?>
"><?php 
    _e('+ Google Calendar', 'tribe-events-calendar');
    ?>
</a>
<?php 
}
?>


<div class="navigation cf clear">
	<div class="tribe-prev prev-posts"><?php 
开发者ID:xdividr,项目名称:wi,代码行数:31,代码来源:single.php

示例8: get_the_terms

}
//Get Course(s) list
$classes = get_the_terms($event_id, 'tribe_events_cat');
if ($classes && !is_wp_error($classes)) {
    $draught_links = array();
    foreach ($classes as $class) {
        $class_links[] = $class->name;
    }
    $course_list = join(", ", $class_links);
}
?>


                                    <?php 
//do_action( 'tribe_events_single_event_after_the_content' );
$gcal = tribe_get_gcal_link($event_id);
?>
                                    
                                    <div style="display:inline-flex">
                                        <div id="inst-buttons" style="padding:10px;">
                                            <a href="<?php 
echo $gcal;
?>
" target="_blank" style="padding:10px; background:gray; color: white; border-radius: 4px; text-decoration: none;">+Google Calendar</a>
                                        </div>

                                        <div id="inst-buttons" style="padding:10px;">
                                            <a href="<?php 
echo get_permalink($event_id);
?>
?ical=1" target="_blank" style="padding:10px; background:gray; color: white; border-radius: 4px; text-decoration: none;">+iCal Export</a>
开发者ID:csteines,项目名称:Complete-Training-Plugin,代码行数:31,代码来源:new-inst-notifications-body.php

示例9: grve_single_event_links

/**
 * Prints links for single events
 */
function grve_single_event_links()
{
    // don't show on password protected posts
    if (is_single() && post_password_required()) {
        return;
    }
    echo '<div class="grve-tribe-events-cal-links">';
    echo '<a class="grve-btn grve-btn-extrasmall grve-square grve-bg-primary-1" href="' . tribe_get_gcal_link() . '" title="' . __('Add to Google Calendar', GRVE_THEME_TRANSLATE) . '"><span>' . __('Google Calendar', GRVE_THEME_TRANSLATE) . '</span></a>';
    echo '<a class="grve-btn grve-btn-extrasmall grve-square grve-grey-color" href="' . tribe_get_single_ical_link() . '" title="' . __('Download .ics file', GRVE_THEME_TRANSLATE) . '" ><span>' . __('iCal Export', GRVE_THEME_TRANSLATE) . '</span></a>';
    echo '</div>';
}
开发者ID:poweronio,项目名称:mbsite,代码行数:14,代码来源:grve-events-calendar-functions.php


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