Changeset 46625 for trunk/src/wp-includes/functions.php
- Timestamp:
- 11/01/2019 12:39:04 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r46610 r46625 4549 4549 * @since 2.5.0 4550 4550 * @since 5.4.0 This function is no longer marked as "private". 4551 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE). 4551 4552 * 4552 4553 * @param string $function The function that was called. … … 4577 4578 if ( function_exists( '__' ) ) { 4578 4579 if ( ! is_null( $replacement ) ) { 4579 /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */ 4580 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $function, $version, $replacement ) ); 4580 trigger_error( 4581 sprintf( 4582 /* translators: 1: PHP function name, 2: Version number, 3: Alternative function name. */ 4583 __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 4584 $function, 4585 $version, 4586 $replacement 4587 ), 4588 E_USER_DEPRECATED 4589 ); 4581 4590 } else { 4582 /* translators: 1: PHP function name, 2: Version number. */ 4583 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $function, $version ) ); 4591 trigger_error( 4592 sprintf( 4593 /* translators: 1: PHP function name, 2: Version number. */ 4594 __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 4595 $function, 4596 $version 4597 ), 4598 E_USER_DEPRECATED 4599 ); 4584 4600 } 4585 4601 } else { 4586 4602 if ( ! is_null( $replacement ) ) { 4587 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) ); 4603 trigger_error( 4604 sprintf( 4605 '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 4606 $function, 4607 $version, 4608 $replacement 4609 ), 4610 E_USER_DEPRECATED 4611 ); 4588 4612 } else { 4589 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) ); 4613 trigger_error( 4614 sprintf( 4615 '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 4616 $function, 4617 $version 4618 ), 4619 E_USER_DEPRECATED 4620 ); 4590 4621 } 4591 4622 } … … 4606 4637 * @since 4.5.0 Added the `$parent_class` parameter. 4607 4638 * @since 5.4.0 This function is no longer marked as "private". 4639 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE). 4608 4640 * 4609 4641 * @param string $class The class containing the deprecated constructor. … … 4646 4678 $version, 4647 4679 '<pre>__construct()</pre>' 4648 ) 4680 ), 4681 E_USER_DEPRECATED 4649 4682 ); 4650 4683 } else { … … 4656 4689 $version, 4657 4690 '<pre>__construct()</pre>' 4658 ) 4691 ), 4692 E_USER_DEPRECATED 4659 4693 ); 4660 4694 } … … 4668 4702 $version, 4669 4703 '<pre>__construct()</pre>' 4670 ) 4704 ), 4705 E_USER_DEPRECATED 4671 4706 ); 4672 4707 } else { … … 4677 4712 $version, 4678 4713 '<pre>__construct()</pre>' 4679 ) 4714 ), 4715 E_USER_DEPRECATED 4680 4716 ); 4681 4717 } … … 4698 4734 * @since 2.5.0 4699 4735 * @since 5.4.0 This function is no longer marked as "private". 4736 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE). 4700 4737 * 4701 4738 * @param string $file The file that was included. … … 4728 4765 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 4729 4766 $message = empty( $message ) ? '' : ' ' . $message; 4767 4730 4768 if ( function_exists( '__' ) ) { 4731 4769 if ( ! is_null( $replacement ) ) { 4732 /* translators: 1: PHP file name, 2: Version number, 3: Alternative file name. */ 4733 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $file, $version, $replacement ) . $message ); 4770 trigger_error( 4771 sprintf( 4772 /* translators: 1: PHP file name, 2: Version number, 3: Alternative file name. */ 4773 __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 4774 $file, 4775 $version, 4776 $replacement 4777 ) . $message, 4778 E_USER_DEPRECATED 4779 ); 4734 4780 } else { 4735 /* translators: 1: PHP file name, 2: Version number. */ 4736 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $file, $version ) . $message ); 4781 trigger_error( 4782 sprintf( 4783 /* translators: 1: PHP file name, 2: Version number. */ 4784 __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 4785 $file, 4786 $version 4787 ) . $message, 4788 E_USER_DEPRECATED 4789 ); 4737 4790 } 4738 4791 } else { 4739 4792 if ( ! is_null( $replacement ) ) { 4740 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message ); 4793 trigger_error( 4794 sprintf( 4795 '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 4796 $file, 4797 $version, 4798 $replacement 4799 ) . $message, 4800 E_USER_DEPRECATED 4801 ); 4741 4802 } else { 4742 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message ); 4803 trigger_error( 4804 sprintf( 4805 '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 4806 $file, 4807 $version 4808 ) . $message, 4809 E_USER_DEPRECATED 4810 ); 4743 4811 } 4744 4812 } … … 4765 4833 * @since 3.0.0 4766 4834 * @since 5.4.0 This function is no longer marked as "private". 4835 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE). 4767 4836 * 4768 4837 * @param string $function The function that was called. … … 4793 4862 if ( function_exists( '__' ) ) { 4794 4863 if ( ! is_null( $message ) ) { 4795 /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */ 4796 trigger_error( sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), $function, $version, $message ) ); 4864 trigger_error( 4865 sprintf( 4866 /* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */ 4867 __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), 4868 $function, 4869 $version, 4870 $message 4871 ), 4872 E_USER_DEPRECATED 4873 ); 4797 4874 } else { 4798 /* translators: 1: PHP function name, 2: Version number. */ 4799 trigger_error( sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $function, $version ) ); 4875 trigger_error( 4876 sprintf( 4877 /* translators: 1: PHP function name, 2: Version number. */ 4878 __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 4879 $function, 4880 $version 4881 ), 4882 E_USER_DEPRECATED 4883 ); 4800 4884 } 4801 4885 } else { 4802 4886 if ( ! is_null( $message ) ) { 4803 trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) ); 4887 trigger_error( 4888 sprintf( 4889 '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', 4890 $function, 4891 $version, 4892 $message 4893 ), 4894 E_USER_DEPRECATED 4895 ); 4804 4896 } else { 4805 trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) ); 4897 trigger_error( 4898 sprintf( 4899 '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', 4900 $function, 4901 $version 4902 ), 4903 E_USER_DEPRECATED 4904 ); 4806 4905 } 4807 4906 } … … 4821 4920 * 4822 4921 * @since 4.6.0 4922 * @since 5.4.0 The error type is now classified as E_USER_DEPRECATED (used to default to E_USER_NOTICE). 4823 4923 * @access private 4824 4924 * … … 4851 4951 if ( WP_DEBUG && apply_filters( 'deprecated_hook_trigger_error', true ) ) { 4852 4952 $message = empty( $message ) ? '' : ' ' . $message; 4953 4853 4954 if ( ! is_null( $replacement ) ) { 4854 /* translators: 1: WordPress hook name, 2: Version number, 3: Alternative hook name. */ 4855 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), $hook, $version, $replacement ) . $message ); 4955 trigger_error( 4956 sprintf( 4957 /* translators: 1: WordPress hook name, 2: Version number, 3: Alternative hook name. */ 4958 __( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 4959 $hook, 4960 $version, 4961 $replacement 4962 ) . $message, 4963 E_USER_DEPRECATED 4964 ); 4856 4965 } else { 4857 /* translators: 1: WordPress hook name, 2: Version number. */ 4858 trigger_error( sprintf( __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $hook, $version ) . $message ); 4966 trigger_error( 4967 sprintf( 4968 /* translators: 1: WordPress hook name, 2: Version number. */ 4969 __( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.' ), 4970 $hook, 4971 $version 4972 ) . $message, 4973 E_USER_DEPRECATED 4974 ); 4859 4975 } 4860 4976 } … … 4909 5025 $version = sprintf( __( '(This message was added in version %s.)' ), $version ); 4910 5026 } 5027 4911 5028 $message .= ' ' . sprintf( 4912 5029 /* translators: %s: Documentation URL. */ … … 4914 5031 __( 'https://wordpress.org/support/article/debugging-in-wordpress/' ) 4915 5032 ); 4916 /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message. */ 4917 trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) ); 5033 5034 trigger_error( 5035 sprintf( 5036 /* translators: Developer debugging message. 1: PHP function name, 2: Explanatory message, 3: Version information message. */ 5037 __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), 5038 $function, 5039 $message, 5040 $version 5041 ), 5042 E_USER_NOTICE 5043 ); 4918 5044 } else { 4919 5045 if ( is_null( $version ) ) { … … 4922 5048 $version = sprintf( '(This message was added in version %s.)', $version ); 4923 5049 } 5050 4924 5051 $message .= sprintf( 4925 5052 ' Please see <a href="%s">Debugging in WordPress</a> for more information.', 4926 5053 'https://wordpress.org/support/article/debugging-in-wordpress/' 4927 5054 ); 4928 trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) ); 5055 5056 trigger_error( 5057 sprintf( 5058 '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', 5059 $function, 5060 $message, 5061 $version 5062 ), 5063 E_USER_NOTICE 5064 ); 4929 5065 } 4930 5066 }
Note: See TracChangeset
for help on using the changeset viewer.