Skip to content

Commit

Permalink
Update helper text when editing portfolio settings.
Browse files Browse the repository at this point in the history
See #3420.
  • Loading branch information
boonebgorges committed Aug 1, 2024
1 parent ce8d2ce commit 10e5b3e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
10 changes: 10 additions & 0 deletions wp-content/plugins/wds-citytech/wds-register.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,16 @@ function openlab_get_profile_field_helper_text( $field_name ) {
case 'display_name' :
return "Please choose your Display Name. Your Display Name will appear on your public OpenLab profile and wherever you post on the OpenLab. <strong>Because your Display Name is public, you don't need to use your real name or your full name.</strong> Your Display Name can be changed at any time by editing your profile.";

case 'portfolio_name' :
$group_type_label = openlab_get_portfolio_label( [ 'case' => 'upper' ] );

return sprintf(
'Depending on the privacy settings you choose, your %s name may be publicly visible, so you may not wish to include your full name. We recommend keeping your %s name under 50 characters. You can change your %s name at any time.',
$group_type_label,
$group_type_label,
$group_type_label
);

default :
return '';
}
Expand Down
4 changes: 1 addition & 3 deletions wp-content/themes/openlab/buddypress/groups/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@
<li>ARCH3522 NYC Arch, FA2013</li>
</ul>
<?php elseif ( 'portfolio' === $group_type ) : ?>
<?php $group_type_label = openlab_get_portfolio_label( 'case=upper&user_id=' . bp_loggedin_user_id() ); ?>
<p class="ol-tooltip">Depending on the privacy settings you choose, your <?php echo esc_html( $group_type_label ); ?> may be publicly visible, so you may not wish to include your full name. We recommend keeping your <?php echo esc_html( $group_type_label ) ?> name under 50 characters. You can change your <?php echo esc_html( $group_type_label ); ?> name at any time.</p>

<p class="ol-tooltip"><?php echo esc_html( openlab_get_profile_field_helper_text( 'portfolio_name' ) ); ?></p>
<?php else : ?>
<p class="ol-tooltip">Please take a moment to consider the name of your <?php echo ucwords($group_type) ?>. Choosing a name that clearly identifies your <?php echo ucwords($group_type) ?> will make it easier for others to find your <?php echo ucwords($group_type) ?> profile. We recommend keeping your <?php echo ucwords($group_type) ?> name under 50 characters.</p>
<?php endif; ?>
Expand Down
4 changes: 4 additions & 0 deletions wp-content/themes/openlab/buddypress/groups/single/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@

<?php do_action( 'bp_before_group_details_admin' ); ?>

<?php if ( 'portfolio' === $group_type ) : ?>
<p><?php echo esc_html( openlab_get_profile_field_helper_text( 'portfolio_name' ) ); ?></p>
<?php endif; ?>

<label for="group-name"><?php echo $group_label_uc . ' Name'; ?> (required)</label>
<input class="form-control" type="text" name="group-name" id="group-name" value="<?php bp_group_name(); ?>" />

Expand Down

0 comments on commit 10e5b3e

Please sign in to comment.