Ticket #10912: 10912.diff
File 10912.diff, 1.2 KB (added by , 15 years ago) |
---|
-
rewrite.php
46 46 } 47 47 48 48 /** 49 * Add permalink structure. 50 * 51 * Warning: you must call this on init or earlier, otherwise the query var 52 * addition stuff won't work. 53 * 54 * @since 2.9.0 55 * 56 * @param string $name Name for permalink structure. 57 * @param string $struct Permalink structure. 58 * @param bool $with_front Prepend front base to permalink structure. 59 */ 60 function add_permastruct($name, $struct, $with_front = true) { 61 global $wp_rewrite; 62 63 return $wp_rewrite->add_permastruct($name, $struct, $with_front); 64 } 65 66 /** 49 67 * Add a new feed type like /atom1/. 50 68 * 51 69 * @since 2.1.0 … … 67 85 } 68 86 69 87 /** 88 * Remove rewrite rules and then recreate rewrite rules. 89 * 90 * @see WP_Rewrite::flush_rules() 91 * 92 * @since 2.9.0 93 * 94 * @param $hard bool Whether to update .htaccess (hard flush) or just update rewrite_rules transient (soft flush). Default is true (hard). 95 */ 96 function flush_rewrite_rules($hard = true) { 97 global $wp_rewrite; 98 $wp_rewrite->flush_rules($hard); 99 } 100 101 /** 70 102 * Endpoint Mask for Permalink. 71 103 * 72 104 * @since 2.1.0