Skip to:
Content

BuddyPress.org

Ticket #7193: 7193.bp-pages.patch

File 7193.bp-pages.patch, 1.7 KB (added by r-a-y, 9 years ago)
  • src/bp-core/admin/bp-core-admin-slugs.php

     
    184184
    185185                <h3><?php _e( 'Registration', 'buddypress' ); ?></h3>
    186186
    187                 <p><?php _e( 'Associate WordPress Pages with the following BuddyPress Registration pages.', 'buddypress' ); ?></p>
     187                <?php if ( bp_get_option( 'users_can_register' ) ) : ?>
     188                        <p><?php _e( 'Associate WordPress Pages with the following BuddyPress Registration pages.', 'buddypress' ); ?></p>
     189                <?php else : ?>
     190                        <?php if ( is_multisite() ) : ?>
     191                                <p><?php 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' ) ); ?></p>
     192                        <?php else : ?>
     193                                <p><?php 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' ) ); ?></p>
     194                        <?php endif; ?>
     195                <?php endif; ?>
    188196
    189197                <table class="form-table">
    190198                        <tbody>
    191199
    192                                 <?php foreach ( $static_pages as $name => $label ) : ?>
     200                                <?php if ( bp_get_option( 'users_can_register' ) ) : foreach ( $static_pages as $name => $label ) : ?>
    193201
    194202                                        <tr valign="top">
    195203                                                <th scope="row">
     
    218226                                                </td>
    219227                                        </tr>
    220228
    221                                 <?php endforeach ?>
     229                                <?php endforeach; endif; ?>
    222230
    223231                                <?php
    224232