Changeset 51592
- Timestamp:
- 08/10/2021 01:44:34 PM (4 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r51586 r51592 4764 4764 * Outputs the HTML checked attribute. 4765 4765 * 4766 * Compares the first two arguments and if identical marks as checked 4766 * Compares the first two arguments and if identical marks as checked. 4767 4767 * 4768 4768 * @since 1.0.0 4769 4769 * 4770 * @param mixed $checked One of the values to compare 4771 * @param mixed $current (true) The other value to compare if not just true 4772 * @param bool $echo Whether to echo or just return the string 4773 * @return string HTML attribute or empty string 4770 * @param mixed $checked One of the values to compare. 4771 * @param mixed $current Optional. The other value to compare if not just true. 4772 * Default true. 4773 * @param bool $echo Optional. Whether to echo or just return the string. 4774 * Default true. 4775 * @return string HTML attribute or empty string. 4774 4776 */ 4775 4777 function checked( $checked, $current = true, $echo = true ) { … … 4780 4782 * Outputs the HTML selected attribute. 4781 4783 * 4782 * Compares the first two arguments and if identical marks as selected 4784 * Compares the first two arguments and if identical marks as selected. 4783 4785 * 4784 4786 * @since 1.0.0 4785 4787 * 4786 * @param mixed $selected One of the values to compare 4787 * @param mixed $current (true) The other value to compare if not just true 4788 * @param bool $echo Whether to echo or just return the string 4789 * @return string HTML attribute or empty string 4788 * @param mixed $selected One of the values to compare. 4789 * @param mixed $current Optional. The other value to compare if not just true. 4790 * Default true. 4791 * @param bool $echo Optional. Whether to echo or just return the string. 4792 * Default true. 4793 * @return string HTML attribute or empty string. 4790 4794 */ 4791 4795 function selected( $selected, $current = true, $echo = true ) { … … 4796 4800 * Outputs the HTML disabled attribute. 4797 4801 * 4798 * Compares the first two arguments and if identical marks as disabled 4802 * Compares the first two arguments and if identical marks as disabled. 4799 4803 * 4800 4804 * @since 3.0.0 4801 4805 * 4802 * @param mixed $disabled One of the values to compare 4803 * @param mixed $current (true) The other value to compare if not just true 4804 * @param bool $echo Whether to echo or just return the string 4805 * @return string HTML attribute or empty string 4806 * @param mixed $disabled One of the values to compare. 4807 * @param mixed $current Optional. The other value to compare if not just true. 4808 * Default true. 4809 * @param bool $echo Optional. Whether to echo or just return the string. 4810 * Default true. 4811 * @return string HTML attribute or empty string. 4806 4812 */ 4807 4813 function disabled( $disabled, $current = true, $echo = true ) { … … 4812 4818 * Outputs the HTML readonly attribute. 4813 4819 * 4814 * Compares the first two arguments and if identical marks as readonly 4820 * Compares the first two arguments and if identical marks as readonly. 4815 4821 * 4816 4822 * @since 5.9.0 4817 4823 * 4818 * @param mixed $readonly One of the values to compare 4819 * @param mixed $current (true) The other value to compare if not just true 4820 * @param bool $echo Whether to echo or just return the string 4821 * @return string HTML attribute or empty string 4824 * @param mixed $readonly One of the values to compare. 4825 * @param mixed $current Optional. The other value to compare if not just true. 4826 * Default true. 4827 * @param bool $echo Optional. Whether to echo or just return the string. 4828 * Default true. 4829 * @return string HTML attribute or empty string. 4822 4830 */ 4823 4831 function wp_readonly( $readonly, $current = true, $echo = true ) { … … 4838 4846 * Private helper function for checked, selected, disabled and readonly. 4839 4847 * 4840 * Compares the first two arguments and if identical marks as $type4848 * Compares the first two arguments and if identical marks as `$type`. 4841 4849 * 4842 4850 * @since 2.8.0 4843 4851 * @access private 4844 4852 * 4845 * @param mixed $helper One of the values to compare 4846 * @param mixed $current (true) The other value to compare if not just true4847 * @param bool $echo Whether to echo or just return the string 4848 * @param string $type The type of checked|selected|disabled|readonly we are doing 4849 * @return string HTML attribute or empty string 4853 * @param mixed $helper One of the values to compare. 4854 * @param mixed $current The other value to compare if not just true. 4855 * @param bool $echo Whether to echo or just return the string. 4856 * @param string $type The type of checked|selected|disabled|readonly we are doing. 4857 * @return string HTML attribute or empty string. 4850 4858 */ 4851 4859 function __checked_selected_helper( $helper, $current, $echo, $type ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore,PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore -
trunk/src/wp-includes/php-compat/readonly.php
r51586 r51592 16 16 * Outputs the HTML readonly attribute. 17 17 * 18 * Compares the first two arguments and if identical marks as readonly 18 * Compares the first two arguments and if identical marks as readonly. 19 19 * 20 20 * This function is deprecated, and cannot be used on PHP >= 8.1. … … 25 25 * @see wp_readonly() 26 26 * 27 * @param mixed $readonly One of the values to compare 28 * @param mixed $current (true) The other value to compare if not just true 29 * @param bool $echo Whether to echo or just return the string 30 * @return string HTML attribute or empty string 27 * @param mixed $readonly One of the values to compare. 28 * @param mixed $current Optional. The other value to compare if not just true. 29 * Default true. 30 * @param bool $echo Optional. Whether to echo or just return the string. 31 * Default true. 32 * @return string HTML attribute or empty string. 31 33 */ 32 34 function readonly( $readonly, $current = true, $echo = true ) {
Note: See TracChangeset
for help on using the changeset viewer.