@@ 4996-5001 (lines=6) @@ | ||
4993 | return new IXR_Error( 401, $error_message ); |
|
4994 | ||
4995 | // Check for a valid post format if one was given |
|
4996 | if ( isset( $content_struct['wp_post_format'] ) ) { |
|
4997 | $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); |
|
4998 | if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { |
|
4999 | return new IXR_Error( 404, __( 'Invalid post format.' ) ); |
|
5000 | } |
|
5001 | } |
|
5002 | ||
5003 | // Let WordPress generate the post_name (slug) unless |
|
5004 | // one has been provided. |
|
@@ 5320-5325 (lines=6) @@ | ||
5317 | return new IXR_Error( 401, __( 'The post type may not be changed.' ) ); |
|
5318 | ||
5319 | // Check for a valid post format if one was given |
|
5320 | if ( isset( $content_struct['wp_post_format'] ) ) { |
|
5321 | $content_struct['wp_post_format'] = sanitize_key( $content_struct['wp_post_format'] ); |
|
5322 | if ( !array_key_exists( $content_struct['wp_post_format'], get_post_format_strings() ) ) { |
|
5323 | return new IXR_Error( 404, __( 'Invalid post format.' ) ); |
|
5324 | } |
|
5325 | } |
|
5326 | ||
5327 | $this->escape($postdata); |
|
5328 |