Changeset 4844 for trunk/bp-groups/bp-groups-template.php
- Timestamp:
- 07/25/2011 12:01:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-template.php
r4823 r4844 1267 1267 $group = ( $groups_template->group ) ? $groups_template->group : $bp->groups->current_group; 1268 1268 1269 $current_tab = $bp->action_variables[0];1269 $current_tab = bp_action_variable( 0 ); 1270 1270 ?> 1271 1271 <?php if ( $bp->is_item_admin || $bp->is_item_mod ) { ?> … … 1314 1314 } 1315 1315 function bp_get_group_admin_form_action( $page = false, $group = false ) { 1316 global $ bp, $groups_template;1316 global $groups_template; 1317 1317 1318 1318 if ( !$group ) … … 1320 1320 1321 1321 if ( !$page ) 1322 $page = $bp->action_variables[0];1322 $page = bp_action_variable( 0 ); 1323 1323 1324 1324 return apply_filters( 'bp_group_admin_form_action', bp_get_group_permalink( $group ) . 'admin/' . $page ); … … 1326 1326 1327 1327 function bp_group_has_requested_membership( $group = false ) { 1328 global $ bp, $groups_template;1328 global $groups_template; 1329 1329 1330 1330 if ( !$group ) 1331 1331 $group =& $groups_template->group; 1332 1332 1333 if ( groups_check_for_membership_request( $bp->loggedin_user->id, $group->id ) )1333 if ( groups_check_for_membership_request( bp_loggedin_user_id(), $group->id ) ) 1334 1334 return true; 1335 1335 … … 2015 2015 global $bp; 2016 2016 2017 if ( empty( $bp->action_variables[1]) )2017 if ( !bp_action_variable( 1 ) ) 2018 2018 $bp->action_variables[1] = array_shift( array_keys( $bp->groups->group_creation_steps ) ); 2019 2019 2020 return apply_filters( 'bp_get_group_creation_form_action', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->action_variables[1]);2020 return apply_filters( 'bp_get_group_creation_form_action', bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . bp_action_variable( 1 ) ); 2021 2021 } 2022 2022 … … 2029 2029 2030 2030 /* If this the first step, we can just accept and return true */ 2031 if ( ! $bp->action_variables[1]&& array_shift( array_keys( $bp->groups->group_creation_steps ) ) == $step_slug )2031 if ( !bp_action_variable( 1 ) && array_shift( array_keys( $bp->groups->group_creation_steps ) ) == $step_slug ) 2032 2032 return true; 2033 2033 … … 2039 2039 2040 2040 /* Check the current step against the step parameter */ 2041 if ( $bp->action_variables[1] == $step_slug)2041 if ( bp_is_action_variable( $step_slug ) ) 2042 2042 return true; 2043 2043 … … 2175 2175 2176 2176 foreach ( (array)$bp->groups->group_creation_steps as $slug => $name ) { 2177 if ( $slug == $bp->action_variables[1])2177 if ( bp_is_action_variable( $slug ) ) 2178 2178 break; 2179 2179 … … 2181 2181 } 2182 2182 2183 return apply_filters( 'bp_get_group_creation_previous_link', $bp->loggedin_user->domain. bp_get_groups_slug() . '/create/step/' . array_pop( $previous_steps ) );2183 return apply_filters( 'bp_get_group_creation_previous_link', bp_get_root_domain() . bp_get_groups_slug() . '/create/step/' . array_pop( $previous_steps ) ); 2184 2184 } 2185 2185 … … 2261 2261 } 2262 2262 2263 /** 2264 * Displays group header tabs 2265 * 2266 * @package BuddyPress 2267 * @todo Deprecate? 2268 */ 2263 2269 function bp_groups_header_tabs() { 2264 global $ bp, $create_group_step, $completed_to_step;2270 global $create_group_step, $completed_to_step; 2265 2271 ?> 2266 <li<?php if ( ! isset($bp->action_variables[0]) || 'recently-active' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>2267 <li<?php if ( 'recently-joined' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li>2268 <li<?php if ( 'most-popular' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/most-popular"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li>2269 <li<?php if ( 'admin-of' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/admin-of"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li>2270 <li<?php if ( 'mod-of' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/mod-of"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li>2271 <li<?php if ( 'alphabetically' == $bp->action_variables[0]) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>2272 <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li> 2273 <li<?php if ( bp_is_action_variable( 'recently-joined', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/recently-joined"><?php _e( 'Recently Joined', 'buddypress' ) ?></a></li> 2274 <li<?php if ( bp_is_action_variable( 'most-popular', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/most-popular"><?php _e( 'Most Popular', 'buddypress' ) ?></a></li> 2275 <li<?php if ( bp_is_action_variable( 'admin-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/admin-of"><?php _e( 'Administrator Of', 'buddypress' ) ?></a></li> 2276 <li<?php if ( bp_is_action_variable( 'mod-of', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/mod-of"><?php _e( 'Moderator Of', 'buddypress' ) ?></a></li> 2277 <li<?php if ( bp_is_action_variable( 'alphabetically' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_groups_slug() ?>/my-groups/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li> 2272 2278 <?php 2273 2279 do_action( 'groups_header_tabs' ); 2274 2280 } 2275 2281 2282 /** 2283 * Displays group filter titles 2284 * 2285 * @package BuddyPress 2286 * @todo Deprecate? 2287 */ 2276 2288 function bp_groups_filter_title() { 2277 global $bp; 2278 2279 $current_filter = $bp->action_variables[0]; 2289 $current_filter = bp_action_variable( 0 ); 2280 2290 2281 2291 switch ( $current_filter ) { … … 2303 2313 2304 2314 function bp_is_group_admin_screen( $slug ) { 2305 global $bp;2306 2307 2315 if ( !bp_is_groups_component() || !bp_is_current_action( 'admin' ) ) 2308 2316 return false; 2309 2317 2310 if ( $bp->action_variables[0] == $slug)2318 if ( bp_is_action_variable( $slug ) ) 2311 2319 return true; 2312 2320
Note: See TracChangeset
for help on using the changeset viewer.