Skip to content

Commit

Permalink
move nonce check
Browse files Browse the repository at this point in the history
  • Loading branch information
pkevan committed Dec 18, 2024
1 parent 5798957 commit aa8a4b3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,11 @@ public function menu_tools_tabs() {
* @see summarize_admin_init()
*/
public function menu_tools_summarize() {
$summarize_by = isset( $_POST['tix_summarize_by'] ) ? $_POST['tix_summarize_by'] : 'ticket';
if ( isset( $_POST['tix_summarize_submit'] ) && wp_verify_nonce( $_POST['_wp_nonce'], 'tix_summarize' ) && array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) :
if ( isset( $_POST['tix_summarize_submit'] ) && wp_verify_nonce( $_POST['_wp_nonce'], 'tix_summarize' ) ) {
$summarize_by = isset( $_POST['tix_summarize_by'] ) ? $_POST['tix_summarize_by'] : 'ticket';
if ( ! array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) {
return;
}
$fields = $this->get_available_summary_fields();
$summary = $this->get_summary( $summarize_by );
$summary_title = $fields[ $summarize_by ];
Expand Down

0 comments on commit aa8a4b3

Please sign in to comment.