• Resolved mastercoeurl

    (@mastercoeurl)


    I’m trying to remove some of the built in WordPress features I’m not using on my site but when I dequeue wp-mediaelement, it breaks embedded foogalleries in my posts. Does Foogallery require these or is there a way of dequeueing them without breaking it. Here’s the function I’m using.

    add_action('init', 'remove_media_element', 10);
    function remove_media_element()
    {	
    	wp_deregister_script('wp-mediaelement');
    	wp_deregister_style('wp-mediaelement');
    } 
    • This topic was modified 8 years, 4 months ago by mastercoeurl.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bradvin

    (@bradvin)

    Hi

    FooGallery does not rely on the mediaelement library, so what I think is happening is that your theme has a dependancy on the mediaelement library which is causing a javascript error, now that it is being dequeued from the page.

    A way to get FooGallery working is to goto FooGallery Settings, Advanced Tab and enable Custom Ready Event, then save settings. This will change FooGallery to use it’s own ready event, which will work around any javascript errors that are being thrown in any jquery ready events.

    Thread Starter mastercoeurl

    (@mastercoeurl)

    Thank you very much. Not only did you help me solve the problem, you also put me on the path to find other javascript errors I didn’t even realise were there and fixed them too.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disabling wp-mediaelement breaks gallery embeds’ is closed to new replies.