0, 'action' => '', 'msg' => 'Not allowed in demo mode!' ))); print "!!!ASL_MAINT_STOP!!!"; die(); } $status = 0; $msg = 'Missing POST information, please try again!'; $action = 'none'; if ( isset($_POST, $_POST['data']) ) { if (is_array($_POST['data'])) $data = $_POST['data']; else parse_str($_POST['data'], $data); if ( isset($data['asl_reset_nonce']) ) { $nonce = 'asl_reset_nonce'; } else if ( isset($data['asl_wipe_nonce']) ) { $nonce = 'asl_wipe_nonce'; } if ( isset($data[$nonce]) && wp_verify_nonce( $data[$nonce], $nonce ) ) { if ( $nonce == 'asl_reset_nonce' ) { // Reset wd_asl()->init->pluginReset(); $status = 1; $action = 'refresh'; $msg = 'The plugin data was successfully reset!'; } else { // Wipe wd_asl()->init->pluginWipe(); $status = 1; $action = 'redirect'; $msg = 'All plugin data was successfully wiped, you will be redirected in 5 seconds!'; } } else { $msg = 'Missing or invalid NONCE, please reload this page and try again!'; } } $ret = array( 'status' => $status, 'action' => $action, 'msg' => $msg ); print "Maintenance !!!ASL_MAINT_START!!!"; print_r(json_encode($ret)); print "!!!ASL_MAINT_STOP!!!"; die(); } // ------------------------------------------------------------ // ---------------- SINGLETON SPECIFIC -------------------- // ------------------------------------------------------------ public static function getInstance() { if ( ! ( self::$_instance instanceof self ) ) { self::$_instance = new self(); } return self::$_instance; } } }