Ticket #6680: 6680.02.patch
File 6680.02.patch, 5.4 KB (added by , 9 years ago) |
---|
-
src/bp-templates/bp-legacy/buddypress/activity/post-form.php
25 25 </a> 26 26 </div> 27 27 28 <p class="activity-greeting"><?php if ( bp_is_group() ) 29 printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) ); 30 else 31 printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) ); 32 ?></p> 28 <div id="whats-new-content"> 33 29 34 <div id="whats-new-content">35 30 <div id="whats-new-textarea"> 36 31 <label for="whats-new" class="bp-screen-reader-text"><?php _e( 'Post what\'s new', 'buddypress' ); ?></label> 37 <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="1 0"32 <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="1" 38 33 <?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?> 39 ><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>34 placeholder="<?php echo esc_attr( bp_get_activity_whats_new_placeholder() ) ;?>"><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea> 40 35 </div> 41 36 42 <div id="whats-new-options"> 43 <div id="whats-new-submit"> 44 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php esc_attr_e( 'Post Update', 'buddypress' ); ?>" /> 45 </div> 37 <div id="whats-new-actions"> 38 <?php 39 /** 40 * Fires before the activity post form options. 41 * 42 * @since BuddyPress (2.4.0) 43 */ 44 do_action( 'bp_activity_post_form_before_options' ); ?> 46 45 47 < ?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>46 <div id="whats-new-options"> 48 47 49 < div id="whats-new-post-in-box">48 <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?> 50 49 51 < ?php _e( 'Post in', 'buddypress' ); ?>:50 <div id="whats-new-post-in-box"> 52 51 53 <label for="whats-new-post-in" class="bp-screen-reader-text"><?php _e( 'Post in', 'buddypress' ); ?></label> 54 <select id="whats-new-post-in" name="whats-new-post-in"> 55 <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option> 52 <label for="whats-new-post-in"><?php _e( 'Post in', 'buddypress' ); ?>:</label> 56 53 57 < ?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0&update_meta_cache=0' ) ) :58 while ( bp_groups() ) : bp_the_group(); ?>54 <select id="whats-new-post-in" name="whats-new-post-in"> 55 <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option> 59 56 60 <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option> 57 <?php if ( bp_has_groups( 'user_id=' . bp_loggedin_user_id() . '&type=alphabetical&max=100&per_page=100&populate_extras=0&update_meta_cache=0' ) ) : 58 while ( bp_groups() ) : bp_the_group(); ?> 61 59 62 <?php endwhile; 63 endif; ?> 60 <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option> 64 61 65 </select> 66 </div> 67 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 62 <?php endwhile; 63 endif; ?> 68 64 69 <?php elseif ( bp_is_group_activity() ) : ?> 65 </select> 66 </div> 67 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 70 68 71 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 72 <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" /> 69 <?php elseif ( bp_is_group_home() ) : ?> 73 70 74 <?php endif; ?> 71 <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" /> 72 <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" /> 75 73 74 <?php endif; ?> 75 76 <?php 77 78 /** 79 * Fires at the end of the activity post form options. 80 * 81 * @since BuddyPress (1.2.0) 82 */ 83 do_action( 'bp_activity_post_form_options' ); ?> 84 85 </div><!-- #whats-new-options --> 86 76 87 <?php 77 78 88 /** 79 * Fires at the end of the activity post form markup.89 * Fires before the activity post form submit. 80 90 * 81 * @since 1.2.091 * @since BuddyPress (2.4.0) 82 92 */ 83 do_action( 'bp_activity_post_form_ options' ); ?>93 do_action( 'bp_activity_post_form_before_submit' ); ?> 84 94 85 </div><!-- #whats-new-options --> 95 <div id="whats-new-submit"> 96 97 <input type="reset" name="aw-whats-new-reset" id="aw-whats-new-reset" value="<?php esc_attr_e( 'Cancel', 'buddypress' ); ?>" /> 98 <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php esc_attr_e( 'Post Update', 'buddypress' ); ?>" /> 99 100 <?php 101 /** 102 * Fires at the end of the activity post form submit. 103 * 104 * @since BuddyPress (2.4.0) 105 */ 106 do_action( 'bp_activity_post_form_submit' ); ?> 107 </div><!-- #whats-new-submit --> 108 </div><!-- #whats-new-actions --> 86 109 </div><!-- #whats-new-content --> 87 110 88 111 <?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?>