mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
@@ -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 = '';
|
||||
|
||||
Reference in New Issue
Block a user