src/class-extended-cpt.php
public function registered_post_type( string $post_type, WP_Post_Type $post_type_object ) {
		if ( $post_type !== $this->post_type ) {
			return;
		}
		$struct = str_replace( "%{$this->post_type}_slug%", $this->post_slug, $post_type_object->rewrite['permastruct'] );
		$struct = str_replace( '%postname%', "%{$this->post_type}%", $struct );
		add_permastruct( $this->post_type, $struct, $post_type_object->rewrite );
	}
public function registered_post_type( string $post_type, WP_Post_Type $post_type_object ) {
		if ( $post_type !== $this->post_type ) {
			return;
		}
		$struct = str_replace( "%{$this->post_type}_slug%", $this->post_slug, $post_type_object->rewrite['permastruct'] );
		$struct = str_replace( '%postname%', "%{$this->post_type}%", $struct );
		add_permastruct( $this->post_type, $struct, $post_type_object->rewrite );
	}
public function registered_post_type ( string $ post_type , WP_Post_Type $ post_type_object ) { if ( $ post_type !== $ this -> post_type ) { return ; } $ struct = str_replace ( "%{$this->post_type}_slug%" , $ this -> post_slug , $ post_type_object -> rewrite [ 'permastruct' ] ) ; $ struct = str_replace ( '%postname%' , "%{$this->post_type}%" , $ struct ) ; add_permastruct ( $ this -> post_type , $ struct , $ post_type_object -> rewrite ) ; }
Action fired after a CPT is registered in order to set up the custom permalink structure for the post type.

@param string       $post_type        Post type name.
@param WP_Post_Type $post_type_object Post type object.
Action fired after a CPT is registered in order to set up the custom permalink structure for the post type .