diff --git a/wp-includes/blocks/latest-comments.php.mine b/wp-includes/blocks/latest-comments.php.mine deleted file mode 100644 index 29e17e9de5..0000000000 --- a/wp-includes/blocks/latest-comments.php.mine +++ /dev/null @@ -1,184 +0,0 @@ - $attributes['commentsToShow'], - 'status' => 'approve', - 'post_status' => 'publish', - ) - ) - ); - - $list_items_markup = ''; - if ( ! empty( $comments ) ) { - // Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget(). - $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); - _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); - - foreach ( $comments as $comment ) { - $list_items_markup .= '
  • '; - if ( $attributes['displayAvatar'] ) { - $avatar = get_avatar( - $comment, - 48, - '', - '', - array( - 'class' => 'wp-block-latest-comments__comment-avatar', - ) - ); - if ( $avatar ) { - $list_items_markup .= $avatar; - } - } - - $list_items_markup .= '
    '; - $list_items_markup .= ''; - if ( $attributes['displayExcerpt'] ) { - $list_items_markup .= '
    ' . wpautop( get_comment_excerpt( $comment ) ) . '
    '; - } - $list_items_markup .= '
  • '; - } - } - - $class = 'wp-block-latest-comments'; - if ( isset( $attributes['align'] ) ) { - $class .= " align{$attributes['align']}"; - } - if ( $attributes['displayAvatar'] ) { - $class .= ' has-avatars'; - } - if ( $attributes['displayDate'] ) { - $class .= ' has-dates'; - } - if ( $attributes['displayExcerpt'] ) { - $class .= ' has-excerpts'; - } - if ( empty( $comments ) ) { - $class .= ' no-comments'; - } - $classnames = esc_attr( $class ); - - $block_content = ! empty( $comments ) ? sprintf( - '
      %2$s
    ', - $classnames, - $list_items_markup - ) : sprintf( - '
    %2$s
    ', - $classnames, - __( 'No comments to show.' ) - ); - - return $block_content; -} - -register_block_type( - 'core/latest-comments', - array( - 'attributes' => array( - 'className' => array( - 'type' => 'string', - ), - 'commentsToShow' => array( - 'type' => 'number', - 'default' => 5, - 'minimum' => 1, - 'maximum' => 100, - ), - 'displayAvatar' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayDate' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayExcerpt' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'align' => array( - 'type' => 'string', - 'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ), - ), - ), - 'render_callback' => 'gutenberg_render_block_core_latest_comments', - ) -); diff --git a/wp-includes/blocks/latest-comments.php.r44105 b/wp-includes/blocks/latest-comments.php.r44105 deleted file mode 100644 index 557e3dce13..0000000000 --- a/wp-includes/blocks/latest-comments.php.r44105 +++ /dev/null @@ -1,184 +0,0 @@ - $attributes['commentsToShow'], - 'status' => 'approve', - 'post_status' => 'publish', - ) - ) - ); - - $list_items_markup = ''; - if ( ! empty( $comments ) ) { - // Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget(). - $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); - _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); - - foreach ( $comments as $comment ) { - $list_items_markup .= '
  • '; - if ( $attributes['displayAvatar'] ) { - $avatar = get_avatar( - $comment, - 48, - '', - '', - array( - 'class' => 'wp-block-latest-comments__comment-avatar', - ) - ); - if ( $avatar ) { - $list_items_markup .= $avatar; - } - } - - $list_items_markup .= '
    '; - $list_items_markup .= ''; - if ( $attributes['displayExcerpt'] ) { - $list_items_markup .= '
    ' . wpautop( get_comment_excerpt( $comment ) ) . '
    '; - } - $list_items_markup .= '
  • '; - } - } - - $class = 'wp-block-latest-comments'; - if ( isset( $attributes['align'] ) ) { - $class .= " align{$attributes['align']}"; - } - if ( $attributes['displayAvatar'] ) { - $class .= ' has-avatars'; - } - if ( $attributes['displayDate'] ) { - $class .= ' has-dates'; - } - if ( $attributes['displayExcerpt'] ) { - $class .= ' has-excerpts'; - } - if ( empty( $comments ) ) { - $class .= ' no-comments'; - } - $classnames = esc_attr( $class ); - - $block_content = ! empty( $comments ) ? sprintf( - '
      %2$s
    ', - $classnames, - $list_items_markup - ) : sprintf( - '
    %2$s
    ', - $classnames, - __( 'No comments to show.' ) - ); - - return $block_content; -} - -register_block_type( - 'core/latest-comments', - array( - 'attributes' => array( - 'className' => array( - 'type' => 'string', - ), - 'commentsToShow' => array( - 'type' => 'number', - 'default' => 5, - 'minimum' => 1, - 'maximum' => 100, - ), - 'displayAvatar' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayDate' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayExcerpt' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'align' => array( - 'type' => 'string', - 'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ), - ), - ), - 'render_callback' => 'render_block_core_latest_comments', - ) -); diff --git a/wp-includes/blocks/latest-comments.php.r44183 b/wp-includes/blocks/latest-comments.php.r44183 deleted file mode 100644 index fcc17c3cd6..0000000000 --- a/wp-includes/blocks/latest-comments.php.r44183 +++ /dev/null @@ -1,182 +0,0 @@ - $attributes['commentsToShow'], - 'status' => 'approve', - 'post_status' => 'publish', - ) - ) - ); - - $list_items_markup = ''; - if ( ! empty( $comments ) ) { - // Prime the cache for associated posts. This is copied from \WP_Widget_Recent_Comments::widget(). - $post_ids = array_unique( wp_list_pluck( $comments, 'comment_post_ID' ) ); - _prime_post_caches( $post_ids, strpos( get_option( 'permalink_structure' ), '%category%' ), false ); - - foreach ( $comments as $comment ) { - $list_items_markup .= '
  • '; - if ( $attributes['displayAvatar'] ) { - $avatar = get_avatar( - $comment, - 48, - '', - '', - array( - 'class' => 'wp-block-latest-comments__comment-avatar', - ) - ); - if ( $avatar ) { - $list_items_markup .= $avatar; - } - } - - $list_items_markup .= '
    '; - $list_items_markup .= ''; - if ( $attributes['displayExcerpt'] ) { - $list_items_markup .= '
    ' . wpautop( get_comment_excerpt( $comment ) ) . '
    '; - } - $list_items_markup .= '
  • '; - } - } - - $class = 'wp-block-latest-comments'; - if ( isset( $attributes['align'] ) ) { - $class .= " align{$attributes['align']}"; - } - if ( $attributes['displayAvatar'] ) { - $class .= ' has-avatars'; - } - if ( $attributes['displayDate'] ) { - $class .= ' has-dates'; - } - if ( $attributes['displayExcerpt'] ) { - $class .= ' has-excerpts'; - } - if ( empty( $comments ) ) { - $class .= ' no-comments'; - } - $classnames = esc_attr( $class ); - - $block_content = ! empty( $comments ) ? sprintf( - '
      %2$s
    ', - $classnames, - $list_items_markup - ) : sprintf( - '
    %2$s
    ', - $classnames, - __( 'No comments to show.' ) - ); - - return $block_content; -} - -register_block_type( - 'core/latest-comments', - array( - 'attributes' => array( - 'className' => array( - 'type' => 'string', - ), - 'commentsToShow' => array( - 'type' => 'number', - 'default' => 5, - 'minimum' => 1, - 'maximum' => 100, - ), - 'displayAvatar' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayDate' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'displayExcerpt' => array( - 'type' => 'boolean', - 'default' => true, - ), - 'align' => array( - 'type' => 'string', - 'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ), - ), - ), - 'render_callback' => 'render_block_core_latest_comments', - ) -); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 6db018c12a..fb73ecd836 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -1763,26 +1763,6 @@ function wp_default_styles( &$styles ) { $styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle. $styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6 - // RTL CSS - $rtl_styles = array( - // wp-admin - 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', - 'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus', 'customize-preview', - 'ie', 'login', - // wp-includes - 'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer', - 'wp-jquery-ui-dialog', - // deprecated - 'deprecated-media', 'farbtastic', - ); - - foreach ( $rtl_styles as $rtl_style ) { - $styles->add_data( $rtl_style, 'rtl', 'replace' ); - if ( $suffix ) { - $styles->add_data( $rtl_style, 'suffix', $suffix ); - } - } - // Packages styles $fonts_url = ''; @@ -1798,7 +1778,6 @@ function wp_default_styles( &$styles ) { $styles->add( 'wp-editor-font', $fonts_url ); $styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" ); - $styles->add_data( 'wp-block-library-theme', 'rtl', 'replace' ); $styles->add( 'wp-edit-blocks', @@ -1811,7 +1790,6 @@ function wp_default_styles( &$styles ) { 'wp-block-library-theme', ) ); - $styles->add_data( 'wp-edit-blocks', 'rtl', 'replace' ); $package_styles = array( 'block-library' => array(), @@ -1825,10 +1803,32 @@ function wp_default_styles( &$styles ) { foreach ( $package_styles as $package => $dependencies ) { $handle = 'wp-' . $package; - $path = "/wp-includes/css/dist/$package/style$suffix.css"; + $path = "/wp-includes/css/dist/$package/style$suffix.css"; $styles->add( $handle, $path, $dependencies ); - $styles->add_data( $handle, 'rtl', 'replace' ); + } + + // RTL CSS + $rtl_styles = array( + // Admin CSS + 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', + 'widgets', 'site-icon', 'l10n', 'install', 'wp-color-picker', 'customize-controls', 'customize-widgets', 'customize-nav-menus', 'customize-preview', + 'ie', 'login', + // Includes CSS + 'buttons', 'admin-bar', 'wp-auth-check', 'editor-buttons', 'media-views', 'wp-pointer', + 'wp-jquery-ui-dialog', + // Package styles + 'wp-block-library-theme', 'wp-edit-blocks', 'wp-block-library', 'wp-components', 'wp-edit-post', 'wp-editor', 'wp-format-library', + 'wp-list-reusable-blocks', 'wp-nux', + // Deprecated CSS + 'deprecated-media', 'farbtastic', + ); + + foreach ( $rtl_styles as $rtl_style ) { + $styles->add_data( $rtl_style, 'rtl', 'replace' ); + if ( $suffix ) { + $styles->add_data( $rtl_style, 'suffix', $suffix ); + } } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 3c4d4ef87c..e3b727743f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0.2-alpha-44213'; +$wp_version = '5.0.2-alpha-44231'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.