Skip to:
Content

BuddyPress.org

Changeset 12976


Ignore:
Timestamp:
06/27/2021 10:47:39 AM (4 years ago)
Author:
imath
Message:

Set the show_instance_in_rest to true for all BP Widgets options

Using this widget option will allow users to transform our legacy widgets to widget blocks.

Fixes #8496

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/classes/class-bp-blogs-recent-posts-widget.php

    r12324 r12976  
    1313/**
    1414 * The Recent Networkwide Posts widget.
     15 *
     16 * @since 1.0.0
    1517 */
    1618class BP_Blogs_Recent_Posts_Widget extends WP_Widget {
     
    1820    /**
    1921     * Constructor method.
     22     *
     23     * @since 1.5.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2025     */
    2126    public function __construct() {
     
    2429            'classname'                   => 'widget_bp_blogs_widget buddypress widget',
    2530            'customize_selective_refresh' => true,
     31            'show_instance_in_rest'       => true,
    2632        );
    2733        parent::__construct( false, $name = _x( '(BuddyPress) Recent Networkwide Posts', 'widget name', 'buddypress' ), $widget_ops );
  • trunk/src/bp-core/classes/class-bp-core-login-widget.php

    r12118 r12976  
    2222     *
    2323     * @since 1.9.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2425     */
    2526    public function __construct() {
     
    3132                'classname'                   => 'widget_bp_core_login_widget buddypress widget',
    3233                'customize_selective_refresh' => true,
     34                'show_instance_in_rest'       => true,
    3335            )
    3436        );
  • trunk/src/bp-friends/classes/class-bp-core-friends-widget.php

    r12323 r12976  
    2222     *
    2323     * @since 1.9.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2425     */
    2526    function __construct() {
     
    2829            'classname'                   => 'widget_bp_core_friends_widget buddypress widget',
    2930            'customize_selective_refresh' => true,
     31            'show_instance_in_rest'       => true,
    3032        );
    3133        parent::__construct( false, $name = _x( '(BuddyPress) Friends', 'widget name', 'buddypress' ), $widget_ops );
  • trunk/src/bp-groups/classes/class-bp-groups-widget.php

    r12791 r12976  
    2222     *
    2323     * @since 1.0.3
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2425     */
    2526    public function __construct() {
     
    2829            'classname'                   => 'widget_bp_groups_widget buddypress widget',
    2930            'customize_selective_refresh' => true,
     31            'show_instance_in_rest'       => true,
    3032        );
    3133        parent::__construct( false, _x( '(BuddyPress) Groups', 'widget name', 'buddypress' ), $widget_ops );
  • trunk/src/bp-members/classes/class-bp-core-members-widget.php

    r12324 r12976  
    2222     *
    2323     * @since 1.5.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2425     */
    2526    public function __construct() {
     
    3435            'classname'                   => 'widget_bp_core_members_widget buddypress widget',
    3536            'customize_selective_refresh' => true,
     37            'show_instance_in_rest'       => true,
    3638        ) );
    3739
  • trunk/src/bp-members/classes/class-bp-core-recently-active-widget.php

    r12324 r12976  
    2222     *
    2323     * @since 1.5.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2425     */
    2526    public function __construct() {
     
    3031            'classname'                   => 'widget_bp_core_recently_active_widget buddypress widget',
    3132            'customize_selective_refresh' => true,
     33            'show_instance_in_rest'       => true,
    3234        ) );
    3335    }
  • trunk/src/bp-members/classes/class-bp-core-whos-online-widget.php

    r12324 r12976  
    1515 *
    1616 * @since 1.0.3
     17 * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    1718 */
    1819class BP_Core_Whos_Online_Widget extends WP_Widget {
     
    2223     *
    2324     * @since 1.5.0
     25     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2426     */
    2527    public function __construct() {
     
    3032            'classname'                   => 'widget_bp_core_whos_online_widget buddypress widget',
    3133            'customize_selective_refresh' => true,
     34            'show_instance_in_rest'       => true,
    3235        ) );
    3336    }
  • trunk/src/bp-messages/classes/class-bp-messages-sitewide-notices-widget.php

    r11447 r12976  
    2020    /**
    2121     * Constructor method.
     22     *
     23     * @since 1.9.0
     24     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2225     */
    2326    function __construct() {
     
    2932                'description'                 => __( 'Display Sitewide Notices posted by the site administrator', 'buddypress' ),
    3033                'customize_selective_refresh' => true,
     34                'show_instance_in_rest'       => true,
    3135            )
    3236        );
  • trunk/src/bp-templates/bp-nouveau/includes/activity/widgets.php

    r12949 r12976  
    2020     *
    2121     * @since 3.0.0
     22     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    2223     */
    2324    public function __construct() {
     
    3536                'description'                 => __( 'Display the latest updates of your community having the types of your choice.', 'buddypress' ),
    3637                'customize_selective_refresh' => true,
     38                'show_instance_in_rest'       => true,
    3739            )
    3840        );
  • trunk/src/bp-templates/bp-nouveau/includes/classes.php

    r12156 r12976  
    192192     *
    193193     * @since 3.0.0
     194     * @since 9.0.0 Adds the `show_instance_in_rest` property to Widget options.
    194195     */
    195196    public function __construct() {
    196197        $widget_ops = array(
    197             'description' => __( 'Displays BuddyPress primary nav in the sidebar of your site. Make sure to use it as the first widget of the sidebar and only once.', 'buddypress' ),
    198             'classname'   => 'widget_nav_menu buddypress_object_nav',
     198            'description'           => __( 'Displays BuddyPress primary nav in the sidebar of your site. Make sure to use it as the first widget of the sidebar and only once.', 'buddypress' ),
     199            'classname'             => 'widget_nav_menu buddypress_object_nav',
     200            'show_instance_in_rest' => true,
    199201        );
    200202
Note: See TracChangeset for help on using the changeset viewer.