App()
Base App
Description
Base app utility class that provides shared functionality of apps.
Changelog
Version | Description |
---|---|
2.3.0 | Introduced. |
Methods
- get_components_config — Get components config.
- print_config — Print config.
Source
core/base/app.php
abstract class App extends Module { /** * Print config. * * Used to print the app and its components settings as a JavaScript object. * * @access protected */ final protected function print_config() { $name = $this->get_name(); wp_localize_script( 'elementor-' . $name, 'elementor' . ucfirst( $name ) . 'Config', $this->get_settings() + $this->get_components_config() ); } /** * Get components config. * * Retrieves the app components settings. * * @access private * * @return array */ private function get_components_config() { $settings = []; foreach ( $this->get_components() as $id => $instance ) { $settings[ $id ] = $instance->get_settings(); } return $settings; } }