summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/misc.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:30 +0000
commitfa9a33d818470a5796f0ff8797f98b510ed8de18 (patch)
treebde6a1eede376f9b5df5898ce812330152984d8e /wp-admin/includes/misc.php
parentReleasing progress-linux version 6.4.3+dfsg1-1~progress7.99u1. (diff)
downloadwordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.tar.xz
wordpress-fa9a33d818470a5796f0ff8797f98b510ed8de18.zip
Merging upstream version 6.5+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/includes/misc.php')
-rw-r--r--wp-admin/includes/misc.php63
1 files changed, 39 insertions, 24 deletions
diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php
index 0902820..f950821 100644
--- a/wp-admin/includes/misc.php
+++ b/wp-admin/includes/misc.php
@@ -39,11 +39,12 @@ function got_mod_rewrite() {
* @since 3.7.0
*
* @global bool $is_nginx
+ * @global bool $is_caddy
*
* @return bool Whether the server supports URL rewriting.
*/
function got_url_rewrite() {
- $got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || iis7_supports_permalinks() );
+ $got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || $GLOBALS['is_caddy'] || iis7_supports_permalinks() );
/**
* Filters whether URL rewriting is available.
@@ -1038,17 +1039,15 @@ function admin_color_scheme_picker( $user_id ) {
<input type="hidden" class="css_url" value="<?php echo esc_url( $color_info->url ); ?>" />
<input type="hidden" class="icon_colors" value="<?php echo esc_attr( wp_json_encode( array( 'icons' => $color_info->icon_colors ) ) ); ?>" />
<label for="admin_color_<?php echo esc_attr( $color ); ?>"><?php echo esc_html( $color_info->name ); ?></label>
- <table class="color-palette">
- <tr>
- <?php
- foreach ( $color_info->colors as $html_color ) {
- ?>
- <td style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</td>
- <?php
- }
+ <div class="color-palette">
+ <?php
+ foreach ( $color_info->colors as $html_color ) {
?>
- </tr>
- </table>
+ <div class="color-palette-shade" style="background-color: <?php echo esc_attr( $html_color ); ?>">&nbsp;</div>
+ <?php
+ }
+ ?>
+ </div>
</div>
<?php
@@ -1398,6 +1397,15 @@ function wp_admin_canonical_url() {
// Ensure we're using an absolute URL.
$current_url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
$filtered_url = remove_query_arg( $removable_query_args, $current_url );
+
+ /**
+ * Filters the admin canonical url value.
+ *
+ * @since 6.5.0
+ *
+ * @param string $filtered_url The admin canonical url value.
+ */
+ $filtered_url = apply_filters( 'wp_admin_canonical_url', $filtered_url );
?>
<link id="wp-admin-canonical" rel="canonical" href="<?php echo esc_url( $filtered_url ); ?>" />
<script>
@@ -1499,11 +1507,11 @@ All at ###SITENAME###
* Filters the text of the email sent when a change of site admin email address is attempted.
*
* The following strings have a special meaning and will get replaced dynamically:
- * ###USERNAME### The current user's username.
- * ###ADMIN_URL### The link to click on to confirm the email change.
- * ###EMAIL### The proposed new site admin email address.
- * ###SITENAME### The name of the site.
- * ###SITEURL### The URL to the site.
+ * - ###USERNAME### The current user's username.
+ * - ###ADMIN_URL### The link to click on to confirm the email change.
+ * - ###EMAIL### The proposed new site admin email address.
+ * - ###SITENAME### The name of the site.
+ * - ###SITEURL### The URL to the site.
*
* @since MU (3.0.0)
* @since 4.9.0 This filter is no longer Multisite specific.
@@ -1531,16 +1539,23 @@ All at ###SITENAME###
$site_title = parse_url( home_url(), PHP_URL_HOST );
}
- wp_mail(
- $value,
- sprintf(
- /* translators: New admin email address notification email subject. %s: Site title. */
- __( '[%s] New Admin Email Address' ),
- $site_title
- ),
- $content
+ $subject = sprintf(
+ /* translators: New admin email address notification email subject. %s: Site title. */
+ __( '[%s] New Admin Email Address' ),
+ $site_title
);
+ /**
+ * Filters the subject of the email sent when a change of site admin email address is attempted.
+ *
+ * @since 6.5.0
+ *
+ * @param string $subject Subject of the email.
+ */
+ $subject = apply_filters( 'new_admin_email_subject', $subject );
+
+ wp_mail( $value, $subject, $content );
+
if ( $switched_locale ) {
restore_previous_locale();
}