Making WordPress.org


Ignore:
Timestamp:
02/11/2021 02:05:04 AM (5 years ago)
Author:
dd32
Message:

Support Forums: Also Viewing: Move the toggle into the forum profile screen.

This allows non-moderators with at least 20 replies to opt-in to the feature.

This change also adds a heading to the user options page to give the checkboxes a heading, and makes the banner fixing to the page smoother and more inline with the forum styling.

See #2552.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-users.php

    r10321 r10655  
    88        // Add custom fields to user's profile.
    99        add_action( 'bbp_user_edit_after_name',        array( $this, 'add_custom_title_input' ) );
     10        add_action( 'bbp_user_edit_after',             array( $this, 'add_options_section_header' ), 0 );
    1011        add_action( 'bbp_user_edit_after',             array( $this, 'add_auto_topic_subscription_checkbox' ) );
    1112
     
    8081        </div>
    8182        <?php
     83    }
     84
     85    /**
     86     * Add a section header to the extra user options.
     87     */
     88    public function add_options_section_header() {
     89        printf(
     90            '<h2 id="user-settings" class="entry-title">%s</h2>',
     91            esc_html__( 'User Options', 'wporg-forums' )
     92        );
    8293    }
    8394
Note: See TracChangeset for help on using the changeset viewer.