Changeset 2810 for branches/plugin/bbp-includes/bbp-general-template.php
- Timestamp:
- 01/17/2011 05:26:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-general-template.php
r2804 r2810 322 322 323 323 /** START Form Functions ******************************************************/ 324 325 /** 326 * Output the current tab index of a given form 327 * 328 * Use this function to handle the tab indexing of user facing forms within a 329 * template file. Calling this function will automatically increment the global 330 * tab index by default. 331 * 332 * @param int $auto_increment Optional Default true. Set to false to prevent ++ 333 */ 334 function bbp_tab_index( $auto_increment = true) { 335 echo bbp_get_tab_index( $auto_increment ); 336 } 337 338 /** 339 * Output the current tab index of a given form 340 * 341 * Use this function to handle the tab indexing of user facing forms within a 342 * template file. Calling this function will automatically increment the global 343 * tab index by default. 344 * 345 * @uses apply_filters Allows return value to be filtered 346 * @param int $auto_increment Optional Default true. Set to false to prevent ++ 347 * @return int $bbp->tab_index The global tab index 348 */ 349 function bbp_get_tab_index( $auto_increment = true ) { 350 global $bbp; 351 352 if ( true === $auto_increment ) 353 ++$bbp->tab_index; 354 355 return apply_filters( 'bbp_get_tab_index', (int) $bbp->tab_index ); 356 } 324 357 325 358 /** … … 393 426 // Output-related 394 427 'select_id' => 'bbp_forum_id', 395 'tab' => false,428 'tab' => bbp_get_tab_index(), 396 429 'options_only' => false, 397 430 'show_none' => false,
Note: See TracChangeset
for help on using the changeset viewer.