Changeset 9057
- Timestamp:
- 09/30/2014 01:57:50 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-groups/bp-groups-template.php
r9048 r9057 2287 2287 } 2288 2288 2289 /** 2290 * HTML admin subnav items for group pages. 2291 * 2292 * @param object $group Optional. Group object. Default: current group in 2293 * the loop. 2294 */ 2289 2295 function bp_group_admin_tabs( $group = false ) { 2290 2296 global $groups_template; … … 2328 2334 } 2329 2335 2336 /** 2337 * Output the group count for the displayed user. 2338 */ 2330 2339 function bp_group_total_for_member() { 2331 2340 echo bp_get_group_total_for_member(); 2332 2341 } 2342 /** 2343 * Get the group count for the displayed user. 2344 * 2345 * @return string 2346 */ 2333 2347 function bp_get_group_total_for_member() { 2334 2348 return apply_filters( 'bp_get_group_total_for_member', BP_Groups_Member::total_group_count() ); 2335 2349 } 2336 2350 2351 /** 2352 * Output the 'action' attribute for a group form. 2353 * 2354 * @param string $page Page slug. 2355 */ 2337 2356 function bp_group_form_action( $page ) { 2338 2357 echo bp_get_group_form_action( $page ); 2339 2358 } 2359 /** 2360 * Generate the 'action' attribute for a group form. 2361 * 2362 * @param string $page Page slug. 2363 * @param object $group Optional. Group object. Default: current group 2364 * in the loop. 2365 * @return string 2366 */ 2340 2367 function bp_get_group_form_action( $page, $group = false ) { 2341 2368 global $groups_template; … … 2347 2374 } 2348 2375 2376 /** 2377 * Output the 'action' attribute for a group admin form. 2378 * 2379 * @param string $page Optional. Page slug. 2380 */ 2349 2381 function bp_group_admin_form_action( $page = false ) { 2350 2382 echo bp_get_group_admin_form_action( $page ); 2351 2383 } 2384 /** 2385 * Generate the 'action' attribute for a group admin form. 2386 * 2387 * @param string $page Optional. Page slug. 2388 * @param object $group Optional. Group object. Default: current group 2389 * in the loop. 2390 * @return string 2391 */ 2352 2392 function bp_get_group_admin_form_action( $page = false, $group = false ) { 2353 2393 global $groups_template; … … 2362 2402 } 2363 2403 2404 /** 2405 * Determine whether the logged-in user has requested membership to a group. 2406 * 2407 * @param object $group Optional. Group object. Default: current group in 2408 * the loop. 2409 * @return bool 2410 */ 2364 2411 function bp_group_has_requested_membership( $group = false ) { 2365 2412 global $groups_template; … … 2375 2422 2376 2423 /** 2377 * bp_group_is_member() 2378 * 2379 * Checks if current user is member of a group. 2380 * 2381 * @uses bp_current_user_can() Check if current user is super admin 2382 * @uses apply_filters Creates bp_group_is_member filter and passes $is_member 2383 * @usedby groups/activity.php, groups/single/forum/edit.php, groups/single/forum/topic.php to determine template part visibility 2384 * @global object $groups_template Current Group (usually in template loop) 2385 * @param object $group Group to check is_member 2386 * @return bool If user is member of group or not 2424 * Check if current user is member of a group. 2425 * 2426 * @global object $groups_template 2427 * 2428 * @param object $group Optional. Group to check is_member. Default: current 2429 * group in the loop. 2430 * @return bool If user is member of group or not. 2387 2431 */ 2388 2432 function bp_group_is_member( $group = false ) { … … 2402 2446 * Check whether the current user has an outstanding invite to the current group in the loop. 2403 2447 * 2404 * @param object $group Optional. Group data object. Default s tothe current2448 * @param object $group Optional. Group data object. Default: the current 2405 2449 * group in the groups loop. 2406 2450 * @return bool True if the user has an outstanding invite, otherwise false. … … 2470 2514 } 2471 2515 2516 /** 2517 * Output the URL for accepting an invitation to the current group in the loop. 2518 */ 2472 2519 function bp_group_accept_invite_link() { 2473 2520 echo bp_get_group_accept_invite_link(); 2474 2521 } 2522 /** 2523 * Generate the URL for accepting an invitation to a group. 2524 * 2525 * @param object $group Optional. Group object. Default: Current group 2526 * in the loop. 2527 * @return string 2528 */ 2475 2529 function bp_get_group_accept_invite_link( $group = false ) { 2476 2530 global $groups_template, $bp; … … 2482 2536 } 2483 2537 2538 /** 2539 * Output the URL for accepting an invitation to the current group in the loop. 2540 */ 2484 2541 function bp_group_reject_invite_link() { 2485 2542 echo bp_get_group_reject_invite_link(); 2486 2543 } 2544 /** 2545 * Generate the URL for rejecting an invitation to a group. 2546 * 2547 * @param object $group Optional. Group object. Default: Current group 2548 * in the loop. 2549 * @return string 2550 */ 2487 2551 function bp_get_group_reject_invite_link( $group = false ) { 2488 2552 global $groups_template, $bp; … … 2494 2558 } 2495 2559 2560 /** 2561 * Output the URL for confirming a request to leave a group. 2562 */ 2496 2563 function bp_group_leave_confirm_link() { 2497 2564 echo bp_get_group_leave_confirm_link(); 2498 2565 } 2566 /** 2567 * Generate the URL for confirming a request to leave a group. 2568 * 2569 * @param object $group Optional. Group object. Default: Current group 2570 * in the loop. 2571 * @return string 2572 */ 2499 2573 function bp_get_group_leave_confirm_link( $group = false ) { 2500 2574 global $groups_template; … … 2506 2580 } 2507 2581 2582 /** 2583 * Output the URL for rejecting a request to leave a group. 2584 */ 2508 2585 function bp_group_leave_reject_link() { 2509 2586 echo bp_get_group_leave_reject_link(); 2510 2587 } 2588 /** 2589 * Generate the URL for rejecting a request to leave a group. 2590 * 2591 * @param object $group Optional. Group object. Default: Current group 2592 * in the loop. 2593 * @return string 2594 */ 2511 2595 function bp_get_group_leave_reject_link( $group = false ) { 2512 2596 global $groups_template; … … 2518 2602 } 2519 2603 2604 /** 2605 * Output the 'action' attribute for a group send invite form. 2606 */ 2520 2607 function bp_group_send_invite_form_action() { 2521 2608 echo bp_get_group_send_invite_form_action(); 2522 2609 } 2610 /** 2611 * Output the 'action' attribute for a group send invite form. 2612 * 2613 * @param object $page Optional. Group object. Default: current group 2614 * in the loop. 2615 * @return string 2616 */ 2523 2617 function bp_get_group_send_invite_form_action( $group = false ) { 2524 2618 global $groups_template; … … 2530 2624 } 2531 2625 2626 /** 2627 * Determine whether the current user has friends to invite to a group. 2628 * 2629 * @param object $group Optional. Group object. Default: current group in 2630 * the loop. 2631 * @return bool 2632 */ 2532 2633 function bp_has_friends_to_invite( $group = false ) { 2533 2634 global $groups_template; … … 2546 2647 2547 2648 /** 2548 * Output sa 'New Topic' button for a group.2649 * Output a 'New Topic' button for a group. 2549 2650 * 2550 2651 * @since BuddyPress (1.2.7) 2551 2652 * 2552 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed.2553 * @uses bp_get_group_new_topic_button() Returns the 'New Topic' button2653 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, 2654 * boolean false if not passed. 2554 2655 */ 2555 2656 function bp_group_new_topic_button( $group = false ) { … … 2561 2662 * @since BuddyPress (1.2.7) 2562 2663 * 2563 * @param BP_Groups_Group|bool $group The BP Groups_Group object if passed, boolean false if not passed. 2564 * @uses is_user_logged_in() Is there a user logged in? 2565 * @uses bp_group_is_user_banned() Is the current user banned from the current group? 2566 * @uses bp_is_group_forum() Are we on a group forum page? 2567 * @uses bp_is_group_forum_topic() Are we on a group topic page? 2568 * @uses bp_get_button() Renders a button 2569 * @return string HTML code for the button 2664 * @param BP_Groups_Group|bool $group The BP Groups_Group object if 2665 * passed, boolean false if not passed. 2666 * @return string HTML code for the button. 2570 2667 */ 2571 2668 function bp_get_group_new_topic_button( $group = false ) {
Note: See TracChangeset
for help on using the changeset viewer.