permalink_structure_changed
Fires after the permalink structure is updated.
Usage
add_action( 'permalink_structure_changed', 'wp_kama_permalink_structure_changed_action', 10, 2 ); /** * Function for `permalink_structure_changed` action-hook. * * @param string $old_permalink_structure The previous permalink structure. * @param string $permalink_structure The new permalink structure. * * @return void */ function wp_kama_permalink_structure_changed_action( $old_permalink_structure, $permalink_structure ){ // action... }
- $old_permalink_structure(string)
- The previous permalink structure.
- $permalink_structure(string)
- The new permalink structure.
Changelog
Since 2.8.0 | Introduced. |
Where the hook is called
permalink_structure_changed
wp-includes/class-wp-rewrite.php 1973
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );