Skip to main content

GravityKit\GravityCalendar\Elementor\Loader

Registers the GravityCalendar widgets with Elementor.

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:25

Details

  • Kind: class
  • Namespace: GravityKit\GravityCalendar\Elementor

Methods

MethodDescription
init()Hooks everything Elementor needs.
register_widgets()Registers the widgets.
register_category()Adds the GravityKit category to the Elementor panel.
enqueue_editor_styles()Adds the widget icon's styles to the editor.
enqueue_preview_scripts()Enqueues the scripts the calendar needs inside the editor's preview iframe.
enqueue_preview_styles()Enqueues the styles the calendar needs inside the editor's preview iframe.

Method Reference

init()

public static function init()

Hooks everything Elementor needs.

Runs on elementor/init, so nothing below is reachable when Elementor is inactive.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:56

register_widgets()

public static function register_widgets( $widgets_manager )

Registers the widgets.

Parameters

NameTypeDefaultDescription
$widgets_manager\Elementor\Widgets_ManagerElementor's widgets manager.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:73

register_category()

public static function register_category( $elements_manager )

Adds the GravityKit category to the Elementor panel.

Parameters

NameTypeDefaultDescription
$elements_manager\Elementor\Elements_ManagerElementor's elements manager.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:92

enqueue_editor_styles()

public static function enqueue_editor_styles()

Adds the widget icon's styles to the editor.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:109

enqueue_preview_scripts()

public static function enqueue_preview_scripts()

Enqueues the scripts the calendar needs inside the editor's preview iframe.

Elementor injects the widget's markup into an already-loaded iframe, so nothing the shortcode enqueues during that render is ever printed. Everything the calendar needs has to reach the iframe on its own page load instead.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:124

enqueue_preview_styles()

public static function enqueue_preview_styles()

Enqueues the styles the calendar needs inside the editor's preview iframe.

Returns

  • void

Since: 2.22.0

Source: includes/elementor/class-calendar-elementor.php:150