wordpress/wp-content/themes/basic/themify/themify-wp-filters.php
/**
 * Adds Post Options in Themify Custom Panel to custom post types
 * that do not have any options set for it.
 *
 * @return array
 */
Adds Post Options in Themify Custom Panel to custom post types
that do not have any options set for it.

@return array
Adds Post Options in Themify Custom Panel to custom post types that do not have any options set for it . @return array
function themify_setup_cpt_post_options( $metaboxes ){
	global $typenow;
	$post_type = get_post_type_object( $typenow );
	if ( empty($typenow) || (is_object($post_type) && ! $post_type->publicly_queryable) ) {
		return $metaboxes;
	}
	$exclude = false;
	foreach ( $metaboxes as $metabox ) {
		if ( $metabox[ 'id' ] === $typenow . '-options' ) {
			$exclude = true;
			break;
		}
		if ( ! empty( $metabox['options'] ) ) {
			foreach( $metabox['options'] as $option ) {
				if( in_array( $typenow . '_layout', $option, true ) ) {
					$exclude = true;
					break 2;
				}
			}
		}
	}
	if ( $exclude ) {
		return $metaboxes;
	}
    $excludes = apply_filters( 'themify_exclude_cpt_post_options', array( 'tbuilder_layout', 'tbuilder_layout_part' ));
	if ( in_array( $typenow, $excludes,true) ) {
		return $metaboxes;
	}
	global $typenow;
	$name = !empty( $typenow )? 'custom_post_' . $typenow . '_single' : 'page_layout';
	$post_options =  array(
			array(
				'name' => $name,
				'title' => __('Sidebar Option', 'themify'),
				'description' => '',
				'type' => 'layout',
				'show_title' => true,
				'meta' => apply_filters('themify_post_type_theme_sidebars' , array(
							array('value' => 'default', 'img' => 'themify/img/default.svg', 'selected' => true, 'title' => __('Default', 'themify')),
							array('value' => 'sidebar1', 'img' => 'images/layout-icons/sidebar1.png', 'title' => __('Sidebar Right', 'themify')),
							array('value' => 'sidebar1 sidebar-left', 'img' => 'images/layout-icons/sidebar1-left.png', 'title' => __('Sidebar Left', 'themify')),
							array('value' => 'sidebar-none', 'img' => 'images/layout-icons/sidebar-none.png', 'title' => __('No Sidebar ', 'themify'))
						)
					),
				'default' => 'default'
			),
			array(
				'name'=> 'content_width',
				'title' => __('Content Width', 'themify'),
				'description' => '',
				'type' => 'layout',
				'show_title' => true,
				'meta' => array(
					array(
						'value' => 'default_width',
						'img' => 'themify/img/default.svg',
						'selected' => true,
						'title' => __( 'Default', 'themify' )
					),
					array(
						'value' => 'full_width',
						'img' => 'themify/img/fullwidth.svg',
						'title' => __( 'Fullwidth', 'themify' )
					)
				),
				'default' => 'default_width'
			),
		) ;
	$post_options = apply_filters( 'themify_post_type_default_options', $post_options);
	return array_merge( array(
		array(
			'name' => __( 'Post Options', 'themify' ),
			'id' => $typenow . '-options',
			'options' => $post_options,
			'pages' => $typenow
		),
	), $metaboxes );
}
function themify_setup_cpt_post_options ( $ metaboxes ) { global $ typenow ; $ post_type = get_post_type_object ( $ typenow ) ; if ( empty ( $ typenow ) || ( is_object ( $ post_type ) && ! $ post_type -> publicly_queryable ) ) { return $ metaboxes ; } $ exclude = false ; foreach ( $ metaboxes as $ metabox ) { if ( $ metabox [ 'id' ] === $ typenow . '-options' ) { $ exclude = true ; break ; } if ( ! empty ( $ metabox [ 'options' ] ) ) { foreach ( $ metabox [ 'options' ] as $ option ) { if ( in_array ( $ typenow . '_layout' , $ option , true ) ) { $ exclude = true ; break 2 ; } } } } if ( $ exclude ) { return $ metaboxes ; } $ excludes = apply_filters ( 'themify_exclude_cpt_post_options' , array ( 'tbuilder_layout' , 'tbuilder_layout_part' ) ) ; if ( in_array ( $ typenow , $ excludes , true ) ) { return $ metaboxes ; } global $ typenow ; $ name = ! empty ( $ typenow ) ? 'custom_post_' . $ typenow . '_single' : 'page_layout' ; $ post_options = array ( array ( 'name' => $ name , 'title' => __ ( 'Sidebar Option' , 'themify' ) , 'description' => '' , 'type' => 'layout' , 'show_title' => true , 'meta' => apply_filters ( 'themify_post_type_theme_sidebars' , array ( array ( 'value' => 'default' , 'img' => 'themify/img/default.svg' , 'selected' => true , 'title' => __ ( 'Default' , 'themify' ) ) , array ( 'value' => 'sidebar1' , 'img' => 'images/layout-icons/sidebar1.png' , 'title' => __ ( 'Sidebar Right' , 'themify' ) ) , array ( 'value' => 'sidebar1 sidebar-left' , 'img' => 'images/layout-icons/sidebar1-left.png' , 'title' => __ ( 'Sidebar Left' , 'themify' ) ) , array ( 'value' => 'sidebar-none' , 'img' => 'images/layout-icons/sidebar-none.png' , 'title' => __ ( 'No Sidebar ' , 'themify' ) ) ) ) , 'default' => 'default' ) , array ( 'name' => 'content_width' , 'title' => __ ( 'Content Width' , 'themify' ) , 'description' => '' , 'type' => 'layout' , 'show_title' => true , 'meta' => array ( array ( 'value' => 'default_width' , 'img' => 'themify/img/default.svg' , 'selected' => true , 'title' => __ ( 'Default' , 'themify' ) ) , array ( 'value' => 'full_width' , 'img' => 'themify/img/fullwidth.svg' , 'title' => __ ( 'Fullwidth' , 'themify' ) ) ) , 'default' => 'default_width' ) , ) ; $ post_options = apply_filters ( 'themify_post_type_default_options' , $ post_options ) ; return array_merge ( array ( array ( 'name' => __ ( 'Post Options' , 'themify' ) , 'id' => $ typenow . '-options' , 'options' => $ post_options , 'pages' => $ typenow ) , ) , $ metaboxes ) ; }
Adds Post Options in Themify Custom Panel to custom post types
 that do not have any options set for it.
Adds Post Options in Themify Custom Panel to custom post types that do not have any options set for it .
/* post types that don't have single page views don't need the Post Options */ /* list of post types that already have defined options */ /* post types that should not have the CPT Post options */