You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Code Quality: Add types for term insert/update/delete functions.
Add PHPStan array shapes for the `$args` parameter of `wp_insert_term()`, `wp_update_term()`, and `wp_delete_term()`, along with narrowed return types. The types describe the contract these functions are intended to be called with, rather than what unguarded callers happen to pass today.
Developed in WordPress#12465.
Follow-up to r62680.
See #64898.
git-svn-id: https://develop.svn.wordpress.org/trunk@62682 602fd350-edb4-49c9-b593-d223f7449a82
$tt_id = $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id ) );
2626
2644
2627
2645
if ( ! empty( $tt_id ) ) {
@@ -3229,6 +3247,17 @@ function wp_unique_term_slug( $slug, $term ) {
3229
3247
* }
3230
3248
* @return array|WP_Error An array containing the `term_id` and `term_taxonomy_id`,
0 commit comments