@@ 72-77 (lines=6) @@ | ||
69 | if ( 'term' === $object_type ) { |
|
70 | $object = get_term( intval( $id ) ); |
|
71 | ||
72 | if ( is_wp_error( $object ) && $object->get_error_code() === 'invalid_taxonomy' ) { |
|
73 | // Fetch raw term. |
|
74 | $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_checksum_columns, array( 'term_group' ) ) ) ); |
|
75 | // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared |
|
76 | $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->terms WHERE term_id = %d", $id ) ); |
|
77 | } |
|
78 | } |
|
79 | ||
80 | if ( 'term_taxonomy' === $object_type ) { |
|
@@ 80-84 (lines=5) @@ | ||
77 | } |
|
78 | } |
|
79 | ||
80 | if ( 'term_taxonomy' === $object_type ) { |
|
81 | $columns = implode( ', ', array_unique( array_merge( Defaults::$default_term_taxonomy_checksum_columns, array( 'description' ) ) ) ); |
|
82 | // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared |
|
83 | $object = $wpdb->get_row( $wpdb->prepare( "SELECT $columns FROM $wpdb->term_taxonomy WHERE term_taxonomy_id = %d", $id ) ); |
|
84 | } |
|
85 | ||
86 | if ( 'term_relationships' === $object_type ) { |
|
87 | $columns = implode( ', ', Defaults::$default_term_relationships_checksum_columns ); |