Changeset 56474
- Timestamp:
- 08/26/2023 04:47:09 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r56472 r56474 5414 5414 * Marks a function as deprecated and inform when it has been used. 5415 5415 * 5416 * There is a hook {@see 'deprecated_function_run'} that will be called that can be used 5417 * to get the backtrace up to what file and function called the deprecated 5418 * function. 5416 * There is a {@see 'deprecated_function_run'} hook that will be called that can be used 5417 * to get the backtrace up to what file and function called the deprecated function. 5419 5418 * 5420 5419 * The current behavior is to trigger a user error if `WP_DEBUG` is true. … … 5503 5502 * 5504 5503 * Similar to _deprecated_function(), but with different strings. Used to 5505 * remove PHP4 5504 * remove PHP4-style constructors. 5506 5505 * 5507 5506 * The current behavior is to trigger a user error if `WP_DEBUG` is true. 5508 5507 * 5509 * This function is to be used in every PHP4 5508 * This function is to be used in every PHP4-style constructor method that is deprecated. 5510 5509 * 5511 5510 * @since 4.3.0 … … 5605 5604 * 5606 5605 * This function is to be used in the class constructor for every deprecated class. 5607 * See {@see _deprecated_constructor()} for deprecating PHP4 5606 * See {@see _deprecated_constructor()} for deprecating PHP4-style constructors. 5608 5607 * 5609 5608 * @since 6.4.0 … … 5636 5635 if ( WP_DEBUG && apply_filters( 'deprecated_class_trigger_error', true ) ) { 5637 5636 if ( function_exists( '__' ) ) { 5638 if ( ! is_null( $replacement ) ) { 5639 /* translators: 1: PHP class name, 2: version number, 3: alternative clas or function name */ 5640 trigger_error( sprintf( __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $class, $version, $replacement ), E_USER_DEPRECATED ); 5637 if ( $replacement ) { 5638 trigger_error( 5639 sprintf( 5640 /* translators: 1: PHP class name, 2: Version number, 3: Alternative class or function name. */ 5641 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5642 $class, 5643 $version, 5644 $replacement 5645 ), 5646 E_USER_DEPRECATED 5647 ); 5641 5648 } else { 5642 /* translators: 1: PHP class name, 2: version number */ 5643 trigger_error( sprintf( __( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $class, $version ), E_USER_DEPRECATED ); 5649 trigger_error( 5650 sprintf( 5651 /* translators: 1: PHP class name, 2: Version number. */ 5652 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5653 $class, 5654 $version 5655 ), 5656 E_USER_DEPRECATED 5657 ); 5644 5658 } 5645 5659 } else { 5646 if ( ! is_null( $replacement ) ) { 5647 trigger_error( sprintf( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $class, $version, $replacement ), E_USER_DEPRECATED ); 5660 if ( $replacement ) { 5661 trigger_error( 5662 sprintf( 5663 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5664 $class, 5665 $version, 5666 $replacement 5667 ), 5668 E_USER_DEPRECATED 5669 ); 5648 5670 } else { 5649 trigger_error( sprintf( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $class, $version ), E_USER_DEPRECATED ); 5671 trigger_error( 5672 sprintf( 5673 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5674 $class, 5675 $version 5676 ), 5677 E_USER_DEPRECATED 5678 ); 5650 5679 } 5651 5680 } … … 5656 5685 * Marks a file as deprecated and inform when it has been used. 5657 5686 * 5658 * There is a hook {@see 'deprecated_file_included'} that will be called that can be used 5659 * to get the backtrace up to what file and function included the deprecated 5660 * file. 5687 * There is a {@see 'deprecated_file_included'} hook that will be called that can be used 5688 * to get the backtrace up to what file and function included the deprecated file. 5661 5689 * 5662 5690 * The current behavior is to trigger a user error if `WP_DEBUG` is true. … … 5751 5779 * Before this function is called, the argument must be checked for whether it was 5752 5780 * used by comparing it to its default value or evaluating whether it is empty. 5781 * 5753 5782 * For example: 5754 5783 * … … 5757 5786 * } 5758 5787 * 5759 * There is a hook deprecated_argument_run that will be called that can be used 5760 * to get the backtrace up to what file and function used the deprecated 5761 * argument. 5788 * There is a {@see 'deprecated_argument_run'} hook that will be called that can be used 5789 * to get the backtrace up to what file and function used the deprecated argument. 5762 5790 * 5763 5791 * The current behavior is to trigger a user error if WP_DEBUG is true. … … 5912 5940 * Marks something as being incorrectly called. 5913 5941 * 5914 * There is a hook {@see 'doing_it_wrong_run'} that will be called that can be used 5915 * to get the backtrace up to what file and function called the deprecated 5916 * function. 5942 * There is a {@see 'doing_it_wrong_run'} hook that will be called that can be used 5943 * to get the backtrace up to what file and function called the deprecated function. 5917 5944 * 5918 5945 * The current behavior is to trigger a user error if `WP_DEBUG` is true.
Note: See TracChangeset
for help on using the changeset viewer.