Changeset 44935 for trunk/src/wp-includes/functions.php
- Timestamp:
- 03/19/2019 04:53:46 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r44921 r44935 6804 6804 * 6805 6805 * @since 5.1.0 6806 */ 6807 function wp_update_php_annotation() { 6806 * @since 5.2.0 Added the `$before` and `$after` parameters. 6807 * 6808 * @param string $before Markup to output before the annotation. Default `<p class="description">`. 6809 * @param string $after Markup to output after the annotation. Default `</p>`. 6810 */ 6811 function wp_update_php_annotation( $before = '<p class="description">', $after = '</p>' ) { 6812 $annotation = wp_get_update_php_annotation(); 6813 6814 echo $before . $annotation . $after; 6815 } 6816 6817 /** 6818 * Returns the default annotation for the web hosting altering the "Update PHP" page URL. 6819 * 6820 * This function is to be used after {@see wp_get_update_php_url()} to return a consistent 6821 * annotation if the web host has altered the default "Update PHP" page URL. 6822 * 6823 * @since 5.2.0 6824 * 6825 * @return string $message Update PHP page annotation. An empty string if no custom URLs are provided. 6826 */ 6827 function wp_get_update_php_annotation() { 6808 6828 $update_url = wp_get_update_php_url(); 6809 6829 $default_url = wp_get_default_update_php_url(); 6810 6830 6811 6831 if ( $update_url === $default_url ) { 6812 return; 6813 } 6814 6815 echo '<p class="description">'; 6816 printf( 6832 return ''; 6833 } 6834 6835 $annotation = sprintf( 6817 6836 /* translators: %s: default Update PHP page URL */ 6818 6837 __( 'This resource is provided by your web host, and is specific to your site. For more information, <a href="%s" target="_blank">see the official WordPress documentation</a>.' ), 6819 6838 esc_url( $default_url ) 6820 6839 ); 6821 echo'</p>'; 6840 6841 return $annotation; 6822 6842 } 6823 6843
Note: See TracChangeset
for help on using the changeset viewer.