Apply coding standards.

This commit is contained in:
Ian Dunn 2019-10-24 07:55:45 -07:00
parent 33d8ed54b1
commit f888fd85c8
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
11 changed files with 57 additions and 42 deletions

View file

@ -1,6 +1,6 @@
<?php
namespace WordPressDotOrg\FiveForTheFuture\View;
namespace WordPressDotOrg\FiveForTheFuture\View;
use function WordPressDotOrg\FiveForTheFuture\get_views_path;
/**

View file

@ -1,5 +1,5 @@
<?php // todo i18n
//// change all id/class prefixes to fftf (or something better) b/c not valid to start w/ number
//// change all id/class prefixes to fftf (or something better) b/c not valid to start w/ number.
// TODO are we using this, or is all the front end stuff happening in the 5ftF theme now?
?>
@ -7,29 +7,34 @@
<article class="5ftf">
<section class="about">
<h3>
<?php _e( 'Five for the Future', 'wordpressdotorg' ); ?>
<?php esc_html_e( 'Five for the Future', 'wporg-5ftf' ); ?>
</h3>
<p>
<?php _e( 'Many companies in the WordPress ecosystem choose to contribute 5% of their time back towards sustaining and improving the WordPress project. This helps to ensure that WordPress remains a vibrant platform to build a business on, and prevents a <a href="">tragedy of the commons</a>.', 'wordpressdotorg' ); ?>
<?php // link to CTA page ?>
<?php wp_kses_post(
__( 'Many companies in the WordPress ecosystem choose to contribute 5% of their time back towards sustaining and improving the WordPress project. This helps to ensure that WordPress remains a vibrant platform to build a business on, and prevents a <a href="todo">tragedy of the commons</a>.', 'wporg-5ftf' )
); ?>
<?php // todo link to CTA page. ?>
</p>
</section>
<section class="people">
<h3>
<?php _e( 'Thank you to all of the companies that participate in Five for the Future.', 'wordpressdotorg' ); ?>
<?php esc_html_e( 'Thank you to all of the companies that participate in Five for the Future.', 'wporg-5ftf' ); ?>
</h3>
<?php /*
// sort filter options
// this should be js - backbone or react? react
// in page or api? start in page, can iterate later to add infinite scroll or something
*/ ?>
<?php
/*
* todo.
* sort filter options.
* this should be js - backbone or react? react.
* in page or api? start in page, can iterate later to add infinite scroll or something.
*/
?>
<form>
<label for="5ftf-search">
<?php _e( 'Search:' ); ?>
<?php esc_html_e( 'Search:', 'wporg-5ftf' ); ?>
</label>
<input type="text" id="5ftf-search" name="5ftf-search" />
@ -56,7 +61,7 @@
</th>
<th>
Teams Contributing To
<?php // This can't really be sorted in a meaningful way, since multiple teams are listed here ?>
<?php // This can't really be sorted in a meaningful way, since multiple teams are listed here. ?>
</th>
</tr>
</thead>
@ -64,7 +69,7 @@
<tbody id="5ftf-companies-body">
<tr>
<td colspan="5">
<?php _e( 'Loading&hellip;' ); ?>
<?php esc_html_e( 'Loading&hellip;', 'wporg-5ftf' ); ?>
</td>
</tr>
</tbody>
@ -96,6 +101,6 @@
<p>Have a question? Ready to get started? Get in touch and we'll help you find where you're needed the most.</p>
<?php // link to pledge form ?>
<?php // todo link to pledge form. ?>
</section>
</article>

View file

@ -28,11 +28,11 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
<?php else : ?>
<div class="5ftf-contributors">
<?php foreach ( $contributors as $status => $group ) : ?>
<?php foreach ( $contributors as $contributor_status => $group ) : ?>
<?php if ( ! empty( $group ) ) : ?>
<h3 class="contributor-list-heading">
<?php
switch ( $status ) {
switch ( $contributor_status ) {
case 'pending':
esc_html_e( 'Unconfirmed', 'wporg' );
break;
@ -43,13 +43,13 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
?>
</h3>
<ul class="contributor-list <?php echo esc_attr( $status ); ?>">
<ul class="contributor-list <?php echo esc_attr( $contributor_status ); ?>">
<?php foreach ( $group as $contributor_post ) :
$contributor = get_user_by( 'login', $contributor_post->post_title );
?>
<li>
<?php echo get_avatar( $contributor->user_email, 32 ); ?>
<?php echo $contributor_post->post_title; ?>
<?php echo esc_html( $contributor_post->post_title ); ?>
<!-- TODO These buttons don't do anything yet.
<button class="button-primary" data-action="remove" data-contributor-post="<?php echo esc_attr( $contributor_post->ID ); ?>">
<?php esc_html_e( 'Remove', 'wporg' ); ?>

View file

@ -13,7 +13,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
I understand and agree to the <a href="%s">expectations</a> for
inclusion in the Five for the Future acknowledgement program.
' ),
get_permalink( get_page_by_path( 'expectations' ) ) // TODO Change this URL?
esc_url( get_permalink( get_page_by_path( 'expectations' ) ) ) // TODO Change this URL?
);
?>
</p>