Changeset 10110 for trunk/src/bp-core/bp-core-component.php
- Timestamp:
- 09/14/2015 03:39:38 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-component.php
r10108 r10110 127 127 public $global_tables = array(); 128 128 129 /** 130 * Query argument for component search URLs. 131 * 132 * @since 2.4.0 133 * @var string 134 */ 135 public $search_query_arg = 's'; 136 129 137 /** Methods ***************************************************************/ 130 138 … … 135 143 * @since 1.9.0 Added $params as a parameter. 136 144 * @since 2.3.0 Added $params['features'] as a configurable value. 145 * @since 2.4.0 Added $params['search_query_arg'] as a configurable value. 137 146 * 138 147 * @param string $id Unique ID. Letters, numbers, and underscores only. … … 142 151 * @param array $params { 143 152 * Additional parameters used by the component. 144 * @type int $adminbar_myaccount_order Set the position for our menu under the WP Toolbar's "My Account menu". 145 * @type array $features An array of feature names. This is used to load additional files from your 146 * component directory and for feature active checks. eg. array( 'awesome' ) 147 * would look for a file called "bp-{$this->id}-awesome.php" and you could use 148 * bp_is_active( $this->id, 'awesome' ) to determine if the feature is active. 153 * @type int $adminbar_myaccount_order Set the position for our menu under the WP Toolbar's "My Account menu". 154 * @type array $features An array of feature names. This is used to load additional files from your 155 * component directory and for feature active checks. eg. array( 'awesome' ) 156 * would look for a file called "bp-{$this->id}-awesome.php" and you could use 157 * bp_is_active( $this->id, 'awesome' ) to determine if the feature is active. 158 * @type string $search_query_arg String to be used as the query argument in component search URLs. 149 159 * } 150 160 */ … … 170 180 if ( ! empty( $params['features'] ) ) { 171 181 $this->features = array_map( 'sanitize_title', (array) $params['features'] ); 182 } 183 184 if ( ! empty( $params['search_query_arg'] ) ) { 185 $this->search_query_arg = sanitize_title( $params['search_query_arg'] ); 172 186 } 173 187
Note: See TracChangeset
for help on using the changeset viewer.