Commit 201e97b9 authored by lucha's avatar lucha

Wordpress 5.0.3

parent 7dc5c3fa
WordPress - Web publishing software
Copyright 2011-2018 by the contributors
Copyright 2011-2019 by the contributors
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -65,7 +65,25 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. */
/* translators: 1: WordPress version number, 2: plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
44
),
'5.0.3',
number_format_i18n( 44 )
);
?>
<?php
/* translators: %s: Codex URL */
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_5.0.3' );
?>
</p>
<p>
<?php
printf(
/* translators: 1: WordPress version number, 2: plural number of bugs. */
_n(
'<strong>Version %1$s</strong> addressed %2$s bug.',
'<strong>Version %1$s</strong> addressed %2$s bugs.',
......
......@@ -560,6 +560,10 @@ code {
margin: 10px 2px 0 20px;
}
.wrap.block-editor-no-js {
padding-right: 20px;
}
.wrap > h2:first-child, /* Back-compat for pre-4.4 */
.wrap [class$="icon32"] + h2, /* Back-compat for pre-4.4 */
.postbox .inside h2, /* Back-compat for pre-4.4 */
......
This diff is collapsed.
......@@ -560,6 +560,10 @@ code {
margin: 10px 20px 0 2px;
}
.wrap.block-editor-no-js {
padding-left: 20px;
}
.wrap > h2:first-child, /* Back-compat for pre-4.4 */
.wrap [class$="icon32"] + h2, /* Back-compat for pre-4.4 */
.postbox .inside h2, /* Back-compat for pre-4.4 */
......
This diff is collapsed.
......@@ -23,10 +23,6 @@ if ( ! defined( 'ABSPATH' ) ) {
*/
global $post_type, $post_type_object, $post, $title, $editor_styles, $wp_meta_boxes;
if ( ! empty( $post_type_object ) ) {
$title = $post_type_object->labels->edit_item;
}
// Flag that we're loading the block editor.
$current_screen = get_current_screen();
$current_screen->is_block_editor( true );
......@@ -399,9 +395,36 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="block-editor">
<h1 class="screen-reader-text"><?php echo esc_html( $post_type_object->labels->edit_item ); ?></h1>
<div id="editor" class="block-editor__container"></div>
<h1 class="screen-reader-text hide-if-no-js"><?php echo esc_html( $title ); ?></h1>
<div id="editor" class="block-editor__container hide-if-no-js"></div>
<div id="metaboxes" class="hidden">
<?php the_block_editor_meta_boxes(); ?>
</div>
<?php // JavaScript is disabled. ?>
<div class="wrap hide-if-js block-editor-no-js">
<h1 class="wp-heading-inline"><?php echo esc_html( $title ); ?></h1>
<div class="notice notice-error notice-alt">
<p>
<?php
$message = sprintf(
/* translators: %s: https://wordpress.org/plugins/classic-editor/ */
__( 'The block editor requires JavaScript. Please enable JavaScript in your browser settings, or try the <a href="%s">Classic Editor plugin</a>.' ),
__( 'https://wordpress.org/plugins/classic-editor/' )
);
/**
* Filters the message displayed in the block editor interface when JavaScript is
* not enabled in the browser.
*
* @since 5.0.3
*
* @param string $message The message being displayed.
* @param WP_Post $post The post being edited.
*/
echo apply_filters( 'block_editor_no_javascript_message', $message, $post );
?>
</p>
</div>
</div>
</div>
......@@ -150,6 +150,8 @@ case 'edit':
$post_new_file = "post-new.php?post_type=$post_type";
}
$title = $post_type_object->labels->edit_item;
/**
* Allows replacement of the editor.
*
......@@ -174,8 +176,7 @@ case 'edit':
wp_enqueue_script('autosave');
}
$title = $post_type_object->labels->edit_item;
$post = get_post($post_id, OBJECT, 'edit');
$post = get_post( $post_id, OBJECT, 'edit' );
if ( post_type_supports($post_type, 'comments') ) {
wp_enqueue_script('admin-comments');
......
......@@ -222,8 +222,8 @@ function twentynineteen_scripts() {
wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' );
if ( has_nav_menu( 'menu-1' ) ) {
wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.0', true );
wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.0', true );
wp_enqueue_script( 'twentynineteen-priority-menu', get_theme_file_uri( '/js/priority-menu.js' ), array(), '1.1', true );
wp_enqueue_script( 'twentynineteen-touch-navigation', get_theme_file_uri( '/js/touch-keyboard-navigation.js' ), array(), '1.1', true );
}
wp_enqueue_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' );
......@@ -257,7 +257,7 @@ add_action( 'wp_print_footer_scripts', 'twentynineteen_skip_link_focus_fix' );
*/
function twentynineteen_editor_customizer_styles() {
wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.0', 'all' );
wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.1', 'all' );
if ( 'custom' === get_theme_mod( 'primary_color' ) ) {
// Include color patterns.
......
......@@ -125,7 +125,7 @@ function twentynineteen_customize_partial_blogdescription() {
* Bind JS handlers to instantly live-preview changes.
*/
function twentynineteen_customize_preview_js() {
wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181108', true );
wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20181231', true );
}
add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );
......@@ -133,7 +133,7 @@ add_action( 'customize_preview_init', 'twentynineteen_customize_preview_js' );
* Load dynamic logic for the customizer controls area.
*/
function twentynineteen_panels_js() {
wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181031', true );
wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '20181231', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );
......
......@@ -203,18 +203,18 @@ function twentynineteen_add_ellipses_to_nav( $nav_menu, $args ) {
if ( 'menu-1' === $args->theme_location ) :
$nav_menu .= '<div class="main-menu-more">';
$nav_menu .= '<ul class="main-menu" tabindex="0">';
$nav_menu .= '<ul class="main-menu">';
$nav_menu .= '<li class="menu-item menu-item-has-children">';
$nav_menu .= '<a href="#" class="screen-reader-text" aria-label="More" aria-haspopup="true" aria-expanded="false">' . esc_html__( 'More', 'twentynineteen' ) . '</a>';
$nav_menu .= '<span class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1">';
$nav_menu .= '<button class="submenu-expand main-menu-more-toggle is-empty" tabindex="-1" aria-label="More" aria-haspopup="true" aria-expanded="false">';
$nav_menu .= '<span class="screen-reader-text">' . esc_html__( 'More', 'twentynineteen' ) . '</span>';
$nav_menu .= twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' );
$nav_menu .= '</span>';
$nav_menu .= '</button>';
$nav_menu .= '<ul class="sub-menu hidden-links">';
$nav_menu .= '<li id="menu-item--1" class="mobile-parent-nav-menu-item menu-item--1">';
$nav_menu .= '<span class="menu-item-link-return">';
$nav_menu .= '<button class="menu-item-link-return">';
$nav_menu .= twentynineteen_get_icon_svg( 'chevron_left' );
$nav_menu .= esc_html__( 'Back', 'twentynineteen' );
$nav_menu .= '</span>';
$nav_menu .= '</button>';
$nav_menu .= '</li>';
$nav_menu .= '</ul>';
$nav_menu .= '</li>';
......@@ -269,11 +269,11 @@ function twentynineteen_add_dropdown_icons( $output, $item, $depth, $args ) {
// Inject the keyboard_arrow_left SVG inside the parent nav menu item, and let the item link to the parent item.
// @todo Only do this for nested submenus? If on a first-level submenu, then really the link could be "#" since the desire is to remove the target entirely.
$link = sprintf(
'<span class="menu-item-link-return" tabindex="-1">%s',
'<button class="menu-item-link-return" tabindex="-1">%s',
twentynineteen_get_icon_svg( 'chevron_left', 24 )
);
// replace opening <a> with <span>
// replace opening <a> with <button>
$output = preg_replace(
'/<a\s.*?>/',
$link,
......@@ -281,10 +281,10 @@ function twentynineteen_add_dropdown_icons( $output, $item, $depth, $args ) {
1 // Limit.
);
// replace closing </a> with </span>
// replace closing </a> with </button>
$output = preg_replace(
'#</a>#i',
'</span>',
'</button>',
$output,
1 // Limit.
);
......@@ -295,7 +295,7 @@ function twentynineteen_add_dropdown_icons( $output, $item, $depth, $args ) {
$icon = twentynineteen_get_icon_svg( 'keyboard_arrow_down', 24 );
$output .= sprintf(
'<span class="submenu-expand" tabindex="-1">%s</span>',
'<button class="submenu-expand" tabindex="-1">%s</button>',
$icon
);
}
......
......@@ -112,7 +112,7 @@
currentSubMenu.parentElement.lastElementChild.className += ' expanded-true';
// Update aria-expanded state
toggleAriaExpandedState( currentSubMenu.previousSibling );
toggleAriaExpandedState( currentSubMenu );
}
/**
......@@ -219,19 +219,9 @@
var url = event.target.getAttribute( 'href' ) ? event.target.getAttribute( 'href' ) : '';
// If there’s a link, go to it on touchend
if ( '#' !== url && '' !== url ) {
window.location = url;
// Open submenu if url is #
} else if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) {
if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) {
openSubMenu( event.target );
// Prevent default touch events
} else {
event.preventDefault();
}
}
......@@ -240,7 +230,8 @@
openSubMenu(event.target);
// Check if child of .submenu-expand is touched
} else if ( null != getCurrentParent( event.target, '.submenu-expand' ) && getCurrentParent( event.target, '.submenu-expand' ).matches( '.submenu-expand' ) ) {
} else if ( null != getCurrentParent( event.target, '.submenu-expand' ) &&
getCurrentParent( event.target, '.submenu-expand' ).matches( '.submenu-expand' ) ) {
openSubMenu( getCurrentParent( event.target, '.submenu-expand' ) );
// Check if .menu-item-link-return is touched
......@@ -264,6 +255,7 @@
if ( null != mainNav && hasClass( mainNav, '.main-navigation' ) ) {
// Prevent default mouse events
event.preventDefault();
} else if (
event.target.matches('.submenu-expand') ||
null != getCurrentParent( event.target, '.submenu-expand' ) &&
......
=== Twenty Nineteen ===
Contributors: the WordPress team
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
Requires at least: 4.9.6
Tested up to: WordPress 5.0
Stable tag: 1.1
Stable tag: 1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
......@@ -14,6 +14,11 @@ Our 2019 default theme is designed to show off the power of the block editor. It
== Changelog ==
= 1.2 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.2
= 1.1 =
* Released: December 19, 2018
......
......@@ -215,6 +215,9 @@
&.is-style-outline .wp-block-button__link:hover {
color: white;
border-color: $color__background-button-hover;
&:not(.has-background) {
color: $color__background-button-hover;
}
}
}
......@@ -502,20 +505,40 @@
//! Image
.wp-block-image {
max-width: 100%;
img {
display: block;
}
&.alignleft,
&.alignright {
max-width: 100%;
.aligncenter {
@include postContentMaxWidth();
@include media(tablet) {
margin: 0;
width: $size__site-tablet-content;
img {
margin: 0 auto;
}
}
@include media(desktop) {
width: $size__site-desktop-content;
img {
margin: 0 auto;
}
}
}
&.alignfull img {
width: 100vw;
max-width: calc( 100% + (2 * #{$size__spacing-unit}));
@include media(tablet) {
max-width: calc( 125% + 150px );
margin-left: auto;
margin-right: auto;
}
......
......@@ -13,6 +13,39 @@
display: inline;
}
/* Un-style buttons */
button {
display: inline-block;
border: none;
padding: 0;
margin: 0;
font-family: $font__heading;
font-weight: 700;
line-height: $font__line-height-heading;
text-decoration: none;
background: transparent;
color: inherit;
cursor: pointer;
transition: background 250ms ease-in-out,
transform 150ms ease;
-webkit-appearance: none;
-moz-appearance: none;
&:hover,
&:focus {
background: transparent;
}
&:focus {
outline: 1px solid transparent;
outline-offset: -4px;
}
&:active {
transform: scale(0.99);
}
}
.main-menu {
display: inline-block;
......@@ -169,6 +202,7 @@
color: $color__background-body;
display: block;
line-height: $font__line-height-heading;
text-shadow: none;
padding: calc( .5 * #{$size__spacing-unit} ) calc( 24px + #{$size__spacing-unit} ) calc( .5 * #{$size__spacing-unit} ) $size__spacing-unit;
white-space: nowrap;
......@@ -182,6 +216,13 @@
}
}
> .menu-item-link-return {
width: 100%;
font-size: $font__size_base;
font-weight: normal;
text-align: left;
}
> a:empty {
display: none;
}
......
......@@ -45,6 +45,10 @@
}
}
.main-navigation .sub-menu a {
opacity: inherit;
}
/* add focus state to social media icons */
.social-navigation a {
&:focus {
......
......@@ -200,6 +200,7 @@
&:after {
content: "\02192";
display: inline-block;
margin-left: 0.5em;
}
......
......@@ -4,13 +4,13 @@ Theme Name: Twenty Nineteen
Theme URI: https://github.com/WordPress/twentynineteen
Author: the WordPress team
Author URI: https://wordpress.org/
Description: A new Gutenberg-ready theme.
Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes.
Requires at least: WordPress 4.9.6
Version: 1.0
Version: 1.2
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
......@@ -1027,6 +1027,7 @@ a:focus {
.main-navigation {
display: block;
margin-top: 0.25rem;
/* Un-style buttons */
/*
* Sub-menu styles
*
......@@ -1049,6 +1050,36 @@ body.page .main-navigation {
display: inline;
}
.main-navigation button {
display: inline-block;
border: none;
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-weight: 700;
line-height: 1.2;
text-decoration: none;
background: transparent;
color: inherit;
cursor: pointer;
transition: background 250ms ease-in-out, transform 150ms ease;
-webkit-appearance: none;
-moz-appearance: none;
}
.main-navigation button:hover, .main-navigation button:focus {
background: transparent;
}
.main-navigation button:focus {
outline: 1px solid transparent;
outline-offset: -4px;
}
.main-navigation button:active {
transform: scale(0.99);
}
.main-navigation .main-menu {
display: inline-block;
margin: 0;
......@@ -1190,6 +1221,7 @@ body.page .main-navigation {
color: #fff;
display: block;
line-height: 1.2;
text-shadow: none;
padding: calc( .5 * 1rem) 1rem calc( .5 * 1rem) calc( 24px + 1rem);
white-space: nowrap;
}
......@@ -1206,6 +1238,13 @@ body.page .main-navigation {
background: #005177;
}
.main-navigation .sub-menu > li > .menu-item-link-return {
width: 100%;
font-size: 22px;
font-weight: normal;
text-align: right;
}
.main-navigation .sub-menu > li > a:empty {
display: none;
}
......@@ -2157,6 +2196,10 @@ body.page .main-navigation {
color: #fff;
}
.site-header.featured-image .main-navigation .sub-menu a {
opacity: inherit;
}
.site-header.featured-image .social-navigation a:focus {
color: #fff;
opacity: 1;
......@@ -2614,6 +2657,7 @@ body.page .main-navigation {
.entry .entry-content .more-link:after {
content: "\02192";
display: inline-block;
margin-right: 0.5em;
}
......@@ -3658,6 +3702,10 @@ body.page .main-navigation {
border-color: #111;
}
.entry .entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover:not(.has-background) {
color: #111;
}
.entry .entry-content .wp-block-archives,
.entry .entry-content .wp-block-categories,
.entry .entry-content .wp-block-latest-posts {
......@@ -3934,20 +3982,53 @@ body.page .main-navigation {
}
}
.entry .entry-content .wp-block-image {
max-width: 100%;
}
.entry .entry-content .wp-block-image img {
display: block;
}
.entry .entry-content .wp-block-image.alignleft, .entry .entry-content .wp-block-image.alignright {
max-width: 100%;
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-image .aligncenter {
max-width: calc(8 * (100vw / 12) - 28px);
}
}
@media only screen and (min-width: 1168px) {
.entry .entry-content .wp-block-image .aligncenter {
max-width: calc(6 * (100vw / 12) - 28px);
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-image .aligncenter {
margin: 0;
width: calc(8 * (100vw / 12) - 28px);
}
.entry .entry-content .wp-block-image .aligncenter img {
margin: 0 auto;
}
}
@media only screen and (min-width: 1168px) {
.entry .entry-content .wp-block-image .aligncenter {
width: calc(6 * (100vw / 12) - 28px);
}
.entry .entry-content .wp-block-image .aligncenter img {
margin: 0 auto;
}
}
.entry .entry-content .wp-block-image.alignfull img {
width: 100vw;
max-width: calc( 100% + (2 * 1rem));
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-image.alignfull img {
max-width: calc( 125% + 150px);
margin-right: auto;
margin-left: auto;
}
......
......@@ -4,13 +4,13 @@ Theme Name: Twenty Nineteen
Theme URI: https://github.com/WordPress/twentynineteen
Author: the WordPress team
Author URI: https://wordpress.org/
Description: A new Gutenberg-ready theme.
Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom styles for all the default blocks, and is built so that what you see in the editor looks like what you'll see on your website. Twenty Nineteen is designed to be adaptable to a wide range of websites, whether you’re running a photo blog, launching a new business, or supporting a non-profit. Featuring ample whitespace and modern sans-serif headlines paired with classic serif body text, it's built to be beautiful on all screen sizes.
Requires at least: WordPress 4.9.6
Version: 1.1
Version: 1.2
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready
This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
......@@ -1027,6 +1027,7 @@ a:focus {
.main-navigation {
display: block;
margin-top: 0.25rem;
/* Un-style buttons */
/*
* Sub-menu styles
*
......@@ -1049,6 +1050,36 @@ body.page .main-navigation {
display: inline;
}
.main-navigation button {
display: inline-block;
border: none;
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-weight: 700;
line-height: 1.2;
text-decoration: none;
background: transparent;
color: inherit;
cursor: pointer;
transition: background 250ms ease-in-out, transform 150ms ease;
-webkit-appearance: none;
-moz-appearance: none;
}
.main-navigation button:hover, .main-navigation button:focus {
background: transparent;
}
.main-navigation button:focus {
outline: 1px solid transparent;
outline-offset: -4px;
}
.main-navigation button:active {
transform: scale(0.99);
}
.main-navigation .main-menu {
display: inline-block;
margin: 0;
......@@ -1190,6 +1221,7 @@ body.page .main-navigation {
color: #fff;
display: block;
line-height: 1.2;
text-shadow: none;
padding: calc( .5 * 1rem) calc( 24px + 1rem) calc( .5 * 1rem) 1rem;
white-space: nowrap;
}
......@@ -1206,6 +1238,13 @@ body.page .main-navigation {
background: #005177;
}
.main-navigation .sub-menu > li > .menu-item-link-return {
width: 100%;
font-size: 22px;
font-weight: normal;
text-align: left;
}
.main-navigation .sub-menu > li > a:empty {
display: none;
}
......@@ -2163,6 +2202,10 @@ body.page .main-navigation {
color: #fff;
}