Skip to:
Content

BuddyPress.org

Changeset 11156


Ignore:
Timestamp:
09/22/2016 01:54:14 AM (3 years ago)
Author:
r-a-y
Message:

Admin: Do not show "Registration" pages dropdown options if registration is disabled.

Fixes #7193.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-slugs.php

    r10825 r11156  
    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_signup_allowed() ) : ?>
     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_signup_allowed() ) : foreach ( $static_pages as $name => $label ) : ?>
    193201
    194202                    <tr valign="top">
     
    219227                    </tr>
    220228
    221                 <?php endforeach ?>
     229                <?php endforeach; endif; ?>
    222230
    223231                <?php
Note: See TracChangeset for help on using the changeset viewer.