Replace use of global $user_ID in favor of get_current_user_id(). fixes #25372.

git-svn-id: https://develop.svn.wordpress.org/trunk@25669 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2013-10-02 21:09:52 +00:00
parent dac3f63f9c
commit 6311fbbfdb
4 changed files with 22 additions and 22 deletions
+2 -4
View File
@@ -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