Changeset 33612
- Timestamp:
- 08/13/2015 03:27:57 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r33407 r33612 5282 5282 $data = $newpost; 5283 5283 $data['sticky'] = $content_struct['sticky']; 5284 $data['post_type'] = 'post'; 5284 5285 $error = $this->_toggle_sticky( $data, true ); 5285 5286 if ( $error ) { -
trunk/tests/phpunit/tests/xmlrpc/mw/editPost.php
r31983 r33612 114 114 $this->assertEquals( $editor_id, $out->post_author ); 115 115 } 116 116 117 117 function test_post_thumbnail() { 118 118 add_theme_support( 'post-thumbnails' ); … … 204 204 } 205 205 206 /** 207 * @ticket 20662 208 */ 209 function test_make_post_sticky() { 210 $author_id = $this->make_user_by_role( 'editor' ); 211 212 $post = array( 'post_title' => 'Title', 'post_content' => 'Content', 'post_author' => $author_id, 'post_status' => 'publish' ); 213 $post_id = wp_insert_post( $post ); 214 215 $result = $this->myxmlrpcserver->mw_editPost( array( $post_id, 'editor', 'editor', array( 'sticky' => '1' ) ) ); 216 $this->assertNotInstanceOf( 'IXR_Error', $result ); 217 $this->assertTrue( $result ); 218 } 219 206 220 // Not allowed since [19914] 207 221 function test_change_post_type() {
Note: See TracChangeset
for help on using the changeset viewer.