-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Group ID to Level Settings page #2978
Conversation
* ENHANCEMENT: Added group ID value to the menu location.
adminpages/membershiplevels.php
Outdated
@@ -342,7 +342,7 @@ function update_level_group_order(event, ui) { | |||
<button class="pmpro_section-toggle-button" type="button" aria-expanded="<?php echo $section_visibility === 'hidden' ? 'false' : 'true'; ?>"> | |||
<span class="dashicons dashicons-arrow-<?php echo $section_visibility === 'hidden' ? 'down' : 'up'; ?>-alt2"></span> | |||
<input type="hidden" class="pmpro-level-settings-group-id" value="<?php echo esc_attr( $level_group->id ); ?>" /> | |||
<?php echo esc_html( $level_group->name ) ?> | |||
<?php echo esc_html( $level_group->name ) . '<small>'. sprintf( esc_html( 'ID: %d', 'paid-memberships-pro' ), $level_group->id ) . '</small>'; ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<?php echo esc_html( $level_group->name ) . '<small>'. sprintf( esc_html( 'ID: %d', 'paid-memberships-pro' ), $level_group->id ) . '</small>'; ?> | |
<?php echo esc_html( $level_group->name ) . '<small>'. esc_html( sprintf( __( 'ID: %d', 'paid-memberships-pro' ), $level_group->id ) ) . '</small>'; ?> |
Localizing the ID string and making sure that PHPCS doesn't complain about non-escaped strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching that, I made it translatable by changing esc_html
to esc_html__
The idea of putting this to the right of the name is to try and not clutter up the group names and make it easily visible without clicking around to get this data.
Screenshots
All Submissions: