-
-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Labels
Description
Should probably not have !, because right now, if the key is numeric (like a post_id or so) it reverts to using the 'value' and that is really odd.
My use case is creating a dropdown with post_title and its ID as value, right now I'm getting post_title as value as well. Changing the line to:
if ( is_numeric( $k ) ) {Fixes this issue. However, I do believe you could skip the entire foreach @ line 275-280 and changing line 288 to:
$key = ( is_numeric( $k ) ? $k : $v );Unless I have misunderstood the use of $use_key. However this is causing issues for me atm!
For options I'm returning something like:
array( 1 => 'Some post', 2 => 'some other post', 3 => 'some third post' )And the scripts thinks it should use "Some%20post" as filter instead of 1.