Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Merge pull request #309 from xwp/bugfix/empty-control-value
Browse files Browse the repository at this point in the history
Return null in postmeta preview filter to allow DB-saved values to be returned if no post value present
  • Loading branch information
westonruter committed Oct 18, 2016
2 parents 9488745 + f5d3aec commit eeb6edc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions php/class-wp-customize-posts-preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,8 @@ public function filter_get_post_meta_to_preview( $value, $object_id, $meta_key,
);
if ( $can_preview ) {
$value = $postmeta_setting->post_value();
} else {
return null;
}

if ( $postmeta_setting->single ) {
Expand Down

0 comments on commit eeb6edc

Please sign in to comment.