apply_filters( "{$permastructname}_rewrite_rules", string[] $rules )

Filters rewrite rules used for individual permastructs.


Description Description

The dynamic portion of the hook name, $permastructname, refers to the name of the registered permastruct, e.g. ‘post_tag’ (tags), ‘category’ (categories), etc.


Top ↑

Parameters Parameters

$rules

(string[]) Array of rewrite rules generated for the current permastruct, keyed by their regex pattern.


Top ↑

More Information More Information

This filter hook allows you to modify various custom permastructs, such as those generated for custom post types or taxonomies (both built-in or custom).


Top ↑

Source Source

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

View on Trac



Top ↑

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

Top ↑

You must log in before being able to contribute a note or feedback.