[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-blogs/ -> bp-blogs-widgets.php (source)

   1  <?php
   2  /**
   3   * BuddyPress Blogs Widgets.
   4   *
   5   * @package BuddyPress
   6   * @subpackage BlogsWidgets
   7   * @since 1.0.0
   8   */
   9  
  10  // Exit if accessed directly.
  11  defined( 'ABSPATH' ) || exit;
  12  
  13  /**
  14   * Register the widgets for the Blogs component.
  15   */
  16  function bp_blogs_register_widgets() {
  17      global $wpdb;
  18  
  19      if ( bp_is_active( 'activity' ) && bp_is_root_blog( $wpdb->blogid ) ) {
  20          add_action( 'widgets_init', function() { register_widget( 'BP_Blogs_Recent_Posts_Widget' ); } );
  21      }
  22  }
  23  add_action( 'bp_register_widgets', 'bp_blogs_register_widgets' );


Generated: Mon Oct 14 01:01:37 2019 Cross-referenced by PHPXref 0.7.1