Service_Provider
Class Service_Provider
Source
File: src/Tribe/Compatibility/Divi/Service_Provider.php
class Service_Provider extends \tad_DI52_ServiceProvider {
/**
* Register the bindings and filters required to ensure compatibility Divi theme.
*
* @since 5.3.1
*/
public function register() {
$this->container->singleton( self::class, $this );
$this->container->singleton( 'filterbar.compatibility.divi-theme', $this );
add_filter( 'et_builder_enable_jquery_body', array( $this, 'disable_jquery_body' ), 10, 1 );
}
/**
* Disable Divi jQuery Body on Single Events.
*
* @since 5.3.1
*
* @param bool $enabled Whether to disable the jQuery body.
*
* @return bool Whether to disable the jQuery body.
*/
public function disable_jquery_body( $enabled ) {
return $this->container->make( Scripts::class )->disable_jquery_body( $enabled );
}
}
Changelog
| Version | Description |
|---|---|
| 5.3.1 | Introduced. |
Methods
- disable_jquery_body — Disable Divi jQuery Body on Single Events.
- register — Register the bindings and filters required to ensure compatibility Divi theme.