Subir ajustes de acordeon y SEO

This commit is contained in:
Gabriel
2026-10-23 11:18:13 -06:00
parent 03333c3ce7
commit 14b96152a5
103 changed files with 6638 additions and 5316 deletions
+76
View File
@@ -58,6 +58,82 @@ require_once ABSPATH . 'wp-admin/admin-header.php';
<a href="contribute.php" class="nav-tab"><?php _e( 'Get Involved' ); ?></a>
</nav>
<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(
/* translators: %s: WordPress version. */
__( '<strong>Version %s</strong> addressed one security issue.' ),
'7.1.2'
);
?>
<?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.2' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: Plural number of bugs. More than one security issue. */
_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.',
36
),
'7.1.1',
number_format_i18n( 36 )
);
?>
<?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.1' )
)
);
?>
</p>
</div>
</div>
<div class="about__section">
<div class="column is-left-padding-zero is-right-padding-zero">
<h2><?php _e( 'Welcome to WordPress 7.1' ); ?></h2>
+8 -15
View File
@@ -1981,7 +1981,8 @@ div.action-links,
.plugins .active th.check-column,
.plugins .active td.check-column,
.plugin-update-tr.active td {
.plugin-update-tr.active td,
.plugins tr.paused td.check-column {
border-right: 4px solid transparent;
}
@@ -1995,6 +1996,10 @@ div.action-links,
border-right: 4px solid var(--wp-admin-theme-color);
}
.plugins tr.active.paused {
border-right: 4px solid #b32d2e;
}
.wp-list-table .column-primary .toggle-row {
display: block;
}
@@ -2341,8 +2346,7 @@ div.action-links,
.plugins tr.active + tr.inactive th.check-column,
.plugins tr.active + tr.inactive td.check-column,
.plugins tr.active + tr.inactive td.column-description,
.plugins .plugin-update-tr:before {
.plugins tr.active + tr.inactive td.column-description {
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
@@ -2352,13 +2356,8 @@ div.action-links,
border-top: none;
}
/* mimic the checkbox th */
.plugins .plugin-update-tr:before {
content: "";
display: table-cell;
}
.plugins #the-list .plugin-update-tr .plugin-update {
flex: 0 1 100%;
border-right: none;
}
@@ -2366,12 +2365,6 @@ div.action-links,
margin-right: 0;
}
.plugins .active.update + .plugin-update-tr:before,
.plugins .active.updated + .plugin-update-tr:before {
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
border-right: 4px solid var(--wp-admin-theme-color);
}
.plugins .plugin-update-tr .update-message {
margin-right: 0;
}
File diff suppressed because one or more lines are too long
+8 -15
View File
@@ -1980,7 +1980,8 @@ div.action-links,
.plugins .active th.check-column,
.plugins .active td.check-column,
.plugin-update-tr.active td {
.plugin-update-tr.active td,
.plugins tr.paused td.check-column {
border-left: 4px solid transparent;
}
@@ -1994,6 +1995,10 @@ div.action-links,
border-left: 4px solid var(--wp-admin-theme-color);
}
.plugins tr.active.paused {
border-left: 4px solid #b32d2e;
}
.wp-list-table .column-primary .toggle-row {
display: block;
}
@@ -2340,8 +2345,7 @@ div.action-links,
.plugins tr.active + tr.inactive th.check-column,
.plugins tr.active + tr.inactive td.check-column,
.plugins tr.active + tr.inactive td.column-description,
.plugins .plugin-update-tr:before {
.plugins tr.active + tr.inactive td.column-description {
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}
@@ -2351,13 +2355,8 @@ div.action-links,
border-top: none;
}
/* mimic the checkbox th */
.plugins .plugin-update-tr:before {
content: "";
display: table-cell;
}
.plugins #the-list .plugin-update-tr .plugin-update {
flex: 0 1 100%;
border-left: none;
}
@@ -2365,12 +2364,6 @@ div.action-links,
margin-left: 0;
}
.plugins .active.update + .plugin-update-tr:before,
.plugins .active.updated + .plugin-update-tr:before {
background-color: rgba(var(--wp-admin-theme-color--rgb), 0.08);
border-left: 4px solid var(--wp-admin-theme-color);
}
.plugins .plugin-update-tr .update-message {
margin-left: 0;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+12
View File
@@ -202,11 +202,23 @@ p {
}
.login form .forgetmenot {
display: flex;
align-items: center;
gap: 4px;
/* Matches the height of the Log In button beside it, so the row centers on it. */
min-height: 40px;
font-weight: 400;
float: right;
margin-bottom: 0;
}
/* Centering aligns margin boxes, so margins left from the inline layout would offset these. */
.login form .forgetmenot input[type="checkbox"],
.login form .forgetmenot label {
margin-top: 0;
margin-bottom: 0;
}
.login .button-primary {
float: left;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+12
View File
@@ -201,11 +201,23 @@ p {
}
.login form .forgetmenot {
display: flex;
align-items: center;
gap: 4px;
/* Matches the height of the Log In button beside it, so the row centers on it. */
min-height: 40px;
font-weight: 400;
float: left;
margin-bottom: 0;
}
/* Centering aligns margin boxes, so margins left from the inline layout would offset these. */
.login form .forgetmenot input[type="checkbox"],
.login form .forgetmenot label {
margin-top: 0;
margin-bottom: 0;
}
.login .button-primary {
float: right;
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+22 -2
View File
@@ -2059,6 +2059,13 @@ function wp_ajax_menu_quick_search() {
function wp_ajax_get_permalink() {
check_ajax_referer( 'getpermalink', 'getpermalinknonce' );
$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
if ( ! $post_id ) {
// Bypass call to get_preview_post_link() for unspecified post ID.
wp_die( '' );
}
if ( ! current_user_can( 'edit_post', $post_id ) ) {
wp_die( -1 );
}
wp_die( get_preview_post_link( $post_id ) );
}
@@ -2070,8 +2077,15 @@ function wp_ajax_get_permalink() {
function wp_ajax_sample_permalink() {
check_ajax_referer( 'samplepermalink', 'samplepermalinknonce' );
$post_id = isset( $_POST['post_id'] ) ? (int) $_POST['post_id'] : 0;
$title = $_POST['new_title'] ?? '';
$slug = $_POST['new_slug'] ?? null;
if ( ! $post_id ) {
// Bypass call to get_sample_permalink_html() for unspecified post ID.
wp_die( '' );
}
if ( ! current_user_can( 'edit_post', $post_id ) ) {
wp_die( -1 );
}
$title = $_POST['new_title'] ?? '';
$slug = $_POST['new_slug'] ?? null;
wp_die( get_sample_permalink_html( $post_id, $title, $slug ) );
}
@@ -4615,6 +4629,12 @@ function wp_ajax_activate_plugin() {
wp_send_json_error( $status );
}
// A network-only plugin is activated for the entire network.
if ( is_multisite() && is_network_only_plugin( $status['plugin'] ) && ! current_user_can( 'manage_network_plugins' ) ) {
$status['errorMessage'] = __( 'Sorry, you are not allowed to activate this plugin.' );
wp_send_json_error( $status );
}
if ( is_plugin_active( $status['plugin'] ) ) {
$status['errorMessage'] = sprintf(
/* translators: %s: Plugin name. */
@@ -572,7 +572,7 @@ class Custom_Image_Header {
$header_image_style .= 'height:' . $custom_header->height . 'px;';
}
?>
<div id="headimg" style="<?php echo $header_image_style; ?>">
<div id="headimg" style="<?php echo esc_attr( $header_image_style ); ?>">
<?php
if ( display_header_text() ) {
$style = ' style="color:#' . get_header_textcolor() . ';"';
@@ -1184,8 +1184,8 @@ endif;
'attachment_id' => $choice['attachment_id'],
'url' => $choice['url'],
'thumbnail_url' => $choice['url'],
'height' => $choice['height'],
'width' => $choice['width'],
'height' => absint( $choice['height'] ),
'width' => absint( $choice['width'] ),
);
update_post_meta( $choice['attachment_id'], '_wp_attachment_is_custom_header', get_stylesheet() );
@@ -1216,7 +1216,13 @@ endif;
}
}
set_theme_mod( 'header_image', sanitize_url( $header_image_data['url'] ) );
$header_image_data['url'] = sanitize_url( $header_image_data['url'] );
if ( isset( $header_image_data['thumbnail_url'] ) ) {
$header_image_data['thumbnail_url'] = sanitize_url( $header_image_data['thumbnail_url'] );
}
set_theme_mod( 'header_image', $header_image_data['url'] );
set_theme_mod( 'header_image_data', $header_image_data );
}
@@ -1589,9 +1595,8 @@ endif;
$alt_text_key = '_wp_attachment_image_alt';
foreach ( $header_images as &$header_image ) {
$header_meta = get_post_meta( $header_image['attachment_id'] );
$header_image['timestamp'] = $header_meta[ $timestamp_key ] ?? '';
$header_image['alt_text'] = $header_meta[ $alt_text_key ] ?? '';
$header_image['timestamp'] = get_post_meta( $header_image['attachment_id'], $timestamp_key, true );
$header_image['alt_text'] = get_post_meta( $header_image['attachment_id'], $alt_text_key, true );
}
return $header_images;
+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
@@ -3370,7 +3370,7 @@ function attachment_submitbox_metadata() {
<?php
if ( $post->post_parent ) {
$post_parent = get_post( $post->post_parent );
if ( $post_parent ) {
if ( $post_parent && current_user_can( 'read_post', $post_parent->ID ) ) {
$uploaded_to_title = $post_parent->post_title ? $post_parent->post_title : __( '(no title)' );
$uploaded_to_link = get_edit_post_link( $post->post_parent, 'raw' );
?>
+1
View File
@@ -1003,6 +1003,7 @@ function confirm_delete_users( $users ) {
'include' => $blog_users,
'show' => 'display_name_with_login',
'id' => "reassign_user_{$details->userblog_id}_{$delete_user->ID}",
'blog_id' => $details->userblog_id,
)
);
?>
+7 -1
View File
@@ -598,11 +598,17 @@ function is_plugin_active_for_network( $plugin ) {
* Checks for "Site Wide Only: true" for backward compatibility.
*
* @since 3.0.0
* @since 7.1.1 The `$plugin` path is normalized with `plugin_basename()` and `trim()`,
* matching how `activate_plugin()` resolves it.
*
* @param string $plugin Path to the plugin file relative to the plugins directory.
* @param string $plugin Path to the plugin file. Accepts a path relative to the plugins
* directory, or an absolute path, with or without surrounding whitespace.
* @return bool True if plugin is network only, false otherwise.
*/
function is_network_only_plugin( $plugin ) {
// Normalize the path the same way activate_plugin() does, so both agree on the file.
$plugin = plugin_basename( trim( $plugin ) );
$plugin_data = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin );
if ( $plugin_data ) {
return $plugin_data['Network'];
+14
View File
@@ -24,6 +24,20 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
$post_data = &$_POST;
}
/*
* A raw `ID` on the create path (no `post_ID`) is an attempt to overwrite an
* existing post while bypassing the per-post capability checks below, which only
* run on the update path. Reject it outright: legitimate post creation never
* carries an `ID`.
*/
if ( ! $update && ! empty( $post_data['ID'] ) ) {
if ( 'page' === $post_data['post_type'] ) {
return new WP_Error( 'edit_others_pages', __( 'Sorry, you are not allowed to edit pages as this user.' ) );
} else {
return new WP_Error( 'edit_others_posts', __( 'Sorry, you are not allowed to edit posts as this user.' ) );
}
}
if ( $update ) {
$post_data['ID'] = (int) $post_data['post_ID'];
}
+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
+2 -2
View File
@@ -2082,9 +2082,9 @@ themes.RunInstaller = {
self.view.collection.query( request );
self.view.collection.trigger( 'update' );
// Open the theme preview.
// Open the theme preview. The slug comes from the URL, so escape it.
self.view.collection.once( 'query:success', function() {
$( 'div[data-slug="' + slug + '"]' ).trigger( 'click' );
$( 'div.theme[data-slug="' + $.escapeSelector( slug ) + '"]' ).trigger( 'click' );
});
}
+1 -1
View File
File diff suppressed because one or more lines are too long