| @@ -164,9 +164,9 @@ | ||
| 164 | 164 | $is_post = $_SERVER['REQUEST_METHOD'] == 'POST'; |
| 165 | 165 | $input_method = $is_post ? INPUT_POST : INPUT_GET; |
| 166 | 166 | |
| 167 | 167 | $chart_id = $success = false; |
| 168 | - $nonce = Visualizer_Security::verifyNonce( filter_input( $input_method, 'nonce' ) ); | |
| 168 | + $nonce = wp_verify_nonce( filter_input( $input_method, 'nonce' ) ); | |
| 169 | 169 | $capable = current_user_can( 'delete_posts' ); |
| 170 | 170 | if ( $nonce && $capable ) { |
| 171 | 171 | $chart_id = filter_input( $input_method, 'chart', FILTER_VALIDATE_INT, array( 'options' => array( 'min_range' => 1 ) ) ); |
| 172 | 172 | if ( $chart_id ) { |
| @@ -260,9 +260,9 @@ | ||
| 260 | 260 | * @access private |
| 261 | 261 | */ |
| 262 | 262 | private function _handleTypesPage() { |
| 263 | 263 | // process post request |
| 264 | - if ( $_SERVER['REQUEST_METHOD'] == 'POST' && Visualizer_Security::verifyNonce( filter_input( INPUT_POST, 'nonce' ) ) ) { | |
| 264 | + if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_POST, 'nonce' ) ) ) { | |
| 265 | 265 | $type = filter_input( INPUT_POST, 'type' ); |
| 266 | 266 | if ( in_array( $type, Visualizer_Plugin::getChartTypes() ) ) { |
| 267 | 267 | // save new chart type |
| 268 | 268 | update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_CHART_TYPE, $type ); |
| @@ -333,9 +333,9 @@ | ||
| 333 | 333 | * |
| 334 | 334 | * @access private |
| 335 | 335 | */ |
| 336 | 336 | private function _handleSettingsPage() { |
| 337 | - if ( $_SERVER['REQUEST_METHOD'] == 'POST' && Visualizer_Security::verifyNonce( filter_input( INPUT_GET, 'nonce' ) ) ) { | |
| 337 | + if ( $_SERVER['REQUEST_METHOD'] == 'POST' && wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) { | |
| 338 | 338 | if ( $this->_chart->post_status == 'auto-draft' ) { |
| 339 | 339 | $this->_chart->post_status = 'publish'; |
| 340 | 340 | wp_update_post( $this->_chart->to_array() ); |
| 341 | 341 | } |
| @@ -393,9 +393,9 @@ | ||
| 393 | 393 | * @access public |
| 394 | 394 | */ |
| 395 | 395 | public function uploadData() { |
| 396 | 396 | // validate nonce |
| 397 | - if ( !Visualizer_Security::verifyNonce( filter_input( INPUT_GET, 'nonce' ) ) ) { | |
| 397 | + if ( !wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ) ) ) { | |
| 398 | 398 | status_header( 403 ); |
| 399 | 399 | exit; |
| 400 | 400 | } |
| 401 | 401 | |
| @@ -444,9 +444,9 @@ | ||
| 444 | 444 | * @access public |
| 445 | 445 | */ |
| 446 | 446 | public function cloneChart() { |
| 447 | 447 | $chart_id = $success = false; |
| 448 | - $nonce = Visualizer_Security::verifyNonce( filter_input( INPUT_GET, 'nonce' ), Visualizer_Plugin::ACTION_CLONE_CHART ); | |
| 448 | + $nonce = wp_verify_nonce( filter_input( INPUT_GET, 'nonce' ), Visualizer_Plugin::ACTION_CLONE_CHART ); | |
| 449 | 449 | $capable = current_user_can( 'edit_posts' ); |
| 450 | 450 | if ( $nonce && $capable ) { |
| 451 | 451 | $chart_id = filter_input( INPUT_GET, 'chart', FILTER_VALIDATE_INT, array( 'options' => array( 'min_range' => 1 ) ) ); |
| 452 | 452 | if ( $chart_id ) { |