true ) ); // Remove Post Types from array unset( $post_types['wpbf_hooks'], $post_types['elementor_library'], $post_types['fl-builder-template'] ); // Add Options Metabox add_meta_box( 'wpbf', esc_html__( 'Template Settings', 'page-builder-framework' ), 'wpbf_options_metabox', $post_types, 'side', 'default' ); // Add Sidebar Metabox add_meta_box( 'wpbf_sidebar', esc_html__( 'Sidebar', 'page-builder-framework' ), 'wpbf_sidebar_metabox', $post_types, 'side', 'default' ); } /** * Options Metabox */ function wpbf_options_metabox( $post ) { wp_nonce_field( basename( __FILE__ ), 'wpbf_options_nonce' ); $wpbf_stored_meta = get_post_meta( $post->ID ); if (!isset( $wpbf_stored_meta['wpbf_options'][0] ) ) { $wpbf_stored_meta['wpbf_options'][0] = false; } $mydata = $wpbf_stored_meta['wpbf_options']; if ( strpos( $mydata[0], 'remove-title' ) !== false ) { $remove_title = 'remove-title'; } else { $remove_title = false; } if ( strpos( $mydata[0], 'full-width') !== false ) { $full_width = 'full-width'; } elseif( strpos( $mydata[0], 'contained') !== false ) { $full_width = 'contained'; } else { $full_width = 'layout-global'; } if ( strpos( $mydata[0], 'remove-featured') !== false ) { $remove_featured = 'remove-featured'; } else { $remove_featured = false; } if ( strpos( $mydata[0], 'remove-header') !== false ) { $remove_header = 'remove-header'; } else { $remove_header = false; } if ( strpos( $mydata[0], 'remove-footer') !== false ) { $remove_footer = 'remove-footer'; } else { $remove_footer = false; } ?>