Changeset 13532 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 07/28/2023 04:15:13 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r13520 r13532 670 670 671 671 /** 672 * Get the component ID corresponding to a directory page ID. 673 * 674 * @since 12.0.0 675 * 676 * @param int $page_id The ID of the directory page associated with the component. 677 * @return int|false The slug representing the component. False if none is found. 678 */ 679 function bp_core_get_component_from_directory_page_id( $page_id = 0 ) { 680 $bp_pages = bp_core_get_directory_page_ids( 'all' ); 681 682 $component = false; 683 foreach ( $bp_pages as $component_id => $p_id) { 684 if ( $page_id === $p_id ) { 685 $component = $component_id; 686 break; 687 } 688 } 689 690 return $component; 691 } 692 693 /** 672 694 * Store the list of BP directory pages in the appropriate meta table. 673 695 * … … 970 992 array( 971 993 'post__not_in' => array( $post_ID ), 972 'post_status' => array( 'publish', 'bp_restricted'),994 'post_status' => bp_core_get_directory_pages_stati(), 973 995 'post_type' => array( 'buddypress', 'page' ), 974 996 )
Note: See TracChangeset
for help on using the changeset viewer.