Make WordPress Core

Ticket #16886: 16886.patch

File 16886.patch, 1.5 KB (added by soulseekah, 8 years ago)
  • src/wp-includes/general-template.php

     
    38003800}
    38013801
    38023802/**
    3803  * Private helper function for checked, selected, and disabled.
     3803 * Outputs the html readonly attribute.
    38043804 *
     3805 * Compares the first two arguments and if identical marks as readonly
     3806 *
     3807 * @since trunk
     3808 *
     3809 * @param mixed $readonly One of the values to compare
     3810 * @param mixed $current  (true) The other value to compare if not just true
     3811 * @param bool  $echo     Whether to echo or just return the string
     3812 * @return string html attribute or empty string
     3813 */
     3814function readonly( $readonly, $current = true, $echo = true ) {
     3815        return __checked_selected_helper( $readonly, $current, $echo, 'readonly' );
     3816}
     3817
     3818/**
     3819 * Private helper function for checked, selected, disabled and readonly.
     3820 *
    38053821 * Compares the first two arguments and if identical marks as $type
    38063822 *
    38073823 * @since 2.8.0
     
    38103826 * @param mixed  $helper  One of the values to compare
    38113827 * @param mixed  $current (true) The other value to compare if not just true
    38123828 * @param bool   $echo    Whether to echo or just return the string
    3813  * @param string $type    The type of checked|selected|disabled we are doing
     3829 * @param string $type    The type of checked|selected|disabled|readonly we are doing
    38143830 * @return string html attribute or empty string
    38153831 */
    38163832function __checked_selected_helper( $helper, $current, $echo, $type ) {