Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/17/2011 05:26:05 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Normalize bbp-twentyten theme files. Introduce bbp_tab_index functions for forms. Rename some page- files to action- since they are not page templates. Introduce bbp_login and bbp_register place-holders in bbp-twentyten theme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-includes/bbp-general-template.php

    r2804 r2810  
    322322
    323323/** 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 */
     334function 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        }
    324357
    325358/**
     
    393426                        // Output-related
    394427                        'select_id'          => 'bbp_forum_id',
    395                         'tab'                => false,
     428                        'tab'                => bbp_get_tab_index(),
    396429                        'options_only'       => false,
    397430                        'show_none'          => false,
Note: See TracChangeset for help on using the changeset viewer.