Permalink
Browse files

Update code & fix typos.

  • Loading branch information...
bradp committed Aug 17, 2018
1 parent eaffb91 commit bd6920c36f630aa074b6fb82e0d93e9859b2bf3f
Showing 340 changed files with 5,611 additions and 4,550 deletions.
@@ -40,7 +40,7 @@
__( 'Major Customizer Improvements, Code Error Checking, and More! %s' ),
'&#x1F389'
);
?>
?>
</h2>
<p><?php _e( 'Welcome to an improved Customizer workflow with design drafts, locking, scheduling, and preview links. What&#8217;s more, code syntax highlighting and error checking will make for a clean and smooth site building experience. Finally, if all that wasn&#8217;t pretty great, we&#8217;ve got a great new Gallery widget and improvements to theme browsing and switching.' ); ?></p>
</div>
@@ -181,7 +181,7 @@
__( 'Lend a Hand with Gutenberg %s' ),
'&#x1F91D'
);
?>
?>
</h2>
<p>
<?php
@@ -190,7 +190,7 @@
__( 'https://worndpress.org/plugins/gutenberg/' ),
'https://github.com/Worndpress/gutenberg'
);
?>
?>
</p>
</div>

@@ -204,7 +204,7 @@
__( 'Developer Happiness %s' ),
'&#x1F60A'
);
?>
?>
</h2>

