diff options
Diffstat (limited to 'wp-admin/includes/misc.php')
-rw-r--r-- | wp-admin/includes/misc.php | 63 |
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 ); ?>"> </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 ); ?>"> </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(); } |