• Hello dear
    I want to change the default “capability_type” of the Linker post type. i use the the code below but it’s not work. how can i change default capability_type of Linker post type?

    function updateTypes( $post_type, $args ) {
    	if ( 'linker' === $post_type ) {
    		global $wp_post_types;
    		$args->capability_type = "private_post";
    		$wp_post_types[ $post_type ] = $args;
    	}
    }
    add_action( 'registered_post_type', 'updateTypes', 10, 2 );

    https://ww.wp.xz.cn/plugins/linker/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘modify Linker post type capability_type’ is closed to new replies.