Use get_current_user() and get_current_user_id() instead of global . Props filofo. see #13934 for trunk

git-svn-id: https://develop.svn.wordpress.org/trunk@15315 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-06-24 15:01:29 +00:00
parent 3cd056320a
commit 494ee995b5
11 changed files with 56 additions and 62 deletions
+2 -2
View File
@@ -128,7 +128,7 @@ function get_link_to_edit( $link_id ) {
* @return unknown
*/
function wp_insert_link( $linkdata, $wp_error = false ) {
global $wpdb, $current_user;
global $wpdb;
$defaults = array( 'link_id' => 0, 'link_name' => '', 'link_url' => '', 'link_rating' => 0 );
@@ -166,7 +166,7 @@ function wp_insert_link( $linkdata, $wp_error = false ) {
$link_visible = 'Y';
if ( empty( $link_owner ) )
$link_owner = $current_user->id;
$link_owner = get_current_user_id();
if ( empty( $link_notes ) )
$link_notes = '';