Changeset 3256
- Timestamp:
- 05/28/2011 06:03:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-metaboxes.php
r3120 r3256 415 415 * Anonymous user information metabox 416 416 * 417 * @since bbPress (r) 418 * 417 * @since bbPress (r2828) 418 * 419 * @uses bbp_is_reply_anonymous() To check if reply is anonymous 420 * @uses bbp_is_topic_anonymous() To check if topic is anonymous 421 * @uses get_the_ID() To get the global post ID 419 422 * @uses get_post_meta() To get the author user information 420 423 */ 421 function bbp_author_metabox () { 422 global $post; 423 424 // Bail if topic/reply is not anonymous 425 if ( bbp_is_reply_anonymous( get_the_ID() ) || bbp_is_topic_anonymous( get_the_ID() ) ) : ?> 424 function bbp_author_metabox() { 425 426 // Post ID 427 $post_id = get_the_ID(); 428 429 // Show extra bits if topic/reply is anonymous 430 if ( bbp_is_reply_anonymous( $post_id ) || bbp_is_topic_anonymous( $post_id ) ) : ?> 426 431 427 432 <p><strong><?php _e( 'Name', 'bbpress' ); ?></strong></p> … … 429 434 <p> 430 435 <label class="screen-reader-text" for="bbp_anonymous_name"><?php _e( 'Name', 'bbpress' ); ?></label> 431 <input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo get_post_meta( $post ->ID, '_bbp_anonymous_name', true ); ?>" size="38" />436 <input type="text" id="bbp_anonymous_name" name="bbp_anonymous_name" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_name', true ); ?>" size="38" /> 432 437 </p> 433 438 … … 436 441 <p> 437 442 <label class="screen-reader-text" for="bbp_anonymous_email"><?php _e( 'Email', 'bbpress' ); ?></label> 438 <input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo get_post_meta( $post ->ID, '_bbp_anonymous_email', true ); ?>" size="38" />443 <input type="text" id="bbp_anonymous_email" name="bbp_anonymous_email" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_email', true ); ?>" size="38" /> 439 444 </p> 440 445 … … 443 448 <p> 444 449 <label class="screen-reader-text" for="bbp_anonymous_website"><?php _e( 'Website', 'bbpress' ); ?></label> 445 <input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo get_post_meta( $post ->ID, '_bbp_anonymous_website', true ); ?>" size="38" />450 <input type="text" id="bbp_anonymous_website" name="bbp_anonymous_website" value="<?php echo get_post_meta( $post_id, '_bbp_anonymous_website', true ); ?>" size="38" /> 446 451 </p> 447 452 … … 452 457 <p> 453 458 <label class="screen-reader-text" for="bbp_author_ip_address"><?php _e( 'IP Address', 'bbpress' ); ?></label> 454 <input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo get_post_meta( $post ->ID, '_bbp_author_ip', true ); ?>" size="38" disabled="disabled" />459 <input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="<?php echo get_post_meta( $post_id, '_bbp_author_ip', true ); ?>" size="38" disabled="disabled" /> 455 460 </p> 456 461 457 462 <?php 458 463 459 do_action( 'bbp_author_metabox', $post ->ID);464 do_action( 'bbp_author_metabox', $post_id ); 460 465 } 461 466
Note: See TracChangeset
for help on using the changeset viewer.