Ticket #3422: 3422.01.patch
| File 3422.01.patch, 1.3 KB (added by , 15 years ago) |
|---|
-
bp-core/bp-core-functions.php
function bp_core_get_page_meta() { 92 92 } 93 93 } 94 94 95 foreach( $page_ids as $component_name => $page_id ) { 96 if ( empty( $component_name ) || empty( $page_id ) ) 97 unset( $page_ids[$component_name] ); 98 } 99 95 100 return apply_filters( 'bp_core_get_page_meta', $page_ids ); 96 101 } 97 102 … … function bp_core_update_page_meta( $blog_page_ids ) { 121 126 function bp_core_get_page_names() { 122 127 global $wpdb, $bp; 123 128 124 // Set pages as standard class125 $pages = new stdClass;126 127 129 // Get pages and IDs 128 130 if ( $page_ids = bp_core_get_page_meta() ) { 131 132 // Set pages as standard class 133 $pages = new stdClass; 129 134 130 135 $posts_table_name = bp_is_multiblog_mode() ? $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts' : $wpdb->posts; 131 136 $page_ids_sql = implode( ',', (array)$page_ids ); … … function bp_core_add_root_component( $slug ) { 1068 1073 1069 1074 if ( empty( $bp->pages ) ) 1070 1075 $bp->pages = bp_core_get_page_names(); 1071 1076 1072 1077 $match = false; 1073 1078 1074 1079 // Check if the slug is registered in the $bp->pages global 1075 1080 foreach ( (array)$bp->pages as $key => $page ) { 1076 1081 if ( $key == $slug || $page->slug == $slug )