Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/15/2018 08:49:09 PM (8 years ago)
Author:
boonebgorges
Message:

Nouveau: Fix back compat for plugins adding markup at 'groups_custom_group_fields_editable'.

Props r-a-y, imath.
Fixes #7837.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r12280 r12290  
    335335
    336336                if ( ! empty( $core_screen['hook'] ) ) {
     337
     338                        // Group's "Manage > Details" page.
     339                        if ( 'group_details_admin' === $core_screen['hook'] ) {
     340                                /**
     341                                 * Fires after the group description admin details.
     342                                 *
     343                                 * @since 1.0.0
     344                                 */
     345                                do_action( 'groups_custom_group_fields_editable' );
     346                        }
     347
    337348                        /**
    338349                         * Fires before the display of group delete admin.
     
    13891400        }
    13901401}
     1402
     1403/**
     1404 * Adds the "Notify group members of these changes" checkbox to the Manage > Details panel.
     1405 *
     1406 * See #7837 for background on why this technique is required.
     1407 *
     1408 * @since 4.0.0
     1409 */
     1410function bp_nouveau_add_notify_group_members_checkbox() {
     1411        printf( '<p class="bp-controls-wrap">
     1412                <label for="group-notify-members" class="bp-label-text">
     1413                        <input type="checkbox" name="group-notify-members" id="group-notify-members" value="1" /> %s
     1414                </label>
     1415        </p>', esc_html__( 'Notify group members of these changes via email', 'buddypress' ) );
     1416}
     1417add_action( 'groups_custom_group_fields_editable', 'bp_nouveau_add_notify_group_members_checkbox', 20 );
Note: See TracChangeset for help on using the changeset viewer.