Commit bf7d93a0 authored by agata's avatar agata
Browse files

wordpress core update 5.3

parent 4b222b3a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
......@@ -26,7 +26,7 @@
<li>Open <span class="file"><a href="wp-admin/install.php">wp-admin/install.php</a></span> in your browser.</li>
</ol>
</li>
<li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/" title="WordPress support">support forums</a> with as much data as you can gather.</li>
<li>Once the configuration file is set up, the installer will set up the tables needed for your site. If there is an error, double check your <code>wp-config.php</code> file, and try again. If it fails again, please go to the <a href="https://wordpress.org/support/forums/">WordPress support forums</a> with as much data as you can gather.</li>
<li><strong>If you did not enter a password, note the password given to you.</strong> If you did not provide a username, it will be <code>admin</code>.</li>
<li>The installer should then send you to the <a href="wp-login.php">login page</a>. Sign in with the username and password you chose during the installation. If a password was generated for you, you can then click on &#8220;Profile&#8221; to change the password.</li>
</ol>
......@@ -48,7 +48,7 @@
</ol>
<h2>Migrating from other systems</h2>
<p>WordPress can <a href="https://codex.wordpress.org/Importing_Content">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php" title="Import to WordPress">our import tools</a>.</p>
<p>WordPress can <a href="https://wordpress.org/support/article/importing-content/">import from a number of systems</a>. First you need to get WordPress installed and working as described above, before using <a href="wp-admin/import.php">our import tools</a>.</p>
<h2>System Requirements</h2>
<ul>
......@@ -76,23 +76,23 @@
<dd>The WordPress Planet is a news aggregator that brings together posts from WordPress blogs around the web.</dd>
<dt><a href="https://wordpress.org/support/forums/">WordPress Support Forums</a></dt>
<dd>If you&#8217;ve looked everywhere and still can&#8217;t find an answer, the support forums are very active and have a large community ready to help. To help them help you be sure to use a descriptive thread title and describe your question in as much detail as possible.</dd>
<dt><a href="https://codex.wordpress.org/IRC">WordPress <abbr title="Internet Relay Chat">IRC</abbr> Channel</a></dt>
<dt><a href="https://codex.wordpress.org/IRC">WordPress <abbr>IRC</abbr> (Internet Relay Chat) Channel</a></dt>
<dd>There is an online chat channel that is used for discussion among people who use WordPress and occasionally support topics. The above wiki page should point you in the right direction. (<a href="irc://irc.freenode.net/wordpress">irc.freenode.net #wordpress</a>)</dd>
</dl>
<h2>Final Notes</h2>
<ul>
<li>If you have any suggestions, ideas, or comments, or if you (gasp!) found a bug, join us in the <a href="https://wordpress.org/support/forums/">Support Forums</a>.</li>
<li>WordPress has a robust plugin <abbr title="application programming interface">API</abbr> that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
<li>WordPress has a robust plugin <abbr>API</abbr> (Application Programming Interface) that makes extending the code easy. If you are a developer interested in utilizing this, see the <a href="https://developer.wordpress.org/plugins/">Plugin Developer Handbook</a>. You shouldn&#8217;t modify any of the core code.</li>
</ul>
<h2>Share the Love</h2>
<p>WordPress has no multi-million dollar marketing campaign or celebrity sponsors, but we do have something even better&#8212;you. If you enjoy WordPress please consider telling a friend, setting it up for someone less knowledgable than yourself, or writing the author of a media article that overlooks us.</p>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;log</a>, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/" title="Donate to WordPress">donating</a>.</p>
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/caf&#233;log</a>, which came from Michel V. The work has been continued by the <a href="https://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="https://wordpress.org/donate/">donating</a>.</p>
<h2>License</h2>
<p>WordPress is free software, and is released under the terms of the <abbr title="GNU General Public License">GPL</abbr> version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
<p>WordPress is free software, and is released under the terms of the <abbr>GPL</abbr> (GNU General Public License) version 2 or (at your option) any later version. See <a href="license.txt">license.txt</a>.</p>
</body>
</html>
......@@ -144,7 +144,7 @@ get_header( 'wp-activate' );
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
/* translators: 1: Login URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
network_site_url( 'wp-login.php', 'login' ),
$signup->user_login,
......@@ -153,7 +153,7 @@ get_header( 'wp-activate' );
);
} else {
printf(
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
/* translators: 1: Site URL, 2: Username, 3: User email address, 4: Lost password URL. */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
......@@ -188,14 +188,14 @@ get_header( 'wp-activate' );
?>
<p class="view">
<?php
/* translators: 1: site URL, 2: login URL */
/* translators: 1: Site URL, 2: Login URL. */
printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) );
?>
</p>
<?php else : ?>
<p class="view">
<?php
/* translators: 1: login URL, 2: network home URL */
/* translators: 1: Login URL, 2: Network home URL. */
printf( __( 'Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url( 'wp-login.php', 'login' ), network_home_url() );
?>
</p>
......
This diff is collapsed.
......@@ -24,6 +24,9 @@ require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
/** Allow for cross-domain requests (from the front end). */
send_origin_headers();
header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
header( 'X-Robots-Tag: noindex' );
// Require an action parameter
if ( empty( $_REQUEST['action'] ) ) {
wp_die( '0', 400 );
......@@ -35,9 +38,6 @@ require_once( ABSPATH . 'wp-admin/includes/admin.php' );
/** Load Ajax Handlers for WordPress Core */
require_once( ABSPATH . 'wp-admin/includes/ajax-actions.php' );
@header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
@header( 'X-Robots-Tag: noindex' );
send_nosniff_header();
nocache_headers();
......@@ -53,6 +53,7 @@ $core_actions_get = array(
'autocomplete-user',
'dashboard-widgets',
'logged-in',
'rest-nonce',
);
$core_actions_post = array(
......@@ -105,6 +106,7 @@ $core_actions_post = array(
'send-link-to-editor',
'send-attachment-to-editor',
'save-attachment-order',
'media-create-image-subsizes',
'heartbeat',
'get-revision-diffs',
'save-user-color-scheme',
......
......@@ -32,7 +32,12 @@ global $hook_suffix;
?>
<p id="footer-left" class="alignleft">
<?php
$text = sprintf( __( 'Thank you for creating with <a href="%s">WordPress</a>.' ), __( 'https://wordpress.org/' ) );
$text = sprintf(
/* translators: %s: https://wordpress.org/ */
__( 'Thank you for creating with <a href="%s">WordPress</a>.' ),
__( 'https://wordpress.org/' )
);
/**
* Filters the "Thank you" text displayed in the admin footer.
*
......@@ -80,7 +85,7 @@ do_action( 'admin_footer', '' );
*
* @since 4.6.0
*/
do_action( "admin_print_footer_scripts-{$hook_suffix}" );
do_action( "admin_print_footer_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/**
* Prints any scripts and data queued for the footer.
......@@ -97,7 +102,7 @@ do_action( 'admin_print_footer_scripts' );
*
* @since 2.8.0
*/
do_action( "admin_footer-{$hook_suffix}" );
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
// get_site_option() won't exist when auto upgrading from <= 2.7
if ( function_exists( 'get_site_option' ) ) {
......
......@@ -6,7 +6,7 @@
* @subpackage Administration
*/
@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
if ( ! defined( 'WP_ADMIN' ) ) {
require_once( dirname( __FILE__ ) . '/admin.php' );
}
......@@ -16,8 +16,8 @@ if ( ! defined( 'WP_ADMIN' ) ) {
*
* @global string $title
* @global string $hook_suffix
* @global WP_Screen $current_screen
* @global WP_Locale $wp_locale
* @global WP_Screen $current_screen WordPress current screen object.
* @global WP_Locale $wp_locale WordPress date and time locale object.
* @global string $pagenow
* @global string $update_title
* @global int $total_update_count
......@@ -35,20 +35,20 @@ get_admin_page_title();
$title = esc_html( strip_tags( $title ) );
if ( is_network_admin() ) {
/* translators: Network admin screen title. %s: Network name */
/* translators: Network admin screen title. %s: Network title. */
$admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) );
} elseif ( is_user_admin() ) {
/* translators: User dashboard screen title. %s: Network name */
/* translators: User dashboard screen title. %s: Network title. */
$admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
} else {
$admin_title = get_bloginfo( 'name' );
}
if ( $admin_title == $title ) {
/* translators: Admin screen title. %s: Admin screen name */
/* translators: Admin screen title. %s: Admin screen name. */
$admin_title = sprintf( __( '%s &#8212; WordPress' ), $title );
} else {
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name */
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name. */
$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
}
......@@ -108,7 +108,7 @@ do_action( 'admin_enqueue_scripts', $hook_suffix );
*
* @since 2.6.0
*/
do_action( "admin_print_styles-{$hook_suffix}" );
do_action( "admin_print_styles-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/**
* Fires when styles are printed for all admin pages.
......@@ -122,7 +122,7 @@ do_action( 'admin_print_styles' );
*
* @since 2.1.0
*/
do_action( "admin_print_scripts-{$hook_suffix}" );
do_action( "admin_print_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/**
* Fires when scripts are printed for all admin pages.
......@@ -139,7 +139,7 @@ do_action( 'admin_print_scripts' );
*
* @since 2.1.0
*/
do_action( "admin_head-{$hook_suffix}" );
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/**
* Fires in head section for all admin pages.
......
......@@ -49,22 +49,23 @@ if ( get_option( 'db_upgraded' ) ) {
if ( ! is_multisite() ) {
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
exit;
}
/**
* Filters whether to attempt to perform the multisite DB upgrade routine.
*
* In single site, the user would be redirected to wp-admin/upgrade.php.
* In multisite, the DB upgrade routine is automatically fired, but only
* when this filter returns true.
*
* If the network is 50 sites or less, it will run every time. Otherwise,
* it will throttle itself to reduce load.
*
* @since 3.0.0
*
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
*/
} elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
/**
* Filters whether to attempt to perform the multisite DB upgrade routine.
*
* In single site, the user would be redirected to wp-admin/upgrade.php.
* In multisite, the DB upgrade routine is automatically fired, but only
* when this filter returns true.
*
* If the network is 50 sites or less, it will run every time. Otherwise,
* it will throttle itself to reduce load.
*
* @since MU (3.0.0)
*
* @param bool $do_mu_upgrade Whether to perform the Multisite upgrade routine. Default true.
*/
if ( apply_filters( 'do_mu_upgrade', true ) ) {
$c = get_blog_count();
/*
......@@ -228,7 +229,7 @@ if ( isset( $plugin_page ) ) {
*
* @since 2.1.0
*/
do_action( "load-{$page_hook}" );
do_action( "load-{$page_hook}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
if ( ! isset( $_GET['noheader'] ) ) {
require_once( ABSPATH . 'wp-admin/admin-header.php' );
}
......@@ -257,6 +258,7 @@ if ( isset( $plugin_page ) ) {
}
if ( ! ( file_exists( WP_PLUGIN_DIR . "/$plugin_page" ) && is_file( WP_PLUGIN_DIR . "/$plugin_page" ) ) && ! ( file_exists( WPMU_PLUGIN_DIR . "/$plugin_page" ) && is_file( WPMU_PLUGIN_DIR . "/$plugin_page" ) ) ) {
/* translators: %s: Admin page generated by a plugin. */
wp_die( sprintf( __( 'Cannot load %s.' ), htmlentities( $plugin_page ) ) );
}
......@@ -272,7 +274,7 @@ if ( isset( $plugin_page ) ) {
*
* @since 1.5.0
*/
do_action( "load-{$plugin_page}" );
do_action( "load-{$plugin_page}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
if ( ! isset( $_GET['noheader'] ) ) {
require_once( ABSPATH . 'wp-admin/admin-header.php' );
......@@ -293,7 +295,7 @@ if ( isset( $plugin_page ) ) {
$importer = $_GET['import'];
if ( ! current_user_can( 'import' ) ) {
wp_die( __( 'Sorry, you are not allowed to import content.' ) );
wp_die( __( 'Sorry, you are not allowed to import content into this site.' ) );
}
if ( validate_file( $importer ) ) {
......@@ -313,7 +315,7 @@ if ( isset( $plugin_page ) ) {
*
* @since 3.5.0
*/
do_action( "load-importer-{$importer}" );
do_action( "load-importer-{$importer}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
$parent_file = 'tools.php';
$submenu_file = 'import.php';
......@@ -362,7 +364,7 @@ if ( isset( $plugin_page ) ) {
*
* @since 2.1.0
*/
do_action( "load-{$pagenow}" );
do_action( "load-{$pagenow}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
/*
* The following hooks are fired to ensure backward compatibility.
......@@ -370,18 +372,18 @@ if ( isset( $plugin_page ) ) {
*/
if ( $typenow == 'page' ) {
if ( $pagenow == 'post-new.php' ) {
do_action( 'load-page-new.php' );
do_action( 'load-page-new.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
} elseif ( $pagenow == 'post.php' ) {
do_action( 'load-page.php' );
do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
} elseif ( $pagenow == 'edit-tags.php' ) {
if ( $taxnow == 'category' ) {
do_action( 'load-categories.php' );
do_action( 'load-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
} elseif ( $taxnow == 'link_category' ) {
do_action( 'load-edit-link-categories.php' );
do_action( 'load-edit-link-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
} elseif ( 'term.php' === $pagenow ) {
do_action( 'load-edit-tags.php' );
do_action( 'load-edit-tags.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
}
......
......@@ -39,7 +39,8 @@ if ( ! current_user_can( 'upload_files' ) ) {
}
// just fetch the detail form for that attachment
if ( isset( $_REQUEST['attachment_id'] ) && ( $id = intval( $_REQUEST['attachment_id'] ) ) && $_REQUEST['fetch'] ) {
if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
$id = intval( $_REQUEST['attachment_id'] );
$post = get_post( $id );
if ( 'attachment' != $post->post_type ) {
wp_die( __( 'Invalid post type.' ) );
......@@ -50,7 +51,8 @@ if ( isset( $_REQUEST['attachment_id'] ) && ( $id = intval( $_REQUEST['attachmen
switch ( $_REQUEST['fetch'] ) {
case 3:
if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) {
$thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true );
if ( $thumb_url ) {
echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
}
echo '<a class="edit-attachment" href="' . esc_url( get_edit_post_link( $id ) ) . '" target="_blank">' . _x( 'Edit', 'media item' ) . '</a>';
......@@ -90,10 +92,19 @@ if ( isset( $_REQUEST['post_id'] ) ) {
$id = media_handle_upload( 'async-upload', $post_id );
if ( is_wp_error( $id ) ) {
echo '<div class="error-div error">
<button type="button" class="dismiss button-link" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">' . __( 'Dismiss' ) . '</button>
<strong>' . sprintf( __( '&#8220;%s&#8221; has failed to upload.' ), esc_html( $_FILES['async-upload']['name'] ) ) . '</strong><br />' .
esc_html( $id->get_error_message() ) . '</div>';
printf(
'<div class="error-div error">%s <strong>%s</strong><br />%s</div>',
sprintf(
'<button type="button" class="dismiss button-link" onclick="jQuery(this).parents(\'div.media-item\').slideUp(200, function(){jQuery(this).remove();});">%s</button>',
__( 'Dismiss' )
),
sprintf(
/* translators: %s: Name of the file that failed to upload. */
__( '&#8220;%s&#8221; has failed to upload.' ),
esc_html( $_FILES['async-upload']['name'] )
),
esc_html( $id->get_error_message() )
);
exit;
}
......
......@@ -46,14 +46,14 @@ switch ( $action ) {
'id' => 'overview',
'title' => __( 'Overview' ),
'content' =>
'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>',
'<p>' . __( 'You can edit the information left in a comment if needed. This is often useful when you notice that a commenter has made a typographical error.' ) . '</p>' .
'<p>' . __( 'You can also moderate the comment from this screen using the Status box, where you can also change the timestamp of the comment.' ) . '</p>',
)
);
get_current_screen()->set_help_sidebar(
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
'<p>' . __( '<a href="https://codex.wordpress.org/Administration_Screens#Comments">Documentation on Comments</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/article/comments-screen/">Documentation on Comments</a>' ) . '</p>' .
'<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>'
);
......@@ -62,7 +62,8 @@ switch ( $action ) {
$comment_id = absint( $_GET['c'] );
if ( ! $comment = get_comment( $comment_id ) ) {
$comment = get_comment( $comment_id );
if ( ! $comment ) {
comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'javascript:history.go(-1)' ) );
}
......@@ -88,7 +89,8 @@ switch ( $action ) {
$comment_id = absint( $_GET['c'] );
if ( ! $comment = get_comment( $comment_id ) ) {
$comment = get_comment( $comment_id );
if ( ! $comment ) {
wp_redirect( admin_url( 'edit-comments.php?error=1' ) );
die();
}
......@@ -173,7 +175,7 @@ switch ( $action ) {
</tr>
<?php } ?>
<tr>
<th scope="row"><?php /* translators: column name or table row header */ _e( 'In Response To' ); ?></th>
<th scope="row"><?php /* translators: Column name or table row header. */ _e( 'In Response To' ); ?></th>
<td>
<?php
$post_id = $comment->comment_post_ID;
......@@ -190,7 +192,7 @@ switch ( $action ) {
$parent_link = esc_url( get_comment_link( $parent ) );
$name = get_comment_author( $parent );
printf(
/* translators: %s: comment link */
/* translators: %s: Comment link. */
' | ' . __( 'In reply to %s.' ),
'<a href="' . $parent_link . '">' . $name . '</a>'
);
......@@ -202,11 +204,12 @@ switch ( $action ) {
<th scope="row"><?php _e( 'Submitted on' ); ?></th>
<td>
<?php
/* translators: 1: comment date, 2: comment time */
$submitted = sprintf(
/* translators: 1: Comment date, 2: Comment time. */
__( '%1$s at %2$s' ),
/* translators: comment date format. See https://secure.php.net/date */
/* translators: Comment date format. See https://secure.php.net/date */
get_comment_date( __( 'Y/m/d' ), $comment ),
/* translators: Comment time format. See https://secure.php.net/date */
get_comment_date( __( 'g:i a' ), $comment )
);
if ( 'approved' === wp_get_comment_status( $comment ) && ! empty( $comment->comment_post_ID ) ) {
......@@ -218,7 +221,7 @@ switch ( $action ) {
</td>
</tr>
<tr>
<th scope="row"><?php /* translators: field name in comment form */ _ex( 'Comment', 'noun' ); ?></th>
<th scope="row"><?php /* translators: Field name in comment form. */ _ex( 'Comment', 'noun' ); ?></th>
<td class="comment-content">
<?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>
......@@ -260,7 +263,8 @@ switch ( $action ) {
$noredir = isset( $_REQUEST['noredir'] );
if ( ! $comment = get_comment( $comment_id ) ) {
$comment = get_comment( $comment_id );
if ( ! $comment ) {
comment_footer_die( __( 'Invalid comment ID.' ) . sprintf( ' <a href="%s">' . __( 'Go back' ) . '</a>.', 'edit-comments.php' ) );
}
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
......
......@@ -15,123 +15,117 @@ $title = __( 'Credits' );
list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
include( ABSPATH . 'wp-admin/admin-header.php' );
$credits = wp_credits();
?>
<div class="wrap about-wrap full-width-layout">
<h1>
<?php
/* translators: %s: The current WordPress version number */
printf( __( 'Welcome to WordPress&nbsp;%s' ), $display_version );
?>
</h1>
<p class="about-text">
<?php
printf(
/* translators: %s: The current WordPress version number */
__( 'Congratulations on updating to WordPress %s! This update makes it easier than ever to fix your site if something goes wrong.' ),
$display_version
);
?>
</p>
<div class="wp-badge">
<?php
/* translators: %s: The current WordPress version number */
printf( __( 'Version %s' ), $display_version );
?>
</div>
<div class="wrap about__container">
<div class="about__header">
<div class="about__header-title">
<h1>
<span><?php echo $display_version; ?></span>
<?php _e( 'WordPress' ); ?>
</h1>
</div>
<div class="about__header-badge"></div>
<div class="about__header-text">
<p>
<?php
printf(
/* translators: %s: The current WordPress version number. */
__( 'Introducing our most refined user experience with the improved block editor in WordPress %s!' ),
$display_version
);
?>
</p>
</div>
<nav class="about__header-navigation nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="privacy.php" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav>
</div>
<div class="about__section">
<div class="column">
<h2><?php _e( 'WordPress is created by a worldwide team of passionate individuals.' ); ?></h2>
<p>
<?php
if ( ! $credits ) {
printf(
/* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */
__( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
__( 'https://wordpress.org/about/' ),
__( 'https://make.wordpress.org/' )
);
} else {
printf(
/* translators: %s: https://make.wordpress.org/ */
__( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
__( 'https://make.wordpress.org/' )
);
}
?>
</p>
</div>
<nav class="nav-tab-wrapper wp-clearfix" aria-label="<?php esc_attr_e( 'Secondary menu' ); ?>">
<a href="about.php" class="nav-tab"><?php _e( 'What&#8217;s New' ); ?></a>
<a href="credits.php" class="nav-tab nav-tab-active" aria-current="page"><?php _e( 'Credits' ); ?></a>
<a href="freedoms.php" class="nav-tab"><?php _e( 'Freedoms' ); ?></a>
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</nav>
<div class="about__image aligncenter">
<img src="data:image/svg+xml;charset=utf8,%3Csvg width='1320' height='350' viewbox='0 0 1320 350' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 61 220)' fill='%23321017'/%3E%3Crect width='72' height='250' transform='matrix(1 0 0 -1 166 300)' fill='%23BD3854'/%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 272 220)' fill='%23321017'/%3E%3Crect width='71' height='220' transform='matrix(1 0 0 -1 378 220)' fill='%235F1B29'/%3E%3Crect width='71' height='220' transform='matrix(1 0 0 -1 483 220)' fill='%23321017'/%3E%3Crect width='71' height='220' transform='matrix(1 0 0 -1 587 220)' fill='%235F1B29'/%3E%3Crect width='71.28' height='250' transform='matrix(1 0 0 -1 689 300)' fill='%23BD3854'/%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 884 220)' fill='%235F1B29'/%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 789 220)' fill='%23321017'/%3E%3Crect width='71' height='220' transform='matrix(1 0 0 -1 985 220)' fill='%23321017'/%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 1084 220)' fill='%235F1B29'/%3E%3Crect width='72' height='220' transform='matrix(1 0 0 -1 1179 220)' fill='%233D0F19'/%3E%3C/svg%3E%0A" alt="" />
</div>
</div>
<div class="about-wrap-content">
<?php
$credits = wp_credits();
if ( ! $credits ) {
echo '<p class="about-description">';
printf(
/* translators: 1: https://wordpress.org/about/, 2: https://make.wordpress.org/ */
__( 'WordPress is created by a <a href="%1$s">worldwide team</a> of passionate individuals. <a href="%2$s">Get involved in WordPress</a>.' ),
'https://wordpress.org/about/',
__( 'https://make.wordpress.org/' )
);
echo '</p>';
echo '</div>';
echo '</div>';
include( ABSPATH . 'wp-admin/admin-footer.php' );
exit;
}
echo '<p class="about-description">' . __( 'WordPress is created by a worldwide team of passionate individuals.' ) . "</p>\n";
echo '<p>' . sprintf(
/* translators: %s: https://make.wordpress.org/ */
__( 'Want to see your name in lights on this page? <a href="%s">Get involved in WordPress</a>.' ),
__( 'https://make.wordpress.org/' )
) . '</p>';
foreach ( $credits['groups'] as $group_slug => $group_data ) {
if ( $group_data['name'] ) {
if ( 'Translators' == $group_data['name'] ) {
// Considered a special slug in the API response. (Also, will never be returned for en_US.)
$title = _x( 'Translators', 'Translate this to be the equivalent of English Translators in your language for the credits page Translators section' );
} elseif ( isset( $group_data['placeholders'] ) ) {