mirror of
https://github.com/buddypress/buddypress.git
synced 2026-07-22 20:56:55 +08:00
Also, add WPCS improvements to align `bp_parse_args` correctly. Props imath Fixes #8564 git-svn-id: https://buddypress.svn.wordpress.org/trunk@13108 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
37 lines
644 B
PHP
37 lines
644 B
PHP
<?php
|
|
|
|
// Testing Component Class.
|
|
class BPTest_Component extends BP_Component {
|
|
/**
|
|
* Globals to test.
|
|
*
|
|
* @var array
|
|
*/
|
|
public $globals = array();
|
|
|
|
// Start the `test` component setup process.
|
|
public function __construct( $args = array() ) {
|
|
$r = bp_parse_args(
|
|
$args,
|
|
array(
|
|
'id' => 'example',
|
|
'name' => 'Example Component',
|
|
'globals' => array(
|
|
'slug' => 'example',
|
|
),
|
|
)
|
|
);
|
|
|
|
$this->globals = $r['globals'];
|
|
|
|
parent::start(
|
|
$r['id'],
|
|
$r['name']
|
|
);
|
|
}
|
|
|
|
// Setup Test Globals.
|
|
public function setup_globals( $args = array() ) {
|
|
parent::setup_globals( $this->globals );
|
|
}
|
|
}
|