Elango
Forum Replies Created
Viewing 5 replies - 1 through 5 (of 5 total)
-
While installing elementor i want to enable all the breakpoints.
So please give me corret code to enable all the breakpoitns
// Ensure Elementor is active before running this code
function custom_elementor_enable_all_breakpoints() {
if ( did_action( 'elementor/loaded' ) ) {
add_action( 'elementor/init', 'enable_all_custom_breakpoints' );
}
}
// Hook to Elementor's initialization action
function enable_all_custom_breakpoints() {
$manager = \Elementor\Plugin::$instance->breakpoints;
if ( ! $manager ) {
return;
}
// Get default breakpoints config
$default_config = \Elementor\Core\Breakpoints\Manager::get_default_config();
// Enable all breakpoints
foreach ( $default_config as $breakpoint_key => $breakpoint_settings ) {
$breakpoint = $manager->get_breakpoints( $breakpoint_key );
// Check if the breakpoint exists
if ( $breakpoint && method_exists( $breakpoint, 'enable' ) ) {
$breakpoint->enable();
}
}
// Refresh the breakpoints
$manager->refresh();
}
// Initialize the process after plugins are loaded
add_action( 'plugins_loaded', 'custom_elementor_enable_all_breakpoints' );- This reply was modified 2 months, 2 weeks ago by Elango.
Forum: Plugins
In reply to: [Elementor Website Builder - More than Just a Page Builder] Nested Repeaterhi
thank you.
one more thing how to enable all the responsive breakpoint automatically when installing my theme.
thanks again
- This reply was modified 4 months, 1 week ago by Elango.
Forum: Plugins
In reply to: [Elementor Website Builder - More than Just a Page Builder] Nested Repeaterclass Nested_Repeater_Widget extends \Elementor\Widget_Base {
? ? public function get_name() {
? ? ? ? return 'nested_repeater';
? ? }
? ? public function get_title() {
? ? ? ? return __('Nested Repeater', 'text-domain');
? ? }
? ? public function get_icon() {
? ? ? ? return 'eicon-post-list';
? ? }
? ? public function get_categories() {
? ? ? ? return ['general'];
? ? }
? ? protected function _register_controls() {
? ? ? ? $repeater_inner = new \Elementor\Repeater();
? ? ? ? // Define the fields for the inner repeater
? ? ? ? $repeater_inner->add_control(
? ? ? ? ? ? 'inner_title',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Inner Title', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::TEXT,
? ? ? ? ? ? ? ? 'default' => __('Inner Title', 'text-domain'),
? ? ? ? ? ? ]
? ? ? ? );
? ? ? ? $repeater_inner->add_control(
? ? ? ? ? ? 'inner_description',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Inner Description', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::TEXTAREA,
? ? ? ? ? ? ? ? 'default' => __('Inner Description', 'text-domain'),
? ? ? ? ? ? ]
? ? ? ? );
? ? ? ? $repeater = new \Elementor\Repeater();
? ? ? ? // Define the fields for the outer repeater
? ? ? ? $repeater->add_control(
? ? ? ? ? ? 'outer_title',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Outer Title', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::TEXT,
? ? ? ? ? ? ? ? 'default' => __('Outer Title', 'text-domain'),
? ? ? ? ? ? ]
? ? ? ? );
? ? ? ? $repeater->add_control(
? ? ? ? ? ? 'outer_description',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Outer Description', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::TEXTAREA,
? ? ? ? ? ? ? ? 'default' => __('Outer Description', 'text-domain'),
? ? ? ? ? ? ]
? ? ? ? );
? ? ? ? // Add the inner repeater as a field in the outer repeater
? ? ? ? $repeater->add_control(
? ? ? ? ? ? 'inner_list',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Inner List', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::REPEATER,
? ? ? ? ? ? ? ? 'fields' => $repeater_inner->get_controls(),
? ? ? ? ? ? ? ? 'default' => [],
? ? ? ? ? ? ? ? 'title_field' => 'inner_title
',
? ? ? ? ? ? ]
? ? ? ? );
? ? ? ? // Add the outer repeater control to the widget
? ? ? ? $this->add_control(
? ? ? ? ? ? 'outer_list',
? ? ? ? ? ? [
? ? ? ? ? ? ? ? 'label' => __('Outer List', 'text-domain'),
? ? ? ? ? ? ? ? 'type' => \Elementor\Controls_Manager::REPEATER,
? ? ? ? ? ? ? ? 'fields' => $repeater->get_controls(),
? ? ? ? ? ? ? ? 'default' => [],
? ? ? ? ? ? ? ? 'title_field' => 'outer_title
',
? ? ? ? ? ? ]
? ? ? ? );
? ? }
? ? protected function render() {
? ? ? ? $settings = $this->get_settings_for_display();
? ? ? ? if (!empty($settings['outer_list'])) {
? ? ? ? ? ? echo '<div class="outer-list">';
? ? ? ? ? ? foreach ($settings['outer_list'] as $outer_item) {
? ? ? ? ? ? ? ? echo '<div class="outer-item">';
? ? ? ? ? ? ? ? echo '<h3>' . esc_html($outer_item['outer_title']) . '</h3>';
? ? ? ? ? ? ? ? echo '<p>' . esc_html($outer_item['outer_description']) . '</p>';
? ? ? ? ? ? ? ? if (!empty($outer_item['inner_list'])) {
? ? ? ? ? ? ? ? ? ? echo '<div class="inner-list">';
? ? ? ? ? ? ? ? ? ? foreach ($outer_item['inner_list'] as $inner_item) {
? ? ? ? ? ? ? ? ? ? ? ? echo '<div class="inner-item">';
? ? ? ? ? ? ? ? ? ? ? ? echo '<h4>' . esc_html($inner_item['inner_title']) . '</h4>';
? ? ? ? ? ? ? ? ? ? ? ? echo '<p>' . esc_html($inner_item['inner_description']) . '</p>';
? ? ? ? ? ? ? ? ? ? ? ? echo '</div>';
? ? ? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? ? ? echo '</div>';
? ? ? ? ? ? ? ? }
? ? ? ? ? ? ? ? echo '</div>';
? ? ? ? ? ? }
? ? ? ? ? ? echo '</div>';
? ? ? ? }
? ? }
}
// Register the widget
\Elementor\Plugin::instance()->widgets_manager->register_widget_type(new \Nested_Repeater_Widget());
if i use repeater inside repeater having issue.
Any how to eable all the responsive breakpoints why installing the elemntor pluign any code to enable ?
Thanks
Hi ,Please make sure that your template doesn’t raise any PHP errors, notices or warnings. Enabling wp_debug can help you with this.
https://envato.d.pr/i/sV04h2
https://envato.d.pr/i/cgA0lnWe are using give wp pluign on our theme and submited theme for approval on ThemeForest got soft rejected due to this error , So please give me explanation of this issues so we can resubmit with your explanation.
Thanks
Forum: Plugins
In reply to: [WPC Smart Compare for WooCommerce] Javascript BugsHi ,
Still occurs javascript error
https://www.awesomescreenshot.com/image/28969367?key=3ff276004d0e062d1fc512c2f25d7ec4Thanks
Viewing 5 replies - 1 through 5 (of 5 total)