Deprecated tribe_events_event_recurring_info_tooltip

Home Forums Calendar Products Events Calendar PRO Deprecated tribe_events_event_recurring_info_tooltip

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1039840
    Daniel Maier
    Participant

    The following function located at \the-events-calendar\src\functions\template-tags\deprecated.php has been deprecated. Is there a new function that will replace this?

    
    	if ( ! function_exists( 'tribe_events_event_recurring_info_tooltip' ) ) {
    		/**
    		 * @deprecated
    		 */
    		function tribe_events_event_recurring_info_tooltip( $post_id = null ) {
    			_deprecated_function( __FUNCTION__, '3.5', 'tribe_events_recurrence_tooltip()' );
    			if ( function_exists( 'tribe_events_recurrence_tooltip' ) ) {
    				tribe_events_recurrence_tooltip( $post_id );
    			}
    		}
    	}
    

    Thanks!

    #1039845
    Daniel Maier
    Participant

    I also found the same/similar function in /events-calendar-pro/scr/functions/template-tags/general.php (line 714) and it doesn’t say it is deprecated:

    
    	/**
    	 * show the recurring event info in a tooltip
    	 *
    	 * return the details of the start/end date/time
    	 *
    	 * @param int     $post_id
    	 *
    	 * @return string
    	 * @todo remove tribe_events_event_recurring_info_tooltip filter in 3.11
    	 */
    	function tribe_events_recurrence_tooltip( $post_id = null ) {
    		if ( empty( $post_id ) ) {
    			$post_id = get_the_ID();
    		}
    		$tooltip = '';
    		if ( tribe_is_recurring_event( $post_id ) ) {
    			$tooltip .= '<div class="recurringinfo">';
    			$tooltip .= '<div class="event-is-recurring">';
    			$tooltip .= '<span class="tribe-events-divider">|</span>';
    			$tooltip .= sprintf( __( 'Recurring %s', 'tribe-events-calendar-pro' ), tribe_get_event_label_singular() );
    			$tooltip .= sprintf( ' <a href="%s">%s</a>',
    				esc_url( tribe_all_occurences_link( $post_id, false ) ),
    				__( '(See all)', 'tribe-events-calendar-pro' )
    			);
    			$tooltip .= '<div id="tribe-events-tooltip-'. $post_id .'" class="tribe-events-tooltip recurring-info-tooltip">';
    			$tooltip .= '<div class="tribe-events-event-body">';
    			$tooltip .= tribe_get_recurrence_text( $post_id );
    			$tooltip .= '</div>';
    			$tooltip .= '<span class="tribe-events-arrow"></span>';
    			$tooltip .= '</div>';
    			$tooltip .= '</div>';
    			$tooltip .= '</div>';
    		}
    
    		if ( has_filter( 'tribe_events_event_recurring_info_tooltip' ) ) {
    			_deprecated_function( "The 'tribe_get_related_events' filter", '3.9', " the 'tribe_events_recurrence_tooltip' filter" );
    			$tooltip = apply_filters( 'tribe_events_event_recurring_info_tooltip', $tooltip ); // for backwards-compat, will be removed
    		}
    
    		return apply_filters( 'tribe_events_recurrence_tooltip', $tooltip );
    	}
    
    #1040903
    George
    Participant

    Hi Daniel,

    Yes, tribe_events_recurrence_tooltip() replaces the deprecated function tribe_events_event_recurring_info_tooltip()

    I hope this helps!
    George

    #1040910
    Daniel Maier
    Participant

    Thanks George!

    #1041131
    George
    Participant

    😀

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Deprecated tribe_events_event_recurring_info_tooltip’ is closed to new replies.