disable Export listing from the front page

Home Forums Calendar Products Events Calendar PRO disable Export listing from the front page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #935349
    screenrage
    Participant

    How do I disable the Export Listed Events button which shows up at the bottom of the List View? I don’t want people to come in, grab the export of all events and not come back to the site for a month.

    I would like to completely disable that functionality not just simply remove the button.

    thanks

    #935355
    screenrage
    Participant

    please help!

    #935407
    Barry
    Member

    Hi screenrage,

    To only remove that link from list view, you could use a snippet like this one (you might add it to your theme’s functions.php file, for instance):

    add_filter( 'tribe_events_list_show_ical_link', 'list_view_remove_ical_link' );
    
    function list_view_remove_ical_link( $show_remove ) {
    	if ( tribe_is_list_view() ) return false;
    	return $show_remove;
    }

    To remove it from all views you could do this instead:

    add_filter( 'tribe_events_list_show_ical_link', '__return_false' );

    I would like to completely disable that functionality not just simply remove the button.

    To actually prevent an iCal feed from being supplied even if a user somehow crafts the correct URL manually, you could also add a snippet like this one:

    if ( did_action( 'plugins_loaded' ) ) remove_ical_functionality();
    else add_action( 'plugins_loaded', 'remove_ical_functionality', 200 );
    
    function remove_ical_functionality() {
    	remove_action( 'tribe_tec_template_chooser', array( 'TribeiCal', 'do_ical_template' ) );
    }

    Does that help?

    #935601
    screenrage
    Participant

    Yes it does! Thank you so much Barry!

    #935632
    screenrage
    Participant

    the last snippet to completely disable it, would that also go in functions.php?

    #935728
    Barry
    Member

    Yes – you could add it to your theme’s functions.php file 🙂

    #935928
    screenrage
    Participant

    thanks!

    #935941
    Barry
    Member

    No problem.

    I’ll go ahead and close this topic, but if we can help with anything else please do feel free to create new topics as needed.

    Thanks again!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘disable Export listing from the front page’ is closed to new replies.