Changeset 34718
- Timestamp:
- 09/30/2015 04:52:28 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy-functions.php
r34704 r34718 1502 1502 */ 1503 1503 function add_term_meta( $term_id, $meta_key, $meta_value, $unique = false ) { 1504 // Bail if term meta table is not installed. 1505 if ( get_option( 'db_version' ) < 34370 ) { 1506 return false; 1507 } 1508 1504 1509 $added = add_metadata( 'term', $term_id, $meta_key, $meta_value, $unique ); 1505 1510 … … 1523 1528 */ 1524 1529 function delete_term_meta( $term_id, $meta_key, $meta_value = '' ) { 1530 // Bail if term meta table is not installed. 1531 if ( get_option( 'db_version' ) < 34370 ) { 1532 return false; 1533 } 1534 1525 1535 $deleted = delete_metadata( 'term', $term_id, $meta_key, $meta_value ); 1526 1536 … … 1545 1555 */ 1546 1556 function get_term_meta( $term_id, $key = '', $single = false ) { 1557 // Bail if term meta table is not installed. 1558 if ( get_option( 'db_version' ) < 34370 ) { 1559 return false; 1560 } 1561 1547 1562 return get_metadata( 'term', $term_id, $key, $single ); 1548 1563 } … … 1564 1579 */ 1565 1580 function update_term_meta( $term_id, $meta_key, $meta_value, $prev_value = '' ) { 1581 // Bail if term meta table is not installed. 1582 if ( get_option( 'db_version' ) < 34370 ) { 1583 return false; 1584 } 1585 1566 1586 $updated = update_metadata( 'term', $term_id, $meta_key, $meta_value, $prev_value ); 1567 1587 … … 1586 1606 */ 1587 1607 function update_termmeta_cache( $term_ids ) { 1608 // Bail if term meta table is not installed. 1609 if ( get_option( 'db_version' ) < 34370 ) { 1610 return; 1611 } 1612 1588 1613 return update_meta_cache( 'term', $term_ids ); 1589 1614 }
Note: See TracChangeset
for help on using the changeset viewer.