Keeping EA from loading an image

Home Forums Calendar Products Event Aggregator Keeping EA from loading an image

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1214744
    jazzinconcert
    Participant

    Hi there is it possible to prevent event aggregator from loading images when importing events from facebook ?

    I would like to import everything but NO images.

    I would be thankful if there is any solution!

    Thanks

    #1214956
    Hunter
    Moderator

    Hi and welcome back šŸ™‚

    I hope your New Year is off to a great start! At this time, there’s not any way to disable featured images from being imported using Event Aggregator from Facebook. I see the validity in giving users the option of selecting what does and doesn’t get imported. The best place to submit requests of this nature is our UserVoice Feature Ideas page.

    Sorry I don’t have a better answer for you at this time and please let me know if you have any more questions or comments. Thank you and have a great evening. Cheers!

    #1215179
    jazzinconcert
    Participant

    Hi Hunter,

    hm… that’s bad…

    Because of the copyright law in Germany i really would like to NOT import the images from facebook.

    With the former FACEBOOK IMPORTER something like this add_filter( 'tribe_fb_event_img', '__return_false' ); worked.

    Is there no chance to get something like this for EA ?

    If not, maybe there is a way to hide the images on events belonging to special category? Maybe a snippet for php in the different views or in the function.php?

    Thanks for help
    Thomas

    #1215726
    jazzinconcert
    Participant

    Hi Hunter,

    iā€™m sorry , no, causes fatal error.

    #1216302
    Hunter
    Moderator

    Hello,

    I had mistakenly shared a snippet with you, so I deleted it so you and other users wouldn’t be confused by it. Try adding the following snippet to the bottom of your theme’s functions.php file and let me know if it works:

    /* Tribe, prevent image import for Facebook events */
    function tribe_ea_prevent_fb_image ( $event, $record ) {

    // bail if the origin is not facebook
    if ( $record->meta['origin'] != 'facebook' ) return $event;

    // unset image data
    unset( $event['image'] );

    return $event;
    }
    add_filter( 'tribe_aggregator_before_save_event', 'tribe_ea_prevent_fb_image', 10, 2);

    #1227573
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Keeping EA from loading an image’ is closed to new replies.