WordPress 7.1.3

This commit is contained in:
2026-10-06 18:59:45 -06:00
parent e2c26b7f21
commit 5c09d6fa68
51 changed files with 1111 additions and 825 deletions
+25
View File
@@ -61,6 +61,31 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<div class="about__section changelog has-subtle-background-color">
<div class="column">
<h2><?php _e( 'Maintenance and Security Releases' ); ?></h2>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug.',
'<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs.',
4
),
'7.1.3',
'4'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL. */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version. */
esc_url( __( 'https://wordpress.org/documentation/wordpress-version/version-%s/' ) ),
sanitize_title( '7.1.3' )
)
);
?>
</p>
<p>
<?php
printf(
+10 -4
View File
@@ -183,11 +183,15 @@ function export_wp( $args = array() ) {
)
);
// Cast thumbnail IDs to integers to prevent second-order SQL injection via user-controlled meta values.
$thumbnails_ids = array_filter( array_map( 'absint', $thumbnails_ids ) );
$additional_ids = array_merge( $additional_ids, $attachment_ids, $thumbnails_ids );
}
// Merge the additional IDs back with the original post IDs after processing all posts
$post_ids = array_unique( array_merge( $post_ids, $additional_ids ) );
// Merge the additional IDs back with the original post IDs after processing all posts.
// Cast to integers as defense-in-depth, since $additional_ids may include values sourced from postmeta.
$post_ids = array_unique( array_map( 'absint', array_merge( $post_ids, $additional_ids ) ) );
}
/*
@@ -597,8 +601,10 @@ function export_wp( $args = array() ) {
// Fetch 20 posts at a time rather than loading the entire table into memory.
while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) {
$where = 'WHERE ID IN (' . implode( ',', $next_posts ) . ')';
$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
// Re-sanitize immediately before use, as defense-in-depth against the IDs being interpolated directly into SQL below.
$next_posts = array_map( 'absint', $next_posts );
$where = 'WHERE ID IN (' . implode( ',', $next_posts ) . ')';
$posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" );
// Begin Loop.
foreach ( $posts as $post ) {
+7 -2
View File
@@ -1083,10 +1083,15 @@ function wp_read_image_metadata( $file ) {
* @since 7.0.0
*
* @param string $file File path to the image.
* @return string Embedded alternative text.
* @return string Embedded alternative text, empty when there is no alt text or DOM extension is not installed.
*/
function wp_get_image_alttext( $file ) {
$alt_text = '';
$alt_text = '';
if ( ! class_exists( 'DOMDocument', false ) ) {
return $alt_text;
}
$img_contents = file_get_contents( $file );
if ( false === $img_contents ) {
+1 -1
View File
@@ -695,7 +695,7 @@ $('.contextual-help-tabs').on( 'click', 'a', function(e) {
$('.contextual-help-tabs .active').removeClass('active');
link.parent('li').addClass('active');
panel = $( link.attr('href') );
panel = $( document ).find( link.attr('href') );
// Panels.
$('.help-tab-content').not( panel ).removeClass('active').hide();
+1 -1
View File
File diff suppressed because one or more lines are too long