Sets the tag base for the tag permalink.
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.
$tag_basestringrequired
public function set_tag_base( $tag_base ) {
if ( get_option( 'tag_base' ) !== $tag_base ) {
update_option( 'tag_base', $tag_base );
$this->init();
}
}
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rewrite/set_tag_base