permalink_structure_changed
Fires after the permalink structure is updated.
Использование
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(строка)
- The previous permalink structure.
- $permalink_structure(строка)
- The new permalink structure.
Список изменений
С версии 2.8.0 | Введена. |
Где вызывается хук
permalink_structure_changed
wp-includes/class-wp-rewrite.php 1977
do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );