Ticket #49060: 49060.2.diff
File 49060.2.diff, 2.1 KB (added by , 5 years ago) |
---|
-
src/wp-includes/functions.php
3285 3285 * an integer to be used as the response code. 3286 3286 * @since 5.1.0 The `$link_url`, `$link_text`, and `$exit` arguments were added. 3287 3287 * @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. 3288 3290 * 3289 3291 * @global WP_Query $wp_query WordPress Query object. 3290 3292 * … … 3305 3307 * @type string $link_text A label for the link to include. Only works in combination with $link_url. 3306 3308 * Default empty string. 3307 3309 * @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'. 3310 3312 * Default is the value of is_rtl(). 3311 3313 * @type string $charset Character set of the HTML output. Default 'utf-8'. 3312 3314 * @type string $code Error code to use. Default is 'wp_die', or the main error code if $message … … 3442 3444 } 3443 3445 3444 3446 $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 ) { 3446 3454 $dir_attr = get_language_attributes(); 3447 } else {3448 $dir_attr = "dir='$text_direction'";3449 3455 } 3450 3456 ?> 3451 3457 <!DOCTYPE html>