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 |
|---|---|
| 3069 | /** |
| 3070 | * Filters whether the proposed unique term slug is bad. |
| 3071 | * |
| 3072 | * @since 4.3.0 |
| 3073 | * |
| 3074 | * @param bool $needs_suffix Whether the slug needs to be made unique with a suffix. |
| 3075 | * @param string $slug The slug. |
| 3076 | * @param object $term Term object. |
| 3077 | */ |
| 3078 | if ( apply_filters( 'wp_unique_term_slug_is_bad_slug', $needs_suffix, $slug, $term ) ) { |
| 3079 | if ( $parent_suffix ) { |
| 3080 | $slug .= $parent_suffix; |
| 3081 | } |
| 3082 | |
| 3083 | if ( ! empty( $term->term_id ) ) { |
| 3084 | $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s AND term_id != %d", $slug, $term->term_id ); |
| 3085 | } else { |
| 3086 | $query = $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $slug ); |
| 3087 | } |