AnsPress_Tag::rewrite_rules( array $rules, $slug, $base_page_id )
Description #
Add category pages rewrite rule.
Parameters #
- $rulesarray (Required) AnsPress rules.
Source #
File: addons/free/tag.php
public static function rewrite_rules( $rules, $slug, $base_page_id ) { $base_slug = get_page_uri( ap_opt( 'tags_page' ) ); update_option( 'ap_tags_path', $base_slug, true ); $cat_rules = array( $base_slug . '/([^/]+)/page/?([0-9]{1,})/?$' => 'index.php?question_tag=$matches[#]&ap_paged=$matches[#]&ap_page=tag', $base_slug . '/([^/]+)/?$' => 'index.php?question_tag=$matches[#]&ap_page=tag', ); return $cat_rules + $rules; }
Expand full source code Collapse full source code View on GitHub: addons/free/tag.php:472
Add your comment