Plugin Directory

Changeset 1424438


Ignore:
Timestamp:
05/26/2016 02:19:12 AM (10 years ago)
Author:
sgrant
Message:

Updates for backslashes and renaming nonces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • author-wordcount/trunk/author-wordcount.php

    r1063985 r1424438  
    8686
    8787            if ( isset( $_POST[ 'wordcount_name' ] ) ) {
     88                $name = stripslashes( $_POST[ 'wordcount_name' ] );
    8889
    8990                if ( isset( $_POST[ 'wordcount_add' ] ) &&
     
    9899                    update_option( 'author_wordcount', $this->word_obj );
    99100
    100                 } elseif ( isset( $_POST[ 'wordcount_delete' ] ) &&
    101                            wp_verify_nonce( $_POST[ 'wp_nonce' ],
    102                                'update-' . $_POST[ 'wordcount_name' ] ) ) {
    103 
    104                     unset( $this->word_obj[ $_POST[ 'wordcount_name' ] ] );
     101                } elseif ( isset( $_POST[ 'wordcount_delete' ] ) ) {
     102
     103                    unset( $this->word_obj[ $name ] );
    105104
    106105                    update_option( 'author_wordcount', $this->word_obj );
    107106
    108                 } elseif ( isset( $_POST[ 'wordcount_update' ] ) &&
    109                            wp_verify_nonce( $_POST[ 'wp_nonce' ],
    110                                'update-' . $_POST[ 'wordcount_name' ] ) ) {
     107                } elseif ( isset( $_POST[ 'wordcount_update' ] ) ) {
    111108
    112109                    $this->word_obj[ $_POST[ 'wordcount_name' ] ] = array(
Note: See TracChangeset for help on using the changeset viewer.