[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-groups/screens/single/admin/ -> group-cover-image.php (source)

   1  <?php
   2  /**
   3   * Groups: Single group "Manage > Cover Image" screen handler
   4   *
   5   * @package BuddyPress
   6   * @subpackage GroupsScreens
   7   * @since 3.0.0
   8   */
   9  
  10  /**
  11   * Handle the display of a group's Change cover image page.
  12   *
  13   * @since 2.4.0
  14   */
  15  function groups_screen_group_admin_cover_image() {
  16      if ( 'group-cover-image' != bp_get_group_current_admin_tab() ) {
  17          return false;
  18      }
  19  
  20      // If the logged-in user doesn't have permission or if cover image uploads are disabled, then stop here.
  21      if ( ! bp_is_item_admin() || ! bp_group_use_cover_image_header() ) {
  22          return false;
  23      }
  24  
  25      /**
  26       * Fires before the loading of the group Change cover image page template.
  27       *
  28       * @since 2.4.0
  29       *
  30       * @param int $id ID of the group that is being displayed.
  31       */
  32      do_action( 'groups_screen_group_admin_cover_image', bp_get_current_group_id() );
  33  
  34      /**
  35       * Filters the template to load for a group's Change cover image page.
  36       *
  37       * @since 2.4.0
  38       *
  39       * @param string $value Path to a group's Change cover image template.
  40       */
  41      bp_core_load_template( apply_filters( 'groups_template_group_admin_cover_image', 'groups/single/home' ) );
  42  }
  43  add_action( 'bp_screens', 'groups_screen_group_admin_cover_image' );


Generated: Thu Apr 25 01:01:12 2024 Cross-referenced by PHPXref 0.7.1