WP_Rewrite::set_tag_base

Advertisement

Summery Summery

Sets the tag base for the tag permalink.

Syntax Syntax

WP_Rewrite::set_tag_base( string $tag_base )

Description Description

Will update the ‘tag_base’ option, if there is a difference between the current tag base and the parameter value. Calls WP_Rewrite::init() after the option is updated.

Parameters Parameters

$tag_base

(string) (Required) Tag permalink structure base.

Source Source

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

	 */
	public function set_tag_base( $tag_base ) {
		if ( get_option( 'tag_base' ) !== $tag_base ) {
			update_option( 'tag_base', $tag_base );
			$this->init();
		}

Advertisement

Changelog Changelog

Changelog
Version Description
2.3.0 Introduced.

Advertisement

Leave a Reply

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