EPL_Elementor Class
Main class for Elementor integration.
| Since | |
|---|---|
3.6.0 |
|
| Methods | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct()
Constructor
Constructor Since
|
# | ||||||||||
public
|
register_documents(Documents_Manager $documents_manager)
Register dedicated Elementor documents.
Register dedicated Elementor documents. Parameters
Since
|
# | ||||||||||
public
static
|
instance(): EPL_Elementor
Instance
Instance Since
|
# | ||||||||||
public
|
admin_notice_minimum_elementor_version()
Admin notice for minimum Elementor version
Admin notice for minimum Elementor version Since
|
# | ||||||||||
public
|
register_widget_categories(Elements_Manager $elements_manager)
Register Widget Categories
Register Widget Categories Parameters
Since
|
# | ||||||||||
public
|
register_widgets(Widgets_Manager $widgets_manager)
Register Widgets
Register Widgets Parameters
Since
|
# | ||||||||||
public
|
frontend_styles()
Frontend Styles
Frontend Styles Since
|
# | ||||||||||
public
|
editor_scripts()
Editor Scripts
Editor Scripts Two independent editor-only fixes, both injected as a single inline
script on the real
Since
|
# | ||||||||||
public
static
|
get_post_types(): array
Get EPL Post Types
Get EPL Post Types Since
|
# | ||||||||||
public
static
|
get_status_options(): array
Get Listing Status Options
Get Listing Status Options Since
|
# | ||||||||||
public
static
|
setup_listing_context(): EPL_Property_Meta|false
Set up the global listing context for a widget render.
Set up the global listing context for a widget render. Resolves the property from the existing global, the current post, or — in the Elementor editor — a preview listing. When a preview listing is used, the global $post is switched as well so core template callbacks that read the global post (galleries, stickers, content) work too. Always pair with restore_listing_context() before render() returns. ReturnsThe property object or false if none found. Since
|
# | ||||||||||
public
static
|
restore_listing_context()
Restore the global listing context after a widget render.
Restore the global listing context after a widget render. Since
|
# | ||||||||||
public
static
|
is_editor(): bool
Whether Elementor is rendering an editor preview.
Whether Elementor is rendering an editor preview. Since
|
# | ||||||||||
public
static
|
get_listing_agent(EPL_Property_Meta $property, int $index = 0): EPL_Author_Loader|null
Resolve one listing agent without assuming agents are WordPress users.
Resolve one listing agent without assuming agents are WordPress users. Parameters
Since
|
# | ||||||||||
public
static
|
get_listing_agents(EPL_Property_Meta $property): array
Resolve all unique agents assigned to a listing.
Resolve all unique agents assigned to a listing. Parameters
Since
|
# | ||||||||||
public
static
|
get_agent_image(EPL_Author_Loader $agent, int $size = 150): string
Get an agent image, including Staff Directory post-backed images.
Get an agent image, including Staff Directory post-backed images. Staff Directory's author-box image filter is conditionally attached and can be unavailable while Elementor renders nested documents on an archive. Resolve its canonical directory image first, then retain the public EPL filter so extensions can make a final adjustment. Parameters
Since
|
# | ||||||||||
public
|
elementor_listings_query(WP_Query $query, Widget_Base $widget)
Apply EPL defaults to an Elementor Pro Loop Grid query whose Query ID is
"epl_listings".
Apply EPL defaults to an Elementor Pro Loop Grid query whose Query ID is "epl_listings". Parameters
Since
|
# | ||||||||||
public
|
elementor_staff_query(WP_Query $query, Widget_Base $widget)
Configure an Elementor Pro Loop Grid whose Query ID is "epl_staff".
Configure an Elementor Pro Loop Grid whose Query ID is "epl_staff". Parameters
Since
|
# | ||||||||||
public
|
override_staff_directory_location(bool $override, string $location, object $locations_manager): bool
Ensure Theme Builder owns Staff Directory single/archive requests.
Ensure Theme Builder owns Staff Directory single/archive requests. Staff Directory renders through EPL's PHP templates, which do not call Elementor's single/archive theme locations. Force Elementor's header/footer page template only for Directory requests where a matching Theme Builder document has already been selected. Parameters
Since
|
# | ||||||||||
public
|
elementor_loop_query_args(array $query_args, Widget_Base $widget): array
Make Loop Grids that use an EPL Loop Item query EPL listings in both the
Theme Builder editor and on the archive front…
Make Loop Grids that use an EPL Loop Item query EPL listings in both the Theme Builder editor and on the archive front end. Elementor otherwise defaults an unset Loop Grid source to regular posts. Parameters
Since
|
# | ||||||||||
public
|
elementor_current_query_args(array $query_args): array
Supply representative listings for a Current Query Loop Grid in the editor.
Supply representative listings for a Current Query Loop Grid in the editor. Elementor returns early for Current Query and therefore does not run its general elementor/query/query_args filter. Its Theme Builder preview query normally contains one post, irrespective of the Loop Grid item count. Parameters
Since
|
# | ||||||||||
public
|
begin_loop_grid_render($widget)
Begin loop grid render.
Begin loop grid render. Since
|
# | ||||||||||
public
|
end_loop_grid_render($widget)
End loop grid render.
End loop grid render. Since
|
# | ||||||||||
public
|
register_loop_grid_pagination_provider(Element_Base $element)
Add an EPL renderer choice to Elementor Pro's native Loop Grid pagination.
Add an EPL renderer choice to Elementor Pro's native Loop Grid pagination. Elementor remains the default and retains all of its AJAX/load-more modes. EPL pagination is available for the numbered pagination modes. Parameters
Since
|
# | ||||||||||
public
|
capture_loop_grid_query(WP_Query $query, Widget_Base $widget)
Retain the exact query Elementor used so EPL pagination cannot drift from it.
Retain the exact query Elementor used so EPL pagination cannot drift from it. Parameters
Since
|
# | ||||||||||
public
|
render_loop_grid_epl_pagination(string $content, Widget_Base $widget): string
Replace Loop Grid's native numbered navigation with EPL navigation on demand.
Replace Loop Grid's native numbered navigation with EPL navigation on demand. Parameters
Since
|
# | ||||||||||
public
static
|
render_loop_grid_epl_navigation(WP_Query $query, string $widget_id, $pagination_style = '')
Render canonical EPL navigation for an Elementor Loop Grid.
Render canonical EPL navigation for an Elementor Loop Grid. Parameters
Since
|
# | ||||||||||
public
static
|
render_epl_pagination(WP_Query $query, string $pagination_style = '')
Render EPL pagination while optionally overriding its global style setting.
Render EPL pagination while optionally overriding its global style setting. Parameters
Since
|
# | ||||||||||
public
|
get_last_loop_grid_query()
Get last loop grid query.
Get last loop grid query. Since
|
# | ||||||||||
public
|
allow_epl_loop_grid_page($preempt, $query)
Allow epl loop grid page.
Allow epl loop grid page. Since
|
# | ||||||||||
public
|
track_archive_conditions(int $meta_id, int $post_id, string $meta_key, string|array $meta_value)
Track and, when necessary, restore EPL archive display conditions.
Track and, when necessary, restore EPL archive display conditions. Parameters
Since
|
# | ||||||||||
public
|
restore_archive_conditions()
Restore accidentally emptied conditions after Elementor finishes saving.
Restore accidentally emptied conditions after Elementor finishes saving. Since
|
# | ||||||||||
public
static
|
get_preview_property(): EPL_Property_Meta|false
Get a sample property for editor preview.
Get a sample property for editor preview. Fetches the newest published EPL listing to use as preview data in the Elementor editor. ReturnsThe property object or false if none found. Since
|
# | ||||||||||
| Constants | ||
|---|---|---|
public
|
MINIMUM_ELEMENTOR_VERSION = '3.5.0'
Minimum Elementor Version
Minimum Elementor Version The elementor/widgets/register hook and Widgets_Manager::register() used below were introduced in Elementor 3.5. |
# |