Make WordPress Core


Ignore:
Timestamp:
11/12/2018 02:26:18 AM (6 years ago)
Author:
pento
Message:

Block Editor: Update @wordpress dependencies to the latest version.

Changes of note:

  • Includes the new Annotations API package.
  • wp-polyfill-ecmascript.js is renamed to wp-polyfill.js.
  • strip_dynamic_blocks() has been removed in favour of excerpt_remove_blocks().
  • The PHP block parser is now syncing from the block-serialization-default-parser package.
  • do_blocks() uses the new parser.
  • The do_block filter has been removed from do_blocks(), in favour of a render_block filter in render_block().

See #45145, #45190, #45264, #45282.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-admin/edit-form-blocks.php

    r43882 r43884  
    104104    // Override "(Auto Draft)" new post default title with empty string, or filtered value.
    105105    $initial_edits = array(
    106         'title'   => array(
    107             'raw' => $post->post_title,
    108         ),
    109         'content' => array(
    110             'raw' => $post->post_content,
    111         ),
    112         'excerpt' => array(
    113             'raw' => $post->post_excerpt,
    114         ),
     106        'title'   => $post->post_title,
     107        'content' => $post->post_content,
     108        'excerpt' => $post->post_excerpt,
    115109    );
    116110}
     
    203197
    204198// Image sizes.
    205 $image_sizes   = get_intermediate_image_sizes();
    206 $image_sizes[] = 'full';
    207199
    208200/** This filter is documented in wp-admin/includes/media.php */
     
    218210
    219211$available_image_sizes = array();
    220 foreach ( $image_sizes as $image_size_slug ) {
     212foreach ( $image_size_names as $image_size_slug => $image_size_name ) {
    221213    $available_image_sizes[] = array(
    222214        'slug' => $image_size_slug,
    223         'name' => isset( $image_size_names[ $image_size_slug ] ) ? $image_size_names[ $image_size_slug ] : $image_size_slug,
     215        'name' => $image_size_name,
    224216    );
    225217}
     
    260252 * @since 5.0.0
    261253 *
    262  * @param string  $text Placeholder text. Default 'Write your story'.
     254 * @param string  $text Placeholder text. Default 'Start writing or type / to choose a block'.
    263255 * @param WP_Post $post Post object.
    264256 */
    265 $body_placeholder = apply_filters( 'write_your_story', __( 'Write your story' ), $post );
     257$body_placeholder = apply_filters( 'write_your_story', __( 'Start writing or type / to choose a block' ), $post );
    266258
    267259$editor_settings = array(
     
    280272    'allowedMimeTypes'       => get_allowed_mime_types(),
    281273    'styles'                 => $styles,
    282     'availableImageSizes'    => $available_image_sizes,
     274    'imageSizes'             => $available_image_sizes,
    283275    'postLock'               => $lock_details,
    284276    'postLockUtils'          => array(
Note: See TracChangeset for help on using the changeset viewer.