Changeset 13674 for trunk/src/bp-core/admin/bp-core-admin-rewrites.php
- Timestamp:
- 12/19/2023 11:45:13 PM (10 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-rewrites.php
r13595 r13674 182 182 <td> 183 183 <input type="text" class="code" name="<?php printf( 'components[%d][post_name]', absint( $directory_data->id ) ); ?>" id="<?php echo esc_attr( sprintf( '%s-directory-slug', sanitize_key( $component_id ) ) ); ?>" value="<?php echo esc_attr( $directory_data->slug ); ?>"> 184 </td> 185 </tr> 186 <tr> 187 <th scope="row"> 188 <label for="<?php echo esc_attr( sprintf( '%s-directory-url', sanitize_key( $component_id ) ) ); ?>"> 189 <?php ( 'activate' === $component_id || 'register' === $component_id ) ? esc_html_e( 'Page permalink', 'buddypress' ) : esc_html_e( 'Directory permalink', 'buddypress' ); ?> 190 </label> 191 </th> 192 <td> 193 <?php 194 $url_args = array( 195 'component_id' => $component_id, 196 ); 197 198 if ( 'activate' === $component_id || 'register' === $component_id ) { 199 $url_args = array( 200 'component_id' => 'members', 201 sprintf( 'member_%s', $component_id ) => 1, 202 ); 203 } 204 205 $permalink = bp_rewrites_get_url( $url_args ); 206 ?> 207 <input type="text" class="code bp-directory-url" id="<?php echo esc_attr( sprintf( '%s-directory-url', sanitize_key( $component_id ) ) ); ?>" value="<?php echo esc_url( $permalink ); ?>" disabled="disabled"> 208 209 <?php if ( 'activate' !== $component_id && 'register' !== $component_id ) : ?> 210 <a href="<?php echo esc_url( $permalink ); ?>" class="button-secondary bp-open-permalink" target="_bp"> 211 <?php esc_html_e( 'View', 'buddypress' ); ?> <span class="dashicons dashicons-external" aria-hidden="true"></span> 212 <span class="screen-reader-text"><?php esc_html_e( '(opens in a new tab)', 'buddypress' ); ?></span> 213 </a> 214 <?php endif; ?> 184 215 </td> 185 216 </tr>
Note: See TracChangeset
for help on using the changeset viewer.