Make WordPress Core


Ignore:
Timestamp:
01/06/2016 07:39:29 AM (10 years ago)
Author:
swissspidy
Message:

Rewrite: Add a remove_permastruct() helper function.

It can be used to remove permastructs that were added using add_permastruct().

Fixes #35235.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-rewrite.php

    r35941 r36181  
    17461746
    17471747    /**
     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    /**
    17481760     * Removes rewrite rules and then recreate rewrite rules.
    17491761     *
Note: See TracChangeset for help on using the changeset viewer.