[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-templates/bp-legacy/buddypress/activity/ -> post-form.php (source)

   1  <?php
   2  /**
   3   * BuddyPress - Activity Post Form
   4   *
   5   * @package BuddyPress
   6   * @subpackage bp-legacy
   7   * @version 3.0.0
   8   */
   9  
  10  ?>
  11  
  12  <form action="<?php bp_activity_post_form_action(); ?>" method="post" id="whats-new-form" name="whats-new-form">
  13  
  14      <?php
  15  
  16      /**
  17       * Fires before the activity post form.
  18       *
  19       * @since 1.2.0
  20       */
  21      do_action( 'bp_before_activity_post_form' ); ?>
  22  
  23      <div id="whats-new-avatar">
  24          <a href="<?php echo bp_loggedin_user_domain(); ?>">
  25              <?php bp_loggedin_user_avatar( 'width=' . bp_core_avatar_thumb_width() . '&height=' . bp_core_avatar_thumb_height() ); ?>
  26          </a>
  27      </div>
  28  
  29      <p class="activity-greeting"><?php if ( bp_is_group() )
  30          printf( __( "What's new in %s, %s?", 'buddypress' ), bp_get_group_name(), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
  31      else
  32          printf( __( "What's new, %s?", 'buddypress' ), bp_get_user_firstname( bp_get_loggedin_user_fullname() ) );
  33      ?></p>
  34  
  35      <div id="whats-new-content">
  36          <div id="whats-new-textarea">
  37              <label for="whats-new" class="bp-screen-reader-text"><?php
  38                  /* translators: accessibility text */
  39                  _e( 'Post what\'s new', 'buddypress' );
  40              ?></label>
  41              <textarea class="bp-suggestions" name="whats-new" id="whats-new" cols="50" rows="10"
  42                  <?php if ( bp_is_group() ) : ?>data-suggestions-group-id="<?php echo esc_attr( (int) bp_get_current_group_id() ); ?>" <?php endif; ?>
  43              ><?php if ( isset( $_GET['r'] ) ) : ?>@<?php echo esc_textarea( $_GET['r'] ); ?> <?php endif; ?></textarea>
  44          </div>
  45  
  46          <div id="whats-new-options">
  47              <div id="whats-new-submit">
  48                  <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php esc_attr_e( 'Post Update', 'buddypress' ); ?>" />
  49              </div>
  50  
  51              <?php if ( bp_is_active( 'groups' ) && !bp_is_my_profile() && !bp_is_group() ) : ?>
  52  
  53                  <div id="whats-new-post-in-box">
  54  
  55                      <?php _e( 'Post in', 'buddypress' ); ?>:
  56  
  57                      <label for="whats-new-post-in" class="bp-screen-reader-text"><?php
  58                          /* translators: accessibility text */
  59                          _e( 'Post in', 'buddypress' );
  60                      ?></label>
  61                      <select id="whats-new-post-in" name="whats-new-post-in">
  62                          <option selected="selected" value="0"><?php _e( 'My Profile', 'buddypress' ); ?></option>
  63  
  64                          <?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' ) ) :
  65                              while ( bp_groups() ) : bp_the_group(); ?>
  66  
  67                                  <option value="<?php bp_group_id(); ?>"><?php bp_group_name(); ?></option>
  68  
  69                              <?php endwhile;
  70                          endif; ?>
  71  
  72                      </select>
  73                  </div>
  74                  <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
  75  
  76              <?php elseif ( bp_is_group_activity() ) : ?>
  77  
  78                  <input type="hidden" id="whats-new-post-object" name="whats-new-post-object" value="groups" />
  79                  <input type="hidden" id="whats-new-post-in" name="whats-new-post-in" value="<?php bp_group_id(); ?>" />
  80  
  81              <?php endif; ?>
  82  
  83              <?php
  84  
  85              /**
  86               * Fires at the end of the activity post form markup.
  87               *
  88               * @since 1.2.0
  89               */
  90              do_action( 'bp_activity_post_form_options' ); ?>
  91  
  92          </div><!-- #whats-new-options -->
  93      </div><!-- #whats-new-content -->
  94  
  95      <?php wp_nonce_field( 'post_update', '_wpnonce_post_update' ); ?>
  96      <?php
  97  
  98      /**
  99       * Fires after the activity post form.
 100       *
 101       * @since 1.2.0
 102       */
 103      do_action( 'bp_after_activity_post_form' ); ?>
 104  
 105  </form><!-- #whats-new-form -->


Generated: Sat Jul 20 01:01:39 2019 Cross-referenced by PHPXref 0.7.1