Skip to content

Instantly share code, notes, and snippets.

@hauge75
Last active April 30, 2016 17:52
Show Gist options
  • Select an option

  • Save hauge75/fabfb6057842a4c4b5af2e9835837be4 to your computer and use it in GitHub Desktop.

Select an option

Save hauge75/fabfb6057842a4c4b5af2e9835837be4 to your computer and use it in GitHub Desktop.

Revisions

  1. hauge75 revised this gist Apr 30, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -9,8 +9,8 @@ function customized_tribe_single_event_links() {
    }

    echo '<div class="tribe-events-cal-links">';
    echo '<a class="tribe-events-gcal tribe-events-button" href="' . tribe_get_gcal_link() . '" title="' . __( 'Legg til i Google kalender', 'tribe-events-calendar-pro' ) . '">Legg til i Google kalender </a>';
    echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">Legg til i din kalender</a>';
    echo '<a class="tribe-events-gcal tribe-events-button" href="' . tribe_get_gcal_link() . '" >Add to your google calendar</a>';
    echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">Add to your own calendar</a>';
    echo '</div><!-- .tribe-events-cal-links -->';
    }
    ?>
  2. hauge75 created this gist Apr 11, 2016.
    16 changes: 16 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?php
    // Changes the text labels for Google Calendar and iCal buttons on a single event page
    remove_action('tribe_events_single_event_after_the_content', array('Tribe__Events__iCal', '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="' . __( 'Legg til i Google kalender', 'tribe-events-calendar-pro' ) . '">Legg til i Google kalender </a>';
    echo '<a class="tribe-events-ical tribe-events-button" href="' . tribe_get_single_ical_link() . '">Legg til i din kalender</a>';
    echo '</div><!-- .tribe-events-cal-links -->';
    }
    ?>