Changeset 13438
- Timestamp:
- 02/26/2010 07:23:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/rewrite.php
r13377 r13438 44 44 $wp->add_query_var($qv); 45 45 $wp_rewrite->add_rewrite_tag($tagname, $regex, $qv . '='); 46 } 47 48 /** 49 * Add permalink structure. 50 * 51 * @see WP_Rewrite::add_permastruct() 52 * @since 3.0.0 53 * 54 * @param string $name Name for permalink structure. 55 * @param string $struct Permalink structure. 56 * @param bool $with_front Prepend front base to permalink structure. 57 */ 58 function add_permastruct( $name, $struct, $with_front = true ) { 59 global $wp_rewrite; 60 return $wp_rewrite->add_permastruct( $name, $struct, $with_front ); 46 61 } 47 62 … … 65 80 add_action($hook, $function, 10, 1); 66 81 return $hook; 82 } 83 84 /** 85 * Remove rewrite rules and then recreate rewrite rules. 86 * 87 * @see WP_Rewrite::flush_rules() 88 * @since 3.0.0 89 * 90 * @param bool $hard Whether to update .htaccess (hard flush) or just update 91 * rewrite_rules transient (soft flush). Default is true (hard). 92 */ 93 function flush_rewrite_rules( $hard = true ) { 94 global $wp_rewrite; 95 $wp_rewrite->flush_rules( $hard ); 67 96 } 68 97
Note: See TracChangeset
for help on using the changeset viewer.