| Server IP : 208.122.213.31 / Your IP : 216.73.216.45 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/xxxupdates.com/public_html/wp-content/plugins/age-gate/src/Integration/ |
Upload File : |
<?php
namespace AgeGate\Integration;
use AgeGate\Common\Settings;
use AgeGate\Common\Integration;
class Divi extends Integration
{
public function exists()
{
return function_exists('et_fb_is_enabled');
}
public function init()
{
if ($this->exists()) {
// add_action('init', function () {
if (isset($_GET['et_fb']) && current_user_can('edit_posts')) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
Settings::getInstance()->set('isBuilder', true);
}
add_action('age_gate/before_render', [$this, 'pauseDiviCssCache']);
// });
}
}
public function pauseDiviCssCache()
{
$class = 'ET_Core_PageResource';
// Output Location: head-early, right after theme styles have been enqueued.
remove_action('wp_enqueue_scripts', [$class, 'head_early_output_cb'], 11);
// Output Location: head, right BEFORE the theme and wp's custom css.
remove_action('wp_head', [$class, 'head_output_cb'], 99);
// Output Location: head-late, right AFTER the theme and wp's custom css.
remove_action('wp_head', [$class, 'head_late_output_cb'], 103);
// Output Location: footer
remove_action('wp_footer', [$class, 'footer_output_cb'], 20);
// Always delete cached resources for a post upon saving.
remove_action('save_post', [$class, 'save_post_cb'], 10, 3);
// Always delete cached resources for theme customizer upon saving.
remove_action('customize_save_after', [$class, 'customize_save_after_cb']);
// Add fallback callbacks (lol) to link/script tags
remove_filter('style_loader_tag', [$class, 'link_and_script_tags_filter_cb'], 999, 2);
remove_filter('wp_get_custom_css', 'et_epanel_handle_custom_css_output', 999, 2);
add_action('wp_head', 'wp_custom_css_cb', 101);
}
}