BP_Core_Network_Posts_Widget::__construct()

Constructor method.

Description

Source

File: bp-core/classes/class-bp-core-network-posts-widget.php

	public function __construct() {

		// Setup widget name & description.
		$name        = _x( 'BuddyBoss - Network Posts', 'widget name', 'buddyboss' );
		$description = __( 'A dynamic list of network posts', 'buddyboss' );

		// Call WP_Widget constructor.
		parent::__construct( false, $name, array(
			'description'                 => $description,
			'classname'                   => 'network_posts_widget buddypress widget',
			'customize_selective_refresh' => true,
		) );

		if ( is_customize_preview() || is_active_widget( false, false, $this->id_base ) ) {
			add_action( 'bp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
		}
	}

Changelog

Changelog
Version Description
1.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.