Subir ajustes de acordeon y SEO
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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;
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -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' );
|
||||
?>
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
);
|
||||
?>
|
||||
|
||||
@@ -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'];
|
||||
|
||||
@@ -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'];
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -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' );
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -190,67 +190,67 @@ msgctxt "label for responsive previews group"
|
||||
msgid "Responsive Views"
|
||||
msgstr "Vistas adaptables"
|
||||
|
||||
#: wp-admin/about.php:179
|
||||
#: wp-admin/about.php:224
|
||||
msgid "WordPress 7.1 continues to polish accessibility across WordPress Core and Gutenberg, advancing the goals to meet accessibility standards. In this release, high impact changes include the new accessible tooltips API, improved predictability for screen readers, and improved labeling in many places in the admin. The editor adds extensive improvements to navigation and interaction."
|
||||
msgstr "WordPress 7.1 sigue puliendo la accesibilidad en el núcleo de WordPress y Gutenberg, avanzando en los objetivos para cumplir con los estándares de accesibilidad. En esta versión, los cambios de gran impacto incluyen la nueva API de información emergente accesible, una mejor previsibilidad para los lectores de pantalla y un etiquetado mejorado en muchos lugares de la administración. El editor añade mejoras extensas en la navegación y la interacción."
|
||||
|
||||
#: wp-admin/about.php:170
|
||||
#: wp-admin/about.php:215
|
||||
msgid "Image compression, resizing, and thumbnail generation now happen in the browser, via a WebAssembly build of libvips, so large uploads won’t hit PHP memory limits or time out on shared hosts. This also frees up server CPU and memory, while producing smaller files for visitors. Media handling includes built-in support for AVIF, HEIC and HDR gain maps."
|
||||
msgstr "La compresión de imágenes, el redimensionado y la generación de miniaturas ahora se realizan en el navegador, mediante una compilación de libvips en WebAssembly, por lo que las subidas grandes no alcanzarán los límites de memoria de PHP ni agotarán el tiempo de espera en servidores compartidos. Esto también libera CPU y memoria del servidor, a la vez que genera archivos más pequeños para los visitantes. El manejo de medios incluye compatibilidad nativa con AVIF, HEIC y mapas de ganancia HDR."
|
||||
|
||||
#: wp-admin/about.php:169
|
||||
#: wp-admin/about.php:214
|
||||
msgid "Improved media handling"
|
||||
msgstr "Gestión de medios mejorada"
|
||||
|
||||
#: wp-admin/about.php:154
|
||||
#: wp-admin/about.php:199
|
||||
msgid "Notes now support rich text and @mentions. Add bold, italic, code, and links so feedback reads clearly. Type “@” to pull up a list of collaborators to tag the right person directly, with built-in email notifications. Leave a note on a specific text selection instead of an entire block. Start more than one conversation on the same block. Collapse long notes to keep the margin tidy."
|
||||
msgstr "Las notas ahora admiten texto enriquecido y menciones con @. Añade negritas, cursivas, código y enlaces para que los comentarios se lean con claridad. Escribe \"@\" para que aparezca una lista de colaboradores y así etiquetar directamente a la persona adecuada, con avisos por correo electrónico integrados. Deja una nota en una selección de texto específica en lugar de en todo un bloque. Inicia más de una conversación en el mismo bloque. Colapsa las notas largas para mantener ordenado el margen."
|
||||
|
||||
#: wp-admin/about.php:153
|
||||
#: wp-admin/about.php:198
|
||||
msgid "More ways to leave feedback."
|
||||
msgstr "Más formas para enviar comentarios."
|
||||
|
||||
#: wp-admin/about.php:151
|
||||
#: wp-admin/about.php:196
|
||||
msgid "Inline notes with mentions and rich text"
|
||||
msgstr "Notas integradas, con menciones y texto enriquecido"
|
||||
|
||||
#: wp-admin/about.php:134
|
||||
#: wp-admin/about.php:179
|
||||
msgid "A new media editor modal replaces the old inline cropping tool, bringing freeform and aspect-ratio cropping, flip, precise rotation, and metadata editing together in a single streamlined workflow. The familiar Crop button still gets you there, now opening a dedicated space to crop, rotate, and adjust images before publishing."
|
||||
msgstr "Un nuevo emergente de editor de medios reemplaza la antigua herramienta de recorte en línea, y reúne el recorte de forma libre y por relación de aspecto, el volteo, la rotación precisa y la edición de metadatos en un único flujo de trabajo optimizado. El conocido botón de recortar sigue llevándote allí, y ahora abre un espacio dedicado para recortar, rotar y ajustar las imágenes antes de publicarlas."
|
||||
|
||||
#: wp-admin/about.php:133
|
||||
#: wp-admin/about.php:178
|
||||
msgid "One dedicated workflow for editing your images."
|
||||
msgstr "Un flujo de trabajo dedicado a editar tus imágenes."
|
||||
|
||||
#: wp-admin/about.php:131
|
||||
#: wp-admin/about.php:176
|
||||
msgid "A new way to crop"
|
||||
msgstr "Una nueva forma de recortar."
|
||||
|
||||
#: wp-admin/about.php:124
|
||||
#: wp-admin/about.php:169
|
||||
msgid "The admin bar now stays with you across all editors, so you always know where you are. The admin bar also gets a small visual refresh."
|
||||
msgstr "La barra de administración ahora te acompaña en todos los editores, para que siempre sepas dónde estás. Además, la barra de administración recibe un pequeño lavado de cara visual."
|
||||
|
||||
#: wp-admin/about.php:123
|
||||
#: wp-admin/about.php:168
|
||||
msgid "Consistent navigation, from dashboard to editor."
|
||||
msgstr "Navegación coherente, del Escritorio al editor."
|
||||
|
||||
#: wp-admin/about.php:121
|
||||
#: wp-admin/about.php:166
|
||||
msgid "Admin bar, now in every editor"
|
||||
msgstr "Barra de administración, ahora en todos los editores."
|
||||
|
||||
#: wp-admin/about.php:104
|
||||
#: wp-admin/about.php:149
|
||||
msgid "WordPress 7.1 takes a major step toward built-in responsive design. Set how a block looks at different screen sizes directly in the editor, for both Global Styles and individual blocks, all without writing custom CSS."
|
||||
msgstr "WordPress 7.1 da un paso importante hacia el diseño adaptable integrado. Puedes establecer cómo se ve un bloque en diferentes tamaños de pantalla directamente en el editor, tanto para los estilos globales como para los bloques individuales, todo sin necesidad de escribir CSS personalizado."
|
||||
|
||||
#: wp-admin/about.php:103
|
||||
#: wp-admin/about.php:148
|
||||
msgid "Style content your way, on every screen."
|
||||
msgstr "Dale tu estilo al contenido, en todas las pantallas."
|
||||
|
||||
#: wp-admin/about.php:101
|
||||
#: wp-admin/about.php:146
|
||||
msgid "Apply responsive styles"
|
||||
msgstr "Aplica estilos adaptables"
|
||||
|
||||
#: wp-admin/about.php:95
|
||||
#: wp-admin/about.php:140
|
||||
msgid "WordPress 7.1 makes styling and collaborating easier. Style how all blocks look across screen sizes and how the Button block responds to hover, focus, and active states, all without writing custom CSS. A streamlined media editor brings cropping, rotation, and metadata editing together in one workflow. Notes now support rich text and @mentions, and the admin bar travels with you into every editor, so the tools you rely on stay with you wherever you’re working."
|
||||
msgstr "WordPress 7.1 facilita el diseño y la colaboración. Puedes definir cómo se ven todos los bloques en diferentes tamaños de pantalla y cómo responde el bloque de botón a los estados de pasar el cursor, enfoque y activación, todo sin escribir CSS personalizado. Un editor de medios optimizado unifica el recorte, la rotación y la edición de metadatos en un mismo flujo de trabajo. Las notas ahora admiten texto enriquecido y menciones con @, y la barra de administración te acompaña a todos los editores, para que las herramientas que usas estén siempre a mano, estés donde estés."
|
||||
|
||||
@@ -778,12 +778,12 @@ msgid "Skip to Editor"
|
||||
msgstr "Saltar al editor"
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:274
|
||||
#: wp-admin/about.php:319
|
||||
msgid "WordPress %s Field Guide"
|
||||
msgstr "Guía de campo de WordPress %s"
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:247
|
||||
#: wp-admin/about.php:292
|
||||
msgid "WordPress %s Release Notes"
|
||||
msgstr "Notas de la versión de WordPress %s"
|
||||
|
||||
@@ -946,16 +946,16 @@ msgstr "Si eres autor de un plugin, puedes obtener más información sobre <a hr
|
||||
msgid "If you are a plugin author, you can learn more about <a href=\"https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/\">how to add the Personal Data Eraser to a plugin</a>."
|
||||
msgstr "Si eres autor de un plugin, puedes obtener más información sobre <a href=\"https://developer.wordpress.org/plugins/privacy/adding-the-personal-data-eraser-to-your-plugin/\">cómo añadir el borrado de datos personales a un plugin</a>."
|
||||
|
||||
#: wp-admin/about.php:200
|
||||
#: wp-admin/about.php:245
|
||||
msgid "See everything new"
|
||||
msgstr "Ver todo lo nuevo"
|
||||
|
||||
#: wp-admin/about.php:186
|
||||
#: wp-admin/about.php:231
|
||||
msgid "And much more"
|
||||
msgstr "Y mucho más"
|
||||
|
||||
#. translators: %s: Version number.
|
||||
#: wp-admin/about.php:192
|
||||
#: wp-admin/about.php:237
|
||||
msgid "For a comprehensive overview of all the new features and enhancements in WordPress %s, please visit the feature-showcase website."
|
||||
msgstr "Para obtener una visión general de todas las nuevas características y mejoras de WordPress %s, visita el sitio web de presentación de características."
|
||||
|
||||
@@ -1166,12 +1166,12 @@ msgstr[0] "%s patrón eliminado permanentemente."
|
||||
msgstr[1] "%s patrones eliminados permanentemente."
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:257
|
||||
#: wp-admin/about.php:302
|
||||
msgid "Read the WordPress %s Release Notes for information on installation, enhancements, fixed issues, release contributors, learning resources, and the list of file changes."
|
||||
msgstr "Lee las notas de la versión de WordPress %s para obtener información sobre la instalación, las mejoras, los problemas corregidos, los colaboradores de la versión, los recursos de aprendizaje y la lista de cambios en los archivos."
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:284
|
||||
#: wp-admin/about.php:329
|
||||
msgid "Explore the WordPress %s Field Guide. Learn about the changes in this release with detailed developer notes to help you build with WordPress."
|
||||
msgstr "Explora la Guía de campo de WordPress %s. Infórmate sobre los cambios en esta versión con notas detalladas para desarrolladores que te ayudarán a construir con WordPress."
|
||||
|
||||
@@ -1650,7 +1650,7 @@ msgid "<strong>Translate</strong> WordPress into your local language."
|
||||
msgstr "<strong>Traduce</strong> WordPress a tu idioma local."
|
||||
|
||||
#. translators: 1: Learn WordPress link, 2: Workshops link.
|
||||
#: wp-admin/about.php:225
|
||||
#: wp-admin/about.php:270
|
||||
msgid "<a href=\"%1$s\">Learn WordPress</a> is a free resource for new and experienced WordPress users. Learn is stocked with how-to videos on using various features in WordPress, <a href=\"%2$s\">interactive workshops</a> for exploring topics in-depth, and lesson plans for diving deep into specific areas of WordPress."
|
||||
msgstr "<a href=\"%1$s\">Aprende WordPress</a> es un recurso gratuito para usuarios nuevos y experimentados de WordPress. Está repleto de vídeos sobre cómo utilizar las distintas características de WordPress, <a href=\"%2$s\">eventos interactivos</a> para explorar temáticas en profundidad, y planes de lecciones para sumergirse en áreas específicas de WordPress."
|
||||
|
||||
@@ -1800,12 +1800,12 @@ msgid "<a href=\"https://wordpress.org/documentation/article/customizer/\">Docum
|
||||
msgstr "<a href=\"https://wordpress.org/documentation/article/customizer/\">Documentación sobre el personalizador</a>"
|
||||
|
||||
#. translators: The localized WordPress download URL.
|
||||
#: wp-admin/about.php:365
|
||||
#: wp-admin/about.php:410
|
||||
msgid "https://wordpress.org/download/"
|
||||
msgstr "https://es-mx.wordpress.org/download/"
|
||||
|
||||
#. translators: %s: The major version of WordPress for this branch.
|
||||
#: wp-admin/about.php:362
|
||||
#: wp-admin/about.php:407
|
||||
msgid "This is the final release of WordPress %s"
|
||||
msgstr "Esta es la versión final de WordPress %s"
|
||||
|
||||
@@ -2125,12 +2125,12 @@ msgid "Reach out to WordPress Core developers to ensure you'll never have this p
|
||||
msgstr "Contacta con nuestros desarrolladores del núcleo de WordPress para asegurar que nunca vuelvas a tener este problema."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: Link to update WordPress
|
||||
#: wp-admin/about.php:359
|
||||
#: wp-admin/about.php:404
|
||||
msgid "Important! Your version of WordPress (%1$s) will stop receiving security updates in the near future. To keep your site secure, please <a href=\"%2$s\">update to the latest version of WordPress</a>."
|
||||
msgstr "¡Importante! Tu versión de WordPress (%1$s) dejará de recibir actualizaciones en un futuro próximo. Para mantener seguro tu sitio, por favor, <a href=\"%2$s\">actualiza a la última versión de WordPress</a>."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: Link to update WordPress
|
||||
#: wp-admin/about.php:356
|
||||
#: wp-admin/about.php:401
|
||||
msgid "Important! Your version of WordPress (%1$s) is no longer supported, you will not receive any security updates for your website. To keep your site secure, please <a href=\"%2$s\">update to the latest version of WordPress</a>."
|
||||
msgstr "¡Importante! Tu versión de WordPress (%1$s) ya no recibe soporte, y no recibirá ninguna actualización de seguridad para tu web. Para mantener seguro tu sitio, por favor, <a href=\"%2$s\">actualiza a la última versión de WordPress</a>."
|
||||
|
||||
@@ -2140,7 +2140,7 @@ msgid "https://make.wordpress.org/core/wordpress-%s-field-guide/"
|
||||
msgstr "https://make.wordpress.org/core/wordpress-%s-field-guide/"
|
||||
|
||||
#. translators: %s: Version number.
|
||||
#: wp-admin/about.php:216
|
||||
#: wp-admin/about.php:261
|
||||
msgid "Learn more about WordPress %s"
|
||||
msgstr "Aprende más sobre WordPress %s"
|
||||
|
||||
@@ -3053,7 +3053,7 @@ msgstr "← Ir al editor"
|
||||
msgid "← Go to Users"
|
||||
msgstr "← Ir a los usuarios"
|
||||
|
||||
#: wp-admin/about.php:300
|
||||
#: wp-admin/about.php:345
|
||||
msgid "Go to Updates"
|
||||
msgstr "Ir a las actualizaciones"
|
||||
|
||||
@@ -6144,7 +6144,8 @@ msgstr "Este plugin no funciona con tus versiones de WordPress y PHP."
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#. translators: %s: WordPress version.
|
||||
#: wp-admin/about.php:21 wp-admin/about.php:83 wp-admin/includes/update.php:321
|
||||
#: wp-admin/about.php:21 wp-admin/about.php:83 wp-admin/about.php:103
|
||||
#: wp-admin/about.php:128 wp-admin/includes/update.php:321
|
||||
#: wp-admin/index.php:119 wp-admin/install.php:242 wp-admin/update-core.php:94
|
||||
#: wp-admin/upgrade.php:96
|
||||
msgid "https://wordpress.org/documentation/wordpress-version/version-%s/"
|
||||
@@ -8398,8 +8399,9 @@ msgctxt "menu location"
|
||||
msgid "(Currently set to: %s)"
|
||||
msgstr "(Actualmente como: %s) "
|
||||
|
||||
#. translators: %s: WordPress version.
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:330
|
||||
#: wp-admin/about.php:93 wp-admin/about.php:375
|
||||
msgid "<strong>Version %s</strong> addressed one security issue."
|
||||
msgstr "<strong>Versión %s</strong> mostró un problema de seguridad."
|
||||
|
||||
@@ -8412,15 +8414,15 @@ msgstr "https://gravatar.com/"
|
||||
msgid "Profile Picture"
|
||||
msgstr "Imagen de perfil"
|
||||
|
||||
#: wp-admin/about.php:63 wp-admin/about.php:327
|
||||
#: wp-admin/about.php:63 wp-admin/about.php:372
|
||||
msgid "Maintenance and Security Releases"
|
||||
msgstr "Versiones de mantenimiento y seguridad"
|
||||
|
||||
#: wp-admin/about.php:324
|
||||
#: wp-admin/about.php:369
|
||||
msgid "Security Releases"
|
||||
msgstr "Versiones de seguridad"
|
||||
|
||||
#: wp-admin/about.php:321
|
||||
#: wp-admin/about.php:366
|
||||
msgid "Maintenance Releases"
|
||||
msgstr "Versiones de mantenimiento"
|
||||
|
||||
@@ -11640,15 +11642,16 @@ msgid "Show Toolbar when viewing site"
|
||||
msgstr "Mostrar la barra de herramientas al ver el sitio"
|
||||
|
||||
#. translators: 1: WordPress version number, 2: Plural number of bugs.
|
||||
#: wp-admin/about.php:335
|
||||
#: wp-admin/about.php:380
|
||||
msgid "<strong>Version %1$s</strong> addressed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed %2$s bugs."
|
||||
msgstr[0] "La <strong>versión %1$s</strong> soluciona %2$s fallo."
|
||||
msgstr[1] "La <strong>versión %1$s</strong> soluciona %2$s fallos."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: Plural number of bugs.
|
||||
#. translators: 1: WordPress version number, 2: Plural number of bugs. More
|
||||
#. than one security issue.
|
||||
#: wp-admin/about.php:68 wp-admin/about.php:347
|
||||
#: wp-admin/about.php:68 wp-admin/about.php:113 wp-admin/about.php:392
|
||||
msgid "<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed some security issues and fixed %2$s bugs."
|
||||
msgstr[0] "La <strong>versión %1$s</strong> soluciona algunos problemas de seguridad y soluciona %2$s fallo."
|
||||
@@ -11656,28 +11659,29 @@ msgstr[1] "La <strong>versión %1$s</strong> soluciona algunos problemas de segu
|
||||
|
||||
#. translators: %s: HelpHub URL.
|
||||
#. translators: %s: Documentation URL.
|
||||
#: wp-admin/about.php:80 wp-admin/about.php:353
|
||||
#: wp-admin/about.php:80 wp-admin/about.php:100 wp-admin/about.php:125
|
||||
#: wp-admin/about.php:398
|
||||
msgid "For more information, see <a href=\"%s\">the release notes</a>."
|
||||
msgstr "Para más información, lee <a href=\"%s\">las notas de la versión</a>."
|
||||
|
||||
#. translators: 1: WordPress version number, 2: Plural number of bugs. Singular
|
||||
#. security issue.
|
||||
#: wp-admin/about.php:341
|
||||
#: wp-admin/about.php:386
|
||||
msgid "<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bug."
|
||||
msgid_plural "<strong>Version %1$s</strong> addressed a security issue and fixed %2$s bugs."
|
||||
msgstr[0] "La <strong>versión %1$s</strong> soluciona un problema de seguridad y soluciona %2$s fallo."
|
||||
msgstr[1] "La <strong>versión %1$s</strong> soluciona un problema de seguridad y soluciona %2$s fallos."
|
||||
|
||||
#. translators: %s: WordPress version number.
|
||||
#: wp-admin/about.php:332
|
||||
#: wp-admin/about.php:377
|
||||
msgid "<strong>Version %s</strong> addressed some security issues."
|
||||
msgstr "<strong>La versión %s</strong> soluciona algunos problemas de seguridad."
|
||||
|
||||
#: wp-admin/about.php:320
|
||||
#: wp-admin/about.php:365
|
||||
msgid "Maintenance Release"
|
||||
msgstr "Versión de mantenimiento"
|
||||
|
||||
#: wp-admin/about.php:323
|
||||
#: wp-admin/about.php:368
|
||||
msgid "Security Release"
|
||||
msgstr "Versión de seguridad"
|
||||
|
||||
@@ -11686,7 +11690,7 @@ msgstr "Versión de seguridad"
|
||||
msgid "What’s New"
|
||||
msgstr "Novedades"
|
||||
|
||||
#: wp-admin/about.php:326
|
||||
#: wp-admin/about.php:371
|
||||
msgid "Maintenance and Security Release"
|
||||
msgstr "Versión de mantenimiento y seguridad"
|
||||
|
||||
@@ -11956,15 +11960,15 @@ msgstr "<strong>Previsualizacón</strong> mostrará cómo se verá tu borrador s
|
||||
msgid "Because this is a multisite installation, you may add accounts that already exist on the Network by specifying a username or email, and defining a role. For more options, such as specifying a password, you have to be a Network Administrator and use the hover link under an existing user’s name to Edit the user profile under Network Admin > All Users."
|
||||
msgstr "En una instalación multisitio puedes añadir cuentas que ya existen en la Red especificando el nombre de usuario o la contraseña con la que están registrados en la misma, y definiendo un rol. Para más opciones, como especificar una contraseña, debes ser Administrador de la Red y utilizar el enlace que aparece al pasar sobre los nombres de usuario. Puedes encontrar esta opción bajo Administración de Red > Todos los Usuarios."
|
||||
|
||||
#: wp-admin/about.php:94
|
||||
#: wp-admin/about.php:139
|
||||
msgid "Welcome to WordPress 7.1"
|
||||
msgstr "Te damos la bienvenida a WordPress 7.1"
|
||||
|
||||
#: wp-admin/about.php:307
|
||||
#: wp-admin/about.php:352
|
||||
msgid "Go to Dashboard → Home"
|
||||
msgstr "Ve a Escritorio → Inicio"
|
||||
|
||||
#: wp-admin/about.php:300
|
||||
#: wp-admin/about.php:345
|
||||
msgid "Go to Dashboard → Updates"
|
||||
msgstr "Ir a \"Escritorio → Actualizaciones\""
|
||||
|
||||
@@ -13674,7 +13678,7 @@ msgstr "Eliminar Plugin"
|
||||
msgid "You are about to remove the following plugin:"
|
||||
msgstr "Estás a punto de eliminar el siguiente plugin:"
|
||||
|
||||
#: wp-admin/about.php:307
|
||||
#: wp-admin/about.php:352
|
||||
msgid "Go to Dashboard"
|
||||
msgstr "Ir al Escritorio"
|
||||
|
||||
|
||||
@@ -778,7 +778,7 @@ msgid "A view configuration patch must declare a supported schema version."
|
||||
msgstr "Un parche de configuración de vista debe indicar una versión de esquema compatible."
|
||||
|
||||
#. translators: 1: oembed_providers, 2: The oEmbed provider URL pattern.
|
||||
#: wp-includes/class-wp-oembed.php:240
|
||||
#: wp-includes/class-wp-oembed.php:236
|
||||
msgid "The oEmbed provider data returned by the %1$s filter at key %2$s is malformed. The providers array must be a mapping of provider URL patterns to a tuple array consisting of a provider endpoint URL string at index 0 and an optional boolean regex flag at index 1."
|
||||
msgstr "Los datos del proveedor de oEmbed devueltos por el filtro %1$s en la clave %2$s están mal formados. El array de proveedores debe asociar cada patrón de URL de proveedor con un array formado por una cadena con la URL de la API del proveedor en el índice 0 y un indicador booleano opcional de expresión regular en el índice 1."
|
||||
|
||||
@@ -2289,11 +2289,11 @@ msgstr "El campo user_pass es obligatorio al crear un nuevo usuario. El usuario
|
||||
|
||||
#. translators: %s is the throwable class name
|
||||
#. translators: %s is the class name
|
||||
#: wp-includes/template.php:1026 wp-includes/template.php:1065
|
||||
#: wp-includes/template.php:1092 wp-includes/template.php:1131
|
||||
msgid "Uncaught \"%s\" thrown:"
|
||||
msgstr "Excepción “%s” no detectada:"
|
||||
|
||||
#: wp-includes/template.php:975
|
||||
#: wp-includes/template.php:1041
|
||||
msgid "User error triggered:"
|
||||
msgstr "Error de usuario activado:"
|
||||
|
||||
@@ -3900,7 +3900,7 @@ msgctxt "block description"
|
||||
msgid "Reuse this design across your site."
|
||||
msgstr "Reutiliza este diseño en toda tu web."
|
||||
|
||||
#: wp-includes/js/dist/editor.js:101469 wp-admin/about.php:178
|
||||
#: wp-includes/js/dist/editor.js:101469 wp-admin/about.php:223
|
||||
msgid "Accessibility"
|
||||
msgstr "Accesibilidad"
|
||||
|
||||
@@ -22875,7 +22875,7 @@ msgid "Sun"
|
||||
msgstr "dom"
|
||||
|
||||
#: wp-includes/class-wp-http-curl.php:257
|
||||
#: wp-includes/class-wp-http-curl.php:324 wp-includes/class-wp-http.php:1070
|
||||
#: wp-includes/class-wp-http-curl.php:324 wp-includes/class-wp-http.php:1073
|
||||
msgid "Too many redirects."
|
||||
msgstr "Demasiadas redirecciones."
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,7 +2,7 @@
|
||||
# This file is distributed under the same license as the Plugins - Akismet Anti-spam: Spam Protection - Stable (latest release) package.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"PO-Revision-Date: 2026-07-07 17:10:54+0000\n"
|
||||
"PO-Revision-Date: 2026-08-21 19:47:29+0000\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@@ -11,6 +11,39 @@ msgstr ""
|
||||
"Language: es_MX\n"
|
||||
"Project-Id-Version: Plugins - Akismet Anti-spam: Spam Protection - Stable (latest release)\n"
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/setup-jetpack.php:83
|
||||
msgid "Want to use a different account? <a href=\"%1$s\" class=\"akismet-external-link\" target=\"_blank\" rel=\"noopener\">Visit akismet.com%2$s</a> to set it up and get your API key."
|
||||
msgstr "¿Quieres usar otra cuenta? <a href=\"%1$s\" class=\"akismet-external-link\" target=\"_blank\" rel=\"noopener\">Entra en akismet.com%2$s</a> para configurarla y conseguir tu clave API."
|
||||
|
||||
#. translators: 1: clickable URL that leads to more information regarding an
|
||||
#. error code, 2: hidden screen-reader text noting the link opens in a new tab.
|
||||
#: views/notice.php:90
|
||||
msgid "For more information, see the <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">error documentation on akismet.com%2$s</a>"
|
||||
msgstr "Para obtener más información, consulta la <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">documentación sobre el error en akismet.com%2$s</a>"
|
||||
|
||||
#. translators: 1: URL to the contact form, 2: hidden screen-reader text noting
|
||||
#. the link opens in a new tab.
|
||||
#: views/notice.php:61
|
||||
msgid "If you believe your site should not be classified as commercial, <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">please get in touch%2$s</a>"
|
||||
msgstr "Si crees que tu sitio no debería clasificarse como comercial, <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">ponte en contacto con nosotros%2$s</a>"
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/notice.php:55
|
||||
msgid "Your current subscription is for <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">personal, non-commercial use%2$s</a>. Please upgrade your plan to continue using Akismet."
|
||||
msgstr "Tu suscripción actual es para <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">uso personal y no comercial%2$s</a>. Actualiza tu plan para seguir usando Akismet."
|
||||
|
||||
#: views/config.php:331
|
||||
msgid "Account overview on akismet.com (opens in a new tab)"
|
||||
msgstr "Vista general de la cuenta en akismet.com (se abre en una nueva pestaña)"
|
||||
|
||||
#. translators: The placeholder is the name of a plugin, like "Jetpack" .
|
||||
#: views/compatible-plugins.php:81
|
||||
msgid "Documentation for %s (opens in a new tab)"
|
||||
msgstr "Documentación de %s (se abre en una pestaña nueva)"
|
||||
|
||||
#. translators: The placeholder is a URL for checking pending comments.
|
||||
#: views/notice.php:211
|
||||
msgid "Would you like to <a href=\"%s\">scan pending comments for spam</a>?"
|
||||
@@ -311,6 +344,44 @@ msgstr "Una vez que hayas elegido un plan, vuelve aquí para completar la config
|
||||
msgid "Your web host or server administrator has disabled PHP’s <code>gethostbynamel</code> function."
|
||||
msgstr "Tu proveedor de hosting o administrador del servidor ha desactivado la función <code>gethostbynamel</code> de PHP."
|
||||
|
||||
#. translators: 1: URL to the Akismet contact form, 2: hidden screen-reader
|
||||
#. text noting the link opens in a new tab.
|
||||
#: views/notice.php:234
|
||||
msgid "Please enter a new key or <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">contact Akismet support%2$s</a>"
|
||||
msgstr "Introduce una nueva clave o <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">contacta con el soporte de Akismet%2$s</a>."
|
||||
|
||||
#. translators: 1: URL to the Akismet pricing page, 2: hidden screen-reader
|
||||
#. text noting the link opens in a new tab.
|
||||
#: views/notice.php:185
|
||||
msgid "Please <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">choose a free or paid plan%2$s</a> so Akismet can protect your site from spam."
|
||||
msgstr "<a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">Elige un plan gratuito o de pago%2$s</a> para que Akismet pueda proteger tu sitio del spam."
|
||||
|
||||
#. translators: 1: clickable URL to the Akismet account upgrade page, 2: hidden
|
||||
#. screen-reader text noting the link opens in a new tab.
|
||||
#: views/notice.php:163
|
||||
msgid "You can help us fight spam and upgrade your account by <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">contributing a token amount%2$s</a>"
|
||||
msgstr "Puedes ayudarnos a combatir el spam y actualizar tu cuenta <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">colaborando con una pequeña cantidad%2$s</a>"
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#. translators: 1: URL to the Akismet contact form, 2: hidden screen-reader
|
||||
#. text noting the link opens in a new tab.
|
||||
#: views/notice.php:152 views/notice.php:174
|
||||
msgid "Please contact <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">Akismet support%2$s</a> for assistance."
|
||||
msgstr "Por favor, contacta con el <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">soporte de Akismet%2$s</a> para obtener ayuda."
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/notice.php:141
|
||||
msgid "Please visit <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">Akismet.com%2$s</a> to purchase a new subscription."
|
||||
msgstr "Visita <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">Akismet.com%2$s</a> para adquirir una nueva suscripción."
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/notice.php:119
|
||||
msgid "Please contact your web host or firewall administrator and give them <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">this information about Akismet’s system requirements%2$s</a>"
|
||||
msgstr "Ponte en contacto con tu proveedor de alojamiento o administrador del cortafuegos y dales <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">esta información sobre los requisitos del sistema de Akismet%2$s</a>"
|
||||
|
||||
#: class.akismet-admin.php:737
|
||||
msgid "Akismet provisionally cleared this comment."
|
||||
msgstr "Akismet ha borrado este comentario de manera provisional."
|
||||
@@ -804,6 +875,12 @@ msgstr[1] "¡Akismet te ha ahorrado %d minutos!"
|
||||
msgid "The API key you entered could not be verified."
|
||||
msgstr "La clave de la API que has introducido no ha podido ser verificada."
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/notice.php:252
|
||||
msgid "The connection to akismet.com could not be established. Please refer to <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">our guide about firewalls%2$s</a> and check your server configuration."
|
||||
msgstr "No se ha podido establecer la conexión con akismet.com. Consulta <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">nuestra guía sobre cortafuegos%2$s</a> y comprueba la configuración del servidor."
|
||||
|
||||
#: class.akismet-admin.php:760
|
||||
msgid "This comment was reported as not spam."
|
||||
msgstr "Se ha informado sobre este comentario como no spam."
|
||||
@@ -1292,6 +1369,12 @@ msgstr "Muestra el número de comentarios aprobados al lado de cada autor de com
|
||||
msgid "Akismet %1$s requires WordPress %2$s or higher."
|
||||
msgstr "Akismet %1$s necesita WordPress %2$s o superior."
|
||||
|
||||
#. translators: 1: URL, 2: hidden screen-reader text noting the link opens in a
|
||||
#. new tab.
|
||||
#: views/notice.php:130
|
||||
msgid "Your firewall may be blocking Akismet from connecting to its API. Please contact your host and refer to <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">our guide about firewalls%2$s</a>"
|
||||
msgstr "Es posible que tu cortafuegos esté bloqueando la conexión de Akismet con su API. Ponte en contacto con tu proveedor de alojamiento y consulta <a class=\"akismet-external-link\" href=\"%1$s\" target=\"_blank\" rel=\"noopener\">nuestra guía sobre cortafuegos%2$s</a>"
|
||||
|
||||
#: class.akismet-admin.php:103
|
||||
msgid "Comment History"
|
||||
msgstr "Historial de comentarios"
|
||||
|
||||
@@ -154,6 +154,20 @@ function wpcf7_dashboard_right_now() {
|
||||
) )
|
||||
);
|
||||
|
||||
$plugin_updates = get_plugin_updates();
|
||||
|
||||
if ( isset( $plugin_updates[WPCF7_PLUGIN_BASENAME] ) ) {
|
||||
$formatter->append_whitespace();
|
||||
|
||||
$formatter->append_start_tag( 'a', array(
|
||||
'href' => admin_url( 'update-core.php' ),
|
||||
) );
|
||||
|
||||
$formatter->append_preformatted(
|
||||
esc_html( __( '» New version available', 'contact-form-7' ) )
|
||||
);
|
||||
}
|
||||
|
||||
$formatter->print();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class WPCF7_REST_Controller {
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => array( $this, 'get_contact_forms' ),
|
||||
'permission_callback' => static function () {
|
||||
'permission_callback' => function () {
|
||||
if ( current_user_can( 'wpcf7_read_contact_forms' ) ) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -38,7 +38,7 @@ class WPCF7_REST_Controller {
|
||||
array(
|
||||
'methods' => WP_REST_Server::CREATABLE,
|
||||
'callback' => array( $this, 'create_contact_form' ),
|
||||
'permission_callback' => static function () {
|
||||
'permission_callback' => function () {
|
||||
if ( current_user_can( 'wpcf7_edit_contact_forms' ) ) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -58,7 +58,7 @@ class WPCF7_REST_Controller {
|
||||
array(
|
||||
'methods' => WP_REST_Server::READABLE,
|
||||
'callback' => array( $this, 'get_contact_form' ),
|
||||
'permission_callback' => static function ( WP_REST_Request $request ) {
|
||||
'permission_callback' => function ( WP_REST_Request $request ) {
|
||||
$id = (int) $request->get_param( 'id' );
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
|
||||
@@ -74,7 +74,7 @@ class WPCF7_REST_Controller {
|
||||
array(
|
||||
'methods' => WP_REST_Server::EDITABLE,
|
||||
'callback' => array( $this, 'update_contact_form' ),
|
||||
'permission_callback' => static function ( WP_REST_Request $request ) {
|
||||
'permission_callback' => function ( WP_REST_Request $request ) {
|
||||
$id = (int) $request->get_param( 'id' );
|
||||
|
||||
if ( current_user_can( 'wpcf7_edit_contact_form', $id ) ) {
|
||||
@@ -90,7 +90,7 @@ class WPCF7_REST_Controller {
|
||||
array(
|
||||
'methods' => WP_REST_Server::DELETABLE,
|
||||
'callback' => array( $this, 'delete_contact_form' ),
|
||||
'permission_callback' => static function ( WP_REST_Request $request ) {
|
||||
'permission_callback' => function ( WP_REST_Request $request ) {
|
||||
$id = (int) $request->get_param( 'id' );
|
||||
|
||||
if ( current_user_can( 'wpcf7_delete_contact_form', $id ) ) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@ Tags: contact form, schema-woven validation
|
||||
Tested up to: 7.1
|
||||
Requires at least: 7.1
|
||||
Requires PHP: 8.3
|
||||
Stable tag: 6.2.2
|
||||
Stable tag: 6.2.3
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -25,21 +25,7 @@ It is hard to continue to maintain this plugin without support from users like y
|
||||
|
||||
= Privacy notices =
|
||||
|
||||
With the default configuration, this plugin, in itself, does not:
|
||||
|
||||
* track users by stealth;
|
||||
* write any user personal data to the database;
|
||||
* send any data to external servers;
|
||||
* use cookies.
|
||||
|
||||
If you activate certain features in this plugin, the contact form submitter's personal data, including their IP address, may be sent to the service provider. Thus, confirming the provider's privacy policy is recommended. These features include:
|
||||
|
||||
* reCAPTCHA ([Google](https://policies.google.com/?hl=en))
|
||||
* Akismet ([Automattic](https://automattic.com/privacy/))
|
||||
* [Constant Contact](https://www.constantcontact.com/legal/privacy-center)
|
||||
* [Brevo](https://www.brevo.com/legal/privacypolicy/)
|
||||
* [Stripe](https://stripe.com/privacy)
|
||||
* Turnstile ([Cloudflare](https://www.cloudflare.com/turnstile-privacy-policy/))
|
||||
See [Plugin privacy notices](https://contactform7.com/plugin-privacy-notices/).
|
||||
|
||||
== Installation ==
|
||||
|
||||
@@ -66,6 +52,10 @@ Do you have questions or issues with Contact Form 7? Use these support channels
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 6.2.3 =
|
||||
|
||||
* [Release announcement](https://contactform7.com/2026/10/21/contact-form-7-623/)
|
||||
|
||||
= 6.2.2 =
|
||||
|
||||
* [Release announcement](https://contactform7.com/2026/10/11/contact-form-7-622/)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
'name' => '__root__',
|
||||
'pretty_version' => 'dev-trunk',
|
||||
'version' => 'dev-trunk',
|
||||
'reference' => '2a5b1397127b6011e867143a5b9f979b527dab3a',
|
||||
'reference' => '6a450d5fdbd07836ad7aceea80810c3ed19c4201',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
@@ -13,7 +13,7 @@
|
||||
'__root__' => array(
|
||||
'pretty_version' => 'dev-trunk',
|
||||
'version' => 'dev-trunk',
|
||||
'reference' => '2a5b1397127b6011e867143a5b9f979b527dab3a',
|
||||
'reference' => '6a450d5fdbd07836ad7aceea80810c3ed19c4201',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
||||
@@ -7,14 +7,14 @@
|
||||
* Author URI: https://github.com/rocklobster-in/
|
||||
* License: GPL v2 or later
|
||||
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
* Version: 6.2.2
|
||||
* Version: 6.2.3
|
||||
* Requires at least: 7.1
|
||||
* Requires PHP: 8.3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
define( 'WPCF7_VERSION', '6.2.2' );
|
||||
define( 'WPCF7_VERSION', '6.2.3' );
|
||||
|
||||
define( 'WPCF7_REQUIRED_WP_VERSION', '7.1' );
|
||||
|
||||
|
||||
@@ -1722,9 +1722,10 @@ class WP_Import extends WP_Importer {
|
||||
*/
|
||||
public function is_valid_meta_key( $key ) {
|
||||
// skip attachment metadata since we'll regenerate it from scratch
|
||||
// skip _wp_attachment_edit_root_id since source attachment IDs are not remapped
|
||||
// skip _wp_font_face_file since the font file it names is not imported
|
||||
// skip _edit_lock as not relevant for import
|
||||
if ( in_array( $key, array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_font_face_file', '_edit_lock' ), true ) ) {
|
||||
if ( in_array( $key, array( '_wp_attached_file', '_wp_attachment_metadata', '_wp_attachment_edit_root_id', '_wp_font_face_file', '_edit_lock' ), true ) ) {
|
||||
return false;
|
||||
}
|
||||
return $key;
|
||||
|
||||
@@ -5,7 +5,7 @@ Tags: importer, wordpress
|
||||
Requires at least: 5.2
|
||||
Tested up to: 6.8
|
||||
Requires PHP: 7.2
|
||||
Stable tag: 0.9.6
|
||||
Stable tag: 0.9.7
|
||||
License: GPLv2 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
@@ -40,6 +40,9 @@ If you would prefer to do things manually then follow these instructions:
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 0.9.7 =
|
||||
* Skip the `_wp_attachment_edit_root_id` meta key on import. It stores an attachment ID from the source site, and attachment IDs change on import, so the imported value could point at an unrelated attachment on the destination site.
|
||||
|
||||
= 0.9.6 =
|
||||
* Skip the `_wp_font_face_file` meta key on import. Font attachments regenerate this meta locally, and the imported value pointed at a file path from the source site.
|
||||
* Prefix bundled vendor namespaces (`Rowbot\URL`, `Brick\Math`, `Psr\Log`, and others) with `VendorPrefix\` to avoid class redefinition errors when another plugin bundles the same libraries.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Description: Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.
|
||||
* Author: wordpressdotorg
|
||||
* Author URI: https://wordpress.org/
|
||||
* Version: 0.9.6
|
||||
* Version: 0.9.7
|
||||
* Requires at least: 5.2
|
||||
* Requires PHP: 7.2
|
||||
* Text Domain: wordpress-importer
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<p class="text-[20px] leading-[1.45] xxl:text-[17px] lg:text-[20px] sm:text-[18px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -111,7 +111,7 @@
|
||||
<div class="min-w-0 flex-1">
|
||||
<h2 id="certifications-heading" class="text-[48px] font-semibold leading-[1.2] xxl:text-[42px] xl:text-[36px] md:text-[32px] sm:text-[28px]">Nuestras <span class="text-color-2">Certificaciones</span></h2>
|
||||
<p class="mt-4 max-w-[640px] text-[18px] leading-[1.5] xl:text-[16px] md:mx-auto">Equipo técnico con certificaciones avaladas por nuestras marcas premium.</p>
|
||||
<a class="mt-6 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/subfactory/' ) ); ?>" aria-label="Más información sobre nuestras certificaciones y Subfactory"><span>Más información</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button mt-6 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/subfactory/' ) ); ?>" aria-label="Más información sobre nuestras certificaciones y Subfactory"><span>Más información</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
<div class="w-[42%] max-w-[500px] shrink-0 md:w-full md:max-w-[340px]">
|
||||
<?php echo wp_get_attachment_image( 22, 'full', false, array( 'class' => 'block h-auto w-full object-contain', 'alt' => 'Grundfos Authorised Sub Factory', 'loading' => 'lazy', 'sizes' => '(max-width: 767px) 340px, (max-width: 1119px) 42vw, 500px' ) ); ?>
|
||||
@@ -185,7 +185,7 @@
|
||||
<li><strong class="font-black"><?php echo esc_html( $item[0] ); ?></strong> <?php echo esc_html( $item[1] ); ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<a class="mt-8 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( $solution['url'] ); ?>" aria-label="<?php echo esc_attr( 'Explorar más: ' . $solution['name'] ); ?>"><span>Explorar más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button mt-8 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( $solution['url'] ); ?>" aria-label="<?php echo esc_attr( 'Explorar más: ' . $solution['name'] ); ?>"><span>Explorar más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -203,7 +203,7 @@
|
||||
<h3 class="text-[38px] font-black uppercase leading-[1.2] xl:text-[32px] lg:text-[28px] sm:text-[26px]"><span class="text-color-2">Power Depot Service Center</span> es el Centro de Servicio Especializado de <span class="text-color-1">Power Depot</span></h3>
|
||||
</div>
|
||||
<p class="mt-6 text-[19px] leading-[1.5] lg:text-[18px] md:text-[17px]">Nuestro objetivo es optimizar la fiabilidad, eficiencia y seguridad de tus sistemas de control y de potencia. Nuestros ingenieros, con formación continua y experiencia en campo, mejoran la fiabilidad, eficiencia energética y seguridad de tus instalaciones.</p>
|
||||
<a class="mt-7 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/equipo-power-depot-service/' ) ); ?>"><span>Nuestros beneficios</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button mt-7 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/equipo-power-depot-service/' ) ); ?>"><span>Nuestros beneficios</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
<div class="min-w-0">
|
||||
<?php echo wp_get_attachment_image( 34, 'full', false, array( 'class' => 'mx-auto block h-auto w-full max-w-[602px] object-contain', 'alt' => 'Equipo de ingenieros de PowerDepot Service en sus instalaciones', 'loading' => 'lazy', 'sizes' => '(max-width: 767px) calc(100vw - 40px), (max-width: 1119px) 55vw, 602px' ) ); ?>
|
||||
@@ -240,7 +240,7 @@
|
||||
</ul>
|
||||
<div class="mt-3 flex flex-wrap justify-center" role="group" aria-label="Seleccionar grupo de clientes" data-clients-dots></div>
|
||||
<div class="mt-8 text-center">
|
||||
<a class="inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/casos-de-exito/' ) ); ?>"><span>Ver casos de éxito</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/casos-de-exito/' ) ); ?>"><span>Ver casos de éxito</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@
|
||||
<p class="text-[18px] leading-[1.3] xxl:text-[15px] lg:text-[18px] sm:text-[16px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<p class="mx-auto bg-color-1 px-6 py-2 text-xs font-bold uppercase text-white [clip-path:polygon(8%_0,100%_0,100%_50%,92%_100%,0_100%,0_50%)]">Sector <?php echo esc_html( $case[1] ); ?></p>
|
||||
<h2 class="mb-7 mt-2 min-h-[48px] text-[20px] font-bold uppercase leading-tight"><?php echo esc_html( $case[2] ); ?></h2>
|
||||
<?php echo wp_get_attachment_image( $case[3], 'full', false, array( 'class' => 'aspect-square h-auto w-full object-contain', 'alt' => $case[2], 'loading' => 'lazy', 'sizes' => '(max-width: 767px) 85vw, (max-width: 1024px) 44vw, 23vw' ) ); ?>
|
||||
<button type="button" class="group mx-3 mt-3 flex min-h-[48px] items-stretch gap-2 text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" data-case-open="<?php echo esc_attr( $case[0] ); ?>" aria-haspopup="dialog" aria-controls="<?php echo esc_attr( $case[0] ); ?>" aria-label="<?php echo esc_attr( 'Conocer más sobre ' . $case[2] ); ?>"><span class="flex flex-1 items-center justify-center bg-color-1 px-3 group-hover:bg-color-5">Conocer más</span><span class="flex w-11 items-center justify-center bg-color-1 text-3xl [clip-path:polygon(0_0,100%_0,100%_65%,75%_100%,0_100%)] group-hover:bg-color-5" aria-hidden="true">→</span></button>
|
||||
<button type="button" class="site-arrow-button group mx-3 mt-3 flex min-h-[48px] items-stretch gap-2 text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" data-case-open="<?php echo esc_attr( $case[0] ); ?>" aria-haspopup="dialog" aria-controls="<?php echo esc_attr( $case[0] ); ?>" aria-label="<?php echo esc_attr( 'Conocer más sobre ' . $case[2] ); ?>"><span class="flex flex-1 items-center justify-center bg-color-1 px-3 group-hover:bg-color-5">Conocer más</span><span class="flex w-11 items-center justify-center bg-color-1 text-3xl [clip-path:polygon(0_0,100%_0,100%_65%,75%_100%,0_100%)] group-hover:bg-color-5" aria-hidden="true">→</span></button>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -55,7 +55,7 @@
|
||||
<div class="container px-[50px] lg:px-8 md:w-[85%] md:px-0" data-scroll-reveal>
|
||||
<h2 id="contacto-casos-title" class="text-[51px] font-black uppercase leading-[1.2] lg:text-[40px] md:text-[22px]">Contacta con nosotros</h2>
|
||||
<p class="mt-10 text-[19px] leading-[1.2] md:text-base">Estamos comprometidos en ofrecerte el mejor servicio y atención</p>
|
||||
<a class="group mt-14 inline-flex min-h-[48px] items-stretch gap-2 text-base text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 md:mt-8" href="<?php echo esc_url( home_url( '/contacto/' ) ); ?>">
|
||||
<a class="site-arrow-button group mt-14 inline-flex min-h-[48px] items-stretch gap-2 text-base text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 md:mt-8" href="<?php echo esc_url( home_url( '/contacto/' ) ); ?>">
|
||||
<span class="flex min-w-[210px] items-center justify-center bg-color-1 px-5 py-3 transition-colors group-hover:bg-color-5 md:min-w-0">Ponte en contacto</span>
|
||||
<span class="flex w-11 items-center justify-center bg-color-1 transition-colors [clip-path:polygon(0_0,100%_0,100%_65%,75%_100%,0_100%)] group-hover:bg-color-5" aria-hidden="true"><svg class="h-6 w-6" viewBox="0 0 24 24" fill="none"><path d="M3 12h17M12 4l8 8-8 8" stroke="currentColor" stroke-width="1.5"/></svg></span>
|
||||
</a>
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<h2 id="contacto-equipo-title" class="text-[51px] font-black uppercase leading-[1.2] lg:text-[44px] md:text-[32px] sm:text-[28px]">Habla con<br>nuestros<br>ingenieros</h2>
|
||||
<p class="mt-7 text-[19px] leading-snug md:text-base">Mantén tu operación siempre activa</p>
|
||||
<div class="mt-14 flex justify-end md:mt-9">
|
||||
<a class="group inline-flex min-h-[48px] items-stretch gap-2 text-base focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-2" href="<?php echo esc_url( home_url( '/contacto/' ) ); ?>">
|
||||
<a class="site-arrow-button group inline-flex min-h-[48px] items-stretch gap-2 text-base focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-2" href="<?php echo esc_url( home_url( '/contacto/' ) ); ?>">
|
||||
<span class="flex items-center bg-color-1 px-3 py-3 transition-colors group-hover:bg-[#bd2730]">Ponte en contacto</span>
|
||||
<span class="flex w-11 items-center justify-center bg-color-1 transition-colors [clip-path:polygon(0_0,100%_0,100%_65%,75%_100%,0_100%)] group-hover:bg-[#bd2730]" aria-hidden="true"><svg class="h-6 w-6" viewBox="0 0 24 24" fill="none"><path d="M3 12h17M12 4l8 8-8 8" stroke="currentColor" stroke-width="1.5"/></svg></span>
|
||||
</a>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
<p class="text-[20px] leading-[1.45] xxl:text-[17px] lg:text-[20px] sm:text-[18px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<p class="text-[18px] leading-[1.3] xxl:text-[15px] lg:text-[18px] sm:text-[16px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
<p class="text-[18px] leading-[1.3] xxl:text-[15px] lg:text-[18px] sm:text-[16px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@
|
||||
<p class="text-[18px] leading-[1.3] xxl:text-[15px] lg:text-[18px] sm:text-[16px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@ get_header();
|
||||
<p class="text-[20px] leading-[1.45] xxl:text-[17px] lg:text-[20px] sm:text-[18px]"><?php echo esc_html( $service['text'] ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
<a class="service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button service-card-link mt-6 inline-flex min-h-[48px] items-center justify-center self-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1" href="<?php echo esc_url( home_url( $service['path'] ) ); ?>" aria-label="<?php echo esc_attr( 'Conocer más: ' . $service['title'] ); ?>"><span>Conocer más</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</article>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
@@ -165,7 +165,7 @@ get_header();
|
||||
<h2 id="seo-service-center-title" class="text-[38px] font-black uppercase leading-[1.2] xl:text-[32px] lg:text-[28px] sm:text-[26px]"><span class="text-color-2">Power Depot Service Center</span> es el Centro de Servicio Especializado de <span class="text-color-1">Power Depot</span></h2>
|
||||
</div>
|
||||
<p class="mt-6 text-[19px] leading-[1.5] lg:text-[18px] md:text-[17px]">Nuestro objetivo es optimizar la fiabilidad, eficiencia y seguridad de tus sistemas de control y de potencia. Nuestros ingenieros, con formación continua y experiencia en campo, mejoran la fiabilidad, eficiencia energética y seguridad de tus instalaciones.</p>
|
||||
<a class="mt-7 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/equipo-power-depot-service/' ) ); ?>"><span>Nuestros beneficios</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button mt-7 inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/equipo-power-depot-service/' ) ); ?>"><span>Nuestros beneficios</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
<div class="min-w-0" data-scroll-reveal>
|
||||
<?php echo wp_get_attachment_image( 114, 'full', false, array( 'class' => 'mx-auto block h-auto w-full max-w-[602px] object-contain', 'alt' => 'Equipo de Power Depot Service Center con indumentaria de seguridad en una instalación industrial', 'loading' => 'lazy', 'sizes' => '(max-width: 767px) calc(100vw - 40px), (max-width: 1119px) 55vw, 602px' ) ); ?>
|
||||
@@ -204,7 +204,7 @@ get_header();
|
||||
</ul>
|
||||
<div class="mt-3 flex flex-wrap justify-center" role="group" aria-label="Seleccionar grupo de clientes" data-clients-dots></div>
|
||||
<div class="mt-8 text-center">
|
||||
<a class="inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/casos-de-exito/' ) ); ?>"><span>Ver casos de éxito</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
<a class="site-arrow-button inline-flex min-h-[48px] items-center justify-center bg-color-1 px-8 py-3 text-[16px] font-semibold text-white transition-colors hover:bg-color-5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-color-1 motion-reduce:transition-none" href="<?php echo esc_url( home_url( '/casos-de-exito/' ) ); ?>"><span>Ver casos de éxito</span><svg class="ml-5 h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M3 12h17m-8-8 8 8-8 8"/></svg></a>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -182,6 +182,70 @@
|
||||
clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
|
||||
}
|
||||
|
||||
/* Shared red CTA with a separate arrow segment, matching the reference site. */
|
||||
.site-arrow-button {
|
||||
display: inline-flex !important;
|
||||
min-height: 48px;
|
||||
max-width: 100%;
|
||||
align-items: stretch !important;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 0 !important;
|
||||
border: 0;
|
||||
background: transparent !important;
|
||||
color: #fff;
|
||||
line-height: 1.2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.site-arrow-button > span:first-child {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
min-height: 48px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12px 28px;
|
||||
border-radius: 3px;
|
||||
background: #ed323b !important;
|
||||
text-align: center;
|
||||
transition: background-color .2s ease;
|
||||
}
|
||||
|
||||
.site-arrow-button > svg,
|
||||
.site-arrow-button > span:last-child:not(:first-child) {
|
||||
display: flex;
|
||||
width: 48px !important;
|
||||
height: 48px !important;
|
||||
flex: 0 0 48px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 !important;
|
||||
padding: 12px;
|
||||
clip-path: polygon(0 0, 100% 0, 100% 68%, 72% 100%, 0 100%);
|
||||
background: #ed323b !important;
|
||||
transition: background-color .2s ease;
|
||||
}
|
||||
|
||||
.site-arrow-button > span:last-child:not(:first-child) > svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
flex: 0 0 24px;
|
||||
}
|
||||
|
||||
.site-arrow-button:hover > span,
|
||||
.site-arrow-button:hover > svg,
|
||||
.site-arrow-button:focus-visible > span,
|
||||
.site-arrow-button:focus-visible > svg {
|
||||
background: #bd2730 !important;
|
||||
}
|
||||
|
||||
@media (max-width: 479px) {
|
||||
.site-arrow-button > span:first-child {
|
||||
padding-right: 22px;
|
||||
padding-left: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover: none), (max-width: 767px) {
|
||||
.service-card .service-card-description {
|
||||
position: relative;
|
||||
|
||||
@@ -18,7 +18,7 @@ if ( ! trim( wp_strip_all_tags( (string) $page_content ) ) ) {
|
||||
|
||||
<section id="informacion-servicios-industriales" class="order-[999] w-full bg-[#eeeeee] text-color-5" aria-label="Más información">
|
||||
<details class="home-content-accordion w-full overflow-hidden bg-[#eeeeee]">
|
||||
<summary class="flex min-h-[51px] cursor-pointer list-none items-center justify-between gap-4 px-[25px] py-3 text-color-5 transition-colors hover:bg-[#e9e9e9] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-color-2 md:min-h-[44px] md:px-5">
|
||||
<summary class="flex cursor-pointer list-none items-center justify-between gap-4 px-[25px] py-2 text-color-5 transition-colors hover:bg-[#e9e9e9] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-color-2 md:min-h-[44px] md:px-5">
|
||||
<span class="text-[14px] font-normal leading-[1.2]">Más Información</span>
|
||||
<span class="home-content-accordion__icon relative block h-[18px] w-[18px] shrink-0" aria-hidden="true">
|
||||
<span class="absolute left-1/2 top-1/2 h-px w-[10px] -translate-x-1/2 -translate-y-1/2 bg-[#777777]"></span>
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="//powerservice.xyz/main-sitemap.xsl"?>
|
||||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd http://www.google.com/schemas/sitemap-image/1.1 http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/blog/</loc>
|
||||
<lastmod>2026-10-15T17:54:13+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-revisar-antes-de-comprar-una-bomba-sumergible-grundfos-para-pozo-profundo/</loc>
|
||||
<lastmod>2026-10-02T19:43:18+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-seleccionar-una-bomba-sumergible-grundfos-segun-profundidad-y-caudal/</loc>
|
||||
<lastmod>2026-10-02T19:43:03+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-datos-se-necesitan-para-cotizar-una-bomba-sumergible-grundfos/</loc>
|
||||
<lastmod>2026-10-02T19:42:59+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-influye-el-nivel-dinamico-del-pozo-al-seleccionar-una-bomba-sumergible/</loc>
|
||||
<lastmod>2026-10-02T19:42:56+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-relacion-existe-entre-caudal-presion-y-profundidad-al-elegir-una-bomba-para-pozo/</loc>
|
||||
<lastmod>2026-10-02T19:42:54+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-influye-la-carga-total-del-sistema-en-la-seleccion-de-una-bomba-sumergible/</loc>
|
||||
<lastmod>2026-10-02T19:42:52+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-seleccionar-una-bomba-sumergible-para-operacion-continua/</loc>
|
||||
<lastmod>2026-10-02T19:42:49+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/bombas-grundfos-sp-para-pozos-profundos-como-seleccionar-el-modelo-adecuado/</loc>
|
||||
<lastmod>2026-10-02T19:42:47+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/cuando-conviene-utilizar-una-bomba-grundfos-sp-en-un-pozo-profundo/</loc>
|
||||
<lastmod>2026-10-02T19:42:45+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/motores-sumergibles-grundfos-mms-que-revisar-antes-de-seleccionar-uno/</loc>
|
||||
<lastmod>2026-10-02T19:42:43+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/pruebas-esenciales-en-mantenimiento-de-motores-electricos-industriales/</loc>
|
||||
<lastmod>2026-10-01T23:24:47+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-elegir-una-bomba-grundfos-sp-para-pozo-profundo/</loc>
|
||||
<lastmod>2026-09-10T17:33:58+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-pruebas-tecnicas-necesita-un-motor-antes-de-volver-a-operar/</loc>
|
||||
<lastmod>2026-08-26T22:19:24+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-prevenir-sobrecargas-electricas-en-motores-industriales/</loc>
|
||||
<lastmod>2026-08-26T22:18:26+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-debe-incluir-la-instalacion-de-un-tablero-de-control-industrial/</loc>
|
||||
<lastmod>2026-08-26T22:17:40+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-se-realiza-la-puesta-en-marcha-de-un-sistema-de-bombeo/</loc>
|
||||
<lastmod>2026-08-26T22:17:22+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-diferencias-existen-entre-arrancadores-y-variadores-de-frecuencia/</loc>
|
||||
<lastmod>2026-08-26T22:16:56+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/cuando-conviene-instalar-un-variador-de-frecuencia-en-un-motor/</loc>
|
||||
<lastmod>2026-08-26T22:09:16+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-afecta-un-cableado-deficiente-al-rendimiento-de-una-planta/</loc>
|
||||
<lastmod>2026-08-26T22:09:06+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/fallas-en-tableros-de-control-senales-de-alerta-y-prevencion/</loc>
|
||||
<lastmod>2026-08-26T22:06:39+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-revisar-antes-de-instalar-un-motor-electrico-industrial/</loc>
|
||||
<lastmod>2026-08-26T22:06:28+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-elegir-protecciones-electricas-para-motores-y-equipos-de-bombeo/</loc>
|
||||
<lastmod>2026-08-26T22:00:52+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-revisar-antes-de-comprar-una-bomba-sumergible-grundfos/</loc>
|
||||
<lastmod>2026-08-07T21:29:22+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-ayudan-los-servicios-tecnicos-de-bombeo-a-prevenir-fallas/</loc>
|
||||
<lastmod>2026-08-03T06:07:44+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-servicios-de-mantenimiento-industrial-se-ofrecen-en-guadalajara/</loc>
|
||||
<lastmod>2026-08-03T06:04:56+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-elegir-variadores-industriales-para-motores-electricos/</loc>
|
||||
<lastmod>2026-08-03T06:01:27+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/cuando-contratar-servicios-de-mantenimiento-industrial/</loc>
|
||||
<lastmod>2026-08-03T05:52:02+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-mejorar-el-mantenimiento-en-una-empresa-industrial/</loc>
|
||||
<lastmod>2026-08-03T05:36:49+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-servicios-de-mantenimiento-industrial-necesita-una-planta/</loc>
|
||||
<lastmod>2026-08-03T05:33:19+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/fallas-en-motores-electricos-senales-de-alerta-y-prevencion/</loc>
|
||||
<lastmod>2026-08-03T05:09:46+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/cuales-son-las-fallas-electricas-mas-comunes-en-motores-industriales/</loc>
|
||||
<lastmod>2026-08-03T05:00:52+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-se-realiza-un-diagnostico-de-fallas-en-motores-industriales/</loc>
|
||||
<lastmod>2026-08-03T04:45:35+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/reparacion-de-motores-electricos-cuando-conviene-diagnosticar/</loc>
|
||||
<lastmod>2026-08-01T06:06:50+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/que-son-las-polizas-de-servicio-y-como-garantizan-la-continuidad-operativa/</loc>
|
||||
<lastmod>2026-07-09T20:55:24+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/mantenimiento-hidraulico-10-puntos-criticos-de-inspeccion/</loc>
|
||||
<lastmod>2026-06-04T21:22:43+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/integracion-de-tablero-de-control-que-incluye-el-servicio/</loc>
|
||||
<lastmod>2026-05-08T05:15:33+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/como-estructurar-el-mantenimiento-en-empresas-industriales-para-reducir-paros/</loc>
|
||||
<lastmod>2026-04-08T14:43:27+00:00</lastmod>
|
||||
</url>
|
||||
<url>
|
||||
<loc>https://powerservice.xyz/7-servicios-hidraulicos-industriales-que-mas-contratan/</loc>
|
||||
<lastmod>2026-03-09T05:41:17+00:00</lastmod>
|
||||
</url>
|
||||
</urlset>
|
||||
@@ -104,7 +104,7 @@
|
||||
'wp-url',
|
||||
'wp-warning'
|
||||
),
|
||||
'version' => 'd3cbb2c45b145b27a5cf'
|
||||
'version' => '37e58da384b2558bd479'
|
||||
),
|
||||
'block-library.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -150,7 +150,7 @@
|
||||
'import' => 'dynamic'
|
||||
)
|
||||
),
|
||||
'version' => '2e80403676c10cc0a473'
|
||||
'version' => '00e6e2a44788af201f35'
|
||||
),
|
||||
'block-serialization-default-parser.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -402,7 +402,7 @@
|
||||
'import' => 'static'
|
||||
)
|
||||
),
|
||||
'version' => 'a7750dea8d5c880ddf33'
|
||||
'version' => 'a6cb1641d13f718c01bd'
|
||||
),
|
||||
'edit-site.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -452,7 +452,7 @@
|
||||
'import' => 'static'
|
||||
)
|
||||
),
|
||||
'version' => '638e98d0061f4b9f1efb'
|
||||
'version' => '008f89f2cb2ad17a5947'
|
||||
),
|
||||
'edit-widgets.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -543,7 +543,7 @@
|
||||
'import' => 'static'
|
||||
)
|
||||
),
|
||||
'version' => '2cd3b932f41a420d5904'
|
||||
'version' => 'af070cfff88093363220'
|
||||
),
|
||||
'element.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -663,7 +663,7 @@
|
||||
'wp-url',
|
||||
'wp-warning'
|
||||
),
|
||||
'version' => 'b8bf604c1cc119e63ee6'
|
||||
'version' => '07c1c94f9b21baa97a96'
|
||||
),
|
||||
'notices.js' => array(
|
||||
'dependencies' => array(
|
||||
@@ -881,7 +881,7 @@
|
||||
'import' => 'dynamic'
|
||||
)
|
||||
),
|
||||
'version' => 'f7174b0617bcd68e57c3'
|
||||
'version' => 'a2c026d433c295fd5145'
|
||||
),
|
||||
'url.js' => array(
|
||||
'dependencies' => array(
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
'dependencies' => array(
|
||||
|
||||
),
|
||||
'version' => '685442d334b2d3e70832'
|
||||
'version' => '7e33cd8c4128731126e8'
|
||||
),
|
||||
'workflow/index.js' => array(
|
||||
'dependencies' => array(
|
||||
|
||||
@@ -542,6 +542,16 @@ function wp_render_block_states_support( $block_content, $block ) {
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
/*
|
||||
* Every CSS rule this function can produce is keyed off the block's `style`
|
||||
* attribute. Without it there is nothing to generate, so bail before doing
|
||||
* any of the lookups below — this runs for every block on every request.
|
||||
*/
|
||||
$style = $block['attrs']['style'] ?? array();
|
||||
if ( empty( $style ) || ! is_array( $style ) ) {
|
||||
return $block_content;
|
||||
}
|
||||
|
||||
$block_name = $block['blockName'];
|
||||
$block_type = WP_Block_Type_Registry::get_instance()->get_registered( $block_name );
|
||||
if ( ! $block_type ) {
|
||||
@@ -549,7 +559,6 @@ function wp_render_block_states_support( $block_content, $block ) {
|
||||
}
|
||||
|
||||
$supported_pseudo_states = WP_Theme_JSON::VALID_BLOCK_PSEUDO_SELECTORS[ $block_name ] ?? array();
|
||||
$style = $block['attrs']['style'] ?? array();
|
||||
$css_rules = array();
|
||||
$viewport_settings = wp_get_global_settings( array( 'viewport' ) );
|
||||
$responsive_media_queries = WP_Theme_JSON::get_viewport_media_queries( $viewport_settings );
|
||||
|
||||
@@ -343,11 +343,22 @@ function _get_block_template_file( $template_type, $slug ) {
|
||||
);
|
||||
foreach ( $themes as $theme_slug => $theme_dir ) {
|
||||
$template_base_paths = get_block_theme_folders( $theme_slug );
|
||||
$file_path = $theme_dir . '/' . $template_base_paths[ $template_type ] . '/' . $slug . '.html';
|
||||
if ( file_exists( $file_path ) ) {
|
||||
$template_dir = $theme_dir . '/' . $template_base_paths[ $template_type ];
|
||||
$file_path = $template_dir . '/' . $slug . '.html';
|
||||
$template_file = realpath( $file_path );
|
||||
$template_root = realpath( $template_dir );
|
||||
|
||||
if (
|
||||
false !== $template_file &&
|
||||
false !== $template_root &&
|
||||
str_starts_with(
|
||||
wp_normalize_path( $template_file ),
|
||||
trailingslashit( wp_normalize_path( $template_root ) )
|
||||
)
|
||||
) {
|
||||
$new_template_item = array(
|
||||
'slug' => $slug,
|
||||
'path' => $file_path,
|
||||
'path' => $template_file,
|
||||
'theme' => $theme_slug,
|
||||
'type' => $template_type,
|
||||
);
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
.wp-block-accordion-panel[hidden] {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
margin-block-start: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.wp-block-accordion-panel[hidden]{margin-block-start:0}
|
||||
.wp-block-accordion-panel[hidden]{border:none!important;box-shadow:none!important;margin-block-start:0;padding:0!important}
|
||||
@@ -1,3 +1,6 @@
|
||||
.wp-block-accordion-panel[hidden] {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
margin-block-start: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
+1
-1
@@ -1 +1 @@
|
||||
.wp-block-accordion-panel[hidden]{margin-block-start:0}
|
||||
.wp-block-accordion-panel[hidden]{border:none!important;box-shadow:none!important;margin-block-start:0;padding:0!important}
|
||||
@@ -310,6 +310,22 @@ function wp_font_library_render_page() {
|
||||
function wp_font_library_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'font-library' === $_GET['page'] ) {
|
||||
// The page renders outside the menu page callback flow, so it must
|
||||
// enforce authentication and capability checks itself. Without this,
|
||||
// any admin entry point firing `admin_init` (such as admin-post.php,
|
||||
// which serves logged-out requests) would render the page for
|
||||
// unauthenticated visitors.
|
||||
if ( ! is_user_logged_in() ) {
|
||||
auth_redirect();
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'edit_theme_options' ) ) {
|
||||
wp_die(
|
||||
__( 'Sorry, you are not allowed to access this page.' ),
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
wp_font_library_render_page();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -310,6 +310,22 @@ function wp_options_connectors_render_page() {
|
||||
function wp_options_connectors_intercept_render() {
|
||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
||||
if ( isset( $_GET['page'] ) && 'options-connectors' === $_GET['page'] ) {
|
||||
// The page renders outside the menu page callback flow, so it must
|
||||
// enforce authentication and capability checks itself. Without this,
|
||||
// any admin entry point firing `admin_init` (such as admin-post.php,
|
||||
// which serves logged-out requests) would render the page for
|
||||
// unauthenticated visitors.
|
||||
if ( ! is_user_logged_in() ) {
|
||||
auth_redirect();
|
||||
}
|
||||
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
wp_die(
|
||||
__( 'Sorry, you are not allowed to access this page.' ),
|
||||
403
|
||||
);
|
||||
}
|
||||
|
||||
wp_options_connectors_render_page();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
* accepted_args: int,
|
||||
* }
|
||||
*
|
||||
* @phpstan-implements Iterator<int, array<string, Hook_Callback>>
|
||||
* @phpstan-implements ArrayAccess<int, array<string, Hook_Callback>>
|
||||
* @phpstan-implements Iterator<int, array<non-decimal-int-string, Hook_Callback>>
|
||||
* @phpstan-implements ArrayAccess<int, array<non-decimal-int-string, Hook_Callback>>
|
||||
*/
|
||||
#[AllowDynamicProperties]
|
||||
final class WP_Hook implements Iterator, ArrayAccess {
|
||||
@@ -31,7 +31,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @var array
|
||||
* @phpstan-var array<int, array<string, Hook_Callback>>
|
||||
* @phpstan-var array<int, array<non-decimal-int-string, Hook_Callback>>
|
||||
*/
|
||||
public $callbacks = array();
|
||||
|
||||
@@ -502,7 +502,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
*
|
||||
* @param int $offset The offset to retrieve.
|
||||
* @return array|null If set, the value at the specified offset, null otherwise.
|
||||
* @phpstan-return array<string, Hook_Callback>|null
|
||||
* @phpstan-return array<non-decimal-int-string, Hook_Callback>|null
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetGet( $offset ) {
|
||||
@@ -518,7 +518,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
*
|
||||
* @param int|null $offset The offset to assign the value to.
|
||||
* @param array $value The value to set.
|
||||
* @phpstan-param array<string, Hook_Callback> $value
|
||||
* @phpstan-param array<non-decimal-int-string, Hook_Callback> $value
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function offsetSet( $offset, $value ) {
|
||||
@@ -554,7 +554,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
* @link https://www.php.net/manual/en/iterator.current.php
|
||||
*
|
||||
* @return array|false Array of callbacks at current priority, false if there are no more elements.
|
||||
* @phpstan-return array<string, Hook_Callback>|false
|
||||
* @phpstan-return array<non-decimal-int-string, Hook_Callback>|false
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function current() {
|
||||
@@ -569,7 +569,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
|
||||
* @link https://www.php.net/manual/en/iterator.next.php
|
||||
*
|
||||
* @return array|false Array of callbacks at next priority, false if there are no more elements.
|
||||
* @phpstan-return array<string, Hook_Callback>|false
|
||||
* @phpstan-return array<non-decimal-int-string, Hook_Callback>|false
|
||||
*/
|
||||
#[ReturnTypeWillChange]
|
||||
public function next() {
|
||||
|
||||
@@ -1023,7 +1023,10 @@ class WP_Http {
|
||||
|
||||
// Strip all /path/../ out of the path.
|
||||
while ( strpos( $path, '../' ) > 1 ) {
|
||||
$path = preg_replace( '![^/]+/\.\./!', '', $path );
|
||||
$path = preg_replace( '![^/]+/\.\./!', '', $path, -1, $segment_replacement_count );
|
||||
if ( 0 === $segment_replacement_count ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Strip any final leading ../ from the path.
|
||||
|
||||
@@ -79,7 +79,6 @@ class WP_oEmbed {
|
||||
'#https?://(www\.)?twitter\.com/i/moments/.*#i' => array( 'https://publish.twitter.com/oembed', true ),
|
||||
'#https?://(www\.)?soundcloud\.com/.*#i' => array( 'https://soundcloud.com/oembed', true ),
|
||||
'#https?://(open|play)\.spotify\.com/.*#i' => array( 'https://embed.spotify.com/oembed/', true ),
|
||||
'#https?://(.+\.)?imgur\.com/.*#i' => array( 'https://api.imgur.com/oembed', true ),
|
||||
'#https?://(www\.)?issuu\.com/.+/docs/.+#i' => array( 'https://issuu.com/oembed_wp', true ),
|
||||
'#https?://(www\.)?mixcloud\.com/.*#i' => array( 'https://app.mixcloud.com/oembed/', true ),
|
||||
'#https?://(www\.|embed\.)?ted\.com/talks/.*#i' => array( 'https://www.ted.com/services/v1/oembed.{format}', true ),
|
||||
@@ -88,7 +87,7 @@ class WP_oEmbed {
|
||||
'#https?://(www\.)?kickstarter\.com/projects/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
|
||||
'#https?://kck\.st/.*#i' => array( 'https://www.kickstarter.com/services/oembed', true ),
|
||||
'#https?://cloudup\.com/.*#i' => array( 'https://cloudup.com/oembed', true ),
|
||||
'#https?://(www\.)?reverbnation\.com/.*#i' => array( 'https://www.reverbnation.com/oembed', true ),
|
||||
'#https?://((legacy|www)\.)?reverbnation\.com/.*#i' => array( 'https://legacy.reverbnation.com/oembed', true ),
|
||||
'#https?://videopress\.com/v/.*#' => array( 'https://public-api.wordpress.com/oembed/?for=' . $host, true ),
|
||||
'#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i' => array( 'https://www.reddit.com/oembed', true ),
|
||||
'#https?://(www\.)?speakerdeck\.com/.*#i' => array( 'https://speakerdeck.com/oembed.{format}', true ),
|
||||
@@ -102,9 +101,6 @@ class WP_oEmbed {
|
||||
'#https?://(www\.)?amzn\.in/.*#i' => array( 'https://read.amazon.in/kp/api/oembed', true ),
|
||||
'#https?://(www\.)?amzn\.asia/.*#i' => array( 'https://read.amazon.com.au/kp/api/oembed', true ),
|
||||
'#https?://(www\.)?z\.cn/.*#i' => array( 'https://read.amazon.cn/kp/api/oembed', true ),
|
||||
'#https?://www\.someecards\.com/.+-cards/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ),
|
||||
'#https?://www\.someecards\.com/usercards/viewcard/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ),
|
||||
'#https?://some\.ly\/.+#i' => array( 'https://www.someecards.com/v2/oembed/', true ),
|
||||
'#https?://(www\.)?tiktok\.com/.*/video/.*#i' => array( 'https://www.tiktok.com/oembed', true ),
|
||||
'#https?://(www\.)?tiktok\.com/@.*#i' => array( 'https://www.tiktok.com/oembed', true ),
|
||||
'#https?://([a-z]{2}|www)\.pinterest\.com(\.(au|mx))?/.*#i' => array( 'https://www.pinterest.com/oembed.json', true ),
|
||||
@@ -154,7 +150,6 @@ class WP_oEmbed {
|
||||
* | Dailymotion | dai.ly | 3.6.0 |
|
||||
* | Flickr | flic.kr | 3.6.0 |
|
||||
* | Spotify | spotify.com | 3.6.0 |
|
||||
* | Imgur | imgur.com | 3.9.0 |
|
||||
* | Animoto | animoto.com | 4.0.0 |
|
||||
* | Animoto | video214.com | 4.0.0 |
|
||||
* | Issuu | issuu.com | 4.0.0 |
|
||||
@@ -183,8 +178,6 @@ class WP_oEmbed {
|
||||
* | Amazon | a.co | 4.9.0 |
|
||||
* | Amazon | amzn.to (eu, in, asia) | 4.9.0 |
|
||||
* | Amazon | z.cn | 4.9.0 |
|
||||
* | Someecards | someecards.com | 4.9.0 |
|
||||
* | Someecards | some.ly | 4.9.0 |
|
||||
* | Crowdsignal | survey.fm | 5.1.0 |
|
||||
* | TikTok | tiktok.com | 5.4.0 |
|
||||
* | Pinterest | pinterest.com | 5.9.0 |
|
||||
@@ -219,6 +212,9 @@ class WP_oEmbed {
|
||||
* | Meetup.com | meetu.ps | 3.9.0 | 6.0.1 |
|
||||
* | SlideShare | slideshare.net | 3.5.0 | 6.6.0 |
|
||||
* | Screencast | screencast.com | 4.8.0 | 6.8.2 |
|
||||
* | Imgur | imgur.com | 3.9.0 | 7.1.3 |
|
||||
* | Someecards | someecards.com | 4.9.0 | 7.1.3 |
|
||||
* | Someecards | some.ly | 4.9.0 | 7.1.3 |
|
||||
*
|
||||
* @see wp_oembed_add_provider()
|
||||
*
|
||||
|
||||
@@ -3484,43 +3484,6 @@ class WP_Query {
|
||||
$this->posts = apply_filters_ref_array( 'posts_results', array( $this->posts, &$this ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) {
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1' AND {$wpdb->comments}.comment_type != 'note'", &$this ) );
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );
|
||||
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
|
||||
$corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );
|
||||
|
||||
$comments_request = "SELECT {$wpdb->comments}.comment_ID FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";
|
||||
|
||||
$comment_key = md5( $comments_request );
|
||||
$comment_last_changed = wp_cache_get_last_changed( 'comment' );
|
||||
|
||||
$comment_cache_key = "comment_feed:$comment_key";
|
||||
$comment_ids = wp_cache_get_salted( $comment_cache_key, 'comment-queries', $comment_last_changed );
|
||||
if ( false === $comment_ids ) {
|
||||
$comment_ids = $wpdb->get_col( $comments_request );
|
||||
wp_cache_set_salted( $comment_cache_key, $comment_ids, 'comment-queries', $comment_last_changed );
|
||||
}
|
||||
_prime_comment_caches( $comment_ids );
|
||||
|
||||
// Convert to WP_Comment.
|
||||
/** @var WP_Comment[] */
|
||||
$this->comments = array_map( 'get_comment', $comment_ids );
|
||||
$this->comment_count = count( $this->comments );
|
||||
}
|
||||
|
||||
// Check post status to determine if post should be displayed.
|
||||
if ( ! empty( $this->posts ) && ( $this->is_single || $this->is_page ) ) {
|
||||
$status = get_post_status( $this->posts[0] );
|
||||
@@ -3579,6 +3542,43 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $this->posts ) && $this->is_comment_feed && $this->is_singular ) {
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cjoin = apply_filters_ref_array( 'comment_feed_join', array( '', &$this ) );
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cwhere = apply_filters_ref_array( 'comment_feed_where', array( "WHERE comment_post_ID = '{$this->posts[0]->ID}' AND comment_approved = '1' AND {$wpdb->comments}.comment_type != 'note'", &$this ) );
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$cgroupby = apply_filters_ref_array( 'comment_feed_groupby', array( '', &$this ) );
|
||||
$cgroupby = ( ! empty( $cgroupby ) ) ? 'GROUP BY ' . $cgroupby : '';
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$corderby = apply_filters_ref_array( 'comment_feed_orderby', array( 'comment_date_gmt DESC', &$this ) );
|
||||
$corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : '';
|
||||
|
||||
/** This filter is documented in wp-includes/class-wp-query.php */
|
||||
$climits = apply_filters_ref_array( 'comment_feed_limits', array( 'LIMIT ' . get_option( 'posts_per_rss' ), &$this ) );
|
||||
|
||||
$comments_request = "SELECT {$wpdb->comments}.comment_ID FROM {$wpdb->comments} $cjoin $cwhere $cgroupby $corderby $climits";
|
||||
|
||||
$comment_key = md5( $comments_request );
|
||||
$comment_last_changed = wp_cache_get_last_changed( 'comment' );
|
||||
|
||||
$comment_cache_key = "comment_feed:$comment_key";
|
||||
$comment_ids = wp_cache_get_salted( $comment_cache_key, 'comment-queries', $comment_last_changed );
|
||||
if ( false === $comment_ids ) {
|
||||
$comment_ids = $wpdb->get_col( $comments_request );
|
||||
wp_cache_set_salted( $comment_cache_key, $comment_ids, 'comment-queries', $comment_last_changed );
|
||||
}
|
||||
_prime_comment_caches( $comment_ids );
|
||||
|
||||
// Convert to WP_Comment.
|
||||
/** @var WP_Comment[] */
|
||||
$this->comments = array_map( 'get_comment', $comment_ids );
|
||||
$this->comment_count = count( $this->comments );
|
||||
}
|
||||
|
||||
// Put sticky posts at the top of the posts array.
|
||||
$sticky_posts = get_option( 'sticky_posts' );
|
||||
if ( $this->is_home && $page <= 1 && is_array( $sticky_posts ) && ! empty( $sticky_posts ) && ! $query_vars['ignore_sticky_posts'] ) {
|
||||
|
||||
@@ -3880,8 +3880,18 @@ class WP_Theme_JSON {
|
||||
// Only store if the variation has blockGap defined.
|
||||
if ( isset( $style_variation_node['spacing']['blockGap'] ) ) {
|
||||
// Append block selector to the variation selector for proper targeting.
|
||||
$variation_metadata_with_selector = $style_variation;
|
||||
$variation_metadata_with_selector['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
$variation_metadata_with_selector = $style_variation;
|
||||
$variation_metadata_with_selector['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
|
||||
/*
|
||||
* `get_layout_styles()` reads `name` as a block name, to check that the block
|
||||
* supports layout at all. A variation node's `name` is the variation slug,
|
||||
* which is never a registered block, so the check fails and every variation
|
||||
* gap rule is discarded. Pass the block the variation belongs to, so the
|
||||
* support check answers the question it is actually asking.
|
||||
*/
|
||||
$variation_metadata_with_selector['name'] = $block_name;
|
||||
|
||||
$style_variation_layout_metadata[ $style_variation['selector'] ] = array(
|
||||
'metadata' => $variation_metadata_with_selector,
|
||||
'node' => $style_variation_node,
|
||||
@@ -3937,7 +3947,11 @@ class WP_Theme_JSON {
|
||||
if ( isset( $breakpoint_node['spacing']['blockGap'] ) ) {
|
||||
$variation_layout_metadata = $style_variation;
|
||||
$variation_layout_metadata['selector'] = $style_variation['selector'] . $block_metadata['css'];
|
||||
$variation_responsive_css .= $this->get_layout_styles(
|
||||
|
||||
// The variation slug is not a block name here either. See above.
|
||||
$variation_layout_metadata['name'] = $block_name;
|
||||
|
||||
$variation_responsive_css .= $this->get_layout_styles(
|
||||
$variation_layout_metadata,
|
||||
array(
|
||||
'node' => $breakpoint_node,
|
||||
|
||||
@@ -16,11 +16,25 @@
|
||||
#[AllowDynamicProperties]
|
||||
class WP_Widget_Factory {
|
||||
|
||||
/**
|
||||
* Prefix for the key under which a widget registered as an instance is stored.
|
||||
*
|
||||
* Without it the key would be the decimal representation of an integer, which PHP casts from
|
||||
* string to int when it is used as an array key.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*/
|
||||
private const INSTANCE_KEY_PREFIX = 'spl_object_id:';
|
||||
|
||||
/**
|
||||
* Widgets array.
|
||||
*
|
||||
* Keyed by class name for a widget registered by name, and by a prefixed object ID for a widget
|
||||
* registered as an instance.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @var array
|
||||
* @var array<string, WP_Widget>
|
||||
* @phpstan-var array<non-decimal-int-string, WP_Widget>
|
||||
*/
|
||||
public $widgets = array();
|
||||
|
||||
@@ -52,12 +66,13 @@ class WP_Widget_Factory {
|
||||
* @since 2.8.0
|
||||
* @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
|
||||
* instead of simply a `WP_Widget` subclass name.
|
||||
* @since 7.1.1 The key for an instance is prefixed so that it is never cast to an integer.
|
||||
*
|
||||
* @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.
|
||||
*/
|
||||
public function register( $widget ) {
|
||||
if ( $widget instanceof WP_Widget ) {
|
||||
$this->widgets[ spl_object_id( $widget ) ] = $widget;
|
||||
$this->widgets[ self::INSTANCE_KEY_PREFIX . spl_object_id( $widget ) ] = $widget;
|
||||
} else {
|
||||
$this->widgets[ $widget ] = new $widget();
|
||||
}
|
||||
@@ -69,12 +84,13 @@ class WP_Widget_Factory {
|
||||
* @since 2.8.0
|
||||
* @since 4.6.0 Updated the `$widget` parameter to also accept a WP_Widget instance object
|
||||
* instead of simply a `WP_Widget` subclass name.
|
||||
* @since 7.1.1 The key for an instance is prefixed so that it is never cast to an integer.
|
||||
*
|
||||
* @param string|WP_Widget $widget Either the name of a `WP_Widget` subclass or an instance of a `WP_Widget` subclass.
|
||||
*/
|
||||
public function unregister( $widget ) {
|
||||
if ( $widget instanceof WP_Widget ) {
|
||||
unset( $this->widgets[ spl_object_id( $widget ) ] );
|
||||
unset( $this->widgets[ self::INSTANCE_KEY_PREFIX . spl_object_id( $widget ) ] );
|
||||
} else {
|
||||
unset( $this->widgets[ $widget ] );
|
||||
}
|
||||
|
||||
@@ -1462,6 +1462,33 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
return new IXR_Error( 403, __( 'Invalid post type.' ) );
|
||||
}
|
||||
|
||||
// Reject writes to internal-only builtin post types (e.g. customize_changeset)
|
||||
// whose intended write path is a dedicated helper, not a generic post API.
|
||||
$is_internal_only = (
|
||||
empty( $post_type->public )
|
||||
&& empty( $post_type->show_in_rest )
|
||||
&& ! empty( $post_type->_builtin )
|
||||
);
|
||||
|
||||
/**
|
||||
* Filters whether a post type accepts writes via XML-RPC.
|
||||
*
|
||||
* Defaults to false for internal-only builtin post types (public=false,
|
||||
* show_in_rest=false, _builtin=true), such as customize_changeset, whose
|
||||
* writes are meant to flow through dedicated helpers. Return true to opt
|
||||
* a post type back in.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*
|
||||
* @param bool $allowed Whether the post type accepts XML-RPC writes.
|
||||
* @param WP_Post_Type $post_type The post type object.
|
||||
*/
|
||||
$allowed = apply_filters( 'xmlrpc_allow_post_type_writes', ! $is_internal_only, $post_type );
|
||||
|
||||
if ( ! $allowed ) {
|
||||
return new IXR_Error( 403, __( 'Sorry, this post type is not supported over XML-RPC.' ) );
|
||||
}
|
||||
|
||||
$update = ! empty( $post_data['ID'] );
|
||||
|
||||
if ( $update ) {
|
||||
|
||||
@@ -746,8 +746,9 @@ class WP {
|
||||
|
||||
$set_404 = true;
|
||||
|
||||
// Never 404 for the admin, robots, or favicon.
|
||||
if ( is_admin() || is_robots() || is_favicon() ) {
|
||||
// Never 404 here for the admin, robots, favicon, or sitemaps.
|
||||
// Sitemap routes send their own status in WP_Sitemaps::render_sitemaps().
|
||||
if ( is_admin() || is_robots() || is_favicon() || is_sitemap() || get_query_var( 'sitemap-stylesheet' ) ) {
|
||||
$set_404 = false;
|
||||
|
||||
// If posts were found, check for paged content.
|
||||
|
||||
@@ -599,10 +599,14 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
content: none;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item .site-icon {
|
||||
/* The adminbar icon needs additional styling to prevent 3rd party styles from overriding the size. */
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item img.site-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: #f0f0f1; /* matching my-account (user avatar) node's background */
|
||||
max-width: 20px;
|
||||
max-height: 20px;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -940,12 +944,24 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item .site-icon {
|
||||
/*
|
||||
* Flex prevents `text-indent` from hiding the site title, and is unused here
|
||||
* since the icon is positioned absolutely below.
|
||||
*/
|
||||
#wpadminbar #wp-admin-bar-site-name.has-site-icon > .ab-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item img.site-icon {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
right: 12px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
max-width: 28px;
|
||||
max-height: 28px;
|
||||
min-width: 28px;
|
||||
min-height: 28px;
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -598,10 +598,14 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
content: none;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item .site-icon {
|
||||
/* The adminbar icon needs additional styling to prevent 3rd party styles from overriding the size. */
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item img.site-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: #f0f0f1; /* matching my-account (user avatar) node's background */
|
||||
max-width: 20px;
|
||||
max-height: 20px;
|
||||
min-width: 20px;
|
||||
min-height: 20px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -939,12 +943,24 @@ html:lang(he-il) .rtl #wpadminbar * {
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item .site-icon {
|
||||
/*
|
||||
* Flex prevents `text-indent` from hiding the site title, and is unused here
|
||||
* since the icon is positioned absolutely below.
|
||||
*/
|
||||
#wpadminbar #wp-admin-bar-site-name.has-site-icon > .ab-item {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#wpadminbar #wp-admin-bar-site-name > .ab-item img.site-icon {
|
||||
position: absolute;
|
||||
top: 9px;
|
||||
left: 12px;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
max-width: 28px;
|
||||
max-height: 28px;
|
||||
min-width: 28px;
|
||||
min-height: 28px;
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -59,7 +59,10 @@
|
||||
}
|
||||
|
||||
.wp-block-accordion-panel[hidden] {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
margin-block-start: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.wp-block-archives {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -59,7 +59,10 @@
|
||||
}
|
||||
|
||||
.wp-block-accordion-panel[hidden] {
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
margin-block-start: 0;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.wp-block-archives {
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -15,6 +15,17 @@
|
||||
* @since 3.4.0
|
||||
*
|
||||
* @see WP_Customize_Setting
|
||||
*
|
||||
* @phpstan-type Header_Image_Data array{
|
||||
* attachment_id?: int,
|
||||
* url?: string,
|
||||
* thumbnail_url?: string,
|
||||
* timestamp?: int,
|
||||
* width?: int,
|
||||
* height?: int,
|
||||
* alt_text?: string,
|
||||
* attachment_parent?: int,
|
||||
* }
|
||||
*/
|
||||
final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
||||
|
||||
@@ -62,4 +73,163 @@ final class WP_Customize_Header_Image_Setting extends WP_Customize_Setting {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitizes a header value.
|
||||
*
|
||||
* The value is expected to be one of the following:
|
||||
*
|
||||
* - An array of header image data, with the keys `attachment_id`, `url`, `thumbnail_url`, `timestamp`, `width`,
|
||||
* `height`, `alt_text`, and `attachment_parent`, as supplied by {@see get_uploaded_header_images()}. Any other
|
||||
* key is discarded.
|
||||
* - An array with a `choice` key, being the legacy format in which any of the other accepted values is nested.
|
||||
* - The string `remove-header`, `random-default-image`, or `random-uploaded-image`.
|
||||
* - A string corresponding to one of the keys for the array returned by {@see get_uploaded_header_images()}, or
|
||||
* one of the keys for the array passed into {@see register_default_headers()}.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*
|
||||
* @see WP_Customize_Header_Image_Setting::update()
|
||||
* @see Custom_Image_Header::set_header_image()
|
||||
*
|
||||
* @param mixed $value Value to sanitize.
|
||||
* @return array|string|WP_Error|null Sanitized value, or `null`/`WP_Error` if invalid. The array holds
|
||||
* the header image data, or that data nested under a `choice` key,
|
||||
* before the `customize_sanitize_header_image_data` filter, which
|
||||
* may return anything, is applied to it.
|
||||
*
|
||||
* @phpstan-return array<mixed, mixed>|string|WP_Error|null
|
||||
*/
|
||||
public function sanitize( $value ) {
|
||||
/*
|
||||
* The update() method unwraps the legacy `choice` format before handing the value off to
|
||||
* Custom_Image_Header::set_header_image(), so the nested value is what must be sanitized.
|
||||
*/
|
||||
if ( is_array( $value ) && isset( $value['choice'] ) ) {
|
||||
$choice = $this->sanitize_choice( $value['choice'] );
|
||||
if ( is_null( $choice ) || is_wp_error( $choice ) ) {
|
||||
return $choice;
|
||||
}
|
||||
$value = array( 'choice' => $choice );
|
||||
} else {
|
||||
$value = $this->sanitize_choice( $value );
|
||||
if ( is_null( $value ) || is_wp_error( $value ) ) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::sanitize( $value );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitizes a header image choice.
|
||||
*
|
||||
* This is the value which is ultimately passed to {@see Custom_Image_Header::set_header_image()}, whether
|
||||
* supplied at the top level of the setting value or nested under its legacy `choice` key.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*
|
||||
* @param mixed $value Value to sanitize.
|
||||
* @return array|string|WP_Error|null Sanitized value, or `null`/`WP_Error` if invalid.
|
||||
*
|
||||
* @phpstan-return Header_Image_Data|string|WP_Error|null
|
||||
*/
|
||||
private function sanitize_choice( $value ) {
|
||||
// Custom_Image_Header::set_header_image() accepts an object in place of an array.
|
||||
if ( is_object( $value ) ) {
|
||||
$value = (array) $value;
|
||||
}
|
||||
|
||||
if ( is_string( $value ) ) {
|
||||
return sanitize_text_field( $value );
|
||||
}
|
||||
|
||||
if ( ! is_array( $value ) ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* The sanitized value is assembled member by member rather than filtered down from the
|
||||
* supplied one, so that nothing but the members below can end up in it.
|
||||
*/
|
||||
$sanitized = array();
|
||||
|
||||
if ( isset( $value['attachment_id'] ) ) {
|
||||
if ( ! is_scalar( $value['attachment_id'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$attachment_id = absint( $value['attachment_id'] );
|
||||
|
||||
/*
|
||||
* A supplied attachment must be an existing image, since its ID is written to postmeta and its
|
||||
* data displayed. Note that an ID of zero must be skipped rather than looked up, as
|
||||
* get_post_mime_type() falls back to the global post when passed an empty value.
|
||||
*/
|
||||
if ( $attachment_id > 0 ) {
|
||||
$mime_type = get_post_mime_type( $attachment_id );
|
||||
if ( ! is_string( $mime_type ) || ! str_starts_with( $mime_type, 'image/' ) ) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
$sanitized['attachment_id'] = $attachment_id;
|
||||
}
|
||||
|
||||
if ( isset( $value['url'] ) ) {
|
||||
if ( ! is_string( $value['url'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['url'] = sanitize_url( $value['url'] );
|
||||
if ( '' === $sanitized['url'] ) {
|
||||
return new WP_Error( 'invalid_url', __( 'Invalid URL.' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $value['thumbnail_url'] ) ) {
|
||||
if ( ! is_string( $value['thumbnail_url'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['thumbnail_url'] = sanitize_url( $value['thumbnail_url'] );
|
||||
if ( '' === $sanitized['thumbnail_url'] ) {
|
||||
return new WP_Error( 'invalid_url', __( 'Invalid URL.' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset( $value['timestamp'] ) ) {
|
||||
if ( ! is_scalar( $value['timestamp'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['timestamp'] = absint( $value['timestamp'] );
|
||||
}
|
||||
|
||||
if ( isset( $value['width'] ) ) {
|
||||
if ( ! is_scalar( $value['width'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['width'] = absint( $value['width'] );
|
||||
}
|
||||
|
||||
if ( isset( $value['height'] ) ) {
|
||||
if ( ! is_scalar( $value['height'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['height'] = absint( $value['height'] );
|
||||
}
|
||||
|
||||
if ( isset( $value['alt_text'] ) ) {
|
||||
if ( ! is_string( $value['alt_text'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['alt_text'] = sanitize_text_field( $value['alt_text'] );
|
||||
}
|
||||
|
||||
if ( isset( $value['attachment_parent'] ) ) {
|
||||
if ( ! is_scalar( $value['attachment_parent'] ) ) {
|
||||
return null;
|
||||
}
|
||||
$sanitized['attachment_parent'] = absint( $value['attachment_parent'] );
|
||||
}
|
||||
|
||||
return $sanitized;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ function wpautop( $text, $br = true ) {
|
||||
$text = preg_replace( '|<p>(<li.+?)</p>|', '$1', $text );
|
||||
|
||||
// If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.
|
||||
$text = preg_replace( '|<p><blockquote([^>]*)>|i', '<blockquote$1><p>', $text );
|
||||
$text = preg_replace( '!<p><blockquote((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>!i', '<blockquote$1><p>', $text );
|
||||
$text = str_replace( '</blockquote></p>', '</p></blockquote>', $text );
|
||||
|
||||
// If an opening or closing block element tag is preceded by an opening <p> tag, remove it.
|
||||
|
||||
@@ -384,7 +384,7 @@ function get_search_form( $args = array() ) {
|
||||
* @type string $id Unique ID for the popover element. Default is a
|
||||
* generated unique ID.
|
||||
* @type string $button Existing `button` or `a` markup. Used instead of generated button.
|
||||
* Default standard button HTML.
|
||||
* Default empty string.
|
||||
* @type string $label Not used for tooltips.
|
||||
* @type string $close_label Not used for tooltips.
|
||||
* @type string $icon Dashicons icon class for the toggle button.
|
||||
@@ -414,7 +414,7 @@ function wp_get_tooltip( $content, $args = array() ) {
|
||||
* @type string $id Unique ID for the popover element. Default is a
|
||||
* generated unique ID.
|
||||
* @type string $button Existing `button` markup. Used instead of generated button.
|
||||
* Default standard button HTML.
|
||||
* Default empty string.
|
||||
* @type string $label Accessible label for the toggle button.
|
||||
* Default 'Help', matching the default icon.
|
||||
* Ignored for tooltips.
|
||||
@@ -449,7 +449,7 @@ function wp_get_toggletip( $content, $args = array() ) {
|
||||
* @type string $id Unique ID for the popover element. Default is a
|
||||
* generated unique ID.
|
||||
* @type string $button Existing `button` or `a` markup. Used instead of generated button.
|
||||
* Default standard button HTML.
|
||||
* Default empty string.
|
||||
* @type string $label Accessible label for the toggle button.
|
||||
* Default 'Help', matching the default icon.
|
||||
* Ignored for tooltips.
|
||||
@@ -473,7 +473,7 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
|
||||
$defaults = array(
|
||||
'id' => wp_unique_id( 'wp-tooltip-' ),
|
||||
'button' => '<button type="button" aria-label="%3$s"><span class="dashicons %4$s" aria-hidden="true"></span></button>',
|
||||
'button' => '',
|
||||
'label' => __( 'Help' ),
|
||||
'close_label' => __( 'Close' ),
|
||||
'icon' => 'dashicons-editor-help',
|
||||
@@ -488,39 +488,67 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
$classes .= ' ' . $args['class'];
|
||||
}
|
||||
|
||||
$icon = ( $args['icon'] ) ? trim( $args['icon'] ) : $defaults['icon'];
|
||||
$id = ( $args['id'] ) ? $args['id'] : $defaults['id'];
|
||||
$button = ( $args['button'] ) ? $args['button'] : $defaults['button'];
|
||||
$processed = false;
|
||||
$icon = ( $args['icon'] ) ? trim( $args['icon'] ) : $defaults['icon'];
|
||||
$id = ( $args['id'] ) ? $args['id'] : $defaults['id'];
|
||||
|
||||
// Tooltips use the content as the accessible name; toggletips use the label.
|
||||
$label = ( 'tooltip' === $args['type'] ) ? wp_strip_all_tags( $content, true ) : $args['label'];
|
||||
|
||||
/*
|
||||
* The generated button is a plain skeleton. Every dynamic attribute is
|
||||
* added through the tag processor below, so caller-supplied markup is
|
||||
* never scanned or substituted and a percent sign in custom markup,
|
||||
* such as a percent-encoded URL, is never treated as a conversion
|
||||
* specification.
|
||||
*/
|
||||
$default_button = '<button type="button"><span></span></button>';
|
||||
|
||||
$is_default = ! $args['button'];
|
||||
$button = ( $args['button'] ) ? $args['button'] : $default_button;
|
||||
|
||||
// The accepted root element is a `button`, or an `a` for tooltips.
|
||||
$tag = false;
|
||||
$processor = new WP_HTML_Tag_Processor( $button );
|
||||
if ( true === $processor->next_tag( 'button' ) ) {
|
||||
$processor->add_class( 'wp-tooltip__toggle' );
|
||||
if ( 'tooltip' !== $args['type'] ) {
|
||||
$processor->set_attribute( 'popovertarget', '%2$s' );
|
||||
$processor->set_attribute( 'aria-haspopup', 'dialog' );
|
||||
}
|
||||
$button = $processor->get_updated_html();
|
||||
$processed = true;
|
||||
$tag = 'button';
|
||||
} else {
|
||||
// Reset processor.
|
||||
$processor = new WP_HTML_Tag_Processor( $button );
|
||||
if ( true === $processor->next_tag( 'a' ) && 'tooltip' === $args['type'] ) {
|
||||
$processor->add_class( 'wp-tooltip__toggle' );
|
||||
$button = $processor->get_updated_html();
|
||||
$processed = true;
|
||||
if ( 'tooltip' === $args['type'] && true === $processor->next_tag( 'a' ) ) {
|
||||
$tag = 'a';
|
||||
}
|
||||
}
|
||||
if ( ! $processed ) {
|
||||
// Button HTML passed was not valid.
|
||||
$processor = new WP_HTML_Tag_Processor( $defaults['button'] );
|
||||
$processor->add_class( 'wp-tooltip__toggle' );
|
||||
if ( 'tooltip' !== $args['type'] ) {
|
||||
$processor->set_attribute( 'popovertarget', '%2$s' );
|
||||
$processor->set_attribute( 'aria-haspopup', 'dialog' );
|
||||
}
|
||||
$button = $processor->get_updated_html();
|
||||
|
||||
if ( false === $tag ) {
|
||||
// Button HTML passed was not valid. Reset to default.
|
||||
$is_default = true;
|
||||
$button = $default_button;
|
||||
$processor = new WP_HTML_Tag_Processor( $button );
|
||||
$processor->next_tag( 'button' );
|
||||
$tag = 'button';
|
||||
}
|
||||
|
||||
/*
|
||||
* Attributes that apply to every accepted button are added in one pass.
|
||||
* Attributes that name the control are only added when the caller's
|
||||
* markup did not already provide them.
|
||||
*/
|
||||
if ( null === $processor->get_attribute( 'aria-label' ) ) {
|
||||
$processor->set_attribute( 'aria-label', $label );
|
||||
}
|
||||
$processor->add_class( 'wp-tooltip__toggle' );
|
||||
if ( 'button' === $tag && 'tooltip' !== $args['type'] ) {
|
||||
$processor->set_attribute( 'popovertarget', $id );
|
||||
$processor->set_attribute( 'aria-haspopup', 'dialog' );
|
||||
}
|
||||
|
||||
// The generated button also carries the dashicon on its inner span.
|
||||
if ( $is_default && true === $processor->next_tag( 'span' ) ) {
|
||||
$processor->set_attribute( 'class', 'dashicons ' . $icon );
|
||||
$processor->set_attribute( 'aria-hidden', 'true' );
|
||||
}
|
||||
|
||||
$button = $processor->get_updated_html();
|
||||
|
||||
/*
|
||||
* The markup only uses phrasing content so it is valid when nested
|
||||
* in a phrasing context. Sectioning content (e.g. `div`, `dialog`) will
|
||||
@@ -528,11 +556,9 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
* the layout. See #65660.
|
||||
*/
|
||||
if ( 'tooltip' === $args['type'] ) {
|
||||
// Tooltips are only used to visually display labels.
|
||||
$label = wp_strip_all_tags( $content, true );
|
||||
$markup = sprintf(
|
||||
'<span class="%1$s">
|
||||
' . $button . '
|
||||
%6$s
|
||||
<span popover="hint" id="%2$s" class="wp-tooltip__bubble" role="tooltip">' .
|
||||
'<span id="%2$s-text" class="wp-tooltip__text">%5$s</span>' .
|
||||
'</span>' .
|
||||
@@ -542,6 +568,7 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
esc_attr( $label ),
|
||||
esc_attr( $icon ),
|
||||
esc_html( $content ),
|
||||
$button,
|
||||
);
|
||||
} else {
|
||||
/*
|
||||
@@ -551,7 +578,7 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
*/
|
||||
$markup = sprintf(
|
||||
'<span class="%1$s">
|
||||
' . $button . '
|
||||
%7$s
|
||||
<span popover="auto" id="%2$s" class="wp-tooltip__bubble" role="dialog" aria-label="%3$s" tabindex="-1" autofocus>' .
|
||||
'<span id="%2$s-text" class="wp-tooltip__text">%5$s</span>' .
|
||||
'<button type="button" class="wp-tooltip__close" popovertarget="%2$s" popovertargetaction="hide" aria-label="%6$s">' .
|
||||
@@ -561,10 +588,11 @@ function wp_get_tooltip_helper( $content, $args = array() ) {
|
||||
'</span>',
|
||||
esc_attr( $classes ),
|
||||
esc_attr( $id ),
|
||||
esc_attr( $args['label'] ),
|
||||
esc_attr( $label ),
|
||||
esc_attr( $icon ),
|
||||
esc_html( $content ),
|
||||
esc_attr( $args['close_label'] ),
|
||||
$button,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -3988,7 +3988,7 @@ class WP_HTML_Tag_Processor {
|
||||
self::COMMENT_AS_HTML_COMMENT === $this->comment_type
|
||||
) {
|
||||
// Check if the text could close the comment.
|
||||
if ( 1 === preg_match( '/--!?>/', $plaintext_content ) ) {
|
||||
if ( 1 === preg_match( '/^-?>|--!?>/', $plaintext_content ) ) {
|
||||
_doing_it_wrong(
|
||||
__METHOD__,
|
||||
__( 'Comment text cannot contain a comment closer.' ),
|
||||
|
||||
Vendored
+1300
-1280
File diff suppressed because it is too large
Load Diff
+32
-32
File diff suppressed because one or more lines are too long
Vendored
+121
-46
@@ -29319,6 +29319,13 @@ ${url}
|
||||
function defaultColumnsNumber(imageCount) {
|
||||
return imageCount ? Math.min(3, imageCount) : 3;
|
||||
}
|
||||
function isObject(value) {
|
||||
return !!value && typeof value === "object" && !Array.isArray(value);
|
||||
}
|
||||
function isGalleryFlexLayout(layout) {
|
||||
const layoutType = isObject(layout) ? layout.type : void 0;
|
||||
return typeof layoutType !== "string" || layoutType === "" || layoutType === "flex";
|
||||
}
|
||||
var pickRelevantMediaFiles = (image, sizeSlug = "large") => {
|
||||
const imageProps = Object.fromEntries(
|
||||
Object.entries(image ?? {}).filter(
|
||||
@@ -30529,9 +30536,10 @@ ${url}
|
||||
)
|
||||
] });
|
||||
}
|
||||
function GalleryImagesPreview({ imageBlocks }) {
|
||||
function GalleryImagesPreview({ imageBlocks, layout }) {
|
||||
const { children, ref, className } = (0, import_block_editor97.__experimentalUseBlockPreview)({
|
||||
blocks: imageBlocks
|
||||
blocks: imageBlocks,
|
||||
layout
|
||||
});
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
||||
"div",
|
||||
@@ -30563,6 +30571,10 @@ ${url}
|
||||
} = dynamic;
|
||||
const blockEditingMode = (0, import_block_editor97.useBlockEditingMode)();
|
||||
const [isConfirmingDetach, setIsConfirmingDetach] = (0, import_element44.useState)(false);
|
||||
const previewLayout = (0, import_element44.useMemo)(
|
||||
() => isGalleryFlexLayout(attributes.layout) ? { ...attributes.layout, type: "flex" } : attributes.layout,
|
||||
[attributes.layout]
|
||||
);
|
||||
const emptyInstructions = isResolvingDynamic ? (0, import_i18n79.__)("Loading images\u2026") : sourceDescriptor?.emptyMessage ?? (0, import_i18n79.__)("Dynamic images will appear here.");
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(import_jsx_runtime274.Fragment, { children: [
|
||||
blockEditingMode === "default" && /* @__PURE__ */ (0, import_jsx_runtime274.jsxs)(import_jsx_runtime274.Fragment, { children: [
|
||||
@@ -30589,7 +30601,8 @@ ${url}
|
||||
dynamicImageBlocks.length ? /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(import_block_editor97.BlockContextProvider, { value: galleryContext, children: /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
||||
GalleryImagesPreview,
|
||||
{
|
||||
imageBlocks: dynamicImageBlocks
|
||||
imageBlocks: dynamicImageBlocks,
|
||||
layout: previewLayout
|
||||
}
|
||||
) }) : /* @__PURE__ */ (0, import_jsx_runtime274.jsx)(
|
||||
import_components45.Placeholder,
|
||||
@@ -36185,6 +36198,42 @@ ${text}
|
||||
}
|
||||
return syncedAttributes;
|
||||
}
|
||||
function getNewAttachmentSizeAttributes(sizeSlug, attachment) {
|
||||
const sizes = attachment.media_details?.sizes;
|
||||
if (!sizeSlug || sizeSlug === DEFAULT_MEDIA_SIZE_SLUG3 || !sizes) {
|
||||
return void 0;
|
||||
}
|
||||
const sizeUrl = sizes[sizeSlug]?.source_url;
|
||||
if (sizeUrl) {
|
||||
return { url: sizeUrl };
|
||||
}
|
||||
const fullUrl = attachment.source_url ?? sizes.full?.source_url;
|
||||
return fullUrl ? { url: fullUrl, sizeSlug: DEFAULT_MEDIA_SIZE_SLUG3 } : void 0;
|
||||
}
|
||||
function getNewAttachmentLinkAttributes(linkDestination, attachment) {
|
||||
if (linkDestination === LINK_DESTINATION_MEDIA2) {
|
||||
return attachment.source_url ? { href: attachment.source_url } : void 0;
|
||||
}
|
||||
if (linkDestination === LINK_DESTINATION_ATTACHMENT2) {
|
||||
return attachment.link ? { href: attachment.link } : void 0;
|
||||
}
|
||||
return void 0;
|
||||
}
|
||||
function getNewAttachmentImageBlockAttributes(blockAttributes8, attachment) {
|
||||
if (!attachment) {
|
||||
return void 0;
|
||||
}
|
||||
return {
|
||||
...getNewAttachmentSizeAttributes(
|
||||
blockAttributes8.sizeSlug,
|
||||
attachment
|
||||
),
|
||||
...getNewAttachmentLinkAttributes(
|
||||
blockAttributes8.linkDestination,
|
||||
attachment
|
||||
)
|
||||
};
|
||||
}
|
||||
var { openMediaEditorModalKey: openMediaEditorModalKey2 } = unlock(import_block_editor115.privateApis);
|
||||
function getAttachmentFallbackForEmptyBlockMetadata({ alt, caption }) {
|
||||
const attachment = {};
|
||||
@@ -36210,7 +36259,7 @@ ${text}
|
||||
onClose,
|
||||
onUrlChange
|
||||
}) {
|
||||
const { id, url, alt, caption } = attributes;
|
||||
const { id, url, alt, caption, sizeSlug, linkDestination } = attributes;
|
||||
const registry = (0, import_data50.useRegistry)();
|
||||
const openMediaEditorModal = (0, import_data50.useSelect)(
|
||||
(select10) => select10(import_block_editor115.store).getSettings()[openMediaEditorModalKey2],
|
||||
@@ -36220,7 +36269,9 @@ ${text}
|
||||
id,
|
||||
url,
|
||||
alt,
|
||||
caption: caption?.toString()
|
||||
caption: caption?.toString(),
|
||||
sizeSlug,
|
||||
linkDestination
|
||||
});
|
||||
const mediaEditorMetadataBaselineRef = (0, import_element56.useRef)();
|
||||
const mediaEditorMetadataSyncRequestRef = (0, import_element56.useRef)(0);
|
||||
@@ -36229,9 +36280,11 @@ ${text}
|
||||
id,
|
||||
url,
|
||||
alt,
|
||||
caption: caption?.toString()
|
||||
caption: caption?.toString(),
|
||||
sizeSlug,
|
||||
linkDestination
|
||||
};
|
||||
}, [alt, caption, id, url]);
|
||||
}, [alt, caption, id, linkDestination, sizeSlug, url]);
|
||||
const getCachedAttachmentRecord = (0, import_element56.useCallback)(
|
||||
(attachmentId) => registry.select(import_core_data25.store).getEditedEntityRecord(
|
||||
"postType",
|
||||
@@ -36277,7 +36330,8 @@ ${text}
|
||||
const syncRequest = ++mediaEditorMetadataSyncRequestRef.current;
|
||||
const nextAttributes = {};
|
||||
const currentBlockAttributes = blockAttributesRef.current;
|
||||
if (newId !== currentBlockAttributes.id) {
|
||||
const isNewAttachment = newId !== currentBlockAttributes.id;
|
||||
if (isNewAttachment) {
|
||||
nextAttributes.id = newId;
|
||||
nextAttributes.url = newUrl ?? currentBlockAttributes.url;
|
||||
if (nextAttributes.url !== currentBlockAttributes.url) {
|
||||
@@ -36289,19 +36343,37 @@ ${text}
|
||||
url: nextAttributes.url
|
||||
};
|
||||
}
|
||||
if (originalAttachment) {
|
||||
if (originalAttachment || isNewAttachment) {
|
||||
const resolvedAttachment = await resolveFreshAttachmentRecord(newId);
|
||||
if (syncRequest !== mediaEditorMetadataSyncRequestRef.current) {
|
||||
return;
|
||||
}
|
||||
const attachmentRecord = resolvedAttachment ?? getCachedAttachmentRecord(newId);
|
||||
const latestBlockAttributes = blockAttributesRef.current;
|
||||
const resolvedMetadataAttributes = getSyncedImageBlockAttributes(
|
||||
latestBlockAttributes,
|
||||
originalAttachment,
|
||||
resolvedAttachment
|
||||
);
|
||||
if (Object.keys(resolvedMetadataAttributes).length) {
|
||||
Object.assign(nextAttributes, resolvedMetadataAttributes);
|
||||
if (originalAttachment) {
|
||||
const resolvedMetadataAttributes = getSyncedImageBlockAttributes(
|
||||
latestBlockAttributes,
|
||||
originalAttachment,
|
||||
attachmentRecord
|
||||
);
|
||||
if (Object.keys(resolvedMetadataAttributes).length) {
|
||||
Object.assign(
|
||||
nextAttributes,
|
||||
resolvedMetadataAttributes
|
||||
);
|
||||
}
|
||||
}
|
||||
if (isNewAttachment) {
|
||||
const derivedAttributes = getNewAttachmentImageBlockAttributes(
|
||||
latestBlockAttributes,
|
||||
attachmentRecord
|
||||
);
|
||||
if (derivedAttributes) {
|
||||
Object.assign(nextAttributes, derivedAttributes);
|
||||
if (derivedAttributes.url && derivedAttributes.url !== latestBlockAttributes.url) {
|
||||
onUrlChange?.(derivedAttributes.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Object.keys(nextAttributes).length) {
|
||||
@@ -36312,7 +36384,12 @@ ${text}
|
||||
setAttributes(nextAttributes);
|
||||
}
|
||||
},
|
||||
[onUrlChange, resolveFreshAttachmentRecord, setAttributes]
|
||||
[
|
||||
getCachedAttachmentRecord,
|
||||
onUrlChange,
|
||||
resolveFreshAttachmentRecord,
|
||||
setAttributes
|
||||
]
|
||||
);
|
||||
const openImageMediaEditorModal = (0, import_element56.useCallback)(async () => {
|
||||
if (!id || !openMediaEditorModal) {
|
||||
@@ -36563,7 +36640,8 @@ ${text}
|
||||
setOffsetTop(imageElement?.offsetTop ?? 0);
|
||||
}, [imageElement]);
|
||||
const setRefs = (0, import_compose24.useMergeRefs)([setImageElement, setResizeObserved]);
|
||||
const { allowResize = true } = context;
|
||||
const { allowResize = true, imageCrop = false } = context;
|
||||
const isCroppedGalleryImage = imageCrop && parentLayoutType === "flex";
|
||||
const { image, attachmentResolutionError } = (0, import_data51.useSelect)(
|
||||
(select10) => {
|
||||
const imageRecord = id && isSingleSelected ? select10(import_core_data26.store).getEntityRecord(
|
||||
@@ -37287,10 +37365,12 @@ ${text}
|
||||
} else if (width !== void 0 && width !== null) {
|
||||
style2.width = typeof width === "number" ? `${width}px` : width;
|
||||
}
|
||||
if (height === "auto" || height === void 0 || height === null) {
|
||||
if (height === "auto") {
|
||||
style2.height = "auto";
|
||||
} else {
|
||||
} else if (height !== void 0 && height !== null) {
|
||||
style2.height = typeof height === "number" ? `${height}px` : height;
|
||||
} else if (!isCroppedGalleryImage) {
|
||||
style2.height = "auto";
|
||||
}
|
||||
return style2;
|
||||
})(),
|
||||
@@ -40887,20 +40967,14 @@ ${text}
|
||||
var import_blocks45 = __toESM(require_blocks(), 1);
|
||||
function useOutdentListItem() {
|
||||
const registry = (0, import_data57.useRegistry)();
|
||||
const {
|
||||
moveBlocksToPosition,
|
||||
removeBlock,
|
||||
insertBlock,
|
||||
updateBlockListSettings
|
||||
} = (0, import_data57.useDispatch)(import_block_editor128.store);
|
||||
const { moveBlocksToPosition, removeBlock, removeBlocks, insertBlock } = (0, import_data57.useDispatch)(import_block_editor128.store);
|
||||
const {
|
||||
getBlockRootClientId,
|
||||
getBlockName,
|
||||
getBlockOrder,
|
||||
getBlockIndex,
|
||||
getSelectedBlockClientIds,
|
||||
getBlock,
|
||||
getBlockListSettings
|
||||
getBlock
|
||||
} = (0, import_data57.useSelect)(import_block_editor128.store);
|
||||
function getParentListItemId(id) {
|
||||
const listId = getBlockRootClientId(id);
|
||||
@@ -40936,25 +41010,22 @@ ${text}
|
||||
);
|
||||
registry.batch(() => {
|
||||
if (followingListItems.length) {
|
||||
let nestedListId = getBlockOrder(firstClientId)[0];
|
||||
if (!nestedListId) {
|
||||
const nestedListId = getBlockOrder(firstClientId)[0];
|
||||
if (nestedListId) {
|
||||
moveBlocksToPosition(
|
||||
followingListItems,
|
||||
parentListId,
|
||||
nestedListId
|
||||
);
|
||||
} else {
|
||||
const nestedListBlock = (0, import_blocks45.cloneBlock)(
|
||||
getBlock(parentListId),
|
||||
{},
|
||||
[]
|
||||
followingListItems.map((id) => getBlock(id))
|
||||
);
|
||||
nestedListId = nestedListBlock.clientId;
|
||||
removeBlocks(followingListItems, false);
|
||||
insertBlock(nestedListBlock, 0, firstClientId, false);
|
||||
updateBlockListSettings(
|
||||
nestedListId,
|
||||
getBlockListSettings(parentListId)
|
||||
);
|
||||
}
|
||||
moveBlocksToPosition(
|
||||
followingListItems,
|
||||
parentListId,
|
||||
nestedListId
|
||||
);
|
||||
}
|
||||
moveBlocksToPosition(
|
||||
clientIds,
|
||||
@@ -60530,7 +60601,9 @@ ${text}
|
||||
query: {
|
||||
perPage,
|
||||
offset = 0,
|
||||
postType,
|
||||
// Match `build_query_vars_from_query_block()`, which queries posts when
|
||||
// `query` has no post type.
|
||||
postType = "post",
|
||||
order,
|
||||
orderBy,
|
||||
author,
|
||||
@@ -64047,7 +64120,9 @@ ${text}
|
||||
orderBy,
|
||||
author: authorIds,
|
||||
pages,
|
||||
postType,
|
||||
// Match `build_query_vars_from_query_block()`, which queries posts when
|
||||
// `query` has no post type.
|
||||
postType = "post",
|
||||
perPage,
|
||||
offset,
|
||||
sticky,
|
||||
@@ -64135,7 +64210,7 @@ ${text}
|
||||
);
|
||||
const showExcludeCurrentControl = shouldExcludeCurrentPost && isControlAllowed(allowedControls, "excludeCurrent");
|
||||
const postTypeSingularName = (0, import_data125.useSelect)(
|
||||
(select10) => select10(import_core_data77.store).getPostType(postType)?.labels.singular_name,
|
||||
(select10) => select10(import_core_data77.store).getPostType(postType)?.labels?.singular_name,
|
||||
[postType]
|
||||
);
|
||||
const showFiltersPanel = showTaxControl || showAuthorControl || showSearchControl || showParentControl || showFormatControl || showExcludeCurrentControl;
|
||||
@@ -68050,7 +68125,7 @@ ${text}
|
||||
}
|
||||
|
||||
// packages/block-library/build-module/block/deprecated.mjs
|
||||
var isObject = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
|
||||
var isObject2 = (obj) => typeof obj === "object" && !Array.isArray(obj) && obj !== null;
|
||||
var v219 = {
|
||||
attributes: {
|
||||
ref: {
|
||||
@@ -68073,7 +68148,7 @@ ${text}
|
||||
// the likelihood, it doesn't solve it completely.
|
||||
isEligible({ content }) {
|
||||
return !!content && Object.keys(content).every(
|
||||
(contentKey) => content[contentKey].values && isObject(content[contentKey].values)
|
||||
(contentKey) => content[contentKey].values && isObject2(content[contentKey].values)
|
||||
);
|
||||
},
|
||||
/*
|
||||
|
||||
+29
-29
File diff suppressed because one or more lines are too long
Vendored
+24
-3
@@ -11932,7 +11932,6 @@ var wp;
|
||||
core.__experimentalGetCurrentThemeBaseGlobalStyles(),
|
||||
core.__experimentalGetCurrentThemeGlobalStylesVariations(),
|
||||
core.getEntityRecord("root", "__unstableBase"),
|
||||
core.getEntityRecord("root", "site"),
|
||||
core.canUser("read", { kind: "root", name: "site" }),
|
||||
core.canUser("create", { kind: "postType", name: "attachment" }),
|
||||
core.canUser("create", { kind: "postType", name: "page" }),
|
||||
@@ -11970,11 +11969,13 @@ var wp;
|
||||
] : []
|
||||
]);
|
||||
const tasks = [];
|
||||
if (coreSelect.canUser("read", { kind: "root", name: "site" })) {
|
||||
tasks.push(core.getEntityRecord("root", "site"));
|
||||
}
|
||||
const globalStylesId = coreSelect.__experimentalGetCurrentGlobalStylesId();
|
||||
if (globalStylesId) {
|
||||
tasks.push(
|
||||
core.getEntityRecord("root", "globalStyles", globalStylesId),
|
||||
core.canUser("read", {
|
||||
core.canUser("update", {
|
||||
kind: "root",
|
||||
name: "globalStyles",
|
||||
id: globalStylesId
|
||||
@@ -12006,6 +12007,26 @@ var wp;
|
||||
if (tasks.length) {
|
||||
await Promise.all(tasks);
|
||||
}
|
||||
if (globalStylesId) {
|
||||
if (coreSelect.canUser("update", {
|
||||
kind: "root",
|
||||
name: "globalStyles",
|
||||
id: globalStylesId
|
||||
})) {
|
||||
await core.getEntityRecord(
|
||||
"root",
|
||||
"globalStyles",
|
||||
globalStylesId
|
||||
);
|
||||
} else {
|
||||
await core.getEntityRecord(
|
||||
"root",
|
||||
"globalStyles",
|
||||
globalStylesId,
|
||||
{ context: "view" }
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+7
-3
@@ -54928,9 +54928,13 @@ If there's a particular need for this, please submit a feature request at https:
|
||||
const fieldsKey = fieldList ? [...fieldList].sort().join(",") : void 0;
|
||||
return (0, import_data65.useSelect)(
|
||||
(select4) => {
|
||||
return unlock7(select4(import_core_data41.store)).getViewConfig(kind, name2, {
|
||||
fields: fieldsKey
|
||||
});
|
||||
return unlock7(select4(import_core_data41.store)).getViewConfig(
|
||||
kind,
|
||||
name2,
|
||||
fieldsKey ? {
|
||||
fields: fieldsKey
|
||||
} : void 0
|
||||
);
|
||||
},
|
||||
[kind, name2, fieldsKey]
|
||||
);
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3526
-3449
File diff suppressed because it is too large
Load Diff
Vendored
+36
-36
File diff suppressed because one or more lines are too long
Vendored
+3
-11
@@ -1334,7 +1334,7 @@ var wp;
|
||||
return data !== null && typeof data === "object" && Object.getPrototypeOf(data) === Object.prototype;
|
||||
}
|
||||
function flattenFormData(formData, key, data) {
|
||||
if (isPlainObject(data)) {
|
||||
if (Array.isArray(data) || isPlainObject(data)) {
|
||||
for (const [name, value] of Object.entries(data)) {
|
||||
flattenFormData(formData, `${key}[${name}]`, value);
|
||||
}
|
||||
@@ -1361,11 +1361,7 @@ var wp;
|
||||
const data = new FormData();
|
||||
data.append("file", file, file.name || file.type.replace("/", "."));
|
||||
for (const [key, value] of Object.entries(additionalData)) {
|
||||
flattenFormData(
|
||||
data,
|
||||
key,
|
||||
value
|
||||
);
|
||||
flattenFormData(data, key, value);
|
||||
}
|
||||
return transformAttachment(
|
||||
await (0, import_api_fetch.default)({
|
||||
@@ -1587,11 +1583,7 @@ var wp;
|
||||
const data = new FormData();
|
||||
data.append("file", file, file.name || file.type.replace("/", "."));
|
||||
for (const [key, value] of Object.entries(additionalData)) {
|
||||
flattenFormData(
|
||||
data,
|
||||
key,
|
||||
value
|
||||
);
|
||||
flattenFormData(data, key, value);
|
||||
}
|
||||
return (0, import_api_fetch2.default)({
|
||||
path: `/wp/v2/media/${attachmentId}/sideload`,
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
<?php return array('dependencies' => array(), 'version' => '685442d334b2d3e70832');
|
||||
<?php return array('dependencies' => array(), 'version' => '7e33cd8c4128731126e8');
|
||||
+26
-8
@@ -52894,9 +52894,7 @@ var vips_heif_default = bytes2;
|
||||
|
||||
// packages/vips/src/utils.ts
|
||||
function supportsQuality(type) {
|
||||
return ["image/jpeg", "image/png", "image/webp", "image/avif"].includes(
|
||||
type
|
||||
);
|
||||
return ["image/jpeg", "image/webp", "image/avif"].includes(type);
|
||||
}
|
||||
function supportsAnimation(type) {
|
||||
return ["image/webp", "image/gif"].includes(type);
|
||||
@@ -52999,6 +52997,9 @@ async function convertImageFormat(id, buffer, inputType, outputType, options = {
|
||||
if (interlaced && supportsInterlace(outputType)) {
|
||||
saveOptions.interlace = interlaced;
|
||||
}
|
||||
if ("image/png" === outputType && isPaletteImage(image)) {
|
||||
saveOptions.palette = true;
|
||||
}
|
||||
if ("image/avif" === outputType) {
|
||||
saveOptions.effort = 2;
|
||||
const sourceBitdepth = getSourceBitdepth(image);
|
||||
@@ -53090,6 +53091,9 @@ function applyResizeAndCrop(resize, originalWidth, originalHeight, smartCrop, cr
|
||||
setImage.call(result, "gainmap", newGainmap);
|
||||
return result;
|
||||
}
|
||||
function isPaletteImage(image) {
|
||||
return image.getTypeof("palette") !== 0;
|
||||
}
|
||||
function getSourceBitdepth(image) {
|
||||
try {
|
||||
const bitdepth = image.getInt("heif-bitdepth");
|
||||
@@ -53110,7 +53114,13 @@ function resolveSaveBitdepth(sourceBitdepth, maxBitdepth) {
|
||||
}
|
||||
return 8;
|
||||
}
|
||||
function buildSaveOptions(type, quality, bitdepth = 8, stripMeta = true) {
|
||||
function buildSaveOptions({
|
||||
type,
|
||||
quality,
|
||||
bitdepth = 8,
|
||||
stripMeta = true,
|
||||
isPalette = false
|
||||
}) {
|
||||
const saveOptions = {
|
||||
// Strip metadata except ICC color profiles or gainmaps,
|
||||
// matching WordPress core's behavior. The \`image_strip_meta\`
|
||||
@@ -53120,6 +53130,9 @@ function buildSaveOptions(type, quality, bitdepth = 8, stripMeta = true) {
|
||||
if (supportsQuality(type)) {
|
||||
saveOptions.Q = quality * 100;
|
||||
}
|
||||
if ("image/png" === type && isPalette) {
|
||||
saveOptions.palette = true;
|
||||
}
|
||||
if ("image/avif" === type) {
|
||||
saveOptions.effort = 2;
|
||||
if (bitdepth > 8) {
|
||||
@@ -53208,12 +53221,13 @@ async function resizeImage(id, buffer, type, resize, options = {}) {
|
||||
return thumb;
|
||||
}
|
||||
);
|
||||
const saveOptions = buildSaveOptions(
|
||||
const saveOptions = buildSaveOptions({
|
||||
type,
|
||||
quality,
|
||||
saveBitdepth,
|
||||
stripMeta
|
||||
);
|
||||
bitdepth: saveBitdepth,
|
||||
stripMeta,
|
||||
isPalette: isPaletteImage(sourceImage)
|
||||
});
|
||||
const outBuffer = image.writeToBuffer(\`.\${ext}\`, saveOptions);
|
||||
const result = {
|
||||
buffer: outBuffer.buffer,
|
||||
@@ -53271,6 +53285,7 @@ async function rotateImage(id, buffer, type, orientation) {
|
||||
image.kill = true;
|
||||
}
|
||||
};
|
||||
const isPalette = isPaletteImage(image);
|
||||
switch (orientation) {
|
||||
case 2:
|
||||
image = image.flipHor();
|
||||
@@ -53296,6 +53311,9 @@ async function rotateImage(id, buffer, type, orientation) {
|
||||
}
|
||||
image.remove("orientation");
|
||||
const saveOptions = {};
|
||||
if ("image/png" === type && isPalette) {
|
||||
saveOptions.palette = true;
|
||||
}
|
||||
const outBuffer = image.writeToBuffer(\`.\${ext}\`, saveOptions);
|
||||
const result = {
|
||||
buffer: outBuffer.buffer,
|
||||
|
||||
Vendored
+72
-43
@@ -194,7 +194,8 @@ var wp;
|
||||
maxConcurrentUploads: DEFAULT_MAX_CONCURRENT_UPLOADS,
|
||||
maxConcurrentImageProcessing: DEFAULT_MAX_CONCURRENT_IMAGE_PROCESSING,
|
||||
retry: { ...DEFAULT_RETRY_SETTINGS }
|
||||
}
|
||||
},
|
||||
failureCount: 0
|
||||
};
|
||||
function reducer(state = DEFAULT_STATE, action = { type: Type.Unknown }) {
|
||||
switch (action.type) {
|
||||
@@ -235,9 +236,13 @@ var wp;
|
||||
...state,
|
||||
queue: [...state.queue, action.item]
|
||||
};
|
||||
case Type.Cancel:
|
||||
case Type.Cancel: {
|
||||
const cancelled = state.queue.find(
|
||||
(item) => item.id === action.id
|
||||
);
|
||||
return {
|
||||
...state,
|
||||
failureCount: cancelled && !cancelled.parentId ? state.failureCount + 1 : state.failureCount,
|
||||
queue: state.queue.map(
|
||||
(item) => item.id === action.id ? {
|
||||
...item,
|
||||
@@ -245,6 +250,7 @@ var wp;
|
||||
} : item
|
||||
)
|
||||
};
|
||||
}
|
||||
case Type.RetryItem:
|
||||
return {
|
||||
...state,
|
||||
@@ -421,6 +427,7 @@ var wp;
|
||||
getAllItems: () => getAllItems,
|
||||
getBlobUrls: () => getBlobUrls,
|
||||
getFailedItems: () => getFailedItems,
|
||||
getFailureCount: () => getFailureCount,
|
||||
getItem: () => getItem,
|
||||
getItemProgress: () => getItemProgress,
|
||||
getPendingImageProcessing: () => getPendingImageProcessing,
|
||||
@@ -433,6 +440,9 @@ var wp;
|
||||
function getAllItems(state) {
|
||||
return state.queue;
|
||||
}
|
||||
function getFailureCount(state) {
|
||||
return state.failureCount;
|
||||
}
|
||||
function getItem(state, id) {
|
||||
return state.queue.find((item) => item.id === id);
|
||||
}
|
||||
@@ -1569,6 +1579,13 @@ var wp;
|
||||
}
|
||||
function readItemData(buffer, loc, idatOffset) {
|
||||
const baseOffset = loc.constructionMethod === 1 ? idatOffset : 0;
|
||||
for (const ext of loc.extents) {
|
||||
if (baseOffset + ext.offset + ext.length > buffer.byteLength) {
|
||||
throw new Error(
|
||||
"HEIC item data extends past the end of the file"
|
||||
);
|
||||
}
|
||||
}
|
||||
if (loc.extents.length === 1) {
|
||||
const ext = loc.extents[0];
|
||||
const start = baseOffset + ext.offset;
|
||||
@@ -2057,6 +2074,8 @@ var wp;
|
||||
}
|
||||
|
||||
// packages/upload-media/build-module/canvas-utils.mjs
|
||||
var HeicUnsupportedError = class extends Error {
|
||||
};
|
||||
async function canvasConvertToJpeg(file, quality = 0.82) {
|
||||
const baseName = getFileBasename(file.name);
|
||||
try {
|
||||
@@ -2114,51 +2133,57 @@ var wp;
|
||||
}
|
||||
}
|
||||
}
|
||||
let heicData;
|
||||
try {
|
||||
heicData = parseHeic(await file.arrayBuffer());
|
||||
} catch (error) {
|
||||
throw new Error("The HEIC file could not be parsed", {
|
||||
cause: error
|
||||
});
|
||||
}
|
||||
if (typeof VideoDecoder !== "undefined") {
|
||||
let supported = false;
|
||||
try {
|
||||
const heicData = parseHeic(await file.arrayBuffer());
|
||||
const support = await VideoDecoder.isConfigSupported({
|
||||
codec: heicData.codecString
|
||||
});
|
||||
if (support.supported) {
|
||||
const canvas = new OffscreenCanvas(
|
||||
heicData.outputWidth,
|
||||
heicData.outputHeight
|
||||
);
|
||||
const ctx = canvas.getContext("2d");
|
||||
if (!ctx) {
|
||||
throw new Error("Could not get canvas 2d context");
|
||||
}
|
||||
for (const tile of heicData.tiles) {
|
||||
const frame = await decodeHevcFrame(
|
||||
heicData.codecString,
|
||||
heicData.description,
|
||||
heicData.tileWidth,
|
||||
heicData.tileHeight,
|
||||
tile.data
|
||||
);
|
||||
try {
|
||||
ctx.drawImage(frame, tile.x, tile.y);
|
||||
} finally {
|
||||
frame.close();
|
||||
}
|
||||
}
|
||||
const outputCanvas = heicData.rotation !== 0 ? applyRotation(canvas, heicData.rotation) : applyExifOrientation(
|
||||
canvas,
|
||||
heicData.exifOrientation
|
||||
);
|
||||
const jpegBlob = await outputCanvas.convertToBlob({
|
||||
type: "image/jpeg",
|
||||
quality
|
||||
});
|
||||
return new File([jpegBlob], `${baseName}.jpg`, {
|
||||
type: "image/jpeg"
|
||||
});
|
||||
}
|
||||
supported = support.supported === true;
|
||||
} catch {
|
||||
}
|
||||
if (supported) {
|
||||
const canvas = new OffscreenCanvas(
|
||||
heicData.outputWidth,
|
||||
heicData.outputHeight
|
||||
);
|
||||
const ctx = canvas.getContext("2d");
|
||||
if (!ctx) {
|
||||
throw new Error("Could not get canvas 2d context");
|
||||
}
|
||||
for (const tile of heicData.tiles) {
|
||||
const frame = await decodeHevcFrame(
|
||||
heicData.codecString,
|
||||
heicData.description,
|
||||
heicData.tileWidth,
|
||||
heicData.tileHeight,
|
||||
tile.data
|
||||
);
|
||||
try {
|
||||
ctx.drawImage(frame, tile.x, tile.y);
|
||||
} finally {
|
||||
frame.close();
|
||||
}
|
||||
}
|
||||
const outputCanvas = heicData.rotation !== 0 ? applyRotation(canvas, heicData.rotation) : applyExifOrientation(canvas, heicData.exifOrientation);
|
||||
const jpegBlob = await outputCanvas.convertToBlob({
|
||||
type: "image/jpeg",
|
||||
quality
|
||||
});
|
||||
return new File([jpegBlob], `${baseName}.jpg`, {
|
||||
type: "image/jpeg"
|
||||
});
|
||||
}
|
||||
}
|
||||
throw new Error(getHeicUnsupportedMessage());
|
||||
throw new HeicUnsupportedError(getHeicUnsupportedMessage());
|
||||
}
|
||||
function applyRotation(source, rotation) {
|
||||
if (rotation === 0) {
|
||||
@@ -2836,13 +2861,17 @@ var wp;
|
||||
file,
|
||||
settings.imageQuality ?? DEFAULT_OUTPUT_QUALITY
|
||||
);
|
||||
} catch {
|
||||
} catch (error) {
|
||||
const unsupported = error instanceof HeicUnsupportedError;
|
||||
dispatch.cancelItem(
|
||||
id,
|
||||
new UploadError({
|
||||
code: ErrorCode.HEIC_DECODE_ERROR,
|
||||
message: getHeicUnsupportedMessage(),
|
||||
file
|
||||
code: unsupported ? ErrorCode.HEIC_DECODE_ERROR : ErrorCode.IMAGE_TRANSCODING_ERROR,
|
||||
message: unsupported ? getHeicUnsupportedMessage() : (0, import_i18n7.__)(
|
||||
"This HEIC image could not be converted. Try converting it to JPEG before uploading."
|
||||
),
|
||||
file,
|
||||
cause: error instanceof Error ? error : void 0
|
||||
})
|
||||
);
|
||||
return;
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -8,19 +8,29 @@
|
||||
*/
|
||||
(() => {
|
||||
|
||||
const popovers = /** @type {NodeListOf<HTMLSpanElement>} */ ( document.querySelectorAll( '.wp-is-tooltip' ) );
|
||||
const supportsPopover = /** @type {boolean} */ ( Object.prototype.hasOwnProperty.call( HTMLElement.prototype, 'popover' ) );
|
||||
let hidePopover = false;
|
||||
if ( ! supportsPopover ) {
|
||||
hidePopover = true;
|
||||
}
|
||||
|
||||
/** @type {ReturnType<typeof setTimeout>} */
|
||||
let openTimeout;
|
||||
const popovers = /** @type {NodeListOf<HTMLSpanElement>} */ ( document.querySelectorAll( '.wp-is-tooltip' ) );
|
||||
|
||||
popovers.forEach( function( popover ) {
|
||||
const trigger = /** @type {HTMLButtonElement|HTMLAnchorElement|null} */ ( popover.querySelector( '.wp-tooltip__toggle' ) );
|
||||
const panel = /** @type {HTMLSpanElement|null} */ ( popover.querySelector( 'span.wp-tooltip__bubble' ) );
|
||||
if ( hidePopover && panel ) {
|
||||
panel.classList.add( 'hidden' );
|
||||
|
||||
return;
|
||||
}
|
||||
if ( ! trigger || ! panel ) {
|
||||
return;
|
||||
}
|
||||
|
||||
/** @type {ReturnType<typeof setTimeout>} */
|
||||
let openTimeout;
|
||||
|
||||
// Show Tooltip Function (with delay to prevent flickering).
|
||||
const showTooltip = () => {
|
||||
clearTimeout( openTimeout );
|
||||
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
/*! This file is auto-generated */
|
||||
(()=>{var e=document.querySelectorAll(".wp-is-tooltip");let n;e.forEach(function(e){const o=e.querySelector(".wp-tooltip__toggle"),t=e.querySelector("span.wp-tooltip__bubble");var r;o&&t&&(e=()=>{clearTimeout(n),n=setTimeout(()=>{t.matches(":popover-open")||t.showPopover({source:o})},300)},r=()=>{clearTimeout(n),t.matches(":popover-open")&&t.hidePopover()},o.addEventListener("mouseenter",e),o.addEventListener("focus",e),o.addEventListener("mouseleave",r),o.addEventListener("blur",r))})})();
|
||||
(()=>{let e=Object.prototype.hasOwnProperty.call(HTMLElement.prototype,"popover")?!1:!0;document.querySelectorAll(".wp-is-tooltip").forEach(function(o){const t=o.querySelector(".wp-tooltip__toggle"),r=o.querySelector("span.wp-tooltip__bubble");if(e&&r)r.classList.add("hidden");else if(t&&r){let e;var o=()=>{clearTimeout(e),e=setTimeout(()=>{r.matches(":popover-open")||r.showPopover({source:t})},300)},p=()=>{clearTimeout(e),r.matches(":popover-open")&&r.hidePopover()};t.addEventListener("mouseenter",o),t.addEventListener("focus",o),t.addEventListener("mouseleave",p),t.addEventListener("blur",p)}})})();
|
||||
@@ -989,6 +989,7 @@ function _wp_call_all_hook( $args ) {
|
||||
* and no longer returns false, but can still return void for invalid callbacks.
|
||||
* @since 6.9.0 Returns explicit null if an invalid callback is supplied.
|
||||
* @since 7.1.0 Uses spl_object_id() instead of spl_object_hash() for performance.
|
||||
* @since 7.1.1 The ID for an object callback is prefixed so that it is never cast to an integer array key.
|
||||
*
|
||||
* @access private
|
||||
*
|
||||
@@ -998,6 +999,8 @@ function _wp_call_all_hook( $args ) {
|
||||
* @param int $priority Unused. The order in which the functions
|
||||
* associated with a particular action are executed.
|
||||
* @return string|null Unique function ID for usage as array key, or null if it couldn't be determined.
|
||||
*
|
||||
* @phpstan-return non-decimal-int-string|null
|
||||
*/
|
||||
function _wp_filter_build_unique_id( $hook_name, $callback, $priority ): ?string {
|
||||
if ( is_string( $callback ) ) {
|
||||
@@ -1005,7 +1008,12 @@ function _wp_filter_build_unique_id( $hook_name, $callback, $priority ): ?string
|
||||
}
|
||||
|
||||
if ( is_object( $callback ) ) {
|
||||
return (string) spl_object_id( $callback );
|
||||
/*
|
||||
* The prefix keeps the ID from being the decimal representation of an integer. PHP casts such a
|
||||
* string to int when it is used as an array key, which would change the type of the keys in
|
||||
* WP_Hook::$callbacks and break consumers that pass them to string functions.
|
||||
*/
|
||||
return 'spl_object_id:' . spl_object_id( $callback );
|
||||
}
|
||||
|
||||
if ( ! isset( $callback[1] ) || ! is_string( $callback[1] ) ) {
|
||||
|
||||
+64
-56
@@ -5921,63 +5921,71 @@ function wp_transition_post_status( $new_status, $old_status, $post ) {
|
||||
*/
|
||||
do_action( 'transition_post_status', $new_status, $old_status, $post );
|
||||
|
||||
/**
|
||||
* Fires when a post is transitioned from one status to another.
|
||||
*
|
||||
* The dynamic portions of the hook name, `$new_status` and `$old_status`,
|
||||
* refer to the old and new post statuses, respectively.
|
||||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `draft_to_publish`
|
||||
* - `publish_to_trash`
|
||||
* - `pending_to_draft`
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
do_action( "{$old_status}_to_{$new_status}", $post );
|
||||
$new_status_object = get_post_status_object( $new_status );
|
||||
$old_status_valid = get_post_status_object( $old_status ) || 'new' === $old_status;
|
||||
$post_type_object = get_post_type_object( $post->post_type );
|
||||
|
||||
/**
|
||||
* Fires when a post is transitioned from one status to another.
|
||||
*
|
||||
* The dynamic portions of the hook name, `$new_status` and `$post->post_type`,
|
||||
* refer to the new post status and post type, respectively.
|
||||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `draft_post`
|
||||
* - `future_post`
|
||||
* - `pending_post`
|
||||
* - `private_post`
|
||||
* - `publish_post`
|
||||
* - `trash_post`
|
||||
* - `draft_page`
|
||||
* - `future_page`
|
||||
* - `pending_page`
|
||||
* - `private_page`
|
||||
* - `publish_page`
|
||||
* - `trash_page`
|
||||
* - `publish_attachment`
|
||||
* - `trash_attachment`
|
||||
*
|
||||
* Please note: When this action is hooked using a particular post status (like
|
||||
* 'publish', as `publish_{$post->post_type}`), it will fire both when a post is
|
||||
* first transitioned to that status from something else, as well as upon
|
||||
* subsequent post updates (old and new status are both the same).
|
||||
*
|
||||
* Therefore, if you are looking to only fire a callback when a post is first
|
||||
* transitioned to a status, use the {@see 'transition_post_status'} hook instead.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @since 5.9.0 Added `$old_status` parameter.
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param string $old_status Old post status.
|
||||
*/
|
||||
do_action( "{$new_status}_{$post->post_type}", $post->ID, $post, $old_status );
|
||||
if ( $new_status_object && $old_status_valid ) {
|
||||
/**
|
||||
* Fires when a post is transitioned from one status to another.
|
||||
*
|
||||
* The dynamic portions of the hook name, `$new_status` and `$old_status`,
|
||||
* refer to the old and new post statuses, respectively.
|
||||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `draft_to_publish`
|
||||
* - `publish_to_trash`
|
||||
* - `pending_to_draft`
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @param WP_Post $post Post object.
|
||||
*/
|
||||
do_action( "{$old_status}_to_{$new_status}", $post );
|
||||
}
|
||||
|
||||
if ( $new_status_object && $post_type_object ) {
|
||||
/**
|
||||
* Fires when a post is transitioned from one status to another.
|
||||
*
|
||||
* The dynamic portions of the hook name, `$new_status` and `$post->post_type`,
|
||||
* refer to the new post status and post type, respectively.
|
||||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `draft_post`
|
||||
* - `future_post`
|
||||
* - `pending_post`
|
||||
* - `private_post`
|
||||
* - `publish_post`
|
||||
* - `trash_post`
|
||||
* - `draft_page`
|
||||
* - `future_page`
|
||||
* - `pending_page`
|
||||
* - `private_page`
|
||||
* - `publish_page`
|
||||
* - `trash_page`
|
||||
* - `publish_attachment`
|
||||
* - `trash_attachment`
|
||||
*
|
||||
* Please note: When this action is hooked using a particular post status (like
|
||||
* 'publish', as `publish_{$post->post_type}`), it will fire both when a post is
|
||||
* first transitioned to that status from something else, as well as upon
|
||||
* subsequent post updates (old and new status are both the same).
|
||||
*
|
||||
* Therefore, if you are looking to only fire a callback when a post is first
|
||||
* transitioned to a status, use the {@see 'transition_post_status'} hook instead.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @since 5.9.0 Added `$old_status` parameter.
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
* @param WP_Post $post Post object.
|
||||
* @param string $old_status Old post status.
|
||||
*/
|
||||
do_action( "{$new_status}_{$post->post_type}", $post->ID, $post, $old_status );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3453,6 +3453,21 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
$response_request['_fields'] = $request['_fields'];
|
||||
}
|
||||
|
||||
/*
|
||||
* Re-read the post. The 'wp_generate_attachment_metadata' filter above
|
||||
* runs long after $post was fetched, and a callback that rewrites the
|
||||
* post row - an optimizer changing post_mime_type once it has
|
||||
* converted the file, say - would otherwise be missing from this
|
||||
* response. The editor stores the response as its copy of the record
|
||||
* rather than reading the attachment again, so a stale row here is
|
||||
* what it keeps. A callback that deleted the attachment instead leaves
|
||||
* nothing to respond with, so that is reported as the error it is.
|
||||
*/
|
||||
$post = $this->get_post( $attachment_id );
|
||||
if ( is_wp_error( $post ) ) {
|
||||
return $post;
|
||||
}
|
||||
|
||||
return $this->prepare_item_for_response( $post, $response_request );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,12 +560,12 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if ( $is_note && ! empty( $request['post'] ) && ! current_user_can( 'edit_post', (int) $request['post'] ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_create_note',
|
||||
__( 'Sorry, you are not allowed to create notes for this post.' ),
|
||||
array( 'status' => rest_authorization_required_code() )
|
||||
);
|
||||
if ( $is_note && ! empty( $request['post'] ) ) {
|
||||
$target_check = $this->check_target_post_permission( (int) $request['post'], $request, true );
|
||||
|
||||
if ( is_wp_error( $target_check ) ) {
|
||||
return $target_check;
|
||||
}
|
||||
}
|
||||
|
||||
$edit_cap = $is_note ? array( 'edit_post', (int) $request['post'] ) : array( 'moderate_comments' );
|
||||
@@ -586,6 +586,16 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* A note's target post was fully checked by check_target_post_permission()
|
||||
* above. Everything below applies to other comments only: a note is allowed
|
||||
* on a draft and on a post whose discussion is closed, and the rest would
|
||||
* repeat what that check already did.
|
||||
*/
|
||||
if ( $is_note ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$post = get_post( (int) $request['post'] );
|
||||
|
||||
if ( ! $post ) {
|
||||
@@ -596,15 +606,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
if ( $is_note && ! $this->check_post_type_supports_notes( $post->post_type ) ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_not_supported_post_type',
|
||||
__( 'Sorry, this post type does not support notes.' ),
|
||||
array( 'status' => 403 )
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'draft' === $post->post_status && ! $is_note ) {
|
||||
if ( 'draft' === $post->post_status ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_draft_post',
|
||||
__( 'Sorry, you are not allowed to create a comment on this post.' ),
|
||||
@@ -628,7 +630,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! comments_open( $post->ID ) && ! $is_note ) {
|
||||
if ( ! comments_open( $post->ID ) ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_closed',
|
||||
__( 'Sorry, comments are closed for this item.' ),
|
||||
@@ -862,6 +864,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
* Checks if a given REST request has access to update a comment.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @since 7.1.1 Target post permissions are checked when a comment's parent post is changed.
|
||||
*
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return true|WP_Error True if the request has access to update the item, error object otherwise.
|
||||
@@ -880,6 +883,26 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* check_edit_permission() above only establishes that the comment may be
|
||||
* edited where it currently sits, because 'edit_comment' maps to 'edit_post'
|
||||
* on the comment's current parent. When the parent is being changed, the new
|
||||
* parent has to be authorized as well. Without this, a user holding
|
||||
* edit_comment on their own comment or note could reparent it onto any post,
|
||||
* including posts they can neither read nor edit.
|
||||
*/
|
||||
if ( isset( $request['post'] ) && (int) $request['post'] !== (int) $comment->comment_post_ID ) {
|
||||
$target_check = $this->check_target_post_permission(
|
||||
(int) $request['post'],
|
||||
$request,
|
||||
'note' === $comment->comment_type
|
||||
);
|
||||
|
||||
if ( is_wp_error( $target_check ) ) {
|
||||
return $target_check;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2041,6 +2064,106 @@ class WP_REST_Comments_Controller extends WP_REST_Controller {
|
||||
return '' !== $check['comment_content'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that a post can receive a comment or a note from the current user.
|
||||
*
|
||||
* Used when creating a note and when changing the parent post of an existing
|
||||
* comment or note, so that attaching content to a post is authorized the same
|
||||
* way whichever path it arrives by.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*
|
||||
* @param int $post_id Target post ID.
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @param bool $is_note Optional. Whether the comment is a note. Default false.
|
||||
* @return true|WP_Error True if the post can receive the comment, error object otherwise.
|
||||
*/
|
||||
protected function check_target_post_permission( int $post_id, WP_REST_Request $request, bool $is_note = false ) {
|
||||
if ( ! $post_id ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_invalid_post_id',
|
||||
__( 'Sorry, you are not allowed to create this comment without a post.' ),
|
||||
array( 'status' => 403 )
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* Notes are editorial content, so they may only be attached to a post the
|
||||
* user can edit. Any other comment needs either comment moderation rights
|
||||
* or edit access to the post, which is what check_edit_permission() grants
|
||||
* on the post a comment is moving away from. Requiring the same at the
|
||||
* destination means both ends of a move are authorized alike.
|
||||
*/
|
||||
if ( $is_note ) {
|
||||
$can_target_post = current_user_can( 'edit_post', $post_id );
|
||||
} else {
|
||||
$can_target_post = current_user_can( 'moderate_comments' ) || current_user_can( 'edit_post', $post_id );
|
||||
}
|
||||
|
||||
if ( ! $can_target_post ) {
|
||||
if ( $is_note ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_create_note',
|
||||
__( 'Sorry, you are not allowed to create notes for this post.' ),
|
||||
array( 'status' => rest_authorization_required_code() )
|
||||
);
|
||||
}
|
||||
|
||||
return new WP_Error(
|
||||
'rest_cannot_edit',
|
||||
__( 'Sorry, you are not allowed to edit this comment.' ),
|
||||
array( 'status' => rest_authorization_required_code() )
|
||||
);
|
||||
}
|
||||
|
||||
$post = get_post( $post_id );
|
||||
|
||||
if ( ! $post ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_invalid_post_id',
|
||||
__( 'Sorry, you are not allowed to create this comment without a post.' ),
|
||||
array( 'status' => 403 )
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* The remaining rules mirror the create-time checks for notes only. They are
|
||||
* deliberately not applied to other comments, because moderators move comments
|
||||
* onto posts whose discussion has closed and onto drafts today. Enforcing the
|
||||
* create-time rules there would break that without blocking anything the
|
||||
* capability check above already permits.
|
||||
*/
|
||||
if ( ! $is_note ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( ! $this->check_post_type_supports_notes( $post->post_type ) ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_not_supported_post_type',
|
||||
__( 'Sorry, this post type does not support notes.' ),
|
||||
array( 'status' => 403 )
|
||||
);
|
||||
}
|
||||
|
||||
if ( 'trash' === $post->post_status ) {
|
||||
return new WP_Error(
|
||||
'rest_comment_trash_post',
|
||||
__( 'Sorry, you are not allowed to create a comment on this post.' ),
|
||||
array( 'status' => 403 )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! $this->check_read_post_permission( $post, $request ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_read_post',
|
||||
__( 'Sorry, you are not allowed to read the post for this comment.' ),
|
||||
array( 'status' => rest_authorization_required_code() )
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if post type supports notes.
|
||||
*
|
||||
|
||||
@@ -703,7 +703,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts ) ) {
|
||||
if ( ! empty( $request['sticky'] ) && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_assign_sticky',
|
||||
__( 'Sorry, you are not allowed to make posts sticky.' ),
|
||||
@@ -914,7 +914,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
if ( ! empty( $request['sticky'] ) && ! current_user_can( $post_type->cap->edit_others_posts ) && ! current_user_can( $post_type->cap->publish_posts ) ) {
|
||||
if ( isset( $request['sticky'] ) && is_sticky( $post->ID ) !== (bool) $request['sticky'] && ( ! current_user_can( $post_type->cap->edit_others_posts ) || ! current_user_can( $post_type->cap->publish_posts ) ) ) {
|
||||
return new WP_Error(
|
||||
'rest_cannot_assign_sticky',
|
||||
__( 'Sorry, you are not allowed to make posts sticky.' ),
|
||||
|
||||
@@ -157,30 +157,45 @@ class WP_Sitemaps {
|
||||
* Renders sitemap templates based on rewrite rules.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*/
|
||||
public function render_sitemaps() {
|
||||
global $wp_query;
|
||||
/*
|
||||
* Bail early if this isn't a sitemap or stylesheet route.
|
||||
*
|
||||
* This runs on every front-end request, so it comes before any
|
||||
* sanitizing. The raw query vars are tested here, matching
|
||||
* WP::handle_404(), which exempts sitemap requests from its own 404 on
|
||||
* the same basis. Testing the sanitized values instead would let a
|
||||
* request that handle_404() exempted fall through both, leaving it a 200.
|
||||
*/
|
||||
if ( ! get_query_var( 'sitemap' ) && ! get_query_var( 'sitemap-stylesheet' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sitemap = sanitize_text_field( get_query_var( 'sitemap' ) );
|
||||
$object_subtype = sanitize_text_field( get_query_var( 'sitemap-subtype' ) );
|
||||
$stylesheet_type = sanitize_text_field( get_query_var( 'sitemap-stylesheet' ) );
|
||||
$paged = absint( get_query_var( 'paged' ) );
|
||||
|
||||
// Bail early if this isn't a sitemap or stylesheet route.
|
||||
// Force a 404 and bail early if the route did not survive sanitizing.
|
||||
if ( ! ( $sitemap || $stylesheet_type ) ) {
|
||||
$this->send_404();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! $this->sitemaps_enabled() ) {
|
||||
$wp_query->set_404();
|
||||
status_header( 404 );
|
||||
$this->send_404();
|
||||
return;
|
||||
}
|
||||
|
||||
// Render stylesheet if this is stylesheet route.
|
||||
if ( $stylesheet_type ) {
|
||||
// Force a 404 and bail early if the stylesheet type is not recognized.
|
||||
if ( ! in_array( $stylesheet_type, array( 'sitemap', 'index' ), true ) ) {
|
||||
$this->send_404();
|
||||
return;
|
||||
}
|
||||
|
||||
$stylesheet = new WP_Sitemaps_Stylesheet();
|
||||
|
||||
$stylesheet->render_stylesheet( $stylesheet_type );
|
||||
@@ -197,7 +212,9 @@ class WP_Sitemaps {
|
||||
|
||||
$provider = $this->registry->get_provider( $sitemap );
|
||||
|
||||
// Force a 404 and bail early if the requested provider is not registered.
|
||||
if ( ! $provider ) {
|
||||
$this->send_404();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -209,8 +226,7 @@ class WP_Sitemaps {
|
||||
|
||||
// Force a 404 and bail early if no URLs are present.
|
||||
if ( empty( $url_list ) ) {
|
||||
$wp_query->set_404();
|
||||
status_header( 404 );
|
||||
$this->send_404();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,6 +234,26 @@ class WP_Sitemaps {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a 404 for a sitemap route that cannot be served.
|
||||
*
|
||||
* WP::handle_404() exempts sitemap requests, so every sitemap 404 is issued
|
||||
* here instead. That includes the no-cache headers handle_404() sends with
|
||||
* its own 404, so an intermediary does not retain a 404 for a route that
|
||||
* becomes valid once the site has more content.
|
||||
*
|
||||
* @since 7.1.1
|
||||
*
|
||||
* @global WP_Query $wp_query WordPress Query object.
|
||||
*/
|
||||
private function send_404(): void {
|
||||
global $wp_query;
|
||||
|
||||
$wp_query->set_404();
|
||||
status_header( 404 );
|
||||
nocache_headers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirects a URL to the wp-sitemap.xml
|
||||
*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user