wordpress / latest / classes / wp_rewrite / get_extra_permastruct.html

WP_Rewrite::get_extra_permastruct( string $name ): string|false

Retrieves an extra permalink structure by name.

Parameters

$name string Required
Permalink structure name.

Return

string|false Permalink structure string on success, false on failure.

Source

File: wp-includes/class-wp-rewrite.php. View all references

public function get_extra_permastruct( $name ) {
	if ( empty( $this->permalink_structure ) ) {
		return false;
	}

	if ( isset( $this->extra_permastructs[ $name ] ) ) {
		return $this->extra_permastructs[ $name ]['struct'];
	}

	return false;
}

Used By

Used By Description

Changelog

Version Description
2.5.0 Introduced.

© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rewrite/get_extra_permastruct