WP_Rewrite::wp_rewrite_rules

SummerySummery

Retrieves the rewrite rules.

Syntax

WP_Rewrite::wp_rewrite_rules()

DescriptionDescription

The difference between this method and WP_Rewrite::rewrite_rules() is that this method stores the rewrite rules in the ‘rewrite_rules’ option and retrieves it. This prevents having to process all of the permalinks to get the rewrite rules in the form of caching.

ReturnReturn

(string[]) Array of rewrite rules keyed by their regex pattern.

SourceSource

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


			

ChangelogChangelog

Changelog
Version Description
1.5.0 Introduced.
Scroll to Top