Changeset 36181
- Timestamp:
- 01/06/2016 07:39:29 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-rewrite.php
r35941 r36181 1746 1746 1747 1747 /** 1748 * Removes a permalink structure. 1749 * 1750 * @since 4.5.0 1751 * @access public 1752 * 1753 * @param string $name Name for permalink structure. 1754 */ 1755 public function remove_permastruct( $name ) { 1756 unset( $this->extra_permastructs[ $name ] ); 1757 } 1758 1759 /** 1748 1760 * Removes rewrite rules and then recreate rewrite rules. 1749 1761 * -
trunk/src/wp-includes/rewrite.php
r35718 r36181 179 179 * 180 180 * @see WP_Rewrite::add_permastruct() 181 * @global WP_Rewrite $wp_rewrite 181 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. 182 182 * 183 183 * @param string $name Name for permalink structure. … … 196 196 197 197 $wp_rewrite->add_permastruct( $name, $struct, $args ); 198 } 199 200 /** 201 * Remove permalink structure. 202 * 203 * Can only be used to remove permastructs that were added using add_permastruct(). 204 * Built-in permastructs cannot be removed. 205 * 206 * @since 4.5.0 207 * 208 * @see WP_Rewrite::remove_permastruct() 209 * @global WP_Rewrite $wp_rewrite WordPress rewrite component. 210 * 211 * @param string $name Name for permalink structure. 212 */ 213 function remove_permastruct( $name ) { 214 global $wp_rewrite; 215 216 $wp_rewrite->remove_permastruct( $name ); 198 217 } 199 218
Note: See TracChangeset
for help on using the changeset viewer.