Changeset 10755
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r10745 r10755 491 491 */ 492 492 return apply_filters( 'bp_core_get_directory_page_ids', $page_ids ); 493 } 494 495 /** 496 * Get the page ID corresponding to a component directory. 497 * 498 * @since 2.6.0 499 * 500 * @param string $component The slug representing the component. Defaults to the current component. 501 * @return int|bool The ID of the directory page associated with the component. False if none is found. 502 */ 503 function bp_core_get_directory_page_id( $component = null ) { 504 if ( ! $component ) { 505 $component = bp_current_component(); 506 } 507 508 $bp_pages = bp_core_get_directory_page_ids( 'all' ); 509 510 $page_id = false; 511 if ( $component && isset( $bp_pages[ $component ] ) ) { 512 $page_id = (int) $bp_pages[ $component ]; 513 } 514 515 return $page_id; 493 516 } 494 517
Note: See TracChangeset
for help on using the changeset viewer.