Exemple #1
0
 /**
  * Link to Previous Event (Display)
  *
  * Displays a link to the previous post by start date for the given event
  *
  * @param bool|string $anchor link text. Use %title% to place the post title in your string.
  * @return void
  * @see tribe_get_prev_event_link()
  */
 function tribe_the_prev_event_link($anchor = false)
 {
     echo apply_filters('tribe_the_prev_event_link', tribe_get_prev_event_link($anchor));
 }
 public function remove_arrow_from_prev_link($anchor)
 {
     return tribe_get_prev_event_link('%title%');
 }
 /**
  * @deprecated
  */
 function tribe_previous_event_link($anchor = false)
 {
     _deprecated_function(__FUNCTION__, '2.1', 'echo tribe_the_prev_event_link( $anchor )');
     echo apply_filters('tribe_previous_event_link', tribe_get_prev_event_link($anchor));
 }
Exemple #4
0
 function avia_events_custom_post_nav($entry)
 {
     if (tribe_is_event()) {
         $final = $links = $entry = array();
         $links['next'] = tribe_get_next_event_link("{-{%title%}-}");
         $links['prev'] = tribe_get_prev_event_link("{-{%title%}-}");
         foreach ($links as $key => $link) {
             preg_match('/^<a.*?href=(["\'])(.*?)\\1.*$/', $link, $m);
             $final[$key]['link_url'] = !empty($m[2]) ? $m[2] : "";
             preg_match('/\\{\\-\\{(.+)\\}\\-\\}/', $link, $m2);
             $final[$key]['link_text'] = !empty($m2[1]) ? $m2[1] : "";
             if (!empty($final[$key]['link_text'])) {
                 $entry[$key] = new stdClass();
                 $entry[$key]->av_custom_link = $final[$key]['link_url'];
                 $entry[$key]->av_custom_title = $final[$key]['link_text'];
                 $entry[$key]->av_custom_image = false;
             }
         }
     }
     return $entry;
 }