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