Introduce 'pre_delete_term' hook.

Props cmmarslender.
Fixes #30127.
Built from https://develop.svn.wordpress.org/trunk@30088


git-svn-id: http://core.svn.wordpress.org/trunk@30088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2014-10-29 02:44:22 +00:00
parent d70744e95c
commit e9adba887d
2 changed files with 11 additions and 1 deletions

View File

@ -2417,6 +2417,16 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
$force_default = $args['force_default'];
}
/**
* Fires when deleting a term, before any modifications are made to posts or terms.
*
* @since 4.1.0
*
* @param int $term Term ID
* @param string $taxonomy Taxonomy Name
*/
do_action( 'pre_delete_term', $term, $taxonomy );
// Update children to point to new parent
if ( is_taxonomy_hierarchical($taxonomy) ) {
$term_obj = get_term($term, $taxonomy);

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.1-alpha-30087';
$wp_version = '4.1-alpha-30088';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.