Changeset 40916 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 06/18/2017 10:39:12 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r40513 r40916 1242 1242 1243 1243 /** 1244 * Get all meta data, including meta IDs, for the given term ID. 1245 * 1246 * @since 4.9.0 1247 * 1248 * @global wpdb $wpdb WordPress database abstraction object. 1249 * 1250 * @param int $term_id 1251 * @return array|false 1252 */ 1253 function has_term_meta( $term_id ) { 1254 // Bail if term meta table is not installed. 1255 if ( get_option( 'db_version' ) < 34370 ) { 1256 return false; 1257 } 1258 1259 global $wpdb; 1260 1261 return $wpdb->get_results( $wpdb->prepare( "SELECT meta_key, meta_value, meta_id, term_id FROM $wpdb->termmeta WHERE term_id = %d ORDER BY meta_key,meta_id", $term_id ), ARRAY_A ); 1262 } 1263 1264 /** 1244 1265 * Check if Term exists. 1245 1266 *
Note: See TracChangeset
for help on using the changeset viewer.