WP_Rewrite::generate_rewrite_rule

SummerySummery

Generates rewrite rules with permalink structure and walking directory only.

Syntax

WP_Rewrite::generate_rewrite_rule( string $permalink_structure, bool $walk_dirs = false )

DescriptionDescription

Shorten version of WP_Rewrite::generate_rewrite_rules() that allows for shorter list of parameters. See the method for longer description of what generating rewrite rules does.

ParametersParameters

$permalink_structure

(string) (Required) The permalink structure to generate rules.

$walk_dirs

(bool) (Optional) Whether to create list of directories to walk over.

Default value: false

ReturnReturn

(array)

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
1.5.0 Introduced.

See alsoSee also

Scroll to Top