| 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 Base_User_App extends Base_App { |
| 9 |
|
| 10 |
/** |
| 11 |
* @since 2.3.0 |
| 12 |
* @access protected |
| 13 |
*/ |
| 14 |
protected function update_settings() { |
| 15 |
update_user_option( get_current_user_id(), $this->get_option_name(), $this->data ); |
| 16 |
} |
| 17 |
|
| 18 |
/** |
| 19 |
* @since 2.3.0 |
| 20 |
* @access protected |
| 21 |
*/ |
| 22 |
protected function init_data() { |
| 23 |
$this->data = get_user_option( $this->get_option_name() ); |
| 24 |
|
| 25 |
if ( ! $this->data ) { |
| 26 |
$this->data = []; |
| 27 |
} |
| 28 |
} |
| 29 |
} |
| 30 |
|