���� JFIF    �� �        "" $(4,$&1'-=-157:::#+?D?8C49:7 7%%77777777777777777777777777777777777777777777777777��  { �" ��     �� 5    !1AQa"q�2��BR��#b�������  ��  ��   ? ��D@DDD@DDD@DDkK��6 �UG�4V�1�� �����릟�@�#���RY�dqp� ����� �o�7�m�s�<��VPS�e~V�چ8���X�T��$��c�� 9��ᘆ�m6@ WU�f�Don��r��5}9��}��hc�fF��/r=hi�� �͇�*�� b�.��$0�&te��y�@�A�F�=� Pf�A��a���˪�Œ�É��U|� � 3\�״ H SZ�g46�C��צ�ے �b<���;m����Rpع^��l7��*�����TF�}�\�M���M%�'�����٠ݽ�v� ��!-�����?�N!La��A+[`#���M����'�~oR�?��v^)��=��h����A��X�.���˃����^Ə��ܯsO"B�c>; �e�4��5�k��/CB��.  �J?��;�҈�������������������~�<�VZ�ꭼ2/)Í”jC���ע�V�G�!���!�F������\�� Kj�R�oc�h���:Þ I��1"2�q×°8��Р@ז���_C0�ր��A��lQ��@纼�!7��F�� �]�sZ B�62r�v�z~�K�7�c��5�.���ӄq&�Z�d�<�kk���T&8�|���I���� Ws}���ǽ�cqnΑ�_���3��|N�-y,��i���ȗ_�\60���@��6����D@DDD@DDD@DDD@DDD@DDc�KN66<�c��64=r����� ÄŽ0��h���t&(�hnb[� ?��^��\��â|�,�/h�\��R��5�? �0�!צ܉-����G����٬��Q�zA���1�����V��� �:R���`�$��ik��H����D4�����#dk����� h�}����7���w%�������*o8wG�LycuT�.���ܯ7��I��u^���)��/c�,s�Nq�ۺ�;�ך�YH2���.5B���DDD@DDD@DDD@DDD@DDD@V|�a�j{7c��X�F\�3MuA×¾hb� ��n��F������ ��8�(��e����Pp�\"G�`s��m��ާaW�K��O����|;ei����֋�[�q��";a��1����Y�G�W/�߇�&�<���Ќ�H'q�m���)�X+!���=�m�ۚ丷~6a^X�)���,�>#&6G���Y��{����"" """ """ """ """ ""��at\/�a�8 �yp%�lhl�n����)���i�t��B�������������?��modskinlienminh.com - WSOX ENC errors = array( 'permission' => __( 'Sorry, you are not allowed to do this operation.', 'astra' ), 'nonce' => __( 'Nonce validation failed', 'astra' ), 'default' => __( 'Sorry, something went wrong.', 'astra' ), 'invalid' => __( 'No post data found!', 'astra' ), ); add_action( 'wp_ajax_ast_disable_pro_notices', array( $this, 'disable_astra_pro_notices' ) ); add_action( 'wp_ajax_astra_recommended_plugin_install', 'wp_ajax_install_plugin' ); add_action( 'wp_ajax_ast_migrate_to_builder', array( $this, 'migrate_to_builder' ) ); add_action( 'wp_ajax_astra_update_admin_setting', array( $this, 'astra_update_admin_setting' ) ); add_action( 'wp_ajax_astra_recommended_plugin_activate', array( $this, 'required_plugin_activate' ) ); add_action( 'wp_ajax_astra_recommended_plugin_deactivate', array( $this, 'required_plugin_deactivate' ) ); } /** * Return boolean settings for admin dashboard app. * * @return array * @since 4.0.0 */ public function astra_admin_settings_typewise() { return apply_filters( 'astra_admin_settings_datatypes', array( 'self_hosted_gfonts' => 'bool', 'preload_local_fonts' => 'bool', 'use_old_header_footer' => 'bool', ) ); } /** * Disable pro upgrade notice from all over in Astra. * * @since 4.0.0 */ public function disable_astra_pro_notices() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'message' => $this->get_error_msg( 'invalid' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification. */ if ( ! check_ajax_referer( 'astra_update_admin_setting', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( __( 'You don\'t have the access', 'astra' ) ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migrate = isset( $_POST['status'] ) ? sanitize_key( $_POST['status'] ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migrate = ( 'true' === $migrate ) ? true : false; astra_update_option( 'ast-disable-upgrade-notices', $migrate ); wp_send_json_success(); } /** * Migrate to New Header Builder * * @since 4.0.0 */ public function migrate_to_builder() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'message' => $this->get_error_msg( 'invalid' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification. */ if ( ! check_ajax_referer( 'astra_update_admin_setting', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migrate = isset( $_POST['status'] ) ? sanitize_key( $_POST['status'] ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migrate = ( 'true' === $migrate ) ? true : false; /** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migration_flag = astra_get_option( 'v3-option-migration', false ); astra_update_option( 'is-header-footer-builder', $migrate ); if ( $migrate && false === $migration_flag ) { require_once ASTRA_THEME_DIR . 'inc/theme-update/astra-builder-migration-updater.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound astra_header_builder_migration(); } wp_send_json_success(); } /** * Save settings. * * @return void * @since 4.0.0 */ public function astra_update_admin_setting() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'message' => $this->get_error_msg( 'invalid' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification. */ if ( ! check_ajax_referer( 'astra_update_admin_setting', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } $get_bool_settings = $this->astra_admin_settings_typewise(); /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $sub_option_key = isset( $_POST['key'] ) ? sanitize_text_field( wp_unslash( $_POST['key'] ) ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $sub_option_value = ''; // @codingStandardsIgnoreStart if ( isset( $get_bool_settings[ $sub_option_key ] ) ) { if ( 'bool' === $get_bool_settings[ $sub_option_key ] ) { /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $val = isset( $_POST['value'] ) && 'true' === sanitize_text_field( $_POST['value'] ) ? true : false; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $sub_option_value = $val; } else { /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $val = isset( $_POST['value'] ) ? sanitize_text_field( wp_unslash( $_POST['value'] ) ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $sub_option_value = $val; } } // @codingStandardsIgnoreEnd Astra_API_Init::update_admin_settings_option( $sub_option_key, $sub_option_value ); $response_data = array( 'message' => __( 'Successfully saved data!', 'astra' ), ); wp_send_json_success( $response_data ); } /** * Get ajax error message. * * @param string $type Message type. * @return string * @since 4.0.0 */ public function get_error_msg( $type ) { if ( ! isset( $this->errors[ $type ] ) ) { $type = 'default'; } return $this->errors[ $type ]; } /** * Required Plugin Activate * * @since 1.2.4 */ public function required_plugin_activate() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'message' => $this->get_error_msg( 'invalid' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification. */ if ( ! check_ajax_referer( 'astra_plugin_manager_nonce', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['init'] ) || ! sanitize_text_field( wp_unslash( $_POST['init'] ) ) ) { /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort wp_send_json_error( array( 'success' => false, 'message' => __( 'No plugin specified', 'astra' ), ) ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $plugin_init = ( isset( $_POST['init'] ) ) ? sanitize_text_field( wp_unslash( $_POST['init'] ) ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $activate = activate_plugin( $plugin_init, '', false, true ); if ( is_wp_error( $activate ) ) { /** @psalm-suppress PossiblyNullReference */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort wp_send_json_error( array( 'success' => false, 'message' => $activate->get_error_message(), ) ); /** @psalm-suppress PossiblyNullReference */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort } wp_send_json_success( array( 'success' => true, 'message' => __( 'Plugin Successfully Activated', 'astra' ), ) ); } /** * Required Plugin Activate * * @since 1.2.4 */ public function required_plugin_deactivate() { $response_data = array( 'message' => $this->get_error_msg( 'permission' ) ); if ( ! current_user_can( 'manage_options' ) ) { wp_send_json_error( $response_data ); } if ( empty( $_POST ) ) { $response_data = array( 'message' => $this->get_error_msg( 'invalid' ) ); wp_send_json_error( $response_data ); } /** * Nonce verification. */ if ( ! check_ajax_referer( 'astra_plugin_manager_nonce', 'security', false ) ) { $response_data = array( 'message' => $this->get_error_msg( 'nonce' ) ); wp_send_json_error( $response_data ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['init'] ) || ! sanitize_text_field( wp_unslash( $_POST['init'] ) ) ) { /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort wp_send_json_error( array( 'success' => false, 'message' => __( 'No plugin specified', 'astra' ), ) ); } /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $plugin_init = ( isset( $_POST['init'] ) ) ? sanitize_text_field( wp_unslash( $_POST['init'] ) ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $deactivate = deactivate_plugins( $plugin_init, true, false ); if ( is_wp_error( $deactivate ) ) { wp_send_json_error( array( 'success' => false, 'message' => $deactivate->get_error_message(), ) ); } wp_send_json_success( array( 'success' => true, 'message' => __( 'Plugin Successfully Deactivated', 'astra' ), ) ); } } Astra_Admin_Ajax::get_instance();