Change + iCal Import Button Text

Home Forums Calendar Products Events Calendar PRO Change + iCal Import Button Text

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #149742
    Sean
    Participant

    Hi guys – ripping my hair out on this one. Why can I not find the source code for this button text? I want to change it to something more specific, such as “Import Single Event as iCal”, but since I can’t locate the source, it’s proving impossible. Any thoughts?

    #150747
    Leah
    Member

    Hi skmcnair,

    Stop tearing your hair out, we’re here to help 😀

    Might this tutorial help you out? If that’s not what you’re going for, let me know and I’ll see if we can’t point you in the right direction for what you need.

    Best,

    Leah

    #152105
    Sean
    Participant

    Thanks. This added the new buttons…. but it also left the old ones. Has the process been changed by one of your recent updates?

    #154111
    Barry
    Member

    Sorry about that, Sean. Try this:

    add_action( 'init', 'replace_ical_google_btns' );
    
    function replace_ical_google_btns() {
    	remove_action( 'tribe_events_single_event_after_the_content', array( 'TribeiCal', 'single_event_links' ) );
    	add_action( 'tribe_events_single_event_after_the_content', '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-gcal tribe-events-button" href="' . tribe_get_gcal_link() . '" title="' . __( 'Add to Google Calendar', 'tribe-events-calendar-pro' ) . '">+ Chocolate Giraffes </a>';
    	echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">+ Pyjama Parties </a>';
    	echo '</div><!-- .tribe-events-cal-links -->';
    }

    Let us know if that works (we’ll be sure to update the tutorial accordingly) 🙂

    #701400
    Barry
    Member

    Hi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Change + iCal Import Button Text’ is closed to new replies.