From daee06ae1d109d2b7df7a75f58e1a0f22b134ced Mon Sep 17 00:00:00 2001 From: Justin Sternberg Date: Thu, 6 Feb 2014 09:15:10 -0500 Subject: [PATCH] Move object_id/object_type designation to before the `cmb_show_on` filter. Fixes #445 --- init.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init.php b/init.php index f212480..773fe80 100644 --- a/init.php +++ b/init.php @@ -492,13 +492,13 @@ public static function save_fields( $meta_box, $object_id, $object_type = '' ) { $meta_box['show_on'] = empty( $meta_box['show_on'] ) ? array( 'key' => false, 'value' => false ) : $meta_box['show_on']; - if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) ) - return; - self::set_object_id( $object_id ); // Set/get type $object_type = self::set_object_type( $object_type ? $object_type : self::set_mb_type( $meta_box ) ); + if ( ! apply_filters( 'cmb_show_on', true, $meta_box ) ) + return; + // save field ids of those that are updated $updated = array();