Multiple instance of iPhoneCheck
-
While trying to RTL the admin panel I dicovered that the iPhone like button for the slider actualy contains 6 nested instances on the YES/NO slide button for the slider.
Some digging into the code got me to this function in in class-admin-meta-boxes.php :/** * Adds layout and slider metaboxes to pages and posts * @package Customizr * @since Customizr 1.0 */ function tc_post_meta_boxes() {//id, title, callback, post_type, context, priority, callback_args /*** Determines which screens we display the box **/ //1 - retrieves the custom post types $args = array( //'public' => true, '_builtin' => false ); $custom_post_types = get_post_types($args); //2 - Merging with the builtin post types, pages and posts $builtin_post_types = array( 'page' => 'page', 'post' => 'post' ); $screens = array_merge( $custom_post_types, $builtin_post_types ); //3- Adding the meta-boxes to those screens foreach ( $screens as $key => $screen) { //skip if acf if ('acf' == $screen ) continue; else //JTS 2015 <<<<*** new line ********************* add_meta_box( 'layout_sectionid' , __( 'Layout Options' , 'customizr' ), array( $this , 'tc_post_layout_box' ), $screen, ( 'page' == $screen | 'post' == $screen ) ? 'side' : 'normal',//displays meta box below editor for custom post types apply_filters('tc_post_meta_boxes_priority' , 'high', $screen ) ); add_meta_box( 'slider_sectionid' , __( 'Slider Options' , 'customizr' ), array( $this , 'tc_post_slider_box' ), $screen, 'normal' , apply_filters('tc_post_meta_boxes_priority' , 'high', $screen) ); endif // JTS 2015 <<<<*** new line ********************* }//end foreach }
the two lines marked with // JTS 2015 are my addition, since it seems that the
if
statement does not skip the rest of the code as mention in the text above it.Am I right?
Or I’ve done some damage? ??
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Multiple instance of iPhoneCheck’ is closed to new replies.