Advertisement
Guest User

EE Avada Header Fix

a guest
Mar 21st, 2022
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. Plugin Name: EE Avada Header Fix
  5. Plugin URI: https://burntorangedesign.com
  6. Description: Fixes issue of registration details showing in Avada Layout headers.
  7. Version: 1.0
  8. Author: Event Espresso
  9. Author URI: https://eventespresso.com
  10. Text Domain: eventespresso
  11. */
  12.  
  13. /* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
  14.  
  15.  
  16. add_action('awb_remove_third_party_the_content_changes', 'tw_ee_avada_remove_filters', 10);
  17. function tw_ee_avada_remove_filters() {
  18.    remove_filter(
  19.        'the_content',
  20.        array('EED_Event_Single', 'event_details'),
  21.        EED_Event_Single::EVENT_DETAILS_PRIORITY
  22.    );
  23. }
  24.  
  25. add_action('awb_readd_third_party_the_content_changes', 'tw_ee_avada_readd_filters', 10);
  26. function tw_ee_avada_readd_filters() {
  27.    add_filter(
  28.        'the_content',
  29.        array('EED_Event_Single', 'event_details'),
  30.        EED_Event_Single::EVENT_DETAILS_PRIORITY
  31.    );
  32. }
  33.  
  34.  
  35.  
  36.  
  37. /* Stop Adding Functions */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement