'Not allowed' ), 403 );
}
delete_user_meta( get_current_user_id(), 'adt_shield_pro_welcome_pending' );
wp_send_json_success();
}
/** Show only once after a fresh activation, on Plugins or the plugin's own pages. */
public static function welcome_dialog() {
if ( ! current_user_can( 'manage_options' ) || '1' !== get_user_meta( get_current_user_id(), 'adt_shield_pro_welcome_pending', true ) ) { return; }
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;
if ( ! $screen || ( 'plugins' !== $screen->id && false === strpos( $screen->id, self::SLUG ) ) ) { return; }
?>
$view,
'ajax' => admin_url( 'admin-ajax.php' ),
'nonce' => wp_create_nonce( 'adt_shield' ),
'urls' => array(
'dashboard' => admin_url( 'admin.php?page=' . self::SLUG ),
'scan' => admin_url( 'admin.php?page=' . self::SLUG . '-scan' ),
'reports' => admin_url( 'admin.php?page=' . self::SLUG . '-reports' ),
),
'last' => ADT_Shield_Scanner::view_result( get_option( ADT_Shield_Scanner::OPT_RESULT ) ),
'history' => array_reverse( ADT_Shield_History::summaries() ),
'i18n' => array(
'scanning' => __( 'Scanning...', 'adnanthemes-malware-scanner' ),
'clean' => __( 'No findings were detected in the files checked. This does not guarantee the website is malware-free.', 'adnanthemes-malware-scanner' ),
'error' => __( 'Something went wrong. Please try again.', 'adnanthemes-malware-scanner' ),
),
)
);
}
private static function shell( $view, $title, $intro ) {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
?>
Skip to main content