Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_update_term_data

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3262       * Filters term data before it is updated in the database.
3263       *
3264       * @since 4.7.0
3265       *
3266       * @param array  $data     Term data to be updated.
3267       * @param int    $term_id  Term ID.
3268       * @param string $taxonomy Taxonomy slug.
3269       * @param array  $args     Arguments passed to wp_update_term().
3270       */
3271      $data = apply_filters( 'wp_update_term_data', $data, $term_id, $taxonomy, $args );
3272
3273      $wpdb->update( $wpdb->terms, $data, compact( 'term_id' ) );
3274
3275      if ( empty( $slug ) ) {
3276           $slug = sanitize_title( $name, $term_id );
3277           $wpdb->update( $wpdb->terms, compact( 'slug' ), compact( 'term_id' ) );
3278      }
3279
3280      /**