Replace use of global $user_ID in favor of get_current_user_id(). fixes #25372.
Built from https://develop.svn.wordpress.org/trunk@25669 git-svn-id: http://core.svn.wordpress.org/trunk@25585 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1372,7 +1372,7 @@ function wp_ajax_inline_save() {
|
||||
$data['excerpt'] = $post['post_excerpt'];
|
||||
|
||||
// rename
|
||||
$data['user_ID'] = $GLOBALS['user_ID'];
|
||||
$data['user_ID'] = get_current_user_id();
|
||||
|
||||
if ( isset($data['post_parent']) )
|
||||
$data['parent_id'] = $data['post_parent'];
|
||||
|
||||
@@ -52,7 +52,7 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
|
||||
if ( isset($post_data['trackback_url']) )
|
||||
$post_data['to_ping'] = $post_data['trackback_url'];
|
||||
|
||||
$post_data['user_ID'] = $GLOBALS['user_ID'];
|
||||
$post_data['user_ID'] = get_current_user_id();
|
||||
|
||||
if (!empty ( $post_data['post_author_override'] ) ) {
|
||||
$post_data['post_author'] = (int) $post_data['post_author_override'];
|
||||
@@ -266,7 +266,7 @@ function edit_post( $post_data = null ) {
|
||||
|
||||
add_meta( $post_ID );
|
||||
|
||||
update_post_meta( $post_ID, '_edit_last', $GLOBALS['current_user']->ID );
|
||||
update_post_meta( $post_ID, '_edit_last', get_current_user_id() );
|
||||
|
||||
wp_update_post( $post_data );
|
||||
|
||||
@@ -538,8 +538,6 @@ function post_exists($title, $content = '', $date = '') {
|
||||
* @return unknown
|
||||
*/
|
||||
function wp_write_post() {
|
||||
global $user_ID;
|
||||
|
||||
if ( isset($_POST['post_type']) )
|
||||
$ptype = get_post_type_object($_POST['post_type']);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user