Powered By Blogger

Monday, January 23, 2017

there an action for when permalinks are rebuilt OR hook when permalink update

http://wordpress.stackexchange.com/questions/96988/is-there-an-action-for-when-permalinks-are-rebuilt



6
down voteaccepted
The action is update_option_permalink_structure. You get the old and the new value as parameters.
add_action( 'update_option_permalink_structure' , 'my_custom_function', 10, 2 );

function my_custom_function( $oldvalue, $_newvalue )
{
    // do something
}
There are also the actions update_option_category_base and update_option_tag_base.

No comments:

Post a Comment