WP_Rewrite::get_extra_permastruct

Advertisement

Summery Summery

Retrieves an extra permalink structure by name.

Syntax Syntax

WP_Rewrite::get_extra_permastruct( string $name )

Parameters Parameters

$name

(string) (Required) Permalink structure name.

Return Return

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

Source Source

File: wp-includes/class-wp-rewrite.php

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

Advertisement

Changelog Changelog

Changelog
Version Description
2.5.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.