Changeset 7840 for trunk/bp-core/bp-core-filters.php
- Timestamp:
- 02/11/2014 02:58:50 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-filters.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-filters.php
r7741 r7840 530 530 } 531 531 add_filter( 'wp_setup_nav_menu_item', 'bp_setup_nav_menu_item', 10, 1 ); 532 533 /** 534 * Filter SQL query strings to swap out the 'meta_id' column. 535 * 536 * WordPress uses the meta_id column for commentmeta and postmeta, and so 537 * hardcodes the column name into its *_metadata() functions. BuddyPress, on 538 * the other hand, uses 'id' for the primary column. To make WP's functions 539 * usable for BuddyPress, we use this just-in-time filter on 'query' to swap 540 * 'meta_id' with 'id. 541 * 542 * @since BuddyPress (2.0.0) 543 * 544 * @access private Do not use. 545 * 546 * @param string $q SQL query. 547 * @return string 548 */ 549 function bp_filter_metaid_column_name( $q ) { 550 return str_replace( 'meta_id', 'id', $q ); 551 }
Note: See TracChangeset
for help on using the changeset viewer.