Changeset 59723 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 01/28/2025 10:43:54 PM (10 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r59713 r59723 5791 5791 5792 5792 // Thwart attempt to change the post type. 5793 if ( ! empty( $content_struct['post_type'] ) && ( $content_struct['post_type'] != $postdata['post_type'] ) ) {5793 if ( ! empty( $content_struct['post_type'] ) && ( $content_struct['post_type'] !== $postdata['post_type'] ) ) { 5794 5794 return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); 5795 5795 } … … 5844 5844 $post_author = $postdata['post_author']; 5845 5845 5846 // If an author idwas provided then use it instead.5846 // If an author ID was provided then use it instead. 5847 5847 if ( isset( $content_struct['wp_author_id'] ) ) { 5848 5848 // Check permissions if attempting to switch author to or from another user. 5849 if ( $user->ID != $content_struct['wp_author_id'] || $user->ID !=$post_author ) {5849 if ( $user->ID !== (int) $content_struct['wp_author_id'] || $user->ID !== (int) $post_author ) { 5850 5850 switch ( $post_type ) { 5851 5851 case 'post':
Note: See TracChangeset
for help on using the changeset viewer.