mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
d70744e95c
commit
e9adba887d
@ -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);
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user