if ( Plugin::$instance->experiments->is_feature_active( 'additional_custom_breakpoints' ) ) {
$kit_active_id = Plugin::$instance->kits_manager->get_active_id();
// Get the breakpoint settings saved in the kit directly from the DB to avoid initializing the kit too early.
$raw_kit_settings = get_post_meta( $kit_active_id, '_elementor_page_settings', true );
// If there is an existing kit with an active breakpoints value saved, use it.
if ( isset( $raw_kit_settings[ Settings_Layout::ACTIVE_BREAKPOINTS_CONTROL_ID ] ) ) {
$active_breakpoint_keys = $raw_kit_settings[ Settings_Layout::ACTIVE_BREAKPOINTS_CONTROL_ID ];
}
}
$default_config = self::get_default_config();
foreach ( $default_config as $breakpoint_name => $breakpoint_config ) {
$args = [ 'name' => $breakpoint_name ] + $breakpoint_config;
// Make sure the two default breakpoints (mobile, tablet) are always enabled.
if ( self::BREAKPOINT_KEY_MOBILE === $breakpoint_name || self::BREAKPOINT_KEY_TABLET === $breakpoint_name ) {
// Make sure the default Mobile and Tablet breakpoints are always enabled.
$args['is_enabled'] = true;
} else {
// If the breakpoint is in the active breakpoints array, make sure it's instantiated as enabled.
$args['is_enabled'] = in_array( $setting_prefix . $breakpoint_name, $active_breakpoint_keys, true );
}
$breakpoints[ $breakpoint_name ] = new Breakpoint( $args );
}
$this->breakpoints = $breakpoints;
}
/**
* Init Active Breakpoints
*
* Create/Refresh the array of --enabled-- breakpoints.
*
* @since 3.2.0
*/
private function init_active_breakpoints() {
$this->active_breakpoints = array_filter( $this->get_breakpoints(), function( $breakpoint ) {
/** @var Breakpoint $breakpoint */
return $breakpoint->is_enabled();
} );
}
private function get_desktop_previous_device_key() {
$config_array_keys = array_keys( $this->get_active_breakpoints() );
$num_of_devices = count( $config_array_keys );
// If the widescreen breakpoint is active, the device that's previous to desktop is the last one before
// widescreen.
if ( self::BREAKPOINT_KEY_WIDESCREEN === $config_array_keys[ $num_of_devices - 1 ] ) {
$desktop_previous_device = $config_array_keys[ $num_of_devices - 2 ];
} else {
// If the widescreen breakpoint isn't active, we just take the last device returned by the config.
$desktop_previous_device = $config_array_keys[ $num_of_devices - 1 ];
}
return $desktop_previous_device;
}
/**
* Get Stylesheet Templates
*
* @since 3.2.0
* @access private
* @static
*/
private static function get_stylesheet_templates() {
$templates_paths = glob( self::get_stylesheet_templates_path() . '*.css' );
$templates = [];
foreach ( $templates_paths as $template_path ) {
$file_name = 'custom-' . basename( $template_path );
$templates[ $file_name ] = $template_path;
}
$deprecated_hook = 'elementor/core/responsive/get_stylesheet_templates';
$replacement_hook = 'elementor/core/breakpoints/get_stylesheet_template';
/**
* @type Deprecation $deprecation_module
*/
$deprecation_module = Plugin::$instance->modules_manager->get_modules( 'dev-tools' )->deprecation;
// TODO: REMOVE THIS DEPRECATED HOOK IN ELEMENTOR v3.10.0/v4.0.0
$templates = $deprecation_module->apply_deprecated_filter( $deprecated_hook, [ $templates ], '3.2.0', $replacement_hook );
return apply_filters( $replacement_hook, $templates );
}
}
Fatal error: Uncaught Error: Class 'Elementor\Core\Breakpoints\Manager' not found in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php:733
Stack trace:
#0 /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php(673): Elementor\Plugin->init_components()
#1 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(324): Elementor\Plugin->init('')
#2 /var/www/html/dportilho.com.br/web/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /var/www/html/dportilho.com.br/web/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /var/www/html/dportilho.com.br/web/wp-settings.php(704): do_action('init')
#5 /var/www/html/dportilho.com.br/web/wp-config.php(126): require_once('/var/www/html/d...')
#6 /var/www/html/dportilho.com.br/web/wp-load.php(50): require_once('/var/www/html/d...')
#7 /var/www/html/dportilho.com.br/web/wp-blog-header.php(13): require_once('/var/www/html/d...')
#8 /var/www/html/dportilho.com.br/web/index.php(17): require in /var/www/html/dportilho.com.br/web/wp-content/plugins/elementor/includes/plugin.php on line 733