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

In this article

Retrieves an extra permalink structure by name.

Parameters

$namestringrequired
Permalink structure name.

Return

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

Source

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;
}

Changelog

VersionDescription
2.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.