Skip to content

Commit

Permalink
Correct user_meta key
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland committed Apr 15, 2012
1 parent 85c5843 commit 40aeee0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wp-display-header.php
Expand Up @@ -329,7 +329,7 @@ public function header_selection_callback() {
}
break;
}

// If no header set yet, get default header
if ( ! $active ) {
$active = get_theme_mod( 'header_image' );
Expand All @@ -355,7 +355,7 @@ public function save_post( $post_ID ) {
if ( ( ! defined('DOING_AUTOSAVE') OR ! DOING_AUTOSAVE ) AND
( isset($_POST[$this->textdomain]) ) AND
( wp_verify_nonce($_POST["{$this->textdomain}-nonce"], $this->textdomain) ) ) {
var_dump("Hello");

$value = ('random' == $_POST[$this->textdomain]) ? 'random' : esc_url_raw( $_POST[$this->textdomain] );

if ( $value == get_theme_mod( 'header_image' ) ) {
Expand Down Expand Up @@ -388,7 +388,7 @@ public function edit_term( $term_id, $tt_id, $taxonomy ) {

if ( ( ! defined('DOING_AUTOSAVE') OR ! DOING_AUTOSAVE ) AND
( isset($_POST[$this->textdomain]) ) AND
( wp_verify_nonce($_POST[$this->textdomain . '-nonce'], $this->textdomain) ) ) {
( wp_verify_nonce($_POST["{$this->textdomain}-nonce"], $this->textdomain) ) ) {

$term_meta = get_option( 'wpdh_tax_meta', array() );
$term_meta[$tt_id] = ('random' == $_POST[$this->textdomain]) ? 'random' : esc_url_raw( $_POST[$this->textdomain] );
Expand All @@ -414,10 +414,10 @@ public function update_user( $user_id ) {

if ( ( ! defined('DOING_AUTOSAVE') OR ! DOING_AUTOSAVE ) AND
( isset($_POST[$this->textdomain]) ) AND
( wp_verify_nonce($_POST[$this->textdomain . '-nonce'], $this->textdomain) ) ) {
( wp_verify_nonce($_POST["{$this->textdomain}-nonce"], $this->textdomain) ) ) {

$value = ('random' == $_POST[$this->textdomain]) ? 'random' : esc_url_raw( $_POST[$this->textdomain] );
update_user_meta( $user_id, '_wpdh_display_header', $value );
update_user_meta( $user_id, $this->textdomain, $value );
}

return $user_id;
Expand Down

0 comments on commit 40aeee0

Please sign in to comment.