Changeset 48327
- Timestamp:
- 07/05/2020 09:07:48 PM (4 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r48319 r48327 4701 4701 * @param string $function The function that was called. 4702 4702 * @param string $version The version of WordPress that deprecated the function. 4703 * @param string $replacement Optional. The function that should have been called. Default null.4704 */ 4705 function _deprecated_function( $function, $version, $replacement = null) {4703 * @param string $replacement Optional. The function that should have been called. Default empty. 4704 */ 4705 function _deprecated_function( $function, $version, $replacement = '' ) { 4706 4706 4707 4707 /** … … 4725 4725 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 4726 4726 if ( function_exists( '__' ) ) { 4727 if ( ! is_null( $replacement )) {4727 if ( $replacement ) { 4728 4728 trigger_error( 4729 4729 sprintf( … … 4748 4748 } 4749 4749 } else { 4750 if ( ! is_null( $replacement )) {4750 if ( $replacement ) { 4751 4751 trigger_error( 4752 4752 sprintf( … … 4817 4817 if ( WP_DEBUG && apply_filters( 'deprecated_constructor_trigger_error', true ) ) { 4818 4818 if ( function_exists( '__' ) ) { 4819 if ( ! empty( $parent_class )) {4819 if ( $parent_class ) { 4820 4820 trigger_error( 4821 4821 sprintf( … … 4842 4842 } 4843 4843 } else { 4844 if ( ! empty( $parent_class )) {4844 if ( $parent_class ) { 4845 4845 trigger_error( 4846 4846 sprintf( … … 4887 4887 * @param string $version The version of WordPress that deprecated the file. 4888 4888 * @param string $replacement Optional. The file that should have been included based on ABSPATH. 4889 * Default null.4889 * Default empty. 4890 4890 * @param string $message Optional. A message regarding the change. Default empty. 4891 4891 */ 4892 function _deprecated_file( $file, $version, $replacement = null, $message = '' ) {4892 function _deprecated_file( $file, $version, $replacement = '', $message = '' ) { 4893 4893 4894 4894 /** … … 4915 4915 4916 4916 if ( function_exists( '__' ) ) { 4917 if ( ! is_null( $replacement )) {4917 if ( $replacement ) { 4918 4918 trigger_error( 4919 4919 sprintf( … … 4938 4938 } 4939 4939 } else { 4940 if ( ! is_null( $replacement )) {4940 if ( $replacement ) { 4941 4941 trigger_error( 4942 4942 sprintf( … … 4985 4985 * @param string $function The function that was called. 4986 4986 * @param string $version The version of WordPress that deprecated the argument used. 4987 * @param string $message Optional. A message regarding the change. Default null.4988 */ 4989 function _deprecated_argument( $function, $version, $message = null) {4987 * @param string $message Optional. A message regarding the change. Default empty. 4988 */ 4989 function _deprecated_argument( $function, $version, $message = '' ) { 4990 4990 4991 4991 /** … … 5009 5009 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 5010 5010 if ( function_exists( '__' ) ) { 5011 if ( ! is_null( $message )) {5011 if ( $message ) { 5012 5012 trigger_error( 5013 5013 sprintf( … … 5032 5032 } 5033 5033 } else { 5034 if ( ! is_null( $message )) {5034 if ( $message ) { 5035 5035 trigger_error( 5036 5036 sprintf( … … 5073 5073 * @param string $hook The hook that was used. 5074 5074 * @param string $version The version of WordPress that deprecated the hook. 5075 * @param string $replacement Optional. The hook that should have been used. Default null.5076 * @param string $message Optional. A message regarding the change. Default null.5077 */ 5078 function _deprecated_hook( $hook, $version, $replacement = null, $message = null) {5075 * @param string $replacement Optional. The hook that should have been used. Default empty. 5076 * @param string $message Optional. A message regarding the change. Default empty. 5077 */ 5078 function _deprecated_hook( $hook, $version, $replacement = '', $message = '' ) { 5079 5079 /** 5080 5080 * Fires when a deprecated hook is called. … … 5100 5100 $message = empty( $message ) ? '' : ' ' . $message; 5101 5101 5102 if ( ! is_null( $replacement )) {5102 if ( $replacement ) { 5103 5103 trigger_error( 5104 5104 sprintf( … … 5167 5167 if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true, $function, $message, $version ) ) { 5168 5168 if ( function_exists( '__' ) ) { 5169 if ( is_null( $version ) ) { 5170 $version = ''; 5171 } else { 5169 if ( $version ) { 5172 5170 /* translators: %s: Version number. */ 5173 5171 $version = sprintf( __( '(This message was added in version %s.)' ), $version ); … … 5191 5189 ); 5192 5190 } else { 5193 if ( is_null( $version ) ) { 5194 $version = ''; 5195 } else { 5191 if ( $version ) { 5196 5192 $version = sprintf( '(This message was added in version %s.)', $version ); 5197 5193 } -
trunk/src/wp-includes/plugin.php
r48109 r48327 621 621 * @param array $args Array of additional function arguments to be passed to apply_filters(). 622 622 * @param string $version The version of WordPress that deprecated the hook. 623 * @param string $replacement Optional. The hook that should have been used. Default null.624 * @param string $message Optional. A message regarding the change. Default null.625 */ 626 function apply_filters_deprecated( $tag, $args, $version, $replacement = null, $message = null) {623 * @param string $replacement Optional. The hook that should have been used. Default empty. 624 * @param string $message Optional. A message regarding the change. Default empty. 625 */ 626 function apply_filters_deprecated( $tag, $args, $version, $replacement = '', $message = '' ) { 627 627 if ( ! has_filter( $tag ) ) { 628 628 return $args[0]; … … 648 648 * @param array $args Array of additional function arguments to be passed to do_action(). 649 649 * @param string $version The version of WordPress that deprecated the hook. 650 * @param string $replacement Optional. The hook that should have been used. Default null.651 * @param string $message Optional. A message regarding the change. Default null.652 */ 653 function do_action_deprecated( $tag, $args, $version, $replacement = null, $message = null) {650 * @param string $replacement Optional. The hook that should have been used. Default empty. 651 * @param string $message Optional. A message regarding the change. Default empty. 652 */ 653 function do_action_deprecated( $tag, $args, $version, $replacement = '', $message = '' ) { 654 654 if ( ! has_action( $tag ) ) { 655 655 return;
Note: See TracChangeset
for help on using the changeset viewer.