getName(); $js_var = 'frontend' === $name ? 'ceFrontendConfig' : 'elementor' . str_replace(' ', '', ucwords(str_replace('-', ' ', $name))) . 'Config'; $config = $this->getSettings() + $this->getComponentsConfig(); if (!$handle) { $handle = 'elementor-' . $name; } wp_localize_script($handle, $js_var, $config); } /** * Get components config. * * Retrieves the app components settings. * * @since 2.3.0 * * @return array */ private function getComponentsConfig() { $settings = []; foreach ($this->getComponents() as $id => $instance) { $settings[$id] = $instance->getSettings(); } return $settings; } }