Changeset 44624 for trunk/src/wp-includes/functions.php
- Timestamp:
- 01/16/2019 03:20:04 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r44590 r44624 2934 2934 * @since 4.1.0 The `$title` and `$args` parameters were changed to optionally accept 2935 2935 * an integer to be used as the response code. 2936 * @since 5.1.0 The `$link_url` and `$link_text` arguments were added. 2936 2937 * 2937 2938 * @param string|WP_Error $message Optional. Error message. If this is a WP_Error object, … … 2947 2948 * 2948 2949 * @type int $response The HTTP response code. Default 200 for Ajax requests, 500 otherwise. 2950 * @type string $link_url A URL to include a link to. Only works in combination with $link_text. 2951 * Default empty string. 2952 * @type string $link_text A label for the link to include. Only works in combination with $link_url. 2953 * Default empty string. 2949 2954 * @type bool $back_link Whether to include a link to go back. Default false. 2950 2955 * @type string $text_direction The text direction. This is only useful internally, when WordPress … … 3034 3039 } elseif ( is_string( $message ) ) { 3035 3040 $message = "<p>$message</p>"; 3041 } 3042 3043 if ( ! empty( $r['link_url'] ) && ! empty( $r['link_text'] ) ) { 3044 $link_url = $r['link_url']; 3045 if ( function_exists( 'esc_url' ) ) { 3046 $link_url = esc_url( $link_url ); 3047 } 3048 $link_text = $r['link_text']; 3049 $message .= "\n<p><a href='{$link_url}'>{$link_text}</a></p>"; 3036 3050 } 3037 3051
Note: See TracChangeset
for help on using the changeset viewer.