Make WordPress Core

Ticket #41810: 41810.diff

File 41810.diff, 846 bytes (added by Mirucon, 8 years ago)
  • wp-includes/formatting.php

    diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
    index 6acb459c26..3aa8a7e967 100644
    a b function maybe_hash_hex_color( $color ) { 
    54155415
    54165416        return $color;
    54175417}
     5418
     5419/**
     5420 * Sanitizes a checkbox from user input or from the database.
     5421 *
     5422 * @see sanitize_checkbox()
     5423 *
     5424 * @param bool $checked Checkbox to sanitize.
     5425 * @return bool Sanitized checkbox, true or false.
     5426 */
     5427 function sanitize_checkbox( $checked ) {
     5428        // Boolean check.
     5429        $filtered = ( isset( $checked ) && true == $checked ) ? true : false;
     5430
     5431        /**
     5432         * Filters a sanitized checkbox.
     5433         *
     5434         * @param bool $filtered The sanitized checkbox.
     5435         * @param bool $checked  The chekbox prior to being sanitized.
     5436         */
     5437         return apply_filters( 'sanitize_checkbox', $filtered, $checked );
     5438}