Changeset 44165
- Timestamp:
- 12/14/2018 05:11:14 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43815-43816
- Property svn:mergeinfo changed
-
trunk/src/wp-admin/edit-form-blocks.php
r43815 r44165 85 85 */ 86 86 $initial_edits = null; 87 $is_new_post = false;87 $is_new_post = false; 88 88 if ( 'auto-draft' === $post->post_status ) { 89 89 $is_new_post = true; … … 102 102 } 103 103 104 // Prepare Jed locale data.105 $locale_data = wp_get_jed_locale_data( 'default' );106 wp_add_inline_script(107 'wp-i18n',108 'wp.i18n.setLocaleData( ' . wp_json_encode( $locale_data ) . ' );'109 );110 111 104 // Preload server-registered block schemas. 112 105 wp_add_inline_script( … … 188 181 foreach ( $editor_styles as $style ) { 189 182 if ( preg_match( '~^(https?:)?//~', $style ) ) { 190 //$response = wp_remote_get( $style ); 191 var_dump( $response ); 183 $response = wp_remote_get( $style ); 192 184 if ( ! is_wp_error( $response ) ) { 193 185 $styles[] = array( -
trunk/src/wp-admin/post-new.php
r43338 r44165 69 69 /** This filter is documented in wp-admin/post.php */ 70 70 if ( apply_filters( 'replace_editor', false, $post ) !== true ) { 71 wp_enqueue_script( 'autosave' ); 72 include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); 71 if ( use_block_editor_for_post( $post ) ) { 72 include( ABSPATH . 'wp-admin/edit-form-blocks.php' ); 73 } else { 74 wp_enqueue_script( 'autosave' ); 75 include( ABSPATH . 'wp-admin/edit-form-advanced.php' ); 76 } 73 77 } 74 78 -
trunk/src/wp-admin/post.php
r44048 r44165 17 17 wp_reset_vars( array( 'action' ) ); 18 18 19 if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] ) { 20 wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 ); 21 } elseif ( isset( $_GET['post'] ) ) { 19 if ( isset( $_GET['post'] ) ) { 22 20 $post_id = $post_ID = (int) $_GET['post']; 23 21 } elseif ( isset( $_POST['post_ID'] ) ) { … … 43 41 } 44 42 45 if ( isset( $_POST['post_type'] ) && $post && $post_type !== $_POST['post_type'] ) {46 wp_die( __( 'A post type mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );47 }48 49 43 if ( isset( $_POST['deletepost'] ) ) { 50 44 $action = 'delete'; … … 55 49 $sendback = wp_get_referer(); 56 50 if ( ! $sendback || 57 strpos( $sendback, 'post.php' ) !== false ||58 strpos( $sendback, 'post-new.php' ) !== false ) {51 strpos( $sendback, 'post.php' ) !== false || 52 strpos( $sendback, 'post-new.php' ) !== false ) { 59 53 if ( 'attachment' == $post_type ) { 60 54 $sendback = admin_url( 'upload.php' ); … … 173 167 } 174 168 169 if ( use_block_editor_for_post( $post ) ) { 170 include( ABSPATH . 'wp-admin/edit-form-blocks.php' ); 171 break; 172 } 173 175 174 if ( ! wp_check_post_lock( $post->ID ) ) { 176 175 $active_post_lock = wp_set_post_lock( $post->ID );
Note: See TracChangeset
for help on using the changeset viewer.