Astra_Builder_Admin::disable_astra_pro_notices()
Disable pro upgrade notice from all over in Astra.
Description
Source
File: inc/core/builder/class-astra-builder-admin.php
public function disable_astra_pro_notices() { check_ajax_referer( 'astra-upgrade-notices-nonce', 'security' ); 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['value'] ) ? sanitize_key( $_POST['value'] ) : ''; /** @psalm-suppress PossiblyInvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort $migrate = ( $migrate ) ? true : false; astra_update_option( 'ast-disable-upgrade-notices', $migrate ); wp_send_json_success(); }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.9.4 | Introduced. |