WordPress.org

Make WordPress Core

Ticket #49060: 49060.2.diff

File 49060.2.diff, 2.1 KB (added by SergeyBiryukov, 2 months ago)
  • src/wp-includes/functions.php

     
    32853285 *              an integer to be used as the response code.
    32863286 * @since 5.1.0 The `$link_url`, `$link_text`, and `$exit` arguments were added.
    32873287 * @since 5.3.0 The `$charset` argument was added.
     3288 * @since 5.5.0 The `$text_direction` argument has a priority over get_language_attributes()
     3289 *              in the default handler.
    32883290 *
    32893291 * @global WP_Query $wp_query WordPress Query object.
    32903292 *
     
    33053307 *     @type string $link_text      A label for the link to include. Only works in combination with $link_url.
    33063308 *                                  Default empty string.
    33073309 *     @type bool   $back_link      Whether to include a link to go back. Default false.
    3308  *     @type string $text_direction The text direction. This is only useful internally, when WordPress
    3309  *                                  is still loading and the site's locale is not set up yet. Accepts 'rtl'.
     3310 *     @type string $text_direction The text direction. This is only useful internally, when WordPress is still
     3311 *                                  loading and the site's locale is not set up yet. Accepts 'rtl' and 'ltr'.
    33103312 *                                  Default is the value of is_rtl().
    33113313 *     @type string $charset        Character set of the HTML output. Default 'utf-8'.
    33123314 *     @type string $code           Error code to use. Default is 'wp_die', or the main error code if $message
     
    34423444                }
    34433445
    34443446                $text_direction = $parsed_args['text_direction'];
    3445                 if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) {
     3447                $dir_attr       = "dir='$text_direction'";
     3448
     3449                // If `text_direction` was not explicitly passed,
     3450                // use get_language_attributes() if available.
     3451                if ( empty( $args['text_direction'] )
     3452                        && function_exists( 'language_attributes' ) && function_exists( 'is_rtl' )
     3453                ) {
    34463454                        $dir_attr = get_language_attributes();
    3447                 } else {
    3448                         $dir_attr = "dir='$text_direction'";
    34493455                }
    34503456                ?>
    34513457<!DOCTYPE html>