WP_Rewrite::set_permalink_structure

SummerySummery

Sets the main permalink structure for the site.

Syntax

WP_Rewrite::set_permalink_structure( string $permalink_structure )

DescriptionDescription

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

Fires the ‘permalink_structure_changed’ action once the init call has processed passing the old and new values

ParametersParameters

$permalink_structure

(string) (Required) Permalink structure.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
1.5.0 Introduced.
Scroll to Top