Changeset 54320
- Timestamp:
- 09/27/2022 01:58:43 AM (22 months ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r54133 r54320 5400 5400 // Let WordPress generate the 'post_name' (slug) unless 5401 5401 // one has been provided. 5402 $post_name = '';5402 $post_name = ; 5403 5403 if ( isset( $content_struct['wp_slug'] ) ) { 5404 5404 $post_name = $content_struct['wp_slug']; … … 5406 5406 5407 5407 // Only use a password if one was given. 5408 5408 5409 if ( isset( $content_struct['wp_password'] ) ) { 5409 5410 $post_password = $content_struct['wp_password']; 5410 } else {5411 $post_password = '';5412 5411 } 5413 5412 5414 5413 // Only set a post parent if one was given. 5414 5415 5415 if ( isset( $content_struct['wp_page_parent_id'] ) ) { 5416 5416 $post_parent = $content_struct['wp_page_parent_id']; 5417 } else {5418 $post_parent = 0;5419 5417 } 5420 5418 5421 5419 // Only set the 'menu_order' if it was given. 5420 5422 5421 if ( isset( $content_struct['wp_page_order'] ) ) { 5423 5422 $menu_order = $content_struct['wp_page_order']; 5424 } else {5425 $menu_order = 0;5426 5423 } 5427 5424 … … 5451 5448 } 5452 5449 5453 $post_title = isset( $content_struct['title'] ) ? $content_struct['title'] : null;5454 $post_content = isset( $content_struct['description'] ) ? $content_struct['description'] : null;5450 $post_title = isset( $content_struct['title'] ) ? $content_struct['title'] : ; 5451 $post_content = isset( $content_struct['description'] ) ? $content_struct['description'] : ; 5455 5452 5456 5453 $post_status = $publish ? 'publish' : 'draft'; … … 5465 5462 break; 5466 5463 default: 5467 $post_status = $publish ? 'publish' : 'draft';5464 5468 5465 break; 5469 5466 } 5470 5467 } 5471 5468 5472 $post_excerpt = isset( $content_struct['mt_excerpt'] ) ? $content_struct['mt_excerpt'] : null;5473 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null;5474 5475 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;5469 $post_excerpt = isset( $content_struct['mt_excerpt'] ) ? $content_struct['mt_excerpt'] : ; 5470 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : ; 5471 5472 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : ; 5476 5473 5477 5474 if ( isset( $content_struct['mt_allow_comments'] ) ) { … … 5537 5534 5538 5535 if ( $post_more ) { 5539 $post_content = $post_content .'<!--more-->' . $post_more;5540 } 5541 5542 $to_ping = null;5536 $post_content '<!--more-->' . $post_more; 5537 } 5538 5539 $to_ping = ; 5543 5540 if ( isset( $content_struct['mt_tb_ping_urls'] ) ) { 5544 5541 $to_ping = $content_struct['mt_tb_ping_urls']; … … 5556 5553 } 5557 5554 5555 5556 5558 5557 if ( ! empty( $dateCreated ) ) { 5559 5558 $post_date = iso8601_to_datetime( $dateCreated ); 5560 5559 $post_date_gmt = iso8601_to_datetime( $dateCreated, 'gmt' ); 5561 } else {5562 $post_date = '';5563 $post_date_gmt = '';5564 5560 } 5565 5561 … … 5787 5783 } 5788 5784 5789 $page_template = null;5785 $page_template = ; 5790 5786 if ( ! empty( $content_struct['wp_page_template'] ) && 'page' === $post_type ) { 5791 5787 $page_template = $content_struct['wp_page_template']; … … 5895 5891 } 5896 5892 5897 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null;5893 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : ; 5898 5894 5899 5895 $post_status = $publish ? 'publish' : 'draft'; … … 5912 5908 } 5913 5909 5914 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : null;5910 $tags_input = isset( $content_struct['mt_keywords'] ) ? $content_struct['mt_keywords'] : ; 5915 5911 5916 5912 if ( 'publish' === $post_status || 'private' === $post_status ) { … … 5926 5922 } 5927 5923 5928 $to_ping = null;5924 $to_ping = ; 5929 5925 if ( isset( $content_struct['mt_tb_ping_urls'] ) ) { 5930 5926 $to_ping = $content_struct['mt_tb_ping_urls']; -
trunk/src/wp-includes/post.php
r54284 r54320 4035 4035 * so the only way to connect them is using ID. Default empty. 4036 4036 * @type array $meta_input Array of post meta values keyed by their post meta key. Default empty. 4037 4037 4038 * } 4038 4039 * @param bool $wp_error Optional. Whether to return a WP_Error on failure. Default false.
Note: See TracChangeset
for help on using the changeset viewer.