Changeset 56705
- Timestamp:
- 09/26/2023 11:49:57 AM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r56687 r56705 5469 5469 if ( function_exists( '__' ) ) { 5470 5470 if ( $replacement ) { 5471 trigger_error( 5472 sprintf( 5473 /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */ 5474 __( 'Function %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5475 $function_name, 5476 $version, 5477 $replacement 5478 ), 5479 E_USER_DEPRECATED 5471 $message = sprintf( 5472 /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */ 5473 __( 'Function %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5474 $function_name, 5475 $version, 5476 $replacement 5480 5477 ); 5481 5478 } else { 5482 trigger_error( 5483 sprintf( 5484 /* translators: 1: PHP function name, 2: Version number. */ 5485 __( 'Function %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5486 $function_name, 5487 $version 5488 ), 5489 E_USER_DEPRECATED 5479 $message = sprintf( 5480 /* translators: 1: PHP function name, 2: Version number. */ 5481 __( 'Function %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5482 $function_name, 5483 $version 5490 5484 ); 5491 5485 } 5492 5486 } else { 5493 5487 if ( $replacement ) { 5494 trigger_error( 5495 sprintf( 5496 'Function %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5497 $function_name, 5498 $version, 5499 $replacement 5500 ), 5501 E_USER_DEPRECATED 5488 $message = sprintf( 5489 'Function %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5490 $function_name, 5491 $version, 5492 $replacement 5502 5493 ); 5503 5494 } else { 5504 trigger_error( 5505 sprintf( 5506 'Function %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5507 $function_name, 5508 $version 5509 ), 5510 E_USER_DEPRECATED 5495 $message = sprintf( 5496 'Function %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5497 $function_name, 5498 $version 5511 5499 ); 5512 5500 } 5513 5501 } 5502 5503 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5514 5504 } 5515 5505 } … … 5561 5551 if ( function_exists( '__' ) ) { 5562 5552 if ( $parent_class ) { 5563 trigger_error( 5564 sprintf( 5565 /* translators: 1: PHP class name, 2: PHP parent class name, 3: Version number, 4: __construct() method. */ 5566 __( 'The called constructor method for %1$s class in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ), 5567 $class_name, 5568 $parent_class, 5569 $version, 5570 '<code>__construct()</code>' 5571 ), 5572 E_USER_DEPRECATED 5553 $message = sprintf( 5554 /* translators: 1: PHP class name, 2: PHP parent class name, 3: Version number, 4: __construct() method. */ 5555 __( 'The called constructor method for %1$s class in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ), 5556 $class_name, 5557 $parent_class, 5558 $version, 5559 '<code>__construct()</code>' 5573 5560 ); 5574 5561 } else { 5575 trigger_error( 5576 sprintf( 5577 /* translators: 1: PHP class name, 2: Version number, 3: __construct() method. */ 5578 __( 'The called constructor method for %1$s class is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5579 $class_name, 5580 $version, 5581 '<code>__construct()</code>' 5582 ), 5583 E_USER_DEPRECATED 5562 $message = sprintf( 5563 /* translators: 1: PHP class name, 2: Version number, 3: __construct() method. */ 5564 __( 'The called constructor method for %1$s class is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5565 $class_name, 5566 $version, 5567 '<code>__construct()</code>' 5584 5568 ); 5585 5569 } 5586 5570 } else { 5587 5571 if ( $parent_class ) { 5588 trigger_error( 5589 sprintf( 5590 'The called constructor method for %1$s class in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.', 5591 $class_name, 5592 $parent_class, 5593 $version, 5594 '<code>__construct()</code>' 5595 ), 5596 E_USER_DEPRECATED 5572 $message = sprintf( 5573 'The called constructor method for %1$s class in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.', 5574 $class_name, 5575 $parent_class, 5576 $version, 5577 '<code>__construct()</code>' 5597 5578 ); 5598 5579 } else { 5599 trigger_error( 5600 sprintf( 5601 'The called constructor method for %1$s class is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5602 $class_name, 5603 $version, 5604 '<code>__construct()</code>' 5605 ), 5606 E_USER_DEPRECATED 5580 $message = sprintf( 5581 'The called constructor method for %1$s class is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5582 $class_name, 5583 $version, 5584 '<code>__construct()</code>' 5607 5585 ); 5608 5586 } 5609 5587 } 5588 5589 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5610 5590 } 5611 5591 } … … 5652 5632 if ( function_exists( '__' ) ) { 5653 5633 if ( $replacement ) { 5654 trigger_error( 5655 sprintf( 5656 /* translators: 1: PHP class name, 2: Version number, 3: Alternative class or function name. */ 5657 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5658 $class_name, 5659 $version, 5660 $replacement 5661 ), 5662 E_USER_DEPRECATED 5634 $message = sprintf( 5635 /* translators: 1: PHP class name, 2: Version number, 3: Alternative class or function name. */ 5636 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5637 $class_name, 5638 $version, 5639 $replacement 5663 5640 ); 5664 5641 } else { 5665 trigger_error( 5666 sprintf( 5667 /* translators: 1: PHP class name, 2: Version number. */ 5668 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5669 $class_name, 5670 $version 5671 ), 5672 E_USER_DEPRECATED 5642 $message = sprintf( 5643 /* translators: 1: PHP class name, 2: Version number. */ 5644 __( 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5645 $class_name, 5646 $version 5673 5647 ); 5674 5648 } 5675 5649 } else { 5676 5650 if ( $replacement ) { 5677 trigger_error( 5678 sprintf( 5679 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5680 $class_name, 5681 $version, 5682 $replacement 5683 ), 5684 E_USER_DEPRECATED 5651 $message = sprintf( 5652 'Class %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5653 $class_name, 5654 $version, 5655 $replacement 5685 5656 ); 5686 5657 } else { 5687 trigger_error( 5688 sprintf( 5689 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5690 $class_name, 5691 $version 5692 ), 5693 E_USER_DEPRECATED 5658 $message = sprintf( 5659 'Class %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5660 $class_name, 5661 $version 5694 5662 ); 5695 5663 } 5696 5664 } 5665 5666 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5697 5667 } 5698 5668 } … … 5744 5714 if ( function_exists( '__' ) ) { 5745 5715 if ( $replacement ) { 5746 trigger_error( 5747 sprintf( 5748 /* translators: 1: PHP file name, 2: Version number, 3: Alternative file name. */ 5749 __( 'File %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5750 $file, 5751 $version, 5752 $replacement 5753 ) . $message, 5754 E_USER_DEPRECATED 5755 ); 5716 $message = sprintf( 5717 /* translators: 1: PHP file name, 2: Version number, 3: Alternative file name. */ 5718 __( 'File %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5719 $file, 5720 $version, 5721 $replacement 5722 ) . $message; 5756 5723 } else { 5757 trigger_error( 5758 sprintf( 5759 /* translators: 1: PHP file name, 2: Version number. */ 5760 __( 'File %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5761 $file, 5762 $version 5763 ) . $message, 5764 E_USER_DEPRECATED 5765 ); 5724 $message = sprintf( 5725 /* translators: 1: PHP file name, 2: Version number. */ 5726 __( 'File %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5727 $file, 5728 $version 5729 ) . $message; 5766 5730 } 5767 5731 } else { 5768 5732 if ( $replacement ) { 5769 trigger_error( 5770 sprintf( 5771 'File %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5772 $file, 5773 $version, 5774 $replacement 5775 ) . $message, 5776 E_USER_DEPRECATED 5733 $message = sprintf( 5734 'File %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 5735 $file, 5736 $version, 5737 $replacement 5777 5738 ); 5778 5739 } else { 5779 trigger_error( 5780 sprintf( 5781 'File %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5782 $file, 5783 $version 5784 ) . $message, 5785 E_USER_DEPRECATED 5786 ); 5740 $message = sprintf( 5741 'File %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 5742 $file, 5743 $version 5744 ) . $message; 5787 5745 } 5788 5746 } 5747 5748 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5789 5749 } 5790 5750 } … … 5838 5798 if ( function_exists( '__' ) ) { 5839 5799 if ( $message ) { 5840 trigger_error( 5841 sprintf( 5842 /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */ 5843 __( 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), 5844 $function_name, 5845 $version, 5846 $message 5847 ), 5848 E_USER_DEPRECATED 5800 $message = sprintf( 5801 /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */ 5802 __( 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), 5803 $function_name, 5804 $version, 5805 $message 5849 5806 ); 5850 5807 } else { 5851 trigger_error( 5852 sprintf( 5853 /* translators: 1: PHP function name, 2: Version number. */ 5854 __( 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5855 $function_name, 5856 $version 5857 ), 5858 E_USER_DEPRECATED 5808 $message = sprintf( 5809 /* translators: 1: PHP function name, 2: Version number. */ 5810 __( 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5811 $function_name, 5812 $version 5859 5813 ); 5860 5814 } 5861 5815 } else { 5862 5816 if ( $message ) { 5863 trigger_error( 5864 sprintf( 5865 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', 5866 $function_name, 5867 $version, 5868 $message 5869 ), 5870 E_USER_DEPRECATED 5817 $message = sprintf( 5818 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', 5819 $function_name, 5820 $version, 5821 $message 5871 5822 ); 5872 5823 } else { 5873 trigger_error( 5874 sprintf( 5875 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', 5876 $function_name, 5877 $version 5878 ), 5879 E_USER_DEPRECATED 5824 $message = sprintf( 5825 'Function %1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', 5826 $function_name, 5827 $version 5880 5828 ); 5881 5829 } 5882 5830 } 5831 5832 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5883 5833 } 5884 5834 } … … 5929 5879 5930 5880 if ( $replacement ) { 5931 trigger_error( 5932 sprintf( 5933 /* translators: 1: WordPress hook name, 2: Version number, 3: Alternative hook name. */ 5934 __( 'Hook %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5935 $hook, 5936 $version, 5937 $replacement 5938 ) . $message, 5939 E_USER_DEPRECATED 5940 ); 5881 $message = sprintf( 5882 /* translators: 1: WordPress hook name, 2: Version number, 3: Alternative hook name. */ 5883 __( 'Hook %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 5884 $hook, 5885 $version, 5886 $replacement 5887 ) . $message; 5941 5888 } else { 5942 trigger_error( 5943 sprintf( 5944 /* translators: 1: WordPress hook name, 2: Version number. */ 5945 __( 'Hook %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5946 $hook, 5947 $version 5948 ) . $message, 5949 E_USER_DEPRECATED 5950 ); 5951 } 5889 $message = sprintf( 5890 /* translators: 1: WordPress hook name, 2: Version number. */ 5891 __( 'Hook %1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 5892 $hook, 5893 $version 5894 ) . $message; 5895 } 5896 5897 wp_trigger_error( '', $message, E_USER_DEPRECATED ); 5952 5898 } 5953 5899 } … … 6005 5951 ); 6006 5952 6007 trigger_error( 6008 sprintf( 6009 /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: WordPress version number. */ 6010 __( 'Function %1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), 6011 $function_name, 6012 $message, 6013 $version 6014 ), 6015 E_USER_NOTICE 5953 $message = sprintf( 5954 /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: WordPress version number. */ 5955 __( 'Function %1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), 5956 $function_name, 5957 $message, 5958 $version 6016 5959 ); 6017 5960 } else { … … 6025 5968 ); 6026 5969 6027 trigger_error( 6028 sprintf( 6029 'Function %1$s was called <strong>incorrectly</strong>. %2$s %3$s', 6030 $function_name, 6031 $message, 6032 $version 6033 ), 6034 E_USER_NOTICE 5970 $message = sprintf( 5971 'Function %1$s was called <strong>incorrectly</strong>. %2$s %3$s', 5972 $function_name, 5973 $message, 5974 $version 6035 5975 ); 6036 5976 } 5977 5978 wp_trigger_error( '', $message ); 6037 5979 } 6038 5980 }
Note: See TracChangeset
for help on using the changeset viewer.