[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> profile-public.php (source)

   1  <?php
   2  gp_title( __( 'Profile &lt; GlotPress', 'glotpress' ) );
   3  gp_breadcrumb( array( __( 'Profile', 'glotpress' ) ) );
   4  
   5  gp_tmpl_header();
   6  ?>
   7  
   8  <h2><?php echo $user->display_name; ?></h2>
   9  
  10  <div>
  11      <div class="user-card">
  12          <div class="user-avatar"><?php echo get_avatar( $user->user_email, 100 ); ?></div>
  13  
  14          <dl class="user-info">
  15              <dd><?php
  16                  $locale_keys = array_keys( $locales );
  17  
  18                  if ( 1 < count( $locales ) ) {
  19                      /* translators: 1: display name of a user, 2: language, 3: language */
  20                      vprintf( __( '%1$s is a polyglot who knows %2$s but also knows %3$s.', 'glotpress' ), array_merge( array( $user->display_name ), $locale_keys ) );
  21                  } else if( ! empty ( $locale_keys ) ) {
  22                      /* translators: 1: display name of a user, 2: language */
  23                      printf( __( '%1$s is a polyglot who contributes to %2$s', 'glotpress' ), $user->display_name, $locale_keys[0] );
  24                  }
  25              ?></dd>
  26              <dt><?php _e( 'Member Since', 'glotpress' ); ?></dt>
  27              <dd><?php
  28                  /* translators: public profile date format, see https://secure.php.net/date */
  29                  echo date_i18n( __( 'M j, Y', 'glotpress' ), strtotime( $user->user_registered ) ); // WPCS: XSS ok.
  30              ?></dd>
  31          </dl>
  32      </div>
  33  </div>
  34  
  35  <div id="profile">
  36      <div class="recent-projects">
  37          <h3><?php _e( 'Recent Projects', 'glotpress' ); ?></h3>
  38  
  39          <ul>
  40          <?php foreach ( $recent_projects as $project ): ?>
  41              <li>
  42                  <p><?php
  43                      echo gp_link_get( $project->project_url, $project->set_name ) . ': ';
  44                      echo gp_link_get( $project->project_url . '?filters[status]=either&filters[user_login]=' . $user->user_login,
  45                          sprintf( _n( '%s contribution', '%s contributions',$project->count, 'glotpress' ), $project->count ) );
  46                  ?></p>
  47                  <p class="ago">
  48                      <?php printf( __( 'last translation about %s ago (UTC)', 'glotpress' ), human_time_diff( gp_gmt_strtotime( $project->last_updated ) ) ); ?>
  49                  </p>
  50              </li>
  51          <?php endforeach; ?>
  52          </ul>
  53      </div>
  54      <div class="validates-projects">
  55          <h3><?php _e( 'Validator to', 'glotpress' ); ?></h3>
  56  
  57          <?php if ( count($permissions) >= 1 ): ?>
  58              <ul>
  59              <?php foreach ( $permissions as $permission ): ?>
  60                  <li>
  61                      <p> <?php echo gp_link_get( $permission->project_url, $permission->set_name ); ?> </p>
  62                  </li>
  63              <?php endforeach; ?>
  64              </ul>
  65          <?php else: ?>
  66              <p><?php printf( __( '%s is not validating any projects!', 'glotpress' ), $user->display_name )?></p>
  67          <?php endif ?>
  68      </div>
  69  </div>
  70  
  71  <?php gp_tmpl_footer();


Generated: Sat Aug 24 01:03:14 2019 Cross-referenced by PHPXref 0.7.1