lib/Post_Type.php
public static function update( $post_types = [] ) {
		foreach ( $post_types as $post_type => $args ) {
			$args = self::parse_args( $args );

			self::register_extensions( $post_type, $args );

			if ( isset( $args['args'] ) ) {
				add_filter( 'register_post_type_args', function( $defaults, $name ) use ( $post_type, $args ) {
					if ( $post_type !== $name ) {
						return $defaults;
					}

					$args = wp_parse_args( $args['args'], $defaults );

					return $args;
				}, 10, 2 );
			}
		}
	}
public static function update( $post_types = [] ) {
		foreach ( $post_types as $post_type => $args ) {
			$args = self::parse_args( $args );

			self::register_extensions( $post_type, $args );

			if ( isset( $args['args'] ) ) {
				add_filter( 'register_post_type_args', function( $defaults, $name ) use ( $post_type, $args ) {
					if ( $post_type !== $name ) {
						return $defaults;
					}

					$args = wp_parse_args( $args['args'], $defaults );

					return $args;
				}, 10, 2 );
			}
		}
	}
public static function update ( $ post_types = [ ] ) { foreach ( $ post_types as $ post_type => $ args ) { $ args = self :: parse_args ( $ args ) ; self :: register_extensions ( $ post_type , $ args ) ; if ( isset ( $ args [ 'args' ] ) ) { add_filter ( 'register_post_type_args' , function ( $ defaults , $ name ) use ( $ post_type , $ args ) { if ( $ post_type !== $ name ) { return $ defaults ; } $ args = wp_parse_args ( $ args [ 'args' ] , $ defaults ) ; return $ args ; } , 10 , 2 ) ; } } }
Updates settings for a post type.

Here, you use the same settings that you also use for the `register()` function.
Run this function before the `init` hook.

@see   register_post_type()
@since 2.2.0

@param array $post_types An associative array of post types and its arguments that should be
updated. See the `register()` function for all the arguments that
you can use.
Updates settings for a post type .