[ Index ] |
PHP Cross Reference of BuddyPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * xProfile Template tags 4 * 5 * @since 3.0.0 6 * @version 8.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 * @deprecated 8.0.0 66 */ 67 function bp_nouveau_base_account_has_xprofile() { 68 _deprecated_function( __FUNCTION__, '8.0.0', 'bp_nouveau_has_signup_xprofile_fields()' ); 69 return bp_nouveau_has_signup_xprofile_fields(); 70 } 71 72 /** 73 * Checks whether there are signup profile fields to display. 74 * 75 * @since 8.0.0 76 * 77 * @param bool Whether to init an xProfile loop. 78 * @return bool True if there are signup profile fields to display. False otherwise. 79 */ 80 function bp_nouveau_has_signup_xprofile_fields( $do_loop = false ) { 81 if ( ! $do_loop ) { 82 $signup_fields = (array) bp_xprofile_get_signup_field_ids(); 83 return 1 <= count( $signup_fields ); 84 } 85 86 return bp_has_profile( bp_xprofile_signup_args() ); 87 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Feb 16 01:00:59 2025 | Cross-referenced by PHPXref 0.7.1 |