WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
| Line | Code |
|---|---|
| 2951 | * Filters term data before it is updated in the database. |
| 2952 | * |
| 2953 | * @since 4.7.0 |
| 2954 | * |
| 2955 | * @param array $data Term data to be updated. |
| 2956 | * @param int $term_id Term ID. |
| 2957 | * @param string $taxonomy Taxonomy slug. |
| 2958 | * @param array $args Arguments passed to wp_update_term(). |
| 2959 | */ |
| 2960 | $data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args ); |
| 2961 | |
| 2962 | $wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) ); |
| 2963 | if ( empty( $slug ) ) { |
| 2964 | $slug = sanitize_title( $name, $term_id ); |
| 2965 | $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) ); |
| 2966 | } |
| 2967 | |
| 2968 | /** |
| 2969 | * Fires immediately after the given terms are edited. |