Changeset 8135
- Timestamp:
- 03/14/2014 01:12:13 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-functions.php
r8133 r8135 572 572 global $wpdb, $bp; 573 573 574 // Legacy - Return false if any of the above values are not set575 if ( ! is_numeric( $activity_id ) ) {576 return false;577 }578 579 574 // Legacy - if no meta_key is passed, delete all for the item 580 575 if ( empty( $meta_key ) ) { … … 616 611 */ 617 612 function bp_activity_get_meta( $activity_id = 0, $meta_key = '', $single = true ) { 618 619 // Make sure activity_id is valid620 if ( empty( $activity_id ) || ! is_numeric( $activity_id ) ) {621 return false;622 }623 624 613 add_filter( 'query', 'bp_filter_metaid_column_name' ); 625 614 $retval = get_metadata( 'activity', $activity_id, $meta_key, $single ); … … 647 636 */ 648 637 function bp_activity_update_meta( $activity_id, $meta_key, $meta_value, $prev_value = '' ) { 649 650 // Legacy - Make sure activity_id is valid651 if ( ! is_numeric( $activity_id ) ) {652 return false;653 }654 655 638 add_filter( 'query', 'bp_filter_metaid_column_name' ); 656 639 $retval = update_metadata( 'activity', $activity_id, $meta_key, $meta_value, $prev_value ); -
trunk/bp-blogs/bp-blogs-functions.php
r8134 r8135 849 849 global $wpdb, $bp; 850 850 851 // Legacy - return false if the $blog_id is empty852 if ( ! is_numeric( $blog_id ) ) {853 return false;854 }855 856 851 // Legacy - if no meta_key is passed, delete all for the blog_id 857 852 if ( empty( $meta_key ) ) { … … 864 859 add_filter( 'query', 'bp_filter_metaid_column_name' ); 865 860 861 $retval = false; 866 862 foreach ( $keys as $key ) { 867 863 $retval = delete_metadata( 'blog', $blog_id, $key, $meta_value, $delete_all ); -
trunk/bp-groups/bp-groups-functions.php
r8134 r8135 1033 1033 global $wpdb; 1034 1034 1035 // Legacy - return false if non-int group ID1036 if ( ! is_numeric( $group_id ) ) {1037 return false;1038 }1039 1040 1035 // Legacy - if no meta_key is passed, delete all for the item 1041 1036 if ( empty( $meta_key ) ) { -
trunk/bp-xprofile/bp-xprofile-functions.php
r8134 r8135 579 579 global $wpdb; 580 580 581 // Legacy - no empty object id 582 if ( empty( $object_id ) ) { 583 return false; 584 } 585 586 // Legacy - sanitize object type 581 // Sanitize object type 587 582 if ( ! in_array( $object_type, array( 'group', 'field', 'data' ) ) ) { 588 583 return false; … … 604 599 add_filter( 'query', 'bp_xprofile_filter_meta_query' ); 605 600 601 $retval = false; 606 602 foreach ( $keys as $key ) { 607 603 $retval = delete_metadata( 'xprofile_' . $object_type, $object_id, $key, $meta_value, $delete_all ); … … 630 626 */ 631 627 function bp_xprofile_get_meta( $object_id, $object_type, $meta_key = '', $single = true ) { 632 // Legacy - sanitize object type628 // Sanitize object type 633 629 if ( ! in_array( $object_type, array( 'group', 'field', 'data' ) ) ) { 634 630 return false;
Note: See TracChangeset
for help on using the changeset viewer.