Changeset 12948 for trunk/src/bp-core/admin/bp-core-admin-slugs.php
- Timestamp:
- 05/13/2021 08:26:05 AM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/admin/bp-core-admin-slugs.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-slugs.php
r12927 r12948 118 118 $directory_pages = bp_core_admin_get_directory_pages(); 119 119 120 if ( ! empty( $directory_pages ) ) : ?>121 122 <h3><?php _e( 'Directories', 'buddypress' ); ?></h3>123 124 <p><?php _e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p>120 if ( ! empty( $directory_pages ) ) : ?> 121 122 <h3><?php esc_html_e( 'Directories', 'buddypress' ); ?></h3> 123 124 <p><?php esc_html_e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p> 125 125 126 126 <table class="form-table"> … … 142 142 'echo' => false, 143 143 'show_option_none' => __( '- None -', 'buddypress' ), 144 'selected' => ! empty( $existing_pages[$name] ) ? $existing_pages[$name] : false144 'selected' => ! empty( $existing_pages[$name] ) ? $existing_pages[$name] : false 145 145 ) ); ?> 146 146 … … 148 148 149 149 <a href="<?php echo esc_url( get_permalink( $existing_pages[$name] ) ); ?>" class="button-secondary" target="_bp"> 150 <?php _e( 'View', 'buddypress' ); ?> <span class="dashicons dashicons-external" aria-hidden="true"></span>150 <?php esc_html_e( 'View', 'buddypress' ); ?> <span class="dashicons dashicons-external" aria-hidden="true"></span> 151 151 <span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'buddypress' ); ?></span> 152 152 </a> … … 186 186 if ( !empty( $static_pages ) ) : ?> 187 187 188 <h3><?php _e( 'Registration', 'buddypress' ); ?></h3>188 <h3><?php esc_html_e( 'Registration', 'buddypress' ); ?></h3> 189 189 190 190 <?php if ( bp_get_signup_allowed() || bp_get_members_invitations_allowed() ) : ?> 191 <p><?php _e( 'Associate WordPress Pages with the following BuddyPress Registration pages.', 'buddypress' ); ?></p> 191 <p> 192 <?php esc_html_e( 'Associate WordPress Pages with the following BuddyPress Registration pages.', 'buddypress' ); ?> 193 <?php esc_html_e( 'These pages will only be reachable by users who are not logged in.', 'buddypress' ); ?> 194 </p> 192 195 <?php else : ?> 193 196 <?php if ( is_multisite() ) : ?> 194 197 <p> 195 198 <?php 196 /* translators: %s: the link to the Network settings page */ 197 printf( __( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by selecting either the "User accounts may be registered" or "Both sites and user accounts can be registered" option on <a href="%s">this page</a>.', 'buddypress' ), network_admin_url( 'settings.php' ) ); 199 printf( 200 /* translators: %s: the link to the Network settings page */ 201 esc_html_x( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by selecting either the "User accounts may be registered" or "Both sites and user accounts can be registered" option on %s.', 'Disabled registration message for multisite config', 'buddypress' ), 202 sprintf( 203 '<a href="%1$s">%2$s</a>', 204 esc_url( network_admin_url( 'settings.php' ) ), 205 esc_html_x( 'this page', 'Link text for the Multisite’s network settings page', 'buddypress' ) 206 ) 207 ); 198 208 ?> 199 209 </p> … … 201 211 <p> 202 212 <?php 203 /* translators: %s: the link to the Site settings page */ 204 printf( __( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by clicking on the "Anyone can register" checkbox on <a href="%s">this page</a>.', 'buddypress' ), admin_url( 'options-general.php' ) ); 213 printf( 214 /* translators: %s: the link to the Site general options page */ 215 esc_html_x( 'Registration is currently disabled. Before associating a page is allowed, please enable registration by clicking on the "Anyone can register" checkbox on %s.', 'Disabled registration message for regular site config', 'buddypress' ), 216 sprintf( 217 '<a href="%1$s">%2$s</a>', 218 esc_url( admin_url( 'options-general.php' ) ), 219 esc_html_x( 'this page', 'Link text for the Site’s general options page', 'buddypress' ) 220 ) 221 ); 205 222 ?> 206 223 </p> … … 229 246 ) ) ?> 230 247 231 <?php if ( ! empty( $existing_pages[ $name ] ) && get_post( $existing_pages[ $name ] ) ) : ?>232 233 <a href="<?php echo get_permalink( $existing_pages[$name] ); ?>" class="button-secondary" target="_bp"><?php _e( 'View', 'buddypress' ); ?></a>234 235 <?php endif; ?>236 237 248 <?php if ( ! bp_is_root_blog() ) restore_current_blog(); ?> 238 249 … … 267 278 268 279 if ( isset( $_POST['bp-admin-pages-submit'] ) ) { 269 if ( ! check_admin_referer( 'bp-admin-pages-setup' ) )280 if ( ! check_admin_referer( 'bp-admin-pages-setup' ) ) { 270 281 return false; 282 } 271 283 272 284 // Then, update the directory pages.
Note: See TracChangeset
for help on using the changeset viewer.