Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/05/2011 06:52:36 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Rename bbp-filters.php to bbp-hooks.php, and move a majority of actions/filters into it. Introduce ability to edit topics/posts from front-end of theme, and consequently introduce page-bbp_edit.php. Also includes various phpDoc clean-up. Props GautamGupta via Google Code-in

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/form-bbp_anonymous.php

    r2734 r2753  
    1 
    2                     <?php if ( bbp_is_anonymous() ) : ?>
     1<?php
     2/**
     3 * Anonymous user form
     4 *
     5 * @package bbPress
     6 * @subpackage Themes
     7 */
     8?>
     9                    <?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?>
    310
    411                        <fieldset>
    5                             <legend><?php _e( 'Your information:', 'bbpress' ); ?></legend>
     12                            <legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author information', 'bbpress' ) : _e( 'Your information:', 'bbpress' ); ?></legend>
    613                            <p>
    714                                <label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br />
    8                                 <input type="text" id="bbp_anonymous_author" value="<?php bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="4" size="40" name="bbp_anonymous_name" />
     15                                <input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="4" size="40" name="bbp_anonymous_name" />
    916                            </p>
    1017
    1118                            <p>
    1219                                <label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />
    13                                 <input type="text" id="bbp_anonymous_email" value="<?php bbp_current_anonymous_user_data( 'email' ); ?>" tabindex="6" size="40" name="bbp_anonymous_email" />
     20                                <input type="text" id="bbp_anonymous_email" value="<?php echo ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? get_post_meta( $post->ID, '_bbp_anonymous_email', true ) : bbp_get_current_anonymous_user_data( 'email' ); ?>" tabindex="6" size="40" name="bbp_anonymous_email" />
    1421                            </p>
    1522
    1623                            <p>
    1724                                <label for="bbp_anonymous_website"><?php _e( 'Website:', 'bbpress' ); ?></label><br />
    18                                 <input type="text" id="bbp_anonymous_website" value="<?php bbp_current_anonymous_user_data( 'website' ); ?>" tabindex="8" size="40" name="bbp_anonymous_website" />
     25                                <input type="text" id="bbp_anonymous_website" value="<?php bbp_is_topic_edit() ? bbp_topic_author_url() : bbp_is_reply_edit() ? bbp_reply_author_url() : bbp_current_anonymous_user_data( 'website' ); ?>" tabindex="8" size="40" name="bbp_anonymous_website" />
    1926                            </p>
    2027                        </fieldset>
Note: See TracChangeset for help on using the changeset viewer.