• Resolved Elango

    (@steelthemeshelp)


    Whlie install my theme and elementor by default automatically enable all the breakpoints please send me the correct code to achieve

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Milos

    (@miloss84)

    Hello there,

    Thank you for contacting us.

    Would it be possible for you to tell us more details about your issue, can you please provide us with a screencast demonstrating the issue?

    This will be useful to us as we will better understand the issue you’re experiencing and provide you with better support.

    I am looking forward to your reply!

    Kind Regards,

    Thread Starter Elango

    (@steelthemeshelp)

    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.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.