mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Text Changes: Merge some duplicate strings with the same meaning in error messages, adjust some other strings for consistency and accuracy.
Props ramiy, SergeyBiryukov. Fixes #38808. git-svn-id: https://develop.svn.wordpress.org/trunk@39278 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3123,7 +3123,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
$valid_date = wp_checkdate( $mm, $jj, $aa, $post_date );
|
||||
if ( ! $valid_date ) {
|
||||
if ( $wp_error ) {
|
||||
return new WP_Error( 'invalid_date', __( 'Whoops, the provided date is invalid.' ) );
|
||||
return new WP_Error( 'invalid_date', __( 'Invalid date.' ) );
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
@@ -3403,7 +3403,7 @@ function wp_insert_post( $postarr, $wp_error = false ) {
|
||||
$page_templates = wp_get_theme()->get_page_templates( $post );
|
||||
if ( 'default' != $postarr['page_template'] && ! isset( $page_templates[ $postarr['page_template'] ] ) ) {
|
||||
if ( $wp_error ) {
|
||||
return new WP_Error('invalid_page_template', __('The page template is invalid.'));
|
||||
return new WP_Error( 'invalid_page_template', __( 'Invalid page template.' ) );
|
||||
}
|
||||
update_post_meta( $post_ID, '_wp_page_template', 'default' );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user