Version 1.0.48

This commit is contained in:
ultimatemember
2015-02-10 02:05:27 +02:00
parent 5487c7b6d1
commit b4f313e8bc
21 changed files with 192 additions and 32 deletions
+4 -1
View File
@@ -122,7 +122,10 @@ class UM_Admin_Metabox {
***/
function ui_on_off( $id, $default=0, $is_conditional=false, $cond1='', $cond1_show='', $cond1_hide='', $yes='', $no='' ) {
$meta = get_post_meta( get_the_ID(), $id, true );
$meta = (string)get_post_meta( get_the_ID(), $id, true );
if ( $meta === '0' && $default > 0 ) {
$default = $meta;
}
$yes = ( !empty( $yes ) ) ? $yes : __('Yes');
$no = ( !empty( $no ) ) ? $no : __('No');