nager $widgets_manager
*/
public function register_module( $widgets_manager ) {
include EPIC_DIR . 'includes/class/Elementor/module-elementor.php';
$modules = $this->get_module_instance()->populate_module();
$exclude = array(
'social_icon_wrapper',
'social_icon_item',
'social_counter_wrapper',
'social_counter_item',
'widget'
);
foreach ( $modules as $module ) {
if ( in_array( $module['type'], $exclude ) ) {
continue;
}
$classname = '\\' . $module['name'] . '_Elementor';
$widgets_manager->register_widget_type( new $classname() );
}
}
public function register_group() {
// List of category.
$epic_module = esc_html__( 'EPIC - Module', 'epic-ne' );
$epic_hero = esc_html__( 'EPIC - Hero', 'epic-ne' );
$epic_slider = esc_html__( 'EPIC - Slider', 'epic-ne' );
$epic_element = esc_html__( 'EPIC - Element', 'epic-ne' );
$epic_carousel = esc_html__( 'EPIC - Carousel', 'epic-ne' );
$epic_footer = esc_html__( 'EPIC - Footer', 'epic-ne' );
$epic_post = esc_html__( 'EPIC - Post', 'epic-ne' );
$epic_archive = esc_html__( 'EPIC - Archive', 'epic-ne' );
// We need to match this group with category on `EPIC\Elementor\ModuleElementorAbstract::get_categories`.
$groups = array(
strtolower( str_replace( ' ', '', $epic_module ) ) => $epic_module,
strtolower( str_replace( ' ', '', $epic_hero ) ) => $epic_hero,
strtolower( str_replace( ' ', '', $epic_slider ) ) => $epic_slider,
strtolower( str_replace( ' ', '', $epic_element ) ) => $epic_element,
strtolower( str_replace( ' ', '', $epic_carousel ) ) => $epic_carousel,
strtolower( str_replace( ' ', '', $epic_footer ) ) => $epic_footer,
strtolower( str_replace( ' ', '', $epic_post ) ) => $epic_post,
strtolower( str_replace( ' ', '', $epic_archive ) ) => $epic_archive,
);
foreach ( $groups as $key => $value ) {
\Elementor\Plugin::$instance->elements_manager->add_category( $key, [ 'title' => $value ], 1 );
}
}
public function register_control() {
$controls = array(
'alert' => 'EPIC\Elementor\Control\Alert',
'dynamicselect' => 'EPIC\Elementor\Control\Dynamicselect',
);
foreach ( $controls as $type => $classname ) {
\Elementor\Plugin::instance()->controls_manager->register_control( $type, new $classname() );
}
}
public function register_custom_css_option( $element ) {
$element->add_control(
'custom_css',
[
'label' => esc_html__( 'Custom CSS Setting', 'epic-ne' ),
'type' => \Elementor\Controls_Manager::CODE,
'default' => '',
'description' => esc_html__( 'Enter custom CSS (Note: it will be outputted only on this particular page).', 'epic-ne' ),
]
);
}
public function render_custom_css( $post_id = null ) {
if ( ! is_singular() ) {
return;
}
if ( ! $post_id ) {
$post_id = get_the_ID();
}
if ( $post_id ) {
$settings = get_post_meta( $post_id, '_elementor_page_settings', true );
if ( ! empty( $settings['custom_css'] ) ) {
echo '';
}
}
}
}
Fatal error: Uncaught Error: Class 'EPIC\Elementor\ModuleElementor' not found in /home/azulcris/public_html/wp-content/plugins/epic-news-element/includes/class/Init.php:131
Stack trace:
#0 /home/azulcris/public_html/wp-content/plugins/epic-news-element/includes/class/Init.php(36): EPIC\Init->load_module()
#1 /home/azulcris/public_html/wp-content/plugins/epic-news-element/includes/class/Init.php(27): EPIC\Init->__construct()
#2 /home/azulcris/public_html/wp-content/plugins/epic-news-element/epic-news-element.php(27): EPIC\Init::getInstance()
#3 /home/azulcris/public_html/wp-settings.php(522): include_once('/home/azulcris/...')
#4 /home/azulcris/public_html/wp-config.php(92): require_once('/home/azulcris/...')
#5 /home/azulcris/public_html/wp-load.php(50): require_once('/home/azulcris/...')
#6 /home/azulcris/public_html/wp-blog-header.php(13): require_once('/home/azulcris/...')
#7 /home/azulcris/public_html/index.php(17): require('/home/azulcris/...')
#8 {main}
thrown in /home/azulcris/public_html/wp-content/plugins/epic-news-element/includes/class/Init.php on line 131