public static function get_permalink_structure( $post_type ) {
		if ( is_string( $post_type ) ) {
			$post_type = get_post_type_object( $post_type );
		}

		if ( ! empty( $post_type->cptp ) && ! empty( $post_type->cptp['permalink_structure'] ) ) {
			$structure = $post_type->cptp->permalink_structure;
		} else if ( ! empty( $post_type->cptp_permalink_structure ) ) {
			$structure = $post_type->cptp_permalink_structure;
		} else {
			$structure = get_option( $post_type->name . '_structure', '%postname%' );
		}
		$structure = '/' . ltrim( $structure, '/' );

		return apply_filters( 'CPTP_' . $post_type->name . '_structure', $structure );
	}
public static function get_permalink_structure( $post_type ) {
		if ( is_string( $post_type ) ) {
			$post_type = get_post_type_object( $post_type );
		}

		if ( ! empty( $post_type->cptp ) && ! empty( $post_type->cptp['permalink_structure'] ) ) {
			$structure = $post_type->cptp->permalink_structure;
		} else if ( ! empty( $post_type->cptp_permalink_structure ) ) {
			$structure = $post_type->cptp_permalink_structure;
		} else {
			$structure = get_option( $post_type->name . '_structure', '%postname%' );
		}
		$structure = '/' . ltrim( $structure, '/' );

		return apply_filters( 'CPTP_' . $post_type->name . '_structure', $structure );
	}
public static function get_permalink_structure ( $ post_type ) { if ( is_string ( $ post_type ) ) { $ post_type = get_post_type_object ( $ post_type ) ; } if ( ! empty ( $ post_type -> cptp ) && ! empty ( $ post_type -> cptp [ 'permalink_structure' ] ) ) { $ structure = $ post_type -> cptp -> permalink_structure ; } else if ( ! empty ( $ post_type -> cptp_permalink_structure ) ) { $ structure = $ post_type -> cptp_permalink_structure ; } else { $ structure = get_option ( $ post_type -> name . '_structure' , '%postname%' ) ; } $ structure = '/' . ltrim ( $ structure , '/' ) ; return apply_filters ( 'CPTP_' . $ post_type -> name . '_structure' , $ structure ) ; }
Get permalink structure.

@since 0.9.6

@param string|WP_Post_Type $post_type post type name. / object post type object.

@return string post type structure.
Get permalink structure .