post_rewrite_rules WordPress Filter Hook

The post_rewrite_rules hook is triggered after the rewrite rules for the post type are generated. This hook can be used to modify the generated rules.

apply_filters( 'post_rewrite_rules', string[] $post_rewrite ) #

Filters rewrite rules used for “post” archives.


Parameters

$post_rewrite

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


Top ↑

More Information

This post will only affect content of the post type ‘posts’.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.