| @@ -62,9 +62,9 @@ | ||
| 62 | 62 | */ |
| 63 | 63 | public function oembed_handler() { |
| 64 | 64 | |
| 65 | 65 | // Verify our nonce. |
| 66 | - if ( ! ( isset( $_REQUEST['cmb2_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash ( $_REQUEST['cmb2_ajax_nonce'] ) ), 'ajax_nonce' ) ) ) { | |
| 66 | + if ( ! ( isset( $_REQUEST['cmb2_ajax_nonce'], $_REQUEST['oembed_url'] ) && wp_verify_nonce( $_REQUEST['cmb2_ajax_nonce'], 'ajax_nonce' ) ) ) { | |
| 67 | 67 | die(); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | // Sanitize our search string. |
| @@ -304,11 +304,10 @@ | ||
| 304 | 304 | // Remove the the cached ttl expiration, and the cached oembed value. |
| 305 | 305 | unset( $options[ $key ] ); |
| 306 | 306 | unset( $options[ str_replace( '_oembed_time_', '_oembed_', $key ) ] ); |
| 307 | 307 | } |
| 308 | - } // End if. | |
| 309 | - // Remove the cached unknown values. | |
| 310 | - elseif ( '{{unknown}}' === $value ) { | |
| 308 | + } elseif ( '{{unknown}}' === $value ) { | |
| 309 | + // Remove the cached unknown values. | |
| 311 | 310 | $modified = true; |
| 312 | 311 | unset( $options[ $key ] ); |
| 313 | 312 | } |
| 314 | 313 | } |
| @@ -315,9 +314,9 @@ | ||
| 315 | 314 | } |
| 316 | 315 | |
| 317 | 316 | // Update the option and remove stale cache data. |
| 318 | 317 | if ( $modified ) { |
| 319 | - $updated = cmb2_options( $option_key )->set( $options ); | |
| 318 | + cmb2_options( $option_key )->set( $options ); | |
| 320 | 319 | } |
| 321 | 320 | } |
| 322 | 321 | |
| 323 | 322 | } |