Content Restriction

This commit is contained in:
ultimatemember
2015-01-07 08:37:25 +02:00
parent 71eb997b4d
commit 955e4ba9d8
11 changed files with 206 additions and 116 deletions
+4 -2
View File
@@ -107,8 +107,10 @@ class UM_Admin_Metabox {
***/
function ui_on_off( $id, $default=0, $is_conditional=false, $cond1='', $cond1_show='', $cond1_hide='' ) {
if (isset($this->postmeta[$id][0])) {
$active = $this->postmeta[$id][0];
$meta = get_post_meta( get_the_ID(), $id, true );
if (isset($this->postmeta[$id][0]) || $meta ) {
$active = ( isset( $this->postmeta[$id][0] ) ) ? $this->postmeta[$id][0] : $meta;
} else {
$active = $default;
}