[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-nouveau/includes/xprofile/ -> template-tags.php (source)

   1  <?php
   2  /**
   3   * xProfile Template tags
   4   *
   5   * @since 3.0.0
   6   * @version 3.0.0
   7   */
   8  
   9  // Exit if accessed directly.
  10  defined( 'ABSPATH' ) || exit;
  11  
  12  /**
  13   * Fire specific hooks into the single members xprofile templates.
  14   *
  15   * @since 3.0.0
  16   *
  17   * @param string $when   Optional. Either 'before' or 'after'.
  18   * @param string $suffix Optional. Use it to add terms at the end of the hook name.
  19   */
  20  function bp_nouveau_xprofile_hook( $when = '', $suffix = '' ) {
  21      $hook = array( 'bp' );
  22  
  23      if ( $when ) {
  24          $hook[] = $when;
  25      }
  26  
  27      // It's a xprofile hook
  28      $hook[] = 'profile';
  29  
  30      if ( $suffix ) {
  31          $hook[] = $suffix;
  32      }
  33  
  34      bp_nouveau_hook( $hook );
  35  }
  36  
  37  /**
  38   * Template tag to output the field visibility markup in edit and signup screens.
  39   *
  40   * @since 3.0.0
  41   */
  42  function bp_nouveau_xprofile_edit_visibilty() {
  43      /**
  44       * Fires before the display of visibility options for the field.
  45       *
  46       * @since 1.7.0
  47       */
  48      do_action( 'bp_custom_profile_edit_fields_pre_visibility' );
  49  
  50      bp_get_template_part( 'members/single/parts/profile-visibility' );
  51  
  52      /**
  53       * Fires after the visibility options for a field.
  54       *
  55       * @since 3.0.0
  56       */
  57      do_action( 'bp_custom_profile_edit_fields' );
  58  }
  59  
  60  /**
  61   * Return a bool check to see whether the base re group has had extended
  62   * profile fields added to it for the registration screen.
  63   *
  64   * @since 3.0.0
  65   */
  66  function bp_nouveau_base_account_has_xprofile() {
  67      return (bool) bp_has_profile(
  68          array(
  69              'profile_group_id' => 1,
  70              'fetch_field_data' => false,
  71          )
  72      );
  73  }


Generated: Sat Oct 19 01:01:37 2019 Cross-referenced by PHPXref 0.7.1