Skip to content

pmxi_custom_types filter #63

@Programmer095

Description

@Programmer095

Used to modify Step 1 options.

Definition ( second parameter has multiple possible values 'custom_types', 'all_types', 'hiddent_types' ):
apply_filters( 'pmxi_custom_types', $custom_types, 'custom_types' );

Here's an example function that would add the 'pc_groups' custom type to the list ( only relevant if the pc_groups CPT was defined with show_ui => false ):

add_filter('pmxi_custom_types', 'wpai_wpallimport_custom_types', 10, 1);
function wpai_wpallimport_custom_types( $custom_types ){
	
	$custom_types = array_merge( $custom_types, get_post_types(array('name'=>'pc_groups'), 'objects' ));
	
	return $custom_types;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions