epl_elementor_enabled: turn the Elementor widgets (beta) off

Description #

Turns the whole Elementor integration on or off. Return false and EPL doesn't load any of it: no EPL widgets or widget categories in Elementor, no EPL Single Listing or EPL Listing Card template types, no single listing or archive page routing, and the bundled "EPL Card" template isn't installed. Listings go back to EPL's normal PHP templates.

EPL reads this filter as soon as its main plugin file loads, before themes and most plugins, so add it in a must-use plugin. In a theme's functions.php it runs too late and does nothing.

Even when this is true, the integration only starts when Elementor 3.5 or later is active. With an older Elementor, admins see a notice instead.

Part of the Elementor integration, which is in beta. See Elementor widgets and templates (beta) for how the widgets and templates fit together.


Usage #

add_filter( 'epl_elementor_enabled', '__return_false' );

Parameters #

$enabled (bool)
True to load the Elementor widgets and templates. Default true.


Examples #

Save this as wp-content/mu-plugins/epl-no-elementor.php:

<?php
/**
 * Plugin Name: EPL without the Elementor widgets
 */
add_filter( 'epl_elementor_enabled', '__return_false' );

The Elementor Templates tab in EPL settings still shows while Elementor is active, but its settings do nothing when the integration is off. Pages that already use EPL widgets lose them on the front end, because Elementor can't render a widget that isn't registered.


Source #

easy-property-listings.php, in Easy_Property_Listings::includes(). Since 3.6.