WP_Rewrite::get_tag_permastruct() WordPress Method

The get_tag_permastruct() method is used to retrieve the permastruct for tags. A permastruct is the set of rules that determine how a URL is constructed. By default, WordPress uses a structure with the date and name of the post in the URL. However, you can change this by specifying a different permastruct in the Permalink Settings screen.

WP_Rewrite::get_tag_permastruct() #

Retrieve the permalink structure for tags.


Description

If the tag_base property has no value, then the tag structure will have the front property value, followed by ‘tag’, and finally ‘%tag%’. If it does, then the root property will be used, along with the tag_base property value.


Top ↑

Return

(string|false) Tag permalink structure on success, false on failure.


Top ↑

Source

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

	public function get_tag_permastruct() {
		return $this->get_extra_permastruct( 'post_tag' );
	}


Top ↑

Changelog

Changelog
VersionDescription
2.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.