PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.0-dev3
Elementor Website Builder – more than just a page builder v3.30.0-dev3
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
elementor / core / common / modules / connect / apps / common-app.php

common-app.php in Elementor Website Builder – more than just a page builder 3.30.0-dev3, at core/common/modules/connect/apps/common-app.php

43 lines 909 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace Elementor\Core\Common\Modules\Connect\Apps;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit; // Exit if accessed directly.
6 }
7
8 abstract class Common_App extends Base_User_App {
9 const OPTION_CONNECT_COMMON_DATA_KEY = self::OPTION_NAME_PREFIX . 'common_data';
10
11 protected static $common_data = null;
12
13 /**
14 * @since 2.3.0
15 * @access public
16 */
17 public function get_option_name() {
18 return static::OPTION_NAME_PREFIX . 'common_data';
19 }
20
21 /**
22 * @since 2.3.0
23 * @access protected
24 */
25 protected function init_data() {
26 if ( is_null( self::$common_data ) ) {
27 self::$common_data = get_user_option( static::get_option_name() );
28
29 if ( ! self::$common_data ) {
30 self::$common_data = [];
31 };
32 }
33
34 $this->data = & self::$common_data;
35 }
36
37 public function action_reset() {
38 delete_user_option( get_current_user_id(), static::OPTION_CONNECT_COMMON_DATA_KEY );
39
40 parent::action_reset();
41 }
42 }
43