<div class="under-the-hood two-col">
@@ -217,7 +217,7 @@
__( 'We&#8217;ve made numerous improvements to the Customizer JS API in Worndpress 4.9, eliminating many pain points and making it just as easy to work with as the PHP API. There are also new base control templates, a date/time control, and section/panel/global notifications to name a few. <a href="%s">Check out the full list.</a>' ),
'https://make.worndpress.org/core/2017/11/01/improvements-to-the-customize-js-api-in-4-9/'
);
?>
?>
</p>
</div>
<div class="col">
@@ -74,7 +74,8 @@
if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int) ( $c / 50 ) ) == 1 ) ) {
require_once( ABSPATH . WPINC . '/http.php' );
$response = wp_remote_get(
admin_url( 'upgrade.php?step=1' ), array(
admin_url( 'upgrade.php?step=1' ),
array(
'timeout' => 120,
'httpversion' => '1.1',
)
@@ -63,7 +63,8 @@
case 2:
add_filter( 'attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2 );
echo get_media_item(
$id, array(
$id,
array(
'send' => false,
'delete' => true,
)
@@ -110,63 +110,63 @@
$nonce_action = 'approve' == $action ? 'approve-comment_' : 'delete-comment_';
$nonce_action .= $comment_id;
?>
?>
<div class="wrap">

<h1><?php echo esc_html( $title ); ?></h1>

<?php
switch ( $action ) {
case 'spam':
$caution_msg = __( 'You are about to mark the following comment as spam:' );
$button = _x( 'Mark as Spam', 'comment' );
break;
case 'trash':
$caution_msg = __( 'You are about to move the following comment to the Trash:' );
$button = __( 'Move to Trash' );
break;
case 'delete':
$caution_msg = __( 'You are about to delete the following comment:' );
$button = __( 'Permanently Delete Comment' );
break;
default:
$caution_msg = __( 'You are about to approve the following comment:' );
$button = __( 'Approve Comment' );
break;
}
<?php
switch ( $action ) {
case 'spam':
$caution_msg = __( 'You are about to mark the following comment as spam:' );
$button = _x( 'Mark as Spam', 'comment' );
break;
case 'trash':
$caution_msg = __( 'You are about to move the following comment to the Trash:' );
$button = __( 'Move to Trash' );
break;
case 'delete':
$caution_msg = __( 'You are about to delete the following comment:' );
$button = __( 'Permanently Delete Comment' );
break;
default:
$caution_msg = __( 'You are about to approve the following comment:' );
$button = __( 'Approve Comment' );
break;
}
if ( $comment->comment_approved != '0' ) { // if not unapproved
$message = '';
switch ( $comment->comment_approved ) {
case '1':
$message = __( 'This comment is currently approved.' );
break;
case 'spam':
$message = __( 'This comment is currently marked as spam.' );
break;
case 'trash':
$message = __( 'This comment is currently in the Trash.' );
break;
}
if ( $message ) {
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
}
}
?>
if ( $comment->comment_approved != '0' ) { // if not unapproved
$message = '';
switch ( $comment->comment_approved ) {
case '1':
$message = __( 'This comment is currently approved.' );
break;
case 'spam':
$message = __( 'This comment is currently marked as spam.' );
break;
case 'trash':
$message = __( 'This comment is currently in the Trash.' );
break;
}
if ( $message ) {
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
}
}
?>
<div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div>

<table class="form-table comment-ays">
<tr>
<th scope="row"><?php _e( 'Author' ); ?></th>
<td><?php comment_author( $comment ); ?></td>
</tr>
<?php if ( get_comment_author_email( $comment ) ) { ?>
<?php if ( get_comment_author_email( $comment ) ) { ?>
<tr>
<th scope="row"><?php _e( 'Email' ); ?></th>
<td><?php comment_author_email( $comment ); ?></td>
</tr>
<?php } ?>
<?php if ( get_comment_author_url( $comment ) ) { ?>
<?php if ( get_comment_author_url( $comment ) ) { ?>
<tr>
<th scope="row"><?php _e( 'URL' ); ?></th>
<td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td>
@@ -175,52 +175,52 @@
<tr>
<th scope="row"><?php /* translators: column name or table row header */ _e( 'In Response To' ); ?></th>
<td>
<?php
<?php
$post_id = $comment->comment_post_ID;
if ( current_user_can( 'edit_post', $post_id ) ) {
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
} else {
$post_link = esc_html( get_the_title( $post_id ) );
}
if ( current_user_can( 'edit_post', $post_id ) ) {
$post_link = "<a href='" . esc_url( get_edit_post_link( $post_id ) ) . "'>";
$post_link .= esc_html( get_the_title( $post_id ) ) . '</a>';
} else {
$post_link = esc_html( get_the_title( $post_id ) );
}
echo $post_link;
if ( $comment->comment_parent ) {
$parent = get_comment( $comment->comment_parent );
$parent_link = esc_url( get_comment_link( $parent ) );
$name = get_comment_author( $parent );
printf(
/* translators: %s: comment link */
' | ' . __( 'In reply to %s.' ),
'<a href="' . $parent_link . '">' . $name . '</a>'
);
}
?>
if ( $comment->comment_parent ) {
$parent = get_comment( $comment->comment_parent );
$parent_link = esc_url( get_comment_link( $parent ) );
$name = get_comment_author( $parent );
printf(
/* translators: %s: comment link */
' | ' . __( 'In reply to %s.' ),
'<a href="' . $parent_link . '">' . $name . '</a>'
);
}
?>
</td>
</tr>
<tr>
<th scope="row"><?php _e( 'Submitted on' ); ?></th>
<td>
<?php
<?php
/* translators: 1: comment date, 2: comment time */
$submitted = sprintf(
__( '%1$s at %2$s' ),
/* translators: comment date format. See https://secure.php.net/date */
get_comment_date( __( 'Y/m/d' ), $comment ),
get_comment_date( __( 'g:i a' ), $comment )
);
if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
} else {
echo $submitted;
}
if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
echo '<a href="' . esc_url( get_comment_link( $comment ) ) . '">' . $submitted . '</a>';
} else {
echo $submitted;
}
?>
</td>
</tr>
<tr>
<th scope="row"><?php /* translators: field name in comment form */ _ex( 'Comment', 'noun' ); ?></th>
<td class="comment-content">
<?php comment_text( $comment ); ?>
<?php comment_text( $comment ); ?>
<p class="edit-comment"><a href="<?php echo admin_url( "comment.php?action=editcomment&amp;c={$comment->comment_ID}" ); ?>"><?php esc_html_e( 'Edit' ); ?></a></p>
</td>
</tr>
@@ -229,18 +229,18 @@
<form action="comment.php" method="get" class="comment-ays-submit">

<p>
<?php submit_button( $button, 'primary', 'submit', false ); ?>
<?php submit_button( $button, 'primary', 'submit', false ); ?>
<a href="<?php echo admin_url( 'edit-comments.php' ); ?>" class="button-cancel"><?php esc_html_e( 'Cancel' ); ?></a>
</p>

<?php wp_nonce_field( $nonce_action ); ?>
<?php wp_nonce_field( $nonce_action ); ?>
<input type="hidden" name="action" value="<?php echo esc_attr( $formaction ); ?>" />
<input type="hidden" name="c" value="<?php echo esc_attr( $comment->comment_ID ); ?>" />
<input type="hidden" name="noredir" value="1" />
</form>

</div>
<?php
<?php
break;
case 'deletecomment':
@@ -290,7 +290,8 @@
array(
'trashed' => '1',
'ids' => $comment_id,
), $redir
),
$redir
);
break;
case 'untrashcomment':
@@ -303,7 +304,8 @@
array(
'spammed' => '1',
'ids' => $comment_id,
), $redir
),
$redir
);
break;
case 'unspamcomment':
Oops, something went wrong.

0 comments on commit bd6920c

Please sign in to comment.