WP_Rewrite::set_tag_base( string $tag_base )

In this article

Sets the tag base for the tag permalink.

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

$tag_basestringrequired
Tag permalink structure base.

Source

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

Changelog

VersionDescription
2.3.0Introduced.

User Contributed Notes

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