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:
westi 2009-07-09 21:13:23 +00:00
parent cdcb806070
commit 9247aae5cc
1 changed files with 3 additions and 3 deletions

View File

@ -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 = '';