Changeset 34708 for trunk/src/wp-includes/rewrite-functions.php
- Timestamp:
- 09/30/2015 01:10:03 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rewrite-functions.php
r34566 r34708 8 8 9 9 /** 10 * Add a straight rewrite rule.10 * Adds a straight rewrite rule. 11 11 * 12 12 * @since 2.1.0 13 * 14 * @global WP_Rewrite $wp_rewrite 15 * 16 * @param string $regex Regular Expression to match request against. 17 * @param string $redirect Page to redirect to. 18 * @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'. 19 */ 20 function add_rewrite_rule($regex, $redirect, $after = 'bottom') { 21 global $wp_rewrite; 22 $wp_rewrite->add_rule($regex, $redirect, $after); 13 * @since 4.4.0 Array support was added to the `$redirect` parameter. 14 * 15 * @global WP_Rewrite $wp_rewrite WordPress Rewrite Component. 16 * 17 * @param string $regex Regular Expression to match request against. 18 * @param string|array $redirect Page to redirect to, or array of query vars and values. 19 * @param string $after Optional, default is 'bottom'. Where to add rule, can also be 'top'. 20 */ 21 function add_rewrite_rule( $regex, $redirect, $after = 'bottom' ) { 22 global $wp_rewrite; 23 24 $wp_rewrite->add_rule( $regex, $redirect, $after ); 23 25 } 24 26
Note: See TracChangeset
for help on using the changeset viewer.