Changeset 17909
- Timestamp:
- 05/13/2011 12:49:53 AM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/credits.php
r17877 r17909 16 16 function add_css() { ?> 17 17 <style type="text/css"> 18 h3.wp-people-group { clear: both; }18 h3.wp-people-group, h3.wp-props-group { clear: both; } 19 19 ul.wp-people-group { margin-bottom: 50px; } 20 20 li.wp-person { float: left; height: 100px; width: 240px; margin-right: 20px; } … … 34 34 35 35 if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) ) 36 return new WP_Error( 'credits_fail', "Oops. We'll need to put a link to WP.org if the HTTP request fails." );36 return false; 37 37 38 $ people= unserialize( wp_remote_retrieve_body( $response ) );39 40 if ( ! $ people)41 return new WP_Error( 'credits_fail', "Oops. We'll need to put a link to WP.org if the HTTP request fails." );38 $results = unserialize( wp_remote_retrieve_body( $response ) ); 39 40 if ( ! $results ) 41 return false; 42 42 43 43 set_site_transient( 'wordpress_credits', $people, 604800 ); // One week. 44 44 } 45 45 46 return $people; 46 return $results; 47 } 48 49 function _wp_credits_add_profile_link( &$user, $key, $prefix ) { 50 $user = '<a href="' . esc_url( $prefix . $user ) . '">' . esc_html( $user ) . '</a>'; 47 51 } 48 52 … … 53 57 <h2><?php _e( 'WordPress Credits' ); ?></h2> 54 58 55 <p><?php _e( "WordPress is created by a worldwide team of passionate individuals. We couldn't possibly list them all, but here some of the most influential people currently involved with the project:" ); ?></p>56 57 59 <?php 58 60 59 $people = wp_credits(); 60 if ( is_wp_error( $people ) ) { 61 echo $people->get_error_message(); 62 } else { 61 $results = wp_credits(); 63 62 64 unset( $people['props'] ); // @TODO 63 if ( false === $results ) { 64 echo '<p>' . sprintf( __( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ), 65 'http://wordpress.org/about/', 66 'http://codex.wordpress.org/Contributing_to_WordPress' ) . '</p>'; 67 include( './admin-footer.php' ); 68 exit; 69 } 65 70 66 foreach ( $people as $group => $members ) { 67 echo '<h3 class="wp-people-group">' . $group . '</h3>'; 68 echo '<ul class="wp-people-group" id="wp-people-group-' . $group . '">'; 69 shuffle( $members ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. 70 foreach ( $members as $slug => $member ) { 71 echo '<li class="wp-person" id="wp-person-' . $slug . '"><img src="http://gravatar.com/avatar/' . $member[3] . '?s=60&r=PG" class="gravatar" /><a class="web" href="' . $member[2] . '">' . $member[0] . '</a><br /><span class="title">' . $member[1] . '</span></li>'; 72 } 73 echo '</ul>'; 71 echo '<p>' . __( "WordPress is created by a worldwide team of passionate individuals. We couldn't possibly list them all, but here some of the most influential people currently involved with the project:" ) . "<p>\n"; 72 73 $gravatar = is_ssl() ? 'https://secure.gravatar.com/avatar/' : 'http://0.gravatar.com/avatar/'; 74 75 foreach ( $results['people'] as $group_slug => $members ) { 76 echo '<h3 class="wp-people-group">' . translate( $results['groups'][ $group_slug ] ) . "</h3>\n"; 77 echo '<ul class="wp-people-group" id="wp-people-group-' . $group_slug . '">' . "\n"; 78 shuffle( $members ); // We were going to sort by ability to pronounce "hierarchical," but that wouldn't be fair to Matt. 79 foreach ( $members as $member_slug => $member ) { 80 echo '<li class="wp-person" id="wp-person-' . $member_slug . '"><img src="' . $gravatar . $member[3] . '?s=60" class="gravatar" /><a class="web" href="' . $results['data']['profile_prefix'] . $member[2] . '">' . $member[0] . '</a><br /><span class="title">' . translate( $member[1] ) . "</span></li>\n"; 74 81 } 82 echo "</ul>\n"; 83 } 84 85 if ( isset( $results['props'] ) ) { 86 echo '<h3 class="wp-props-group">' . sprintf( translate( $results['groups']['props'] ), $results['data']['version'] ) . "</h3>\n\n"; 87 array_walk( $results['props'], '_wp_credits_add_profile_link', $results['data']['profile_prefix'] ); 88 shuffle( $results['props'] ); 89 echo wp_sprintf( '%l.', $results['props'] ); 75 90 } 76 91 … … 79 94 80 95 </div> 81 <?php include( 'admin-footer.php' ); ?> 96 <?php 97 98 include( './admin-footer.php' ); 99 100 return; 101 102 __( 'Project Leaders' ); 103 __( 'Extended Core Team' ); 104 __( 'Recent Rockstars' ); 105 __( 'Core Contributors to WordPress %s' ); 106 __( 'Cofounder, Project Lead' ); 107 __( 'Lead Developer' ); 108 __( 'UI/UX and Community Lead' ); 109 __( 'Developer, Core Committer' ); 110 __( 'Developer' ); 111 __( 'Designer' ); 112 __( 'XML-RPC Developer' ); 113 __( 'Internationalization' ); 114 115 ?> -
trunk/wp-admin/freedoms.php
r17904 r17909 40 40 41 41 </div> 42 <?php include( ' admin-footer.php' ); ?>42 <?php include( './admin-footer.php' ); ?>
Note: See TracChangeset
for help on using the changeset viewer.