[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

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

   1  <?php
   2  $meta = array(
   3      'meta' => array(
   4          'user_display_name' => $user->display_name,
   5          'user_registered'   => $user->user_registered,
   6      )
   7  );
   8  
   9  foreach ( $recent_projects as $project ) {
  10      $project->set_name = html_entity_decode( $project->set_name );
  11      unset($project->project_id);
  12      unset($project->set_id);
  13  }
  14  
  15  $arr = array_merge( $meta,
  16      compact( 'locales', 'recent_projects' )
  17  );
  18  
  19  switch ( gp_get('filter') ) {
  20      case 'meta':
  21          echo wp_json_encode( $meta );
  22          break;
  23      case 'recent_projects':
  24          echo wp_json_encode( compact('recent_projects') );
  25          break;
  26      default:
  27          echo wp_json_encode( $arr );
  28          break;
  29  }


Generated: Thu Mar 21 01:01:48 2019 Cross-referenced by PHPXref 0.7.1