WP_Rewrite::generate_rewrite_rule

Advertisement

Summery Summery

Generates rewrite rules with permalink structure and walking directory only.

Syntax Syntax

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

Description Description

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.

Parameters Parameters

$permalink_structure

(Required) The permalink structure to generate rules.

$walk_dirs

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

Default value: false

Return Return

(array)

Source Source

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

	 */
	public function generate_rewrite_rule( $permalink_structure, $walk_dirs = false ) {
		return $this->generate_rewrite_rules( $permalink_structure, EP_NONE, false, false, false, $walk_dirs );

Advertisement

Changelog Changelog

Changelog
Version Description
1.5.0 Introduced.

See also See also

Advertisement

Leave a Reply