mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-15 23:05:44 +03:00
Plugin: Fix all phpcs errors
This includes autofixes, along with some manual fixes; mostly syntax-related. Some `phpcs:ignore` comments were added for overzealous rules that don't apply.
This commit is contained in:
parent
e1909dfccf
commit
42d44f7dc9
10 changed files with 65 additions and 69 deletions
|
@ -18,7 +18,7 @@ use WP_Post;
|
|||
<?php
|
||||
printf(
|
||||
wp_kses_post( __( "Thank you for confirming your address! We've emailed confirmation links to the contributors you mentioned, and your pledge will show up in <a href=\"%s\">the directory</a> once one contributor confirms their participation.", 'wporg' ) ),
|
||||
esc_url( $directory_url )
|
||||
esc_url( $directory_url )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
|
@ -45,13 +45,11 @@ use WP_Post;
|
|||
<div class="notice notice-error notice-alt">
|
||||
<p>
|
||||
<?php
|
||||
/*
|
||||
* There could be other reasons it failed, like an invalid token, but this is the most common reason,
|
||||
* and the only one that normal users should experience, so we're assuming it in order to provide
|
||||
* the best UX.
|
||||
*/
|
||||
// There could be other reasons it failed, like an invalid token, but this is the most common reason,
|
||||
// and the only one that normal users should experience, so we're assuming it in order to provide
|
||||
// the best UX.
|
||||
esc_html_e( 'Your confirmation link has expired, please obtain a new one:', 'wporg-5ftf' );
|
||||
?>
|
||||
Your confirmation link has expired, please obtain a new one:
|
||||
</p>
|
||||
|
||||
<form action="" method="get">
|
||||
|
|
|
@ -9,6 +9,7 @@ defined( 'WPINC' ) || die();
|
|||
*/
|
||||
|
||||
// Hide it if it hasn't submitted, but show success/error messages if it was submitted.
|
||||
// phpcs:ignore
|
||||
$hidden = empty( $errors ) && empty( $_POST['get_manage_pledge_link'] ) ? 'hidden' : '';
|
||||
|
||||
?>
|
||||
|
|
|
@ -38,6 +38,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
$user = get_user_by( 'id', $entry['user_id'] );
|
||||
|
||||
if ( $user ) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- sanitize_user prevents unsafe characters.
|
||||
echo sanitize_user( $user->user_login );
|
||||
} elseif ( ! empty( $entry['user_id'] ) ) {
|
||||
echo esc_html( $entry['user_id'] );
|
||||
|
@ -52,9 +53,7 @@ namespace WordPressDotOrg\FiveForTheFuture\View;
|
|||
|
||||
<?php else : ?>
|
||||
|
||||
<p>
|
||||
There are no log entries.
|
||||
</p>
|
||||
<p>There are no log entries.</p>
|
||||
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
|
|
@ -24,9 +24,9 @@ defined( 'WPINC' ) || die();
|
|||
|
||||
<?php if ( ! empty( $errors ) ) : ?>
|
||||
<div id="error-messages" class="notice notice-error notice-alt">
|
||||
<?php foreach ( $errors as $error ) : ?>
|
||||
<?php foreach ( $errors as $error_message ) : ?>
|
||||
<p>
|
||||
<?php echo wp_kses_post( $error ); ?>
|
||||
<?php echo wp_kses_post( $error_message ); ?>
|
||||
</p>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue