Last active
October 8, 2015 06:39
-
-
Save sunnyluthra/b25f8a5fe4d9915725df to your computer and use it in GitHub Desktop.
Revisions
-
sunnyluthra revised this gist
Oct 8, 2015 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,4 @@ <?php function get_user_id_by_meta($key, $value) { if (!$key && !$value) { return false; -
sunnyluthra created this gist
Oct 8, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ function get_user_id_by_meta($key, $value) { if (!$key && !$value) { return false; } $args = array( 'meta_key' => $key, 'meta_value' => $value, 'fields' => 'ids', 'count_total' => false, ); $user = get_users($args); return current($user); }