Make checked and selected compare more carefully and update the phpdoc with the correct @since version. Fixes #9862 props Denis-de-Bernardy.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cdcb806070
commit
9247aae5cc
|
@ -376,7 +376,7 @@ function link_cat_row( $category, $name_override = false ) {
|
||||||
*
|
*
|
||||||
* Compares the first two arguments and if identical marks as checked
|
* Compares the first two arguments and if identical marks as checked
|
||||||
*
|
*
|
||||||
* @since 2.8
|
* @since 1.0
|
||||||
*
|
*
|
||||||
* @param any $checked One of the values to compare
|
* @param any $checked One of the values to compare
|
||||||
* @param any $current (true) The other value to compare if not just true
|
* @param any $current (true) The other value to compare if not just true
|
||||||
|
@ -391,7 +391,7 @@ function checked( $checked, $current = true, $echo = true) {
|
||||||
*
|
*
|
||||||
* Compares the first two arguments and if identical marks as selected
|
* Compares the first two arguments and if identical marks as selected
|
||||||
*
|
*
|
||||||
* @since 2.8
|
* @since 1.0
|
||||||
*
|
*
|
||||||
* @param any selected One of the values to compare
|
* @param any selected One of the values to compare
|
||||||
* @param any $current (true) The other value to compare if not just true
|
* @param any $current (true) The other value to compare if not just true
|
||||||
|
@ -415,7 +415,7 @@ function selected( $selected, $current = true, $echo = true) {
|
||||||
* @param string $type The type of checked|selected we are doing.
|
* @param string $type The type of checked|selected we are doing.
|
||||||
*/
|
*/
|
||||||
function __checked_selected_helper( $helper, $current, $echo, $type) {
|
function __checked_selected_helper( $helper, $current, $echo, $type) {
|
||||||
if ( $helper == $current)
|
if ( (string) $helper === (string) $current)
|
||||||
$result = " $type='$type'";
|
$result = " $type='$type'";
|
||||||
else
|
else
|
||||||
$result = '';
|
$result = '';
|
||||||
|
|
Loading…
Reference in New Issue