Compare commits

..

1 Commits
5.0.10 ... 5.0

Author SHA1 Message Date
Gary Pendergast
491c67be12 Tag 5.0
Built from https://develop.svn.wordpress.org/tags/5.0@43971


git-svn-id: http://core.svn.wordpress.org/tags/5.0@43803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-06 19:13:16 +00:00
184 changed files with 2486 additions and 4612 deletions

View File

@@ -1,6 +1,6 @@
WordPress - Web publishing software
Copyright 2011-2019 by the contributors
Copyright 2011-2018 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

View File

@@ -18,50 +18,6 @@ if ( !is_multisite() ) {
die();
}
$valid_error_codes = array( 'already_active', 'blog_taken' );
list( $activate_path ) = explode( '?', wp_unslash( $_SERVER['REQUEST_URI'] ) );
$activate_cookie = 'wp-activate-' . COOKIEHASH;
$key = '';
$result = null;
if ( isset( $_GET['key'] ) && isset( $_POST['key'] ) && $_GET['key'] !== $_POST['key'] ) {
wp_die( __( 'A key value mismatch has been detected. Please follow the link provided in your activation email.' ), __( 'An error occurred during the activation' ), 400 );
} elseif ( ! empty( $_GET['key'] ) ) {
$key = $_GET['key'];
} elseif ( ! empty( $_POST['key'] ) ) {
$key = $_POST['key'];
}
if ( $key ) {
$redirect_url = remove_query_arg( 'key' );
if ( $redirect_url !== remove_query_arg( false ) ) {
setcookie( $activate_cookie, $key, 0, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
wp_safe_redirect( $redirect_url );
exit;
} else {
$result = wpmu_activate_signup( $key );
}
}
if ( $result === null && isset( $_COOKIE[ $activate_cookie ] ) ) {
$key = $_COOKIE[ $activate_cookie ];
$result = wpmu_activate_signup( $key );
setcookie( $activate_cookie, ' ', time() - YEAR_IN_SECONDS, $activate_path, COOKIE_DOMAIN, is_ssl(), true );
}
if ( $result === null || ( is_wp_error( $result ) && 'invalid_key' === $result->get_error_code() ) ) {
status_header( 404 );
} elseif ( is_wp_error( $result ) ) {
$error_code = $result->get_error_code();
if ( ! in_array( $error_code, $valid_error_codes ) ) {
status_header( 400 );
}
}
nocache_headers();
if ( is_object( $wp_object_cache ) )
@@ -113,14 +69,13 @@ function wpmu_activate_stylesheet() {
<?php
}
add_action( 'wp_head', 'wpmu_activate_stylesheet' );
add_action( 'wp_head', 'wp_sensitive_page_meta' );
get_header( 'wp-activate' );
?>
<div id="signup-content" class="widecolumn">
<div class="wp-activate-container">
<?php if ( ! $key ) { ?>
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
<h2><?php _e('Activation Key Required') ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
@@ -134,39 +89,42 @@ get_header( 'wp-activate' );
</form>
<?php } else {
if ( is_wp_error( $result ) && in_array( $result->get_error_code(), $valid_error_codes ) ) {
$signup = $result->get_error_data();
?>
<h2><?php _e( 'Your account is now active!' ); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
network_site_url( 'wp-login.php', 'login' ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup( $key );
if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data();
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<?php
echo '<p class="lead-in">';
if ( $signup->domain . $signup->path == '' ) {
printf(
/* translators: 1: login URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
network_site_url( 'wp-login.php', 'login' ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
} else {
printf(
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
} else {
printf(
/* translators: 1: site URL, 2: username, 3: user email, 4: lost password URL */
__( 'Your site at %1$s is active. You may now log in to your site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.' ),
sprintf( '<a href="http://%1$s">%1$s</a>', $signup->domain ),
$signup->user_login,
$signup->user_email,
wp_lostpassword_url()
);
}
echo '</p>';
} elseif ( $result === null || is_wp_error( $result ) ) {
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<?php if ( is_wp_error( $result ) ) : ?>
?>
<h2><?php _e( 'An error occurred during the activation' ); ?></h2>
<p><?php echo $result->get_error_message(); ?></p>
<?php endif; ?>
<?php
<?php
}
} else {
$url = isset( $result['blog_id'] ) ? get_home_url( (int) $result['blog_id'] ) : '';
$user = get_userdata( (int) $result['user_id'] );

View File

@@ -60,176 +60,6 @@ include( ABSPATH . 'wp-admin/admin-header.php' );
<a href="freedoms.php?privacy-notice" class="nav-tab"><?php _e( 'Privacy' ); ?></a>
</h2>
<div class="changelog point-releases">
<h3><?php _e( 'Maintenance and Security Releases' ); ?></h3>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.10'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.10' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.9'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.9' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.8'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.8' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.7'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.7' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.6'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.6' )
)
);
?>
</p>
<p>
<?php
printf(
/* translators: %s: WordPress version number */
__( '<strong>Version %s</strong> addressed some security issues.' ),
'5.0.4'
);
?>
<?php
printf(
/* translators: %s: HelpHub URL */
__( 'For more information, see <a href="%s">the release notes</a>.' ),
sprintf(
/* translators: %s: WordPress version */
esc_url( __( 'https://wordpress.org/support/wordpress-version/version-%s/' ) ),
sanitize_title( '5.0.4' )
)
);
?>
</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.',
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.',
73
),
'5.0.2',
number_format_i18n( 73 )
);
?>
<?php
/* translators: %s: Codex URL */
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_5.0.2' );
?>
</p>
<p>
<?php
/* translators: %s: WordPress version number */
printf( __( '<strong>Version %s</strong> addressed some security issues.' ), '5.0.1' );
?>
<?php
/* translators: %s: Codex URL */
printf( __( 'For more information, see <a href="%s">the release notes</a>.' ), 'https://codex.wordpress.org/Version_5.0.1' );
?>
</p>
</div>
<div class="feature-section one-col">
<div class="col">
<h2><?php _e( 'Say Hello to the New Editor' ); ?></h2>

View File

@@ -22,7 +22,7 @@ if ( defined( 'ABSPATH' ) ) {
require_once( ABSPATH . 'wp-admin/admin.php' );
header( 'Content-Type: text/plain; charset=' . get_option( 'blog_charset' ) );
header( 'Content-Type: text/html; charset=' . get_option( 'blog_charset' ) );
if ( isset( $_REQUEST['action'] ) && 'upload-attachment' === $_REQUEST['action'] ) {
include( ABSPATH . 'wp-admin/includes/ajax-actions.php' );

View File

@@ -560,10 +560,6 @@ 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 */

File diff suppressed because one or more lines are too long

View File

@@ -560,10 +560,6 @@ 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 */

File diff suppressed because one or more lines are too long

View File

@@ -23,6 +23,10 @@ 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 );
@@ -395,36 +399,9 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
?>
<div class="block-editor">
<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>
<h1 class="screen-reader-text"><?php echo esc_html( $post_type_object->labels->edit_item ); ?></h1>
<div id="editor" class="block-editor__container"></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>

View File

@@ -1070,8 +1070,6 @@ function wp_ajax_replyto_comment( $action ) {
if ( wp_create_nonce( 'unfiltered-html-comment' ) != $_POST['_wp_unfiltered_html_comment'] ) {
kses_remove_filters(); // start with a clean slate
kses_init_filters(); // set up the filters
remove_filter( 'pre_comment_content', 'wp_filter_post_kses' );
add_filter( 'pre_comment_content', 'wp_filter_kses' );
}
}
} else {
@@ -2068,7 +2066,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'Sorry, you are not allowed to upload files.' ),
'filename' => esc_html( $_FILES['async-upload']['name'] ),
'filename' => $_FILES['async-upload']['name'],
)
) );
@@ -2082,7 +2080,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'Sorry, you are not allowed to attach files to this post.' ),
'filename' => esc_html( $_FILES['async-upload']['name'] ),
'filename' => $_FILES['async-upload']['name'],
)
) );
@@ -2092,11 +2090,7 @@ function wp_ajax_upload_attachment() {
$post_id = null;
}
$post_data = ! empty( $_REQUEST['post_data'] ) ? _wp_get_allowed_postdata( _wp_translate_postdata( false, (array) $_REQUEST['post_data'] ) ) : array();
if ( is_wp_error( $post_data ) ) {
wp_die( $post_data->get_error_message() );
}
$post_data = isset( $_REQUEST['post_data'] ) ? $_REQUEST['post_data'] : array();
// If the context is custom header or background, make sure the uploaded file is an image.
if ( isset( $post_data['context'] ) && in_array( $post_data['context'], array( 'custom-header', 'custom-background' ) ) ) {
@@ -2106,7 +2100,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => __( 'The uploaded file is not a valid image. Please try again.' ),
'filename' => esc_html( $_FILES['async-upload']['name'] ),
'filename' => $_FILES['async-upload']['name'],
)
) );
@@ -2121,7 +2115,7 @@ function wp_ajax_upload_attachment() {
'success' => false,
'data' => array(
'message' => $attachment_id->get_error_message(),
'filename' => esc_html( $_FILES['async-upload']['name'] ),
'filename' => $_FILES['async-upload']['name'],
)
) );

View File

@@ -278,9 +278,7 @@ final class WP_Screen {
switch ( $base ) {
case 'post' :
if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] )
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
elseif ( isset( $_GET['post'] ) )
if ( isset( $_GET['post'] ) )
$post_id = (int) $_GET['post'];
elseif ( isset( $_POST['post_ID'] ) )
$post_id = (int) $_POST['post_ID'];

View File

@@ -2831,11 +2831,8 @@ function edit_form_image_editor( $post ) {
<label for="attachment_content"><strong><?php _e( 'Description' ); ?></strong><?php
if ( preg_match( '#^(audio|video)/#', $post->post_mime_type ) ) {
echo ': ' . __( 'Displayed on attachment pages.' );
}
?>
</label>
<?php wp_editor( format_to_edit( $post->post_content ), 'attachment_content', $editor_args ); ?>
} ?></label>
<?php wp_editor( $post->post_content, 'attachment_content', $editor_args ); ?>
</div>
<?php

View File

@@ -620,46 +620,24 @@ function set_screen_options() {
return;
break;
default:
if ( '_page' === substr( $option, -5 ) || 'layout_columns' === $option ) {
/**
* Filters a screen option value before it is set.
*
* The filter can also be used to modify non-standard [items]_per_page
* settings. See the parent function for a full list of standard options.
*
* Returning false to the filter will skip saving the current option.
*
* @since 2.8.0
* @since 5.4.2 Only applied to options ending with '_page',
* or the 'layout_columns' option.
*
* @see set_screen_options()
*
* @param bool $keep Whether to save or skip saving the screen option value.
* Default false.
* @param string $option The option name.
* @param int $value The number of rows to use.
*/
$value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
/**
* Filters a screen option value before it is set.
*
* The dynamic portion of the hook, `$option`, refers to the option name.
* The filter can also be used to modify non-standard [items]_per_page
* settings. See the parent function for a full list of standard options.
*
* Returning false to the filter will skip saving the current option.
*
* @since 5.4.2
* @since 2.8.0
*
* @see set_screen_options()
*
* @param bool $keep Whether to save or skip saving the screen option value.
* Default false.
* @param string $option The option name.
* @param int $value The number of rows to use.
* @param bool|int $value Screen option value. Default false to skip.
* @param string $option The option name.
* @param int $value The number of rows to use.
*/
$value = apply_filters( "set_screen_option_{$option}", false, $option, $value );
$value = apply_filters( 'set-screen-option', false, $option, $value );
if ( false === $value )
return;

View File

@@ -394,7 +394,6 @@ function install_plugin_install_status($api, $loop = false) {
$status = 'install';
$url = false;
$update_file = false;
$version = '';
/*
* Check to see if this plugin is known to be installed,

View File

@@ -174,27 +174,6 @@ function _wp_translate_postdata( $update = false, $post_data = null ) {
return $post_data;
}
/**
* Returns only allowed post data fields
*
* @since 4.9.9
*
* @param array $post_data Array of post data. Defaults to the contents of $_POST.
* @return object|bool WP_Error on failure, true on success.
*/
function _wp_get_allowed_postdata( $post_data = null ) {
if ( empty( $post_data ) ) {
$post_data = $_POST;
}
// Pass through errors
if ( is_wp_error( $post_data ) ) {
return $post_data;
}
return array_diff_key( $post_data, array_flip( array( 'meta_input', 'file', 'guid' ) ) );
}
/**
* Update an existing post with values provided in $_POST.
*
@@ -263,7 +242,6 @@ function edit_post( $post_data = null ) {
$post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error($post_data) )
wp_die( $post_data->get_error_message() );
$translated = _wp_get_allowed_postdata( $post_data );
// Post Formats
if ( isset( $post_data['post_format'] ) )
@@ -343,7 +321,7 @@ function edit_post( $post_data = null ) {
$attachment_data = isset( $post_data['attachments'][ $post_ID ] ) ? $post_data['attachments'][ $post_ID ] : array();
/** This filter is documented in wp-admin/includes/media.php */
$translated = apply_filters( 'attachment_fields_to_save', $translated, $attachment_data );
$post_data = apply_filters( 'attachment_fields_to_save', $post_data, $attachment_data );
}
// Convert taxonomy input to term IDs, to avoid ambiguity.
@@ -388,7 +366,7 @@ function edit_post( $post_data = null ) {
}
}
$translated['tax_input'][ $taxonomy ] = $clean_terms;
$post_data['tax_input'][ $taxonomy ] = $clean_terms;
}
}
@@ -396,18 +374,18 @@ function edit_post( $post_data = null ) {
update_post_meta( $post_ID, '_edit_last', get_current_user_id() );
$success = wp_update_post( $translated );
$success = wp_update_post( $post_data );
// If the save failed, see if we can sanity check the main fields and try again
if ( ! $success && is_callable( array( $wpdb, 'strip_invalid_text_for_column' ) ) ) {
$fields = array( 'post_title', 'post_content', 'post_excerpt' );
foreach ( $fields as $field ) {
if ( isset( $translated[ $field ] ) ) {
$translated[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field, $translated[ $field ] );
if ( isset( $post_data[ $field ] ) ) {
$post_data[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->posts, $field, $post_data[ $field ] );
}
}
wp_update_post( $translated );
wp_update_post( $post_data );
}
// Now that we have an ID we can fix any attachment anchor hrefs
@@ -567,9 +545,9 @@ function bulk_edit_posts( $post_data = null ) {
unset( $post_data['tax_input']['category'] );
}
$post_data['post_ID'] = $post_ID;
$post_data['post_type'] = $post->post_type;
$post_data['post_mime_type'] = $post->post_mime_type;
$post_data['guid'] = $post->guid;
foreach ( array( 'comment_status', 'ping_status', 'post_author' ) as $field ) {
if ( ! isset( $post_data[ $field ] ) ) {
@@ -577,15 +555,17 @@ function bulk_edit_posts( $post_data = null ) {
}
}
$post_data['ID'] = $post_ID;
$post_data['post_ID'] = $post_ID;
$post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error( $post_data ) ) {
$skipped[] = $post_ID;
continue;
}
$post_data = _wp_get_allowed_postdata( $post_data );
if ( isset( $shared_post_data['post_format'] ) ) {
set_post_format( $post_ID, $shared_post_data['post_format'] );
if ( isset( $post_data['post_format'] ) ) {
set_post_format( $post_ID, $post_data['post_format'] );
unset( $post_data['tax_input']['post_format'] );
}
@@ -777,10 +757,9 @@ function wp_write_post() {
$translated = _wp_translate_postdata( false );
if ( is_wp_error($translated) )
return $translated;
$translated = _wp_get_allowed_postdata( $translated );
// Create the post.
$post_ID = wp_insert_post( $translated );
$post_ID = wp_insert_post( $_POST );
if ( is_wp_error( $post_ID ) )
return $post_ID;
@@ -1029,24 +1008,18 @@ function wp_edit_posts_query( $q = false ) {
$post_type = 'post';
$avail_post_stati = get_available_post_statuses($post_type);
$post_status = '';
$perm = '';
if ( isset($q['post_status']) && in_array( $q['post_status'], $post_stati ) ) {
$post_status = $q['post_status'];
$perm = 'readable';
}
$orderby = '';
if ( isset( $q['orderby'] ) ) {
$orderby = $q['orderby'];
} elseif ( isset( $q['post_status'] ) && in_array( $q['post_status'], array( 'pending', 'draft' ) ) ) {
$orderby = 'modified';
}
$order = '';
if ( isset( $q['order'] ) ) {
$order = $q['order'];
} elseif ( isset( $q['post_status'] ) && 'pending' == $q['post_status'] ) {
@@ -1086,7 +1059,7 @@ function wp_edit_posts_query( $q = false ) {
$query = compact('post_type', 'post_status', 'perm', 'order', 'orderby', 'posts_per_page');
// Hierarchical types require special args.
if ( is_post_type_hierarchical( $post_type ) && empty( $orderby ) ) {
if ( is_post_type_hierarchical( $post_type ) && !isset($orderby) ) {
$query['orderby'] = 'menu_order title';
$query['order'] = 'asc';
$query['posts_per_page'] = -1;
@@ -1712,7 +1685,6 @@ function wp_create_post_autosave( $post_data ) {
$post_data = _wp_translate_postdata( true, $post_data );
if ( is_wp_error( $post_data ) )
return $post_data;
$post_data = _wp_get_allowed_postdata( $post_data );
$post_author = get_current_user_id();
@@ -2218,22 +2190,36 @@ function the_block_editor_meta_box_post_form_hidden_fields( $post ) {
* Some meta boxes hook into these actions to add hidden input fields in the classic post form. For backwards
* compatibility, we can capture the output from these actions, and extract the hidden input fields.
*/
ob_start();
/** This filter is documented in wp-admin/edit-form-advanced.php */
do_action( 'edit_form_after_title', $post );
/** This filter is documented in wp-admin/edit-form-advanced.php */
do_action( 'edit_form_advanced', $post );
$classic_output = ob_get_clean();
$actions = array(
'edit_form_after_title',
'edit_form_advanced',
);
$classic_elements = wp_html_split( $classic_output );
$hidden_inputs = '';
foreach( $classic_elements as $element ) {
if ( 0 !== strpos( $element, '<input ') ) {
foreach ( $actions as $action ) {
ob_start();
do_action_deprecated(
$action,
array( $post ),
'5.0.0',
'block_editor_meta_box_hidden_fields',
__( 'This action is still supported in the classic editor, but is deprecated in the block editor.' )
);
$classic_output = ob_get_clean();
if ( ! $classic_output ) {
continue;
}
if ( preg_match( '/\stype=[\'"]hidden[\'"]\s/', $element ) ) {
echo $element;
$classic_elements = wp_html_split( $classic_output );
$hidden_inputs = '';
foreach( $classic_elements as $element ) {
if ( 0 !== strpos( $element, '<input ') ) {
continue;
}
if ( preg_match( '/\stype=[\'"]hidden[\'"]\s/', $element ) ) {
echo $element;
}
}
}
?>

View File

@@ -16,9 +16,7 @@ $submenu_file = 'edit.php';
wp_reset_vars( array( 'action' ) );
if ( isset( $_GET['post'] ) && isset( $_POST['post_ID'] ) && (int) $_GET['post'] !== (int) $_POST['post_ID'] )
wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
elseif ( isset( $_GET['post'] ) )
if ( isset( $_GET['post'] ) )
$post_id = $post_ID = (int) $_GET['post'];
elseif ( isset( $_POST['post_ID'] ) )
$post_id = $post_ID = (int) $_POST['post_ID'];
@@ -40,10 +38,6 @@ if ( $post ) {
$post_type_object = get_post_type_object( $post_type );
}
if ( isset( $_POST['post_type'] ) && $post && $post_type !== $_POST['post_type'] ) {
wp_die( __( 'A post type mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
}
if ( isset( $_POST['deletepost'] ) )
$action = 'delete';
elseif ( isset($_POST['wp-preview']) && 'dopreview' == $_POST['wp-preview'] )
@@ -150,8 +144,6 @@ case 'edit':
$post_new_file = "post-new.php?post_type=$post_type";
}
$title = $post_type_object->labels->edit_item;
/**
* Allows replacement of the editor.
*
@@ -176,7 +168,8 @@ case 'edit':
wp_enqueue_script('autosave');
}
$post = get_post( $post_id, OBJECT, 'edit' );
$title = $post_type_object->labels->edit_item;
$post = get_post($post_id, OBJECT, 'edit');
if ( post_type_supports($post_type, 'comments') ) {
wp_enqueue_script('admin-comments');
@@ -196,7 +189,7 @@ case 'editattachment':
// Update the thumbnail filename
$newmeta = wp_get_attachment_metadata( $post_id, true );
$newmeta['thumb'] = wp_basename( $_POST['thumb'] );
$newmeta['thumb'] = $_POST['thumb'];
wp_update_attachment_metadata( $post_id, $newmeta );

View File

@@ -337,7 +337,7 @@ $can_install = current_user_can( 'install_themes' );
</tr>
<?php foreach ( $broken_themes as $broken_theme ) : ?>
<tr>
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?></td>
<td><?php echo $broken_theme->get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?></td>
<td><?php echo $broken_theme->errors()->get_error_message(); ?></td>
<?php
if ( $can_delete ) {

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Eleven
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -232,30 +232,22 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #eee;
cursor: pointer;
font-size: 15px;
margin: 20px 0;
padding: 5px 22px;
text-decoration: none;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #222;
text-shadow: none;
}
.wp-block-button__link,
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .is-style-outline .wp-block-button__link:hover {
background: #222;
color: #eee;
}
.wp-block-button__link:active {
.wp-block-button .wp-block-button__link:active {
background: #1982d1;
color: #bfddf3;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Eleven
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -20,10 +20,10 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: 300;
font-size: 300;
line-height: 1.625;
}
@@ -371,9 +371,14 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #eee;
cursor: pointer;
font-size: 15px;
line-height: 24px;
@@ -382,19 +387,6 @@ p.has-drop-cap:not(:focus)::first-letter {
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.wp-block-button__link {
background: #222;
color: #eee;
}
.is-style-outline .wp-block-button__link {
color: #222;
}
.wp-block-button__link.has-text-color {
text-shadow: none;
}
/* Media & Text */
.wp-block-media-text *:last-child {

View File

@@ -282,18 +282,18 @@ endif; // twentyeleven_setup
*/
function twentyeleven_scripts_styles() {
// Theme block stylesheet.
wp_enqueue_style( 'twentyeleven-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentyeleven-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181018' );
}
add_action( 'wp_enqueue_scripts', 'twentyeleven_scripts_styles' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Eleven 2.9
*/
function twentyeleven_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentyeleven-block-editor-style', get_template_directory_uri() . '/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentyeleven-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' );
}
add_action( 'enqueue_block_editor_assets', 'twentyeleven_block_editor_styles' );

View File

@@ -1,14 +1,14 @@
# Copyright (C) 2019 the WordPress team
# Copyright (C) 2018 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Eleven 3.1\n"
"Project-Id-Version: Twenty Eleven 2.8\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyeleven\n"
"POT-Creation-Date: 2019-01-02 18:09:07+00:00\n"
"POT-Creation-Date: 2018-11-06 15:33:02+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -26,7 +26,7 @@ msgstr ""
#. translators: %1$s: smilie
#: 404.php:46
#: 404.php:36
msgid "Try looking in the monthly archives. %1$s"
msgstr ""
@@ -56,12 +56,12 @@ msgstr ""
msgid "Blog Archives"
msgstr ""
#: archive.php:60 author.php:90 category.php:64 index.php:40 search.php:47
#: tag.php:65
#: archive.php:57 author.php:86 category.php:59 index.php:37 search.php:44
#: tag.php:60
msgid "Nothing Found"
msgstr ""
#: archive.php:64 author.php:94 category.php:68 index.php:44 tag.php:69
#: archive.php:61 author.php:90 category.php:63 index.php:41 tag.php:64
msgid "Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post."
msgstr ""
@@ -69,11 +69,11 @@ msgstr ""
msgid "Author Archives: %s"
msgstr ""
#: author.php:61 content-single.php:70
#: author.php:60 content-single.php:63
msgid "About %s"
msgstr ""
#: category.php:20
#: category.php:19
msgid "Category Archives: %s"
msgstr ""
@@ -81,25 +81,25 @@ msgstr ""
msgid "This post is password protected. Enter the password to view any comments."
msgstr ""
#: comments.php:35
#: comments.php:34
msgid "One thought on &ldquo;%2$s&rdquo;"
msgid_plural "%1$s thoughts on &ldquo;%2$s&rdquo;"
msgstr[0] ""
msgstr[1] ""
#: comments.php:44 comments.php:65
#: comments.php:41 comments.php:62
msgid "Comment navigation"
msgstr ""
#: comments.php:45 comments.php:66
#: comments.php:42 comments.php:63
msgid "&larr; Older Comments"
msgstr ""
#: comments.php:46 comments.php:67
#: comments.php:43 comments.php:64
msgid "Newer Comments &rarr;"
msgstr ""
#: comments.php:78
#: comments.php:74
msgid "Comments are closed."
msgstr ""
@@ -126,57 +126,57 @@ msgstr ""
#: content-aside.php:35 content-gallery.php:34 content-image.php:29
#: content-link.php:35 content-quote.php:35 content-status.php:48
#: content.php:41 functions.php:457
#: content.php:41 functions.php:443
msgid "Continue reading <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: content-aside.php:39 content-featured.php:26 content-gallery.php:61
#: content-image.php:33 content-intro.php:21 content-link.php:39
#: content-page.php:21 content-quote.php:39 content-single.php:27
#: content-status.php:52 content.php:45 image.php:119
#: content-aside.php:36 content-featured.php:23 content-gallery.php:52
#: content-image.php:30 content-intro.php:18 content-link.php:36
#: content-page.php:18 content-quote.php:36 content-single.php:24
#: content-status.php:49 content.php:42 image.php:98
msgid "Pages:"
msgstr ""
#: content-aside.php:51 content-gallery.php:103 content-image.php:75
#: content-link.php:51 content-quote.php:81 content-status.php:64
#: content.php:91 showcase.php:214
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "Leave a reply"
msgstr ""
#: content-aside.php:51 content-gallery.php:103 content-image.php:75
#: content-link.php:51 content-quote.php:81 content-status.php:64
#: content.php:91 showcase.php:214
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "<b>1</b> Reply"
msgstr ""
#: content-aside.php:51 content-gallery.php:103 content-image.php:75
#: content-link.php:51 content-quote.php:81 content-status.php:64
#: content.php:91 showcase.php:214
#: content-aside.php:44 content-gallery.php:85 content-image.php:66
#: content-link.php:44 content-quote.php:69 content-status.php:57
#: content.php:79 showcase.php:202
msgid "<b>%</b> Replies"
msgstr ""
#: content-aside.php:53 content-featured.php:52 content-gallery.php:106
#: content-image.php:79 content-intro.php:26 content-link.php:53
#: content-page.php:28 content-quote.php:84 content-single.php:59
#: content-status.php:66 content.php:94 functions.php:710 functions.php:741
#: image.php:45
#: content-aside.php:46 content-featured.php:45 content-gallery.php:88
#: content-image.php:70 content-intro.php:19 content-link.php:46
#: content-page.php:21 content-quote.php:72 content-single.php:52
#: content-status.php:59 content.php:82 functions.php:677 functions.php:705
#: image.php:41
msgid "Edit"
msgstr ""
#. translators: used between list items, there is a space after the comma
#: content-featured.php:36 content-featured.php:45 content-gallery.php:73
#: content-gallery.php:85 content-image.php:57 content-image.php:66
#: content-quote.php:51 content-quote.php:63 content-single.php:37
#: content-single.php:40 content.php:58 content.php:72
#: content-featured.php:29 content-featured.php:38 content-gallery.php:60
#: content-gallery.php:70 content-image.php:49 content-image.php:58
#: content-quote.php:44 content-quote.php:54 content-single.php:30
#: content-single.php:33 content.php:51 content.php:63
msgid ", "
msgstr ""
#: content-featured.php:38
#: content-featured.php:31
msgid "This entry was posted in %1$s and tagged %2$s. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-featured.php:40
#: content-featured.php:33
msgid "This entry was posted in %1$s. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
@@ -184,23 +184,23 @@ msgstr ""
msgid "Gallery"
msgstr ""
#: content-gallery.php:49
#: content-gallery.php:45
msgid "This gallery contains <a %1$s>%2$s photo</a>."
msgid_plural "This gallery contains <a %1$s>%2$s photos</a>."
msgstr[0] ""
msgstr[1] ""
#: content-gallery.php:50 showcase.php:128
#: content-gallery.php:46 showcase.php:121
msgid "Permalink to %s"
msgstr ""
#: content-gallery.php:78 content-image.php:61 content-quote.php:56
#: content.php:63
#: content-gallery.php:64 content-image.php:53 content-quote.php:48
#: content.php:55
msgid "<span class=\"%1$s\">Posted in</span> %2$s"
msgstr ""
#: content-gallery.php:93 content-image.php:70 content-quote.php:71
#: content.php:80
#: content-gallery.php:76 content-image.php:61 content-quote.php:60
#: content.php:69
msgid "<span class=\"%1$s\">Tagged</span> %2$s"
msgstr ""
@@ -208,11 +208,11 @@ msgstr ""
msgid "Image"
msgstr ""
#: content-image.php:44
#: content-image.php:36
msgid "<a href=\"%1$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%2$s\">%3$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by </span> <span class=\"author vcard\"><a class=\"url fn n\" href=\"%4$s\" title=\"%5$s\" rel=\"author\">%6$s</a></span></span>"
msgstr ""
#: content-image.php:49 functions.php:791
#: content-image.php:41 functions.php:743
msgid "View all posts by %s"
msgstr ""
@@ -224,19 +224,19 @@ msgstr ""
msgid "Quote"
msgstr ""
#: content-single.php:42
#: content-single.php:35
msgid "This entry was posted in %1$s and tagged %2$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:44
#: content-single.php:37
msgid "This entry was posted in %1$s by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:46
#: content-single.php:39
msgid "This entry was posted by <a href=\"%6$s\">%5$s</a>. Bookmark the <a href=\"%3$s\" title=\"Permalink to %4$s\" rel=\"bookmark\">permalink</a>."
msgstr ""
#: content-single.php:74
#: content-single.php:67
msgid "View all posts by %s <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
@@ -248,199 +248,199 @@ msgstr ""
msgid "Featured"
msgstr ""
#: footer.php:34
#: footer.php:33
msgid "https://wordpress.org/"
msgstr ""
#: footer.php:34
#: footer.php:33
msgid "Semantic Personal Publishing Platform"
msgstr ""
#: footer.php:35
#: footer.php:34
msgid "Proudly powered by %s"
msgstr ""
#: functions.php:100
#: functions.php:97
msgid "Blue"
msgstr ""
#: functions.php:105
#: functions.php:102
msgid "Black"
msgstr ""
#: functions.php:110
#: functions.php:107
msgid "Dark Gray"
msgstr ""
#: functions.php:115
#: functions.php:112
msgid "Medium Gray"
msgstr ""
#: functions.php:120
#: functions.php:117
msgid "Light Gray"
msgstr ""
#: functions.php:125
#: functions.php:122
msgid "White"
msgstr ""
#: functions.php:142
#: functions.php:138
msgid "Primary Menu"
msgstr ""
#. translators: header image description
#: functions.php:236
#: functions.php:227
msgid "Wheel"
msgstr ""
#. translators: header image description
#: functions.php:242
#: functions.php:233
msgid "Shore"
msgstr ""
#. translators: header image description
#: functions.php:248
#: functions.php:239
msgid "Trolley"
msgstr ""
#. translators: header image description
#: functions.php:254
#: functions.php:245
msgid "Pine Cone"
msgstr ""
#. translators: header image description
#: functions.php:260
#: functions.php:251
msgid "Chessboard"
msgstr ""
#. translators: header image description
#: functions.php:266
#: functions.php:257
msgid "Lanterns"
msgstr ""
#. translators: header image description
#: functions.php:272
#: functions.php:263
msgid "Willow"
msgstr ""
#. translators: header image description
#: functions.php:278
#: functions.php:269
msgid "Hanoi Plant"
msgstr ""
#: functions.php:530
#: functions.php:514
msgid "Main Sidebar"
msgstr ""
#: functions.php:541
#: functions.php:523
msgid "Showcase Sidebar"
msgstr ""
#: functions.php:543
#: functions.php:525
msgid "The sidebar for the optional Showcase Template"
msgstr ""
#: functions.php:553
#: functions.php:533
msgid "Footer Area One"
msgstr ""
#: functions.php:555 functions.php:567 functions.php:579
#: functions.php:535 functions.php:545 functions.php:555
msgid "An optional widget area for your site footer"
msgstr ""
#: functions.php:565
#: functions.php:543
msgid "Footer Area Two"
msgstr ""
#: functions.php:577
#: functions.php:553
msgid "Footer Area Three"
msgstr ""
#: functions.php:603 single.php:21
#: functions.php:577 single.php:18
msgid "Post navigation"
msgstr ""
#: functions.php:604
#: functions.php:578
msgid "<span class=\"meta-nav\">&larr;</span> Older posts"
msgstr ""
#: functions.php:605
#: functions.php:579
msgid "Newer posts <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: functions.php:710
#: functions.php:677
msgid "Pingback:"
msgstr ""
#. translators: 1: comment author, 2: date and time
#: functions.php:729
#: functions.php:694
msgid "%1$s on %2$s <span class=\"says\">said:</span>"
msgstr ""
#. translators: 1: date, 2: time
#: functions.php:736
#: functions.php:700
msgid "%1$s at %2$s"
msgstr ""
#: functions.php:745
#: functions.php:709
msgid "Your comment is awaiting moderation."
msgstr ""
#: functions.php:759
#: functions.php:718
msgid "Reply <span>&darr;</span>"
msgstr ""
#: functions.php:785
#: functions.php:737
msgid "<span class=\"sep\">Posted on </span><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a><span class=\"by-author\"> <span class=\"sep\"> by </span> <span class=\"author vcard\"><a class=\"url fn n\" href=\"%5$s\" title=\"%6$s\" rel=\"author\">%7$s</a></span></span>"
msgstr ""
#: header.php:45
#: header.php:43
msgid "Page %s"
msgstr ""
#: header.php:142
#: header.php:133
msgid "Main menu"
msgstr ""
#: header.php:144
#: header.php:135
msgid "Skip to primary content"
msgstr ""
#: header.php:146
#: header.php:137
msgid "Skip to secondary content"
msgstr ""
#: image.php:21
#: image.php:18
msgid "Image navigation"
msgstr ""
#: image.php:22
#: image.php:19
msgid "&larr; Previous"
msgstr ""
#: image.php:23
#: image.php:20
msgid "Next &rarr;"
msgstr ""
#: image.php:34
#: image.php:30
msgid "<span class=\"meta-prep meta-prep-entry-date\">Published </span> <span class=\"entry-date\"><abbr class=\"published\" title=\"%1$s\">%2$s</abbr></span> at <a href=\"%3$s\" title=\"Link to full-size image\">%4$s &times; %5$s</a> in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>"
msgstr ""
#: inc/theme-options.php:56 inc/theme-options.php:564
#: inc/theme-options.php:56 inc/theme-options.php:542
msgid "Color Scheme"
msgstr ""
#: inc/theme-options.php:62 inc/theme-options.php:589
#: inc/theme-options.php:62 inc/theme-options.php:559
msgid "Link Color"
msgstr ""
@@ -452,107 +452,107 @@ msgstr ""
msgid "Theme Options"
msgstr ""
#: inc/theme-options.php:112
#: inc/theme-options.php:111
msgid "Some themes provide customization options that are grouped together on a Theme Options screen. If you change themes, options may change or disappear, as they are theme-specific. Your current theme, Twenty Eleven, provides the following Theme Options:"
msgstr ""
#: inc/theme-options.php:114
#: inc/theme-options.php:113
msgid "<strong>Color Scheme</strong>: You can choose a color palette of \"Light\" (light background with dark text) or \"Dark\" (dark background with light text) for your site."
msgstr ""
#: inc/theme-options.php:115
#: inc/theme-options.php:114
msgid "<strong>Link Color</strong>: You can choose the color used for text links on your site. You can enter the HTML color or hex code, or you can choose visually by clicking the \"Select a Color\" button to pick from a color wheel."
msgstr ""
#: inc/theme-options.php:116
#: inc/theme-options.php:115
msgid "<strong>Default Layout</strong>: You can choose if you want your site&#8217;s default layout to have a sidebar on the left, the right, or not at all."
msgstr ""
#: inc/theme-options.php:118
#: inc/theme-options.php:117
msgid "Remember to click \"Save Changes\" to save any changes you have made to the theme options."
msgstr ""
#: inc/theme-options.php:120
#: inc/theme-options.php:119
msgid "For more information:"
msgstr ""
#: inc/theme-options.php:121
#: inc/theme-options.php:120
msgid "<a href=\"https://codex.wordpress.org/Appearance_Theme_Options_Screen\" target=\"_blank\">Documentation on Theme Options</a>"
msgstr ""
#: inc/theme-options.php:122
#: inc/theme-options.php:121
msgid "<a href=\"https://wordpress.org/support/\" target=\"_blank\">Support Forums</a>"
msgstr ""
#: inc/theme-options.php:130
#: inc/theme-options.php:128
msgid "Overview"
msgstr ""
#: inc/theme-options.php:152
#: inc/theme-options.php:150
msgid "Light"
msgstr ""
#: inc/theme-options.php:158
#: inc/theme-options.php:156
msgid "Dark"
msgstr ""
#: inc/theme-options.php:183
#: inc/theme-options.php:181
msgid "Content on left"
msgstr ""
#: inc/theme-options.php:188
#: inc/theme-options.php:186
msgid "Content on right"
msgstr ""
#: inc/theme-options.php:193
#: inc/theme-options.php:191
msgid "One-column, no sidebar"
msgstr ""
#: inc/theme-options.php:302
#: inc/theme-options.php:298
msgid "Select a Color"
msgstr ""
#: inc/theme-options.php:305
#: inc/theme-options.php:301
msgid "Default color: %s"
msgstr ""
#: inc/theme-options.php:341
#: inc/theme-options.php:337
msgid "%s Theme Options"
msgstr ""
#: inc/theme-options.php:600
#: inc/theme-options.php:566
msgid "Layout"
msgstr ""
#: inc/widgets.php:23
#: inc/widgets.php:21
msgid "Twenty Eleven Ephemera"
msgstr ""
#: inc/widgets.php:26
#: inc/widgets.php:23
msgid "Use this widget to list your recent Aside, Status, Quote, and Link posts"
msgstr ""
#: inc/widgets.php:74
#: inc/widgets.php:68
msgid "Ephemera"
msgstr ""
#: inc/widgets.php:118 inc/widgets.php:127
#: inc/widgets.php:107 inc/widgets.php:116
msgid "0 <span class=\"reply\">comments &rarr;</span>"
msgstr ""
#: inc/widgets.php:118 inc/widgets.php:127
#: inc/widgets.php:107 inc/widgets.php:116
msgid "1 <span class=\"reply\">comment &rarr;</span>"
msgstr ""
#: inc/widgets.php:118 inc/widgets.php:127
#: inc/widgets.php:107 inc/widgets.php:116
msgid "% <span class=\"reply\">comments &rarr;</span>"
msgstr ""
#: inc/widgets.php:194
#: inc/widgets.php:182
msgid "Title:"
msgstr ""
#: inc/widgets.php:197
#: inc/widgets.php:185
msgid "Number of posts to show:"
msgstr ""
@@ -560,7 +560,7 @@ msgstr ""
msgid "Search Results for: %s"
msgstr ""
#: search.php:51
#: search.php:48
msgid "Sorry, but nothing matched your search criteria. Please try again with some different keywords."
msgstr ""
@@ -568,15 +568,15 @@ msgstr ""
msgid "Search"
msgstr ""
#: showcase.php:83
#: showcase.php:78
msgid "Featured Post"
msgstr ""
#: showcase.php:160
#: showcase.php:151
msgid "Featuring: %s"
msgstr ""
#: showcase.php:170
#: showcase.php:161
msgid "Recent Posts"
msgstr ""
@@ -588,15 +588,15 @@ msgstr ""
msgid "Meta"
msgstr ""
#: single.php:22
#: single.php:19
msgid "<span class=\"meta-nav\">&larr;</span> Previous"
msgstr ""
#: single.php:23
#: single.php:20
msgid "Next <span class=\"meta-nav\">&rarr;</span>"
msgstr ""
#: tag.php:20
#: tag.php:19
msgid "Tag Archives: %s"
msgstr ""
#. Theme Name of the plugin/theme

View File

@@ -1,8 +1,8 @@
=== Twenty Eleven ===
Contributors: the WordPress team
Requires at least: WordPress 3.2
Tested up to: WordPress 5.0
Stable tag: 3.1
Tested up to: WordPress 5.0-trunk
Stable tag: 2.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
@@ -43,16 +43,6 @@ Source: https://github.com/aFarkas/html5shiv
== Changelog ==
= 3.1 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_3.1
= 3.0 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Eleven_Theme_Changelog#Version_3.0
= 2.9 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyeleven/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats.
Version: 3.1
Version: 2.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Fifteen
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -384,6 +384,10 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Button */
.wp-block-button .wp-block-button__link {
background-color: #333;
border: 0;
border-radius: 0;
color: #fff;
cursor: pointer;
font-family: "Noto Sans", sans-serif;
font-size: 12px;
@@ -395,30 +399,11 @@ p.has-drop-cap:not(:focus)::first-letter {
vertical-align: baseline;
}
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link {
border: 0;
}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
border-bottom: 2px solid;
}
.wp-block-button__link {
background-color: #333;
color: #fff;
}
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #333;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.is-style-outline .wp-block-button__link:hover,
.is-style-outline .wp-block-button__link:focus {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background-color: #707070;
background-color: rgba(51, 51, 51, 0.7);
color: #fff;
outline: 0;
}
@media screen and (min-width: 46.25em) {

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Fifteen
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -20,7 +20,7 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-size: 15px;
line-height: 1.6;
}
@@ -708,6 +708,10 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Button */
.wp-block-button .wp-block-button__link {
background-color: #333;
border: 0;
border-radius: 0;
color: #fff;
cursor: pointer;
font-family: "Noto Sans", sans-serif;
font-size: 12px;
@@ -718,15 +722,6 @@ p.has-drop-cap:not(:focus)::first-letter {
vertical-align: baseline;
}
.wp-block-button__link {
background-color: #333;
color: #fff;
}
.is-style-outline .wp-block-button__link {
color: #333;
}
@media screen and (min-width: 46.25em) {
.wp-block-button .wp-block-button__link {
font-size: 14px;

View File

@@ -333,7 +333,7 @@ function twentyfifteen_scripts() {
wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
// Theme block stylesheet.
wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181230' );
wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181018' );
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' );
@@ -362,13 +362,13 @@ function twentyfifteen_scripts() {
add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Fifteen 2.1
*/
function twentyfifteen_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
// Add custom fonts.
wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null );
}

View File

@@ -1,8 +1,8 @@
=== Twenty Fifteen ===
Contributors: the WordPress team
Requires at least: WordPress 4.1
Tested up to: WordPress 5.0
Version: 2.3
Tested up to: WordPress 5.0-trunk
Version: 2.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready
@@ -55,16 +55,6 @@ Source: http://www.genericons.com
== Changelog ==
= 2.3 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.3
= 2.2 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Fifteen_Theme_Changelog#Version_2.2
= 2.1 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfifteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Our 2015 default theme is clean, blog-focused, and designed for clarity. Twenty Fifteen's simple, straightforward typography is readable on a wide variety of screen sizes, and suitable for multiple languages. We designed it using a mobile-first approach, meaning your content takes center-stage, regardless of whether your visitors arrive by smartphone, tablet, laptop, or desktop computer.
Version: 2.3
Version: 2.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, left-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Fourteen
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -139,6 +139,7 @@ p.has-drop-cap:not(:focus)::first-letter {
.wp-block-file .wp-block-file__button {
background-color: #24890d;
border: 0;
border-radius: 2px;
color: #fff;
font-size: 12px;
font-weight: 700;
@@ -220,33 +221,24 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background-color: #24890d;
border: 0;
border-radius: 2px;
color: #fff;
font-size: 12px;
font-weight: 700;
line-height: 15px;
padding: 10px 30px 11px;
text-decoration: none;
text-transform: uppercase;
vertical-align: bottom;
}
.wp-block-button__link {
background-color: #24890d;
color: #fff;
}
.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #24890d;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
.is-style-outline .wp-block-button__link:not(.has-text-color):focus {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background-color: #41a62a;
color: #fff;
}
.wp-block-button__link:active {
.wp-block-button .wp-block-button__link:active {
background-color: #55d737;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Fourteen
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -20,12 +20,12 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-size: 16px;
line-height: 1.5;
}
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: Lato, sans-serif;
}
@@ -389,6 +389,10 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background-color: #24890d;
border: 0;
border-radius: 2px;
color: #fff;
font-size: 12px;
font-weight: 700;
padding: 10px 30px 11px;
@@ -396,15 +400,6 @@ p.has-drop-cap:not(:focus)::first-letter {
vertical-align: bottom;
}
.wp-block-button__link {
background-color: #24890d;
color: #fff;
}
.is-style-outline .wp-block-button__link {
color: #24890d;
}
.editor-block-list__block .wp-block-button .mce-content-body {
line-height: normal;
}

View File

@@ -628,6 +628,7 @@ img {
box-shadow: 1px 1px 1px rgba(0,0,0,.8);
color: #000;
height: 36px;
margin-left: -24px;
width: 48px;
}
@@ -636,7 +637,7 @@ img {
content: '\f452';
display: inline-block;
font: normal 32px/1.125 Genericons;
position: relative;
position: absolute;
top: 1px;
left: 10px;
}

View File

@@ -283,7 +283,7 @@ function twentyfourteen_scripts() {
wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() );
// Theme block stylesheet.
wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181230' );
wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181018' );
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' );
@@ -349,13 +349,13 @@ function twentyfourteen_resource_hints( $urls, $relation_type ) {
add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Fourteen 2.3
*/
function twentyfourteen_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
// Add custom fonts.
wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null );
}

View File

@@ -1,8 +1,8 @@
=== Twenty Fourteen ===
Contributors: the WordPress team
Requires at least: WordPress 3.6
Tested up to: WordPress 5.0
Stable tag: 2.5
Tested up to: WordPress 5.0-trunk
Stable tag: 2.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
@@ -50,16 +50,6 @@ Source: http://www.genericons.com
== Changelog ==
= 2.5 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.5
= 2.4 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Fourteen_Theme_Changelog#Version_2.4
= 2.3 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyfourteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: In 2014, our default theme lets you create a responsive magazine website with a sleek, modern design. Feature your favorite homepage content in either a grid or a slider. Use the three widget areas to customize your website, and change your content's layout with a full-width page template and a contributor page to show off your authors. Creating a magazine website with WordPress has never been easier.
Version: 2.5
Version: 2.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
@@ -1405,6 +1405,7 @@ a.post-thumbnail:hover {
box-shadow: 1px 1px 1px rgba(0,0,0,.8);
color: #000;
height: 36px;
margin: -28px 0 0 -24px; /* Keep centered on video (container includes visible controls bar) */
width: 48px;
}
@@ -1414,7 +1415,7 @@ a.post-thumbnail:hover {
content: '\f452';
display: inline-block;
font: normal 32px/1.125 Genericons;
position: relative;
position: absolute;
top: 1px;
left: 10px;
}

View File

@@ -20,6 +20,8 @@ get_header();
<header class="page-header">
<?php
the_archive_title( '<h1 class="page-title">', '</h1>' );
// Remove for now @TODO
// the_archive_description( '<div class="page-description">', '</div>' );
?>
</header><!-- .page-header -->

View File

@@ -205,16 +205,16 @@ class TwentyNineteen_SVG_Icons {
'facebook.com',
'fb.me',
),
'feed' => array(
'feed' => array(
'feed',
),
'google-plus' => array(
'plus.google.com',
),
'lastfm' => array(
'lastfm' => array(
'last.fm',
),
'mail' => array(
'mail' => array(
'mailto:',
),
'slideshare' => array(

View File

@@ -33,42 +33,37 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
<footer class="comment-meta">
<div class="comment-author vcard">
<?php
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
} else {
printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
echo $avatar;
$comment_author_link = get_comment_author_link( $comment );
$comment_author_url = get_comment_author_url( $comment );
$comment_author = get_comment_author( $comment );
$avatar = get_avatar( $comment, $args['avatar_size'] );
if ( 0 != $args['avatar_size'] ) {
if ( empty( $comment_author_url ) ) {
echo $avatar;
} else {
printf( '<a href="%s" rel="external nofollow" class="url">', $comment_author_url );
echo $avatar;
}
}
}
/*
* Using the `check` icon instead of `check_circle`, since we can't add a
* fill color to the inner check shape when in circle form.
*/
if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}
printf(
/* translators: %s: comment author link */
wp_kses(
/*
* Using the `check` icon instead of `check_circle`, since we can't add a
* fill color to the inner check shape when in circle form.
*/
if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
/* translators: %s: SVG Icon */
printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
}
printf(
/* translators: %s: comment author link */
__( '%s <span class="screen-reader-text says">says:</span>', 'twentynineteen' ),
array(
'span' => array(
'class' => array(),
),
)
),
'<b class="fn">' . get_comment_author_link( $comment ) . '</b>'
);
sprintf( '<span class="fn">%s</span>', $comment_author )
);
if ( ! empty( $comment_author_url ) ) {
echo '</a>';
}
if ( ! empty( $comment_author_url ) ) {
echo '</a>';
}
?>
</div><!-- .comment-author -->
@@ -115,4 +110,5 @@ class TwentyNineteen_Walker_Comment extends Walker_Comment {
?>
<?php
}
}

View File

@@ -28,38 +28,38 @@ $discussion = twentynineteen_get_discussion_data();
<div class="<?php echo $discussion->responses > 0 ? 'comments-title-wrap' : 'comments-title-wrap no-responses'; ?>">
<h2 class="comments-title">
<?php
if ( comments_open() ) {
if ( have_comments() ) {
_e( 'Join the Conversation', 'twentynineteen' );
if ( comments_open() ) {
if ( have_comments() ) {
_e( 'Join the Conversation', 'twentynineteen' );
} else {
_e( 'Leave a comment', 'twentynineteen' );
}
} else {
_e( 'Leave a comment', 'twentynineteen' );
if ( '1' == $discussion->responses ) {
/* translators: %s: post title */
printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s reply on &ldquo;%2$s&rdquo;',
'%1$s replies on &ldquo;%2$s&rdquo;',
$discussion->responses,
'comments title',
'twentynineteen'
),
number_format_i18n( $discussion->responses ),
get_the_title()
);
}
}
} else {
if ( '1' == $discussion->responses ) {
/* translators: %s: post title */
printf( _x( 'One reply on &ldquo;%s&rdquo;', 'comments title', 'twentynineteen' ), get_the_title() );
} else {
printf(
/* translators: 1: number of comments, 2: post title */
_nx(
'%1$s reply on &ldquo;%2$s&rdquo;',
'%1$s replies on &ldquo;%2$s&rdquo;',
$discussion->responses,
'comments title',
'twentynineteen'
),
number_format_i18n( $discussion->responses ),
get_the_title()
);
}
}
?>
</h2><!-- .comments-title -->
<?php
// Only show discussion meta information when comments are open and available.
if ( have_comments() && comments_open() ) {
if ( have_comments() && comments_open() ) {
get_template_part( 'template-parts/post/discussion', 'meta' );
}
}
?>
</div><!-- .comments-title-flex -->
<?php

View File

@@ -221,9 +221,11 @@ function twentynineteen_scripts() {
wp_style_add_data( 'twentynineteen-style', 'rtl', 'replace' );
wp_enqueue_script( 'twentynineteen-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
if ( has_nav_menu( 'menu-1' ) ) {
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_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_style( 'twentynineteen-print-style', get_template_directory_uri() . '/print.css', array(), wp_get_theme()->get( 'Version' ), 'print' );
@@ -234,30 +236,12 @@ function twentynineteen_scripts() {
}
add_action( 'wp_enqueue_scripts', 'twentynineteen_scripts' );
/**
* Fix skip link focus in IE11.
*
* This does not enqueue the script because it is tiny and because it is only for IE11,
* thus it does not warrant having an entire dedicated blocking script being loaded.
*
* @link https://git.io/vWdr2
*/
function twentynineteen_skip_link_focus_fix() {
// The following is minified via `terser --compress --mangle -- js/skip-link-focus-fix.js`.
?>
<script>
/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);
</script>
<?php
}
add_action( 'wp_print_footer_scripts', 'twentynineteen_skip_link_focus_fix' );
/**
* Enqueue supplemental block editor styles.
*/
function twentynineteen_editor_customizer_styles() {
wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.1', 'all' );
wp_enqueue_style( 'twentynineteen-editor-customizer-styles', get_theme_file_uri( '/style-editor-customizer.css' ), false, '1.0', 'all' );
if ( 'custom' === get_theme_mod( 'primary_color' ) ) {
// Include color patterns.
@@ -279,13 +263,14 @@ function twentynineteen_colors_css_wrap() {
require_once get_parent_theme_file_path( '/inc/color-patterns.php' );
$primary_color = 199;
if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {
$primary_color = get_theme_mod( 'primary_color_hue', 199 );
if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) {
$primary_color = 199;
} else {
$primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) );
}
?>
<style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . absint( $primary_color ) . '"' : ''; ?>>
<style type="text/css" id="custom-theme-colors" <?php echo is_customize_preview() ? 'data-hue="' . $primary_color . '"' : ''; ?>>
<?php echo twentynineteen_custom_colors_css(); ?>
</style>
<?php

View File

@@ -31,17 +31,10 @@
<?php if ( is_singular() && twentynineteen_can_show_post_thumbnail() ) : ?>
<div class="site-featured-image">
<?php
twentynineteen_post_thumbnail();
the_post();
$discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null;
$classes = 'entry-header';
if ( ! empty( $discussion ) && absint( $discussion->responses ) > 0 ) {
$classes = 'entry-header has-discussion';
}
?>
<div class="<?php echo $classes; ?>">
<?php twentynineteen_post_thumbnail(); ?>
<?php the_post(); ?>
<?php $discussion = ! is_page() && twentynineteen_can_show_post_thumbnail() ? twentynineteen_get_discussion_data() : null; ?>
<div class="<?php echo ( ! empty( $discussion ) && count( $discussion->responses ) > 0 ) ? 'entry-header has-discussion' : 'entry-header'; ?>">
<?php get_template_part( 'template-parts/header/entry', 'header' ); ?>
</div><!-- .entry-header -->
<?php rewind_posts(); ?>

View File

@@ -41,7 +41,7 @@ get_header();
echo wp_get_attachment_image( get_the_ID(), $image_size );
?>
<figcaption class="wp-caption-text"><?php the_excerpt(); ?></figcaption>
<figcaption class="wp-caption-text"><?php echo get_the_excerpt(); ?></figcaption>
</figure><!-- .entry-attachment -->

View File

@@ -12,8 +12,9 @@
*/
function twentynineteen_custom_colors_css() {
$primary_color = 199;
if ( 'default' !== get_theme_mod( 'primary_color', 'default' ) ) {
if ( 'default' === get_theme_mod( 'primary_color', 'default' ) ) {
$primary_color = 199;
} else {
$primary_color = absint( get_theme_mod( 'primary_color_hue', 199 ) );
}
@@ -24,48 +25,21 @@ function twentynineteen_custom_colors_css() {
*
* @param int $saturation Color saturation level.
*/
$saturation = apply_filters( 'twentynineteen_custom_colors_saturation', 100 );
$saturation = absint( $saturation ) . '%';
/**
* Filter Twenty Nineteen default selection saturation level.
*
* @since Twenty Nineteen 1.0
*
* @param int $saturation_selection Selection color saturation level.
*/
$saturation = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) );
$saturation = $saturation . '%';
$saturation_selection = absint( apply_filters( 'twentynineteen_custom_colors_saturation_selection', 50 ) );
$saturation_selection = $saturation_selection . '%';
/**
* Filter Twenty Nineteen default lightness level.
*
* @since Twenty Nineteen 1.0
*
* @param int $lightness Color lightness level.
*/
$lightness = apply_filters( 'twentynineteen_custom_colors_lightness', 33 );
$lightness = absint( $lightness ) . '%';
$lightness = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) );
$lightness = $lightness . '%';
/**
* Filter Twenty Nineteen default hover lightness level.
*
* @since Twenty Nineteen 1.0
*
* @param int $lightness_hover Hover color lightness level.
*/
$lightness_hover = apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 );
$lightness_hover = absint( $lightness_hover ) . '%';
$lightness_hover = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) );
$lightness_hover = $lightness_hover . '%';
/**
* Filter Twenty Nineteen default selection lightness level.
*
* @since Twenty Nineteen 1.0
*
* @param int $lightness_selection Selection color lightness level.
*/
$lightness_selection = apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 );
$lightness_selection = absint( $lightness_selection ) . '%';
$lightness_selection = absint( apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ) );
$lightness_selection = $lightness_selection . '%';
$theme_css = '
/*
@@ -259,9 +233,11 @@ function twentynineteen_custom_colors_css() {
color: inherit;
}
';
$css = '';
if ( function_exists( 'register_block_type' ) && is_admin() ) {
$theme_css = $editor_css;
$css .= $editor_css;
} else if ( ! is_admin() ) {
$css = $theme_css;
}
/**
@@ -273,5 +249,5 @@ function twentynineteen_custom_colors_css() {
* @param int $primary_color The user's selected color hue.
* @param string $saturation Filtered theme color saturation level.
*/
return apply_filters( 'twentynineteen_custom_colors_css', $theme_css, $primary_color, $saturation );
return apply_filters( 'twentynineteen_custom_colors_css', $css, $primary_color, $saturation );
}

View File

@@ -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' ), '20181231', true );
wp_enqueue_script( 'twentynineteen-customize-preview', get_theme_file_uri( '/js/customize-preview.js' ), array( 'customize-preview' ), '20151215', 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(), '20181231', true );
wp_enqueue_script( 'twentynineteen-customize-controls', get_theme_file_uri( '/js/customize-controls.js' ), array(), '1.0', true );
}
add_action( 'customize_controls_enqueue_scripts', 'twentynineteen_panels_js' );

View File

@@ -106,7 +106,10 @@ function twentynineteen_can_show_post_thumbnail() {
* Returns true if image filters are enabled on the theme options.
*/
function twentynineteen_image_filters_enabled() {
return 0 !== get_theme_mod( 'image_filter', 1 );
if ( get_theme_mod( 'image_filter', 1 ) ) {
return true;
}
return false;
}
/**
@@ -203,18 +206,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">';
$nav_menu .= '<ul class="main-menu" tabindex="0">';
$nav_menu .= '<li class="menu-item menu-item-has-children">';
$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 .= '<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 .= twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' );
$nav_menu .= '</button>';
$nav_menu .= '</span>';
$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 .= '<button class="menu-item-link-return">';
$nav_menu .= '<span class="menu-item-link-return">';
$nav_menu .= twentynineteen_get_icon_svg( 'chevron_left' );
$nav_menu .= esc_html__( 'Back', 'twentynineteen' );
$nav_menu .= '</button>';
$nav_menu .= '</span>';
$nav_menu .= '</li>';
$nav_menu .= '</ul>';
$nav_menu .= '</li>';
@@ -269,11 +272,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(
'<button class="menu-item-link-return" tabindex="-1">%s',
'<span class="menu-item-link-return" tabindex="-1">%s',
twentynineteen_get_icon_svg( 'chevron_left', 24 )
);
// replace opening <a> with <button>
// replace opening <a> with <span>
$output = preg_replace(
'/<a\s.*?>/',
$link,
@@ -281,10 +284,10 @@ function twentynineteen_add_dropdown_icons( $output, $item, $depth, $args ) {
1 // Limit.
);
// replace closing </a> with </button>
// replace closing </a> with </span>
$output = preg_replace(
'#</a>#i',
'</button>',
'</span>',
$output,
1 // Limit.
);
@@ -295,7 +298,7 @@ function twentynineteen_add_dropdown_icons( $output, $item, $depth, $args ) {
$icon = twentynineteen_get_icon_svg( 'keyboard_arrow_down', 24 );
$output .= sprintf(
'<button class="submenu-expand" tabindex="-1">%s</button>',
'<span class="submenu-expand" tabindex="-1">%s</span>',
$icon
);
}
@@ -415,7 +418,8 @@ function twentynineteen_hsl_hex( $h, $s, $l, $to_hex = true ) {
return "#$r$g$b";
}
} else {
return "rgb($r, $g, $b)";
return "rgb($r, $g, $b)";
}
}

View File

@@ -40,8 +40,8 @@ if ( ! function_exists( 'twentynineteen_posted_by' ) ) :
*/
function twentynineteen_posted_by() {
printf(
/* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
'<span class="byline">%1$s<span class="screen-reader-text">%2$s</span><span class="author vcard"><a class="url fn n" href="%3$s">%4$s</a></span></span>',
/* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
twentynineteen_get_icon_svg( 'person', 16 ),
__( 'Posted by', 'twentynineteen' ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
@@ -85,8 +85,8 @@ if ( ! function_exists( 'twentynineteen_entry_footer' ) ) :
/* translators: used between list items, there is a space after the comma. */
$categories_list = get_the_category_list( __( ', ', 'twentynineteen' ) );
if ( $categories_list ) {
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */
printf(
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */
'<span class="cat-links">%1$s<span class="screen-reader-text">%2$s</span>%3$s</span>',
twentynineteen_get_icon_svg( 'archive', 16 ),
__( 'Posted in', 'twentynineteen' ),
@@ -97,8 +97,8 @@ if ( ! function_exists( 'twentynineteen_entry_footer' ) ) :
/* translators: used between list items, there is a space after the comma. */
$tags_list = get_the_tag_list( '', __( ', ', 'twentynineteen' ) );
if ( $tags_list ) {
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */
printf(
/* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */
'<span class="tags-links">%1$s<span class="screen-reader-text">%2$s </span>%3$s</span>',
twentynineteen_get_icon_svg( 'tag', 16 ),
__( 'Tags:', 'twentynineteen' ),
@@ -157,7 +157,9 @@ if ( ! function_exists( 'twentynineteen_post_thumbnail' ) ) :
<figure class="post-thumbnail">
<a class="post-thumbnail-inner" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
<?php the_post_thumbnail( 'post-thumbnail' ); ?>
<?php
the_post_thumbnail( 'post-thumbnail' );
?>
</a>
</figure>
@@ -208,8 +210,8 @@ if ( ! function_exists( 'twentynineteen_comment_form' ) ) :
comment_form(
array(
'logged_in_as' => null,
'title_reply' => null,
'logged_in_as' => null,
'title_reply' => null,
)
);
}
@@ -221,19 +223,13 @@ if ( ! function_exists( 'twentynineteen_the_posts_navigation' ) ) :
* Documentation for function.
*/
function twentynineteen_the_posts_navigation() {
$prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 );
$next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 );
the_posts_pagination(
array(
'mid_size' => 2,
'prev_text' => sprintf(
'%s <span class="nav-prev-text">%s</span>',
twentynineteen_get_icon_svg( 'chevron_left', 22 ),
__( 'Newer posts', 'twentynineteen' )
),
'next_text' => sprintf(
'<span class="nav-next-text">%s</span> %s',
__( 'Older posts', 'twentynineteen' ),
twentynineteen_get_icon_svg( 'chevron_right', 22 )
),
'prev_text' => sprintf( '%s <span class="nav-prev-text">%s</span>', $prev_icon, __( 'Newer posts', 'twentynineteen' ) ),
'next_text' => sprintf( '<span class="nav-next-text">%s</span> %s', __( 'Older posts', 'twentynineteen' ), $next_icon ),
)
);
}

View File

@@ -39,7 +39,7 @@ get_header();
}
?>
</main><!-- .site-main -->
</section><!-- .content-area -->

View File

@@ -3,8 +3,6 @@
*
* Helps with accessibility for keyboard only users.
*
* This is the source file for what is minified in the twentynineteen_skip_link_focus_fix() PHP function.
*
* Learn more: https://git.io/vWdr2
*/
( function() {

View File

@@ -112,7 +112,7 @@
currentSubMenu.parentElement.lastElementChild.className += ' expanded-true';
// Update aria-expanded state
toggleAriaExpandedState( currentSubMenu );
toggleAriaExpandedState( currentSubMenu.previousSibling );
}
/**
@@ -219,9 +219,19 @@
var url = event.target.getAttribute( 'href' ) ? event.target.getAttribute( 'href' ) : '';
// If theres a link, go to it on touchend
if ( '#' !== url && '' !== url ) {
window.location = url;
// Open submenu if url is #
if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) {
} else if ( '#' === url && event.target.nextSibling.matches('.submenu-expand') ) {
openSubMenu( event.target );
// Prevent default touch events
} else {
event.preventDefault();
}
}
@@ -230,8 +240,7 @@
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
@@ -255,7 +264,6 @@
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' ) &&

View File

@@ -1,34 +1,64 @@
=== 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, threaded-comments, translation-ready
Requires at least: 4.9.6
Tested up to: WordPress 5.0
Stable tag: 1.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
# Twenty Nineteen
Our 2019 default theme is designed to show off the power of the block editor.
[![Build Status](https://travis-ci.org/WordPress/twentynineteen.svg?branch=master)](https://travis-ci.org/WordPress/twentynineteen)
== 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 youre 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.
**Contributors:** the WordPress team
**Requires at least:** WordPress 4.9.6
**Tested up to:** WordPress 4.9.8
**Version:** 1.0
**License:** GPLv2 or later
**License URI:** http://www.gnu.org/licenses/gpl-2.0.html
**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
== Changelog ==
## Description
= 1.2 =
* Released: January 9, 2019
Twenty Nineteen is a Gutenberg-ready theme for WordPress.
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.2
## Installation
= 1.1 =
* Released: December 19, 2018
1. In your admin panel, go to Appearance -> Themes and click the 'Add New' button.
2. Type in Twenty Nineteen in the search form and press the 'Enter' key on your keyboard.
3. Click on the 'Activate' button to use your new theme right away.
4. Go to https://codex.wordpress.org/Twenty_Nineteen for a guide on how to customize this theme.
5. Navigate to Appearance > Customize in your admin panel and customize to taste.
https://codex.wordpress.org/Twenty_Nineteen_Theme_Changelog#Version_1.1
## Copyright
Twenty Nineteen WordPress Theme, Copyright 2018 WordPress.org
Twenty Nineteen is distributed under the terms of the GNU GPL.
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
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Twenty Nineteen bundles the following third-party resources:
_s, Copyright 2015-2018 Automattic, Inc.
**License:** GPLv2 or later
Source: https://github.com/Automattic/_s/
normalize.css, Copyright 2012-2016 Nicolas Gallagher and Jonathan Neal
**License:** MIT
Source: https://necolas.github.io/normalize.css/
Bundled header image 1, Copyright XXXXX XXXXX
**License:** CC0 1.0 Universal (CC0 1.0)
Source: https://pexels.com/xxxxxxxxxx
Bundled header image 2, Copyright XXXXX XXXXX
**License:** CC0 1.0 Universal (CC0 1.0)
Source: https://pexels.com/xxxxxxxxxx
## Changelog
### 1.0
= 1.0 =
* Released: December 6, 2018
Initial release
== Resources ==
* normalize.css, © 2012-2018 Nicolas Gallagher and Jonathan Neal, MIT
* Underscores, © 2012-2018 Automattic, Inc., GNU GPL v2 or later

View File

@@ -198,9 +198,9 @@
&.is-style-outline .wp-block-button__link,
&.is-style-outline .wp-block-button__link:focus,
&.is-style-outline .wp-block-button__link:active {
@include button-all-transition;
@include button-all-transition;
border-width: 2px;
border-style: solid;
border-style: solid;
&:not(.has-background) {
background: transparent;
@@ -215,9 +215,6 @@
&.is-style-outline .wp-block-button__link:hover {
color: white;
border-color: $color__background-button-hover;
&:not(.has-background) {
color: $color__background-button-hover;
}
}
}
@@ -247,14 +244,6 @@
}
}
.wp-block-archives,
.wp-block-categories {
&.aligncenter {
text-align: center;
}
}
//! Latest categories
.wp-block-categories {
@@ -327,7 +316,6 @@
margin-top: calc(4 * #{ $size__spacing-unit});
margin-bottom: calc(4.33 * #{ $size__spacing-unit});
margin-right: 0;
padding-left: 0;
}
p {
@@ -366,14 +354,10 @@
padding: 0;
blockquote {
margin: $size__spacing-unit 0;
margin-left: 0;
padding: 0;
text-align: left;
max-width: 100%;
p:first-child {
margin-top: 0;
}
}
}
@@ -407,11 +391,10 @@
}
blockquote {
max-width: 100%;
max-width: calc(100% - (2 * #{$size__spacing-unit}));
color: $color__background-body;
padding-left: 0;
margin-left: $size__spacing-unit;
margin-right: $size__spacing-unit;
&.has-text-color p,
&.has-text-color a,
@@ -429,14 +412,6 @@
}
}
&.alignright,
&.alignleft {
@include media(tablet) {
padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
}
}
&.alignfull {
@include media(tablet) {
@@ -505,40 +480,20 @@
//! Image
.wp-block-image {
max-width: 100%;
img {
display: block;
}
.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;
}
}
&.alignleft,
&.alignright {
max-width: 100%;
}
&.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;
}
@@ -565,6 +520,10 @@
line-height: 1.25;
padding: 0;
color: #fff;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
@include media(tablet) {
font-size: $font__size-xl;
@@ -577,7 +536,7 @@
width: 100%;
@include media(tablet) {
padding: $size__spacing-unit calc(2 * #{$size__spacing-unit});
padding: $size__spacing-unit;
}
}
@@ -611,10 +570,6 @@
.blocks-gallery-item:last-child {
margin-bottom: 16px;
}
figcaption a {
color: #fff;
}
}
//! Captions
@@ -745,10 +700,6 @@
padding-right: $size__spacing-unit;
}
@include media(mobile) {
flex-wrap: nowrap;
}
@include media(tablet) {
.wp-block-column > * {
@@ -833,7 +784,7 @@
.has-secondary-background-color,
.has-dark-gray-background-color,
.has-light-gray-background-color {
// Use white text against these backgrounds by default.
color: $color__background-body;

View File

@@ -13,39 +13,6 @@
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;
@@ -202,7 +169,6 @@
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;
@@ -216,13 +182,6 @@
}
}
> .menu-item-link-return {
width: 100%;
font-size: $font__size_base;
font-weight: normal;
text-align: left;
}
> a:empty {
display: none;
}

View File

@@ -45,9 +45,6 @@
width: 32px;
height: 32px;
// Prevent icons from jumping in Safari using hardware acceleration.
transform: translateZ(0);
&#ui-icon-link {
transform: rotate(-45deg);
}

View File

@@ -45,10 +45,6 @@
}
}
.main-navigation .sub-menu a {
opacity: inherit;
}
/* add focus state to social media icons */
.social-navigation a {
&:focus {

View File

@@ -200,7 +200,6 @@
&:after {
content: "\02192";
display: inline-block;
margin-left: 0.5em;
}

View File

@@ -27,8 +27,7 @@ get_header();
// Parent post navigation.
the_post_navigation(
array(
/* translators: %s: parent post link */
'prev_text' => sprintf( __( '<span class="meta-nav">Published in</span><span class="post-title">%s</span>', 'twentynineteen' ), '%title' ),
'prev_text' => _x( '<span class="meta-nav">Published in</span><br/><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
)
);
} elseif ( is_singular( 'post' ) ) {

View File

@@ -58,6 +58,12 @@ body .wp-block[data-align="full"] {
}
}
/** === Editor Block Toolbar Position === */
.editor-block-list__block[data-align="wide"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar,
.editor-block-list__block[data-align="full"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar {
max-width: none;
}
/** === Content Width === */
.wp-block {
width: calc(100vw - (2 * 1rem));
@@ -332,19 +338,12 @@ figcaption,
.wp-block[data-type="core/cover"][data-align="right"] .wp-block-cover {
width: 100%;
max-width: 100%;
padding: calc(1.375 * 1rem);
}
.wp-block[data-type="core/cover"][data-align="left"] .wp-block-cover p,
.wp-block[data-type="core/cover"][data-align="right"] .wp-block-cover p {
padding-left: 0;
padding-right: 0;
}
@media only screen and (min-width: 768px) {
.wp-block[data-type="core/cover"][data-align="left"] .wp-block-cover,
.wp-block[data-type="core/cover"][data-align="right"] .wp-block-cover {
padding: calc(2.75 * 1rem) calc(2.75 * 1rem) calc(3.125 * 1rem);
padding: 1rem;
}
}
@@ -621,13 +620,6 @@ figcaption,
padding-left: calc(2 * 1rem);
}
/* Remove duplicate rule-line when a separator
* is followed by an H1, or H2 */
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h1:before,
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h2:before {
display: none;
}
/** === Latest Posts, Archives, Categories === */
ul.wp-block-archives,
.wp-block-categories,
@@ -767,5 +759,5 @@ ul.wp-block-archives li ul,
/* Make sure our non-latin font overrides don't overwrite the iconfont used in the classic editor toolbar */
.wp-block[data-type="core/freeform"] .mce-btn i {
font-family: dashicons !important;
font-family: dashicons !important;
}

View File

@@ -54,6 +54,14 @@ body {
}
}
/** === Editor Block Toolbar Position === */
// Since 2019 left-aligns wide and fullwide blocks, left align the toolbar too.
.editor-block-list__block[data-align="wide"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar,
.editor-block-list__block[data-align="full"] .editor-block-contextual-toolbar .editor-block-toolbar.editor-block-toolbar {
max-width: none;
}
/** === Content Width === */
.wp-block {
@@ -294,15 +302,12 @@ figcaption,
.wp-block-cover {
width: 100%;
max-width: 100%;
padding: calc(1.375 * #{$size__spacing-unit});
}
p {
padding-left: 0;
padding-right: 0;
}
@include media(tablet) {
@include media(tablet) {
padding: calc(2.75 * #{$size__spacing-unit}) calc(2.75 * #{$size__spacing-unit}) calc(3.125 * #{$size__spacing-unit});
.wp-block-cover {
padding: $size__spacing-unit;
}
}
}
@@ -603,13 +608,6 @@ figcaption,
}
}
/* Remove duplicate rule-line when a separator
* is followed by an H1, or H2 */
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h1:before,
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h2:before {
display: none;
}
/** === Latest Posts, Archives, Categories === */
ul.wp-block-archives,

View File

@@ -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: 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 youre 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.
Description: A new Gutenberg-ready theme.
Requires at least: WordPress 4.9.6
Version: 1.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen
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
Tags: custom-background, custom-logo, custom-menu, featured-images, 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,7 +1027,6 @@ a:focus {
.main-navigation {
display: block;
margin-top: 0.25rem;
/* Un-style buttons */
/*
* Sub-menu styles
*
@@ -1050,36 +1049,6 @@ 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;
@@ -1221,7 +1190,6 @@ 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;
}
@@ -1238,13 +1206,6 @@ 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;
}
@@ -1643,7 +1604,6 @@ body.page .main-navigation {
display: block;
width: 32px;
height: 32px;
transform: translateZ(0);
}
.social-navigation ul.social-links-menu li a svg#ui-icon-link {
@@ -2196,10 +2156,6 @@ 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;
@@ -2657,7 +2613,6 @@ body.page .main-navigation {
.entry .entry-content .more-link:after {
content: "\02192";
display: inline-block;
margin-right: 0.5em;
}
@@ -3702,10 +3657,6 @@ 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 {
@@ -3738,11 +3689,6 @@ body.page .main-navigation {
text-decoration: none;
}
.entry .entry-content .wp-block-archives.aligncenter,
.entry .entry-content .wp-block-categories.aligncenter {
text-align: center;
}
.entry .entry-content .wp-block-categories ul {
padding-top: 0.75rem;
}
@@ -3813,7 +3759,6 @@ body.page .main-navigation {
margin-top: calc(4 * 1rem);
margin-bottom: calc(4.33 * 1rem);
margin-left: 0;
padding-right: 0;
}
.entry .entry-content .wp-block-pullquote p {
@@ -3853,16 +3798,12 @@ body.page .main-navigation {
}
.entry .entry-content .wp-block-pullquote.alignleft blockquote, .entry .entry-content .wp-block-pullquote.alignright blockquote {
margin: 1rem 0;
margin-right: 0;
padding: 0;
text-align: right;
max-width: 100%;
}
.entry .entry-content .wp-block-pullquote.alignleft blockquote p:first-child, .entry .entry-content .wp-block-pullquote.alignright blockquote p:first-child {
margin-top: 0;
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color {
background-color: #0073aa;
padding-right: 0;
@@ -3898,11 +3839,10 @@ body.page .main-navigation {
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color blockquote {
max-width: 100%;
max-width: calc(100% - (2 * 1rem));
color: #fff;
padding-right: 0;
margin-right: 1rem;
margin-left: 1rem;
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color blockquote.has-text-color p,
@@ -3917,12 +3857,6 @@ body.page .main-navigation {
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-pullquote.is-style-solid-color.alignright, .entry .entry-content .wp-block-pullquote.is-style-solid-color.alignleft {
padding: 1rem calc(2 * 1rem);
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-pullquote.is-style-solid-color.alignfull {
padding-right: calc(10% + 58px + (2 * 1rem));
@@ -3982,53 +3916,20 @@ body.page .main-navigation {
}
}
.entry .entry-content .wp-block-image {
max-width: 100%;
}
.entry .entry-content .wp-block-image img {
display: block;
}
@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.alignleft, .entry .entry-content .wp-block-image.alignright {
max-width: 100%;
}
.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;
}
@@ -4060,6 +3961,10 @@ body.page .main-navigation {
line-height: 1.25;
padding: 0;
color: #fff;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
@media only screen and (min-width: 768px) {
@@ -4084,7 +3989,7 @@ body.page .main-navigation {
.entry .entry-content .wp-block-cover-image.alignleft, .entry .entry-content .wp-block-cover-image.alignright,
.entry .entry-content .wp-block-cover.alignleft,
.entry .entry-content .wp-block-cover.alignright {
padding: 1rem calc(2 * 1rem);
padding: 1rem;
}
}
@@ -4136,10 +4041,6 @@ body.page .main-navigation {
margin-bottom: 16px;
}
.entry .entry-content .wp-block-gallery figcaption a {
color: #fff;
}
.entry .entry-content .wp-block-audio figcaption,
.entry .entry-content .wp-block-video figcaption,
.entry .entry-content .wp-block-image figcaption,
@@ -4286,12 +4187,6 @@ body.page .main-navigation {
padding-left: 1rem;
}
@media only screen and (min-width: 600px) {
.entry .entry-content .wp-block-columns {
flex-wrap: nowrap;
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-columns .wp-block-column > *:first-child {
margin-top: 0;

View File

@@ -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: 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 youre 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.
Description: A new Gutenberg-ready theme.
Requires at least: WordPress 4.9.6
Version: 1.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen
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
Tags: custom-background, custom-logo, custom-menu, featured-images, 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,7 +1027,6 @@ a:focus {
.main-navigation {
display: block;
margin-top: 0.25rem;
/* Un-style buttons */
/*
* Sub-menu styles
*
@@ -1050,36 +1049,6 @@ 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;
@@ -1221,7 +1190,6 @@ 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;
}
@@ -1238,13 +1206,6 @@ 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;
}
@@ -1643,7 +1604,6 @@ body.page .main-navigation {
display: block;
width: 32px;
height: 32px;
transform: translateZ(0);
}
.social-navigation ul.social-links-menu li a svg#ui-icon-link {
@@ -2202,10 +2162,6 @@ 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;
@@ -2663,7 +2619,6 @@ body.page .main-navigation {
.entry .entry-content .more-link:after {
content: "\02192";
display: inline-block;
margin-left: 0.5em;
}
@@ -3714,10 +3669,6 @@ 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 {
@@ -3750,11 +3701,6 @@ body.page .main-navigation {
text-decoration: none;
}
.entry .entry-content .wp-block-archives.aligncenter,
.entry .entry-content .wp-block-categories.aligncenter {
text-align: center;
}
.entry .entry-content .wp-block-categories ul {
padding-top: 0.75rem;
}
@@ -3825,7 +3771,6 @@ body.page .main-navigation {
margin-top: calc(4 * 1rem);
margin-bottom: calc(4.33 * 1rem);
margin-right: 0;
padding-left: 0;
}
.entry .entry-content .wp-block-pullquote p {
@@ -3865,16 +3810,12 @@ body.page .main-navigation {
}
.entry .entry-content .wp-block-pullquote.alignleft blockquote, .entry .entry-content .wp-block-pullquote.alignright blockquote {
margin: 1rem 0;
margin-left: 0;
padding: 0;
text-align: left;
max-width: 100%;
}
.entry .entry-content .wp-block-pullquote.alignleft blockquote p:first-child, .entry .entry-content .wp-block-pullquote.alignright blockquote p:first-child {
margin-top: 0;
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color {
background-color: #0073aa;
padding-left: 0;
@@ -3910,11 +3851,10 @@ body.page .main-navigation {
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color blockquote {
max-width: 100%;
max-width: calc(100% - (2 * 1rem));
color: #fff;
padding-left: 0;
margin-left: 1rem;
margin-right: 1rem;
}
.entry .entry-content .wp-block-pullquote.is-style-solid-color blockquote.has-text-color p,
@@ -3929,12 +3869,6 @@ body.page .main-navigation {
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-pullquote.is-style-solid-color.alignright, .entry .entry-content .wp-block-pullquote.is-style-solid-color.alignleft {
padding: 1rem calc(2 * 1rem);
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-pullquote.is-style-solid-color.alignfull {
padding-left: calc(10% + 58px + (2 * 1rem));
@@ -3994,53 +3928,20 @@ body.page .main-navigation {
}
}
.entry .entry-content .wp-block-image {
max-width: 100%;
}
.entry .entry-content .wp-block-image img {
display: block;
}
@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.alignleft, .entry .entry-content .wp-block-image.alignright {
max-width: 100%;
}
.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-left: auto;
margin-right: auto;
}
@@ -4072,6 +3973,10 @@ body.page .main-navigation {
line-height: 1.25;
padding: 0;
color: #fff;
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
}
@media only screen and (min-width: 768px) {
@@ -4096,7 +4001,7 @@ body.page .main-navigation {
.entry .entry-content .wp-block-cover-image.alignleft, .entry .entry-content .wp-block-cover-image.alignright,
.entry .entry-content .wp-block-cover.alignleft,
.entry .entry-content .wp-block-cover.alignright {
padding: 1rem calc(2 * 1rem);
padding: 1rem;
}
}
@@ -4148,10 +4053,6 @@ body.page .main-navigation {
margin-bottom: 16px;
}
.entry .entry-content .wp-block-gallery figcaption a {
color: #fff;
}
.entry .entry-content .wp-block-audio figcaption,
.entry .entry-content .wp-block-video figcaption,
.entry .entry-content .wp-block-image figcaption,
@@ -4298,12 +4199,6 @@ body.page .main-navigation {
padding-right: 1rem;
}
@media only screen and (min-width: 600px) {
.entry .entry-content .wp-block-columns {
flex-wrap: nowrap;
}
}
@media only screen and (min-width: 768px) {
.entry .entry-content .wp-block-columns .wp-block-column > *:first-child {
margin-top: 0;

View File

@@ -3,13 +3,13 @@ Theme Name: Twenty Nineteen
Theme URI: https://github.com/WordPress/twentynineteen
Author: the WordPress team
Author URI: https://wordpress.org/
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 youre 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.
Description: A new Gutenberg-ready theme.
Requires at least: WordPress 4.9.6
Version: 1.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: twentynineteen
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
Tags: custom-background, custom-logo, custom-menu, featured-images, 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.

View File

@@ -36,7 +36,7 @@
array(
'theme_location' => 'menu-1',
'menu_class' => 'main-menu',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
'items_wrap' => '<ul id="%1$s" class="%2$s" tabindex="0">%3$s</ul>',
)
);
?>

View File

@@ -10,15 +10,7 @@
if ( (bool) get_the_author_meta( 'description' ) ) : ?>
<div class="author-bio">
<h2 class="author-title">
<span class="author-heading">
<?php
printf(
/* translators: %s: post author */
__( 'Published by %s', 'twentynineteen' ),
esc_html( get_the_author() )
);
?>
</span>
<span class="author-heading"><?php echo esc_html( sprintf( __( 'Published by %s', 'twentynineteen' ), get_the_author() ) ); ?></span>
</h2>
<p class="author-description">
<?php the_author_meta( 'description' ); ?>

View File

@@ -17,6 +17,7 @@ if ( $has_responses ) {
} else {
$meta_label = __( 'No comments', 'twentynineteen' );
}
?>
<div class="discussion-meta">

View File

@@ -1,8 +1,8 @@
=== Twenty Seventeen ===
Contributors: the WordPress team
Requires at least: WordPress 4.7
Tested up to: WordPress 5.0
Version: 2.0
Tested up to: WordPress 5.0-trunk
Version: 1.8
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, flexible-header, accessibility-ready, custom-colors, custom-header, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
@@ -60,16 +60,6 @@ Source: https://unsplash.com/@englr?photo=bIhpiQA009k
== Changelog ==
= 2.0 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_2.0
= 1.9 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Seventeen_Theme_Changelog#Version_1.9
= 1.8 =
* Released: December 6, 2018

View File

@@ -1,17 +1,15 @@
/*
Theme Name: Twenty Seventeen
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 General Block Styles
2.0 Blocks - Common Blocks
3.0 Blocks - Formatting
4.0 Blocks - Layout Elements
5.0 Blocks - Widgets
6.0 Blocks - Colors
1.0 Blocks - Common Blocks
2.0 Blocks - Formatting
3.0 Blocks - Layout Elements
4.0 Blocks - Widgets
--------------------------------------------------------------*/
/*--------------------------------------------------------------
@@ -189,8 +187,12 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background-color: #222;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: none;
box-shadow: none;
color: #fff;
display: inline-block;
font-size: 14px;
font-size: 0.875rem;
@@ -203,64 +205,11 @@ p.has-drop-cap:not(:focus)::first-letter {
white-space: nowrap;
}
.entry-content .wp-block-button__link {
background-color: #222;
color: #fff;
}
.entry-content .is-style-outline .wp-block-button__link:not(.has-background) {
background-color: transparent;
}
.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #222;
}
.colors-dark .wp-block-button__link {
background-color: #fff;
color: #000;
}
.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus,
.entry-content .is-style-outline .wp-block-button__link:not(.has-background):hover,
.entry-content .is-style-outline .wp-block-button__link:not(.has-background):focus {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background-color: #767676;
-webkit-box-shadow: none;
box-shadow: none;
color: #fff;
}
.colors-dark .entry-content .wp-block-button__link:hover,
.colors-dark .entry-content .wp-block-button__link:focus,
.colors-dark .entry-content .is-style-outline .wp-block-button__link:not(.has-background):hover,
.colors-dark .entry-content .is-style-outline .wp-block-button__link:not(.has-background):focus {
background-color: #bbb;
color: #000;
}
.colors-dark .entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #fff;
}
.colors-dark .entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):hover,
.colors-dark .entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):focus {
color: #222;
}
.colors-custom .entry-content .wp-block-button__link,
.colors-custom .entry-content .wp-block-button__link:hover,
.colors-custom .entry-content .wp-block-button__link:focus,
.colors-dark .entry-content .wp-block-button__link,
.colors-dark .entry-content .wp-block-button__link:hover,
.colors-dark .entry-content .wp-block-button__link:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
.colors-custom .entry-content .wp-block-button__link:hover,
.colors-custom .entry-content .wp-block-button__link:focus {
color: #fff;
}
/* Separator */
@@ -346,106 +295,3 @@ p.has-drop-cap:not(:focus)::first-letter {
font-size: 14px;
font-size: 0.875rem;
}
/*--------------------------------------------------------------
6.0 Blocks - Colors
--------------------------------------------------------------*/
.entry-content .has-pale-pink-color {
color: #f78da7;
}
.entry-content .has-pale-pink-background-color,
.wp-block-button.is-style-outline .has-pale-pink-background-color:link {
background-color: #f78da7;
}
.entry-content .has-vivid-red-color {
color: #cf2e2e;
}
.entry-content .has-vivid-red-background-color,
.wp-block-button.is-style-outline .has-vivid-red-background-color:link {
background-color: #cf2e2e;
}
.entry-content .has-luminous-vivid-orange-color {
color: #ff6900;
}
.entry-content .has-luminous-vivid-orange-background-color,
.wp-block-button.is-style-outline .has-luminous-vivid-orange-background-color:link {
background-color: #ff6900;
}
.entry-content .has-luminous-vivid-amber-color {
color: #fcb900;
}
.entry-content .has-luminous-vivid-amber-background-color,
.wp-block-button.is-style-outline .has-luminous-vivid-amber-background-color:link {
background-color: #fcb900;
}
.entry-content .has-light-green-cyan-color {
color: #7bdcb5;
}
.entry-content .has-light-green-cyan-background-color,
.wp-block-button.is-style-outline .has-light-green-cyan-background-color:link {
background-color: #7bdcb5;
}
.entry-content .has-vivid-green-cyan-color {
color: #00d084;
}
.entry-content .has-vivid-green-cyan-background-color,
.wp-block-button.is-style-outline .has-vivid-green-cyan-background-color:link {
background-color: #00d084;
}
.entry-content .has-pale-cyan-blue-color {
color: #8ed1fc;
}
.entry-content .has-pale-cyan-blue-background-color,
.wp-block-button.is-style-outline .has-pale-cyan-blue-background-color:link {
background-color: #8ed1fc;
}
.entry-content .has-vivid-cyan-blue-color {
color: #0693e3;
}
.entry-content .has-vivid-cyan-blue-background-color,
.wp-block-button.is-style-outline .has-vivid-cyan-blue-background-color:link {
background-color: #0693e3;
}
.entry-content .has-very-light-gray-color {
color: #eee;
}
.entry-content .has-very-light-gray-background-color,
.wp-block-button.is-style-outline .has-very-light-gray-background-color:link {
background-color: #eee;
}
.entry-content .has-cyan-bluish-gray-color {
color: #abb8c3;
}
.entry-content .has-cyan-bluish-gray-background-color,
.wp-block-button.is-style-outline .has-cyan-bluish-gray-background-color:link {
background-color: #abb8c3;
}
.entry-content .has-very-dark-gray-color {
color: #313131;
}
.entry-content .has-very-dark-gray-background-color,
.wp-block-button.is-style-outline .has-very-dark-gray-background-color:link {
background-color: #313131;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Seventeen
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -20,12 +20,12 @@ Description: Used to style blocks in the editor.
--------------------------------------------------------------*/
.edit-post-visual-editor .editor-block-list__block,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-size: 15px;
font-size: 0.9375rem;
}
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: "Libre Franklin", "Helvetica Neue", helvetica, arial, sans-serif;
}
@@ -155,12 +155,9 @@ html[lang="ur"] .edit-post-visual-editor h6 {
/* Typography for Chinese Font */
html[lang^="zh-"] .edit-post-visual-editor .editor-block-list__block {
font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
}
html[lang^="zh-"] .edit-post-visual-editor .editor-block-list__block,
html[lang="zh-CN"] .edit-post-visual-editor .editor-block-list__block {
font-family: "PingFang SC", "Helvetica Neue", Helvetica, STHeitiSC-Light, Arial, sans-serif;
font-family: "PingFang TC", "Helvetica Neue", Helvetica, STHeitiTC-Light, Arial, sans-serif;
}
html[lang^="zh-"] .edit-post-visual-editor h1,
@@ -361,6 +358,12 @@ html[lang="th"] .edit-post-visual-editor * {
max-width: 674px; /* Based on one-column post width; 644px + 30px to account for padding. */
}
/* Background color */
.gutenberg-editor-page .editor-block-list__block {
background-color: transparent;
}
/* Alignments */
.edit-post-visual-editor .alignleft {
@@ -492,10 +495,6 @@ html[lang="th"] .edit-post-visual-editor * {
margin-top: 0.075em;
}
.wp-block-paragraph.has-background {
padding: 20px 30px;
}
/* Gallery */
.wp-block-gallery figcaption {
@@ -711,8 +710,12 @@ table.wp-block-table td:last-child {
/* Buttons */
.wp-block-button .wp-block-button__link {
background-color: #222;
-webkit-border-radius: 2px;
border-radius: 2px;
-webkit-box-shadow: none;
box-shadow: none;
color: #fff;
display: inline-block;
font-size: 14px;
font-size: 0.875rem;
@@ -725,15 +728,6 @@ table.wp-block-table td:last-child {
white-space: nowrap;
}
.wp-block-button__link {
background-color: #222;
color: #fff;
}
.is-style-outline .wp-block-button__link {
color: #222;
}
/* Media & Text */
.wp-block-media-text *:last-child {

View File

@@ -232,10 +232,23 @@ ul {
list-style: disc;
}
ol {
counter-reset: item;
}
ol > li {
display: block;
position: relative;
}
ol > li:before {
content: counter(item);
counter-increment: item;
font-weight: 800;
left: -1.5em;
position: absolute;
}
li > ul,
li > ol {
margin-bottom: 0;
@@ -320,6 +333,7 @@ a img {
img {
height: auto; /* Make sure images are scaled correctly. */
width: inherit; /* Make images fill their parent's space. Solves IE8. */
max-width: 100%; /* Adhere to container width. */
}
@@ -566,6 +580,10 @@ object {
text-align: right;
}
.rtl ol {
counter-reset: item;
}
.rtl ol > li:before {
left: auto;
right: -1.5em;

View File

@@ -425,7 +425,7 @@ function twentyseventeen_scripts() {
wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri() );
// Theme block stylesheet.
wp_enqueue_style( 'twentyseventeen-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'twentyseventeen-style' ), '1.1' );
wp_enqueue_style( 'twentyseventeen-block-style', get_theme_file_uri( '/assets/css/blocks.css' ), array( 'twentyseventeen-style' ), '1.0' );
// Load the dark colorscheme.
if ( 'dark' === get_theme_mod( 'colorscheme', 'light' ) || is_customize_preview() ) {
@@ -472,13 +472,13 @@ function twentyseventeen_scripts() {
add_action( 'wp_enqueue_scripts', 'twentyseventeen_scripts' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Seventeen 1.8
*/
function twentyseventeen_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentyseventeen-block-editor-style', get_theme_file_uri( '/assets/css/editor-blocks.css' ), array(), '1.1' );
wp_enqueue_style( 'twentyseventeen-block-editor-style', get_theme_file_uri( '/assets/css/editor-blocks.css' ) );
// Add custom fonts.
wp_enqueue_style( 'twentyseventeen-fonts', twentyseventeen_fonts_url(), array(), null );
}
@@ -585,30 +585,6 @@ function twentyseventeen_widget_tag_cloud_args( $args ) {
}
add_filter( 'widget_tag_cloud_args', 'twentyseventeen_widget_tag_cloud_args' );
/**
* Get unique ID.
*
* This is a PHP implementation of Underscore's uniqueId method. A static variable
* contains an integer that is incremented with each call. This number is returned
* with the optional prefix. As such the returned value is not universally unique,
* but it is unique across the life of the PHP process.
*
* @since Twenty Seventeen 2.0
* @see wp_unique_id() Themes requiring WordPress 5.0.3 and greater should use this instead.
*
* @staticvar int $id_counter
*
* @param string $prefix Prefix for the returned ID.
* @return string Unique ID.
*/
function twentyseventeen_unique_id( $prefix = '' ) {
static $id_counter = 0;
if ( function_exists( 'wp_unique_id' ) ) {
return wp_unique_id( $prefix );
}
return $prefix . (string) ++$id_counter;
}
/**
* Implement the Custom Header feature.
*/

View File

@@ -74,7 +74,7 @@ function twentyseventeen_get_svg( $args = array() ) {
*/
if ( $args['title'] ) {
$aria_hidden = '';
$unique_id = twentyseventeen_unique_id();
$unique_id = uniqid();
$aria_labelledby = ' aria-labelledby="title-' . $unique_id . '"';
if ( $args['desc'] ) {

View File

@@ -10,7 +10,7 @@
?>
<?php $unique_id = esc_attr( twentyseventeen_unique_id( 'search-form-' ) ); ?>
<?php $unique_id = esc_attr( uniqid( 'search-form-' ) ); ?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="<?php echo $unique_id; ?>">

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyseventeen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Seventeen brings your site to life with header video and immersive featured images. With a focus on business sites, it features multiple sections on the front page as well as widgets, navigation and social menus, a logo, and more. Personalize its asymmetrical grid with a custom color scheme and showcase your multimedia content with post formats. Our default theme for 2017 works great in many languages, for any abilities, and on any device.
Version: 2.0
Version: 1.8
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentyseventeen
@@ -982,11 +982,6 @@ select {
max-width: 100%;
}
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted #333;
}
input[type="radio"],
input[type="checkbox"] {
margin-right: 0.5em;

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Sixteen
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -232,36 +232,21 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
box-shadow: none;
background: #1a1a1a;
border: 0;
border-radius: 2px;
color: #fff;
font-family: Montserrat, "Helvetica Neue", sans-serif;
font-weight: 700;
letter-spacing: 0.046875em;
line-height: 1;
padding: 0.84375em 1.3125em 0.78125em;
padding: 0.84375em 0.875em 0.78125em;
text-transform: uppercase;
}
.entry-content .wp-block-button__link {
background: #1a1a1a;
color: #fff;
}
.entry-content .is-style-outline .wp-block-button__link:not(.has-background) {
background: transparent;
}
.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #1a1a1a;
}
.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus,
.entry-content .is-style-outline .wp-block-button__link:not(.has-background):hover,
.entry-content .is-style-outline .wp-block-button__link:not(.has-background):focus,
.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):hover,
.entry-content .is-style-outline .wp-block-button__link:not(.has-text-color):focus {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background: #007acc;
color: #fff;
}
.wp-block-button .wp-block-button__link:focus {
@@ -337,98 +322,98 @@ hr.wp-block-separator {
6.0 Blocks - Colors
--------------------------------------------------------------*/
.entry-content .has-dark-gray-color {
.has-dark-gray-color {
color: #1a1a1a;
}
.entry-content .has-dark-gray-background-color {
.has-dark-gray-background-color {
background-color: #1a1a1a;
}
.entry-content .has-medium-gray-color {
.has-medium-gray-color {
color: #686868;
}
.entry-content .has-medium-gray-background-color {
.has-medium-gray-background-color {
background-color: #686868;
}
.entry-content .has-light-gray-color {
.has-light-gray-color {
color: #e5e5e5;
}
.entry-content .has-light-gray-background-color {
.has-light-gray-background-color {
background-color: #e5e5e5;
}
.entry-content .has-white-color {
.has-white-color {
color: #fff;
}
.entry-content .has-white-background-color {
.has-white-background-color {
background-color: #fff;
}
.entry-content .has-blue-gray-color {
.has-blue-gray-color {
color: #4d545c;
}
.entry-content .has-blue-gray-background-color {
.has-blue-gray-background-color {
background-color: #4d545c;
}
.entry-content .has-bright-blue-color {
.has-bright-blue-color {
color: #007acc;
}
.entry-content .has-bright-blue-background-color {
.has-bright-blue-background-color {
background-color: #007acc;
}
.entry-content .has-light-blue-color {
.has-light-blue-color {
color: #9adffd;
}
.entry-content .has-light-blue-background-color {
.has-light-blue-background-color {
background-color: #9adffd;
}
.entry-content .has-dark-brown-color {
.has-dark-brown-color {
color: #402b30;
}
.entry-content .has-dark-brown-background-color {
.has-dark-brown-background-color {
background-color: #402b30;
}
.entry-content .has-medium-brown-color {
.has-medium-brown-color {
color: #774e24;
}
.entry-content .has-medium-brown-background-color {
.has-medium-brown-background-color {
background-color: #774e24;
}
.entry-content .has-dark-red-color {
.has-dark-red-color {
color: #640c1f;
}
.entry-content .has-dark-red-background-color {
.has-dark-red-background-color {
background-color: #640c1f;
}
.entry-content .has-bright-red-color {
.has-bright-red-color {
color: #ff675f;
}
.entry-content .has-bright-red-background-color {
.has-bright-red-background-color {
background-color: #ff675f;
}
.entry-content .has-yellow-color {
.has-yellow-color {
color: #ffef8e;
}
.entry-content .has-yellow-background-color {
.has-yellow-background-color {
background-color: #ffef8e;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Sixteen
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -19,7 +19,7 @@ Description: Used to style blocks in the editor.
--------------------------------------------------------------*/
.edit-post-visual-editor .editor-block-list__block,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: Merriweather, Georgia, serif;
font-size: 16px;
font-size: 1rem;
@@ -543,23 +543,18 @@ Description: Used to style blocks in the editor.
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #1a1a1a;
border: 0;
border-radius: 2px;
color: #fff;
font-family: Montserrat, "Helvetica Neue", sans-serif;
font-weight: 700;
letter-spacing: 0.046875em;
line-height: 1;
padding: 0.84375em 1.3125em 0.78125em;
padding: 0.84375em 0.875em 0.78125em;
text-transform: uppercase;
}
.wp-block-button__link {
background: #1a1a1a;
color: #fff;
}
.is-style-outline .wp-block-button__link {
color: #1a1a1a;
}
/* Media & Text */
.wp-block-media-text *:last-child {

View File

@@ -223,11 +223,11 @@ sub {
vertical-align: baseline;
}
sup {
sub {
top: -6px;
}
sub {
sup {
bottom: -3px;
}

View File

@@ -326,7 +326,7 @@ function twentysixteen_scripts() {
wp_enqueue_style( 'twentysixteen-style', get_stylesheet_uri() );
// Theme block stylesheet.
wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181230' );
wp_enqueue_style( 'twentysixteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentysixteen-style' ), '20181018' );
// Load the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentysixteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentysixteen-style' ), '20160816' );
@@ -354,7 +354,7 @@ function twentysixteen_scripts() {
wp_enqueue_script( 'twentysixteen-keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20160816' );
}
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20181230', true );
wp_enqueue_script( 'twentysixteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20160816', true );
wp_localize_script( 'twentysixteen-script', 'screenReaderText', array(
'expand' => __( 'expand child menu', 'twentysixteen' ),
@@ -364,13 +364,13 @@ function twentysixteen_scripts() {
add_action( 'wp_enqueue_scripts', 'twentysixteen_scripts' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Sixteen 1.6
*/
function twentysixteen_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentysixteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
// Add custom fonts.
wp_enqueue_style( 'twentysixteen-fonts', twentysixteen_fonts_url(), array(), null );
}

View File

@@ -1,8 +1,8 @@
=== Twenty Sixteen ===
Contributors: the WordPress team
Requires at least: WordPress 4.4
Tested up to: WordPress 5.0
Version: 1.8
Tested up to: WordPress 5.0-trunk
Version: 1.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog
@@ -56,16 +56,6 @@ Image used in screenshot.png: A photo by Austin Schmid (https://unsplash.com/sch
== Changelog ==
= 1.8 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.8
= 1.7 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Sixteen_Theme_Changelog#Version_1.7
= 1.6 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentysixteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
Version: 1.8
Version: 1.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: one-column, two-columns, right-sidebar, accessibility-ready, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, flexible-header, microformats, post-formats, rtl-language-support, sticky-post, threaded-comments, translation-ready, blog

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Ten
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -204,52 +204,42 @@ p.has-drop-cap:not(:focus)::first-letter {
6.0 Blocks - Colors
--------------------------------------------------------------*/
.has-blue-color,
.has-blue-color:visited {
.has-blue-color {
color: #0066cc;
}
.has-blue-background-color,
.has-blue-background-color:visited {
.has-blue-background-color {
background-color: #0066cc;
}
.has-black-color,
.has-black-color:visited {
.has-black-color {
color: #000;
}
.has-black-background-color,
.has-black-background-color:visited {
.has-black-background-color {
background-color: #000;
}
.has-medium-gray-color,
.has-medium-gray-color:visited {
.has-medium-gray-color {
color: #666;
}
.has-medium-gray-background-color,
.has-medium-gray-background-color:visited {
.has-medium-gray-background-color {
background-color: #666;
}
.has-light-gray-color,
.has-light-gray-color:visited {
.has-light-gray-color {
color: #f1f1f1;
}
.has-light-gray-background-color,
.has-light-gray-background-color:visited {
.has-light-gray-background-color {
background-color: #f1f1f1;
}
.has-white-color,
.has-white-color:visited {
.has-white-color {
color: #fff;
}
.has-white-background-color,
.has-white-background-color:visited {
.has-white-background-color {
background-color: #fff;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Ten
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -19,11 +19,11 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-size: 16px;
}
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: Georgia, "Bitstream Charter", serif;
}

View File

@@ -660,7 +660,7 @@ function twentyten_scripts_styles() {
add_action( 'wp_enqueue_scripts', 'twentyten_scripts_styles' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Ten 2.6
*/

View File

@@ -2,9 +2,9 @@
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Twenty Ten 2.7\n"
"Project-Id-Version: Twenty Ten 2.6\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/theme/twentyten\n"
"POT-Creation-Date: 2018-12-18 17:42:13+00:00\n"
"POT-Creation-Date: 2018-11-05 19:37:37+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

View File

@@ -1,8 +1,8 @@
=== Twenty Ten ===
Contributors: the WordPress team
Requires at least: WordPress 3.0
Tested up to: WordPress 5.0
Stable tag: 2.7
Tested up to: WordPress 5.0-trunk
Stable tag: 2.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header, featured-images, footer-widgets, featured-image-header
@@ -37,11 +37,6 @@ GNU General Public License for more details.
== Changelog ==
= 2.7 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Ten_Theme_Changelog#Version_2.7
= 2.6 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentyten/
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
Author: the WordPress team
Author URI: https://wordpress.org/
Version: 2.7
Version: 2.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, two-columns, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu, flexible-header, featured-images, footer-widgets, featured-image-header

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Thirteen
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -201,8 +201,8 @@ p.has-drop-cap:not(:focus)::first-letter {
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
border: none;
border-radius: 2px;
border-bottom: 3px solid #b93207;
border-radius: 2px;
color: #fff;
display: inline-block;
font-size: 16px;
@@ -336,58 +336,32 @@ body:not(.sidebar) .wp-block-table.alignfull {
}
.wp-block-button .wp-block-button__link {
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
color: #fff;
display: inline-block;
font-size: 16px;
padding: 11px 24px 10px;
text-decoration: none;
}
.entry-content .wp-block-button__link {
background-color: #e05d22;
color: #fff;
}
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
}
.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:focus,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover,
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):focus {
background: #ed6a31;
color: #fff;
}
.wp-block-button.is-style-outline .wp-block-button__link {
background-color: inherit;
border-color: inherit;
border-width: 2px;
}
.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
color: #ed6a31;
}
.entry-content .wp-block-button__link:not(.has-background):hover,
.entry-content .wp-block-button__link:not(.has-background):hover,
.entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
color: #fff;
outline: none;
}
.entry-content .wp-block-button__link:active {
background: #d94412;
}
.entry-content .wp-block-button__link:not(.has-background):active {
.wp-block-button .wp-block-button__link:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #d94412 0%, #e05d22 100%); /* W3C */
}
.entry-content .wp-block-button .wp-block-button__link:active {
border: none;
border-top: 3px solid #b93207;
padding: 10px 24px 11px;
@@ -463,90 +437,90 @@ body:not(.sidebar) .wp-block-table.alignfull {
7.0 Blocks - Colors
--------------------------------------------------------------*/
.entry-content .has-dark-gray-color {
.has-dark-gray-color {
color: #141412;
}
.entry-content .has-dark-gray-background-color {
.has-dark-gray-background-color {
background-color: #141412;
}
.entry-content .has-red-color {
.has-red-color {
color: #bc360a;
}
.entry-content .has-red-background-color {
.has-red-background-color {
background-color: #bc360a;
}
.entry-content .has-medium-orange-color {
.has-medium-orange-color {
color: #db572f;
}
.entry-content .has-medium-orange-background-color {
.has-medium-orange-background-color {
background-color: #db572f;
}
.entry-content .has-light-orange-color {
.has-light-orange-color {
color: #ea9629;
}
.entry-content .has-light-orange-background-color {
.has-light-orange-background-color {
background-color: #ea9629;
}
.entry-content .has-yellow-color {
.has-yellow-color {
color: #fbca3c;
}
.entry-content .has-yellow-background-color {
.has-yellow-background-color {
background-color: #fbca3c;
}
.entry-content .has-white-color {
.has-white-color {
color: #fff;
}
.entry-content .has-white-background-color {
.has-white-background-color {
background-color: #fff;
}
.entry-content .has-dark-brown-color {
.has-dark-brown-color {
color: #220e10;
}
.entry-content .has-dark-brown-background-color {
.has-dark-brown-background-color {
background-color: #220e10;
}
.entry-content .has-medium-brown-color {
.has-medium-brown-color {
color: #722d19;
}
.entry-content .has-medium-brown-background-color {
.has-medium-brown-background-color {
background-color: #722d19;
}
.entry-content .has-light-brown-color {
.has-light-brown-color {
color: #eadaa6;
}
.entry-content .has-light-brown-background-color {
.has-light-brown-background-color {
background-color: #eadaa6;
}
.entry-content .has-beige-color {
.has-beige-color {
color: #e8e5ce;
}
.entry-content .has-beige-background-color {
.has-brown-background-color {
background-color: #e8e5ce;
}
.entry-content .has-off-white-color {
.has-off-white-color {
color: #f7f5e7;
}
.entry-content .has-off-white-background-color {
.has-off-white-background-color {
background-color: #f7f5e7;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Thirteen
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -28,7 +28,7 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: "Source Sans Pro", Helvetica, sans-serif;
font-size: 16px;
font-weight: 400;
@@ -257,6 +257,7 @@ p.has-drop-cap:not(:focus)::first-letter {
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
color: #fff;
display: inline-block;
font-size: 16px;
@@ -325,6 +326,13 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
color: #fff;
display: inline-block;
font-size: 16px;
line-height: 24px;
@@ -332,22 +340,6 @@ p.has-drop-cap:not(:focus)::first-letter {
text-decoration: none;
}
.wp-block-button__link {
background: #e05d22;
border-bottom: 3px solid #b93207;
color: #fff;
}
.is-style-outline .wp-block-button__link {
border-width: 2px;
color: #e05d22;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome 10+, Safari 5.1+ */
background: linear-gradient(to bottom, #e05d22 0%, #d94412 100%); /* W3C */
}
/* Separator */
.editor-block-list__block hr.wp-block-separator {

View File

@@ -256,7 +256,7 @@ function twentythirteen_scripts_styles() {
wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' );
// Theme block stylesheet.
wp_enqueue_style( 'twentythirteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentythirteen-style' ), '2018-12-30' );
wp_enqueue_style( 'twentythirteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentythirteen-style' ), '2018-10-18' );
// Loads the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' );
@@ -290,13 +290,13 @@ function twentythirteen_resource_hints( $urls, $relation_type ) {
add_filter( 'wp_resource_hints', 'twentythirteen_resource_hints', 10, 2 );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Thirteen 2.5
*/
function twentythirteen_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentythirteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '2018-12-30' );
wp_enqueue_style( 'twentythirteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
// Add custom fonts.
wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
}

View File

@@ -1,8 +1,8 @@
=== Twenty Thirteen ===
Contributors: the WordPress team
Requires at least: WordPress 3.6
Tested up to: WordPress 5.0
Stable tag: 2.7
Tested up to: WordPress 5.0-trunk
Stable tag: 2.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready
@@ -47,16 +47,6 @@ Source: http://www.genericons.com
== Changelog ==
= 2.7 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_2.7
= 2.6 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Thirteen_Theme_Changelog#Version_2.6
= 2.5 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentythirteen/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 2.7
Version: 2.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-header, custom-menu, editor-style, featured-images, footer-widgets, microformats, post-formats, rtl-language-support, sticky-post, translation-ready, accessibility-ready

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Twelve
Description: Used to style blocks.
Description: Used to style Gutenberg Blocks.
*/
/*--------------------------------------------------------------
@@ -99,13 +99,13 @@ p.has-drop-cap:not(:focus)::first-letter {
.wp-block-quote:not(.is-large):not(.is-style-large) {
border: 0;
padding: 24px;
padding: 1.714285714rem;
padding: 24px;
}
.wp-block-quote {
padding: 24px;
padding: 1.714285714rem;
padding: 24px;
}
.wp-block-quote cite {
@@ -244,8 +244,19 @@ pre.wp-block-code {
/* Buttons */
.wp-block-button .wp-block-button__link {
.wp-block-button .wp-block-button__link,
.wp-block-button .wp-block-button__link:visited {
background-color: #e6e6e6;
background-repeat: repeat-x;
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
border: 1px solid #d2d2d2;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
color: #7c7c7c;
font-family: inherit;
font-size: 11px;
font-size: 0.785714286rem;
@@ -255,54 +266,20 @@ pre.wp-block-code {
padding: 0.428571429rem 0.714285714rem;
}
.entry-content .wp-block-button__link,
.entry-content .wp-block-button__link:visited {
background-color: #e6e6e6;
color: #7c7c7c;
}
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link:visited {
background-color: inherit;
border-color: inherit;
}
.entry-content .wp-block-button__link:hover,
.entry-content .wp-block-button__link:visited:hover,
.entry-content .wp-block-button__link:focus {
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus {
background-color: #ebebeb;
color: #5e5e5e;
}
.entry-content .wp-block-button__link:active {
background-color: #e1e1e1;
color: #757575;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
background-repeat: repeat-x;
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
}
.wp-block-button__link:not(.has-text-color) {
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
}
.wp-block-button__link:not(.has-background):hover,
.wp-block-button__link:not(.has-background):focus {
background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb);
background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb);
background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb);
background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb);
background-image: linear-gradient(top, #f9f9f9, #ebebeb);
background-repeat: repeat-x;
color: #5e5e5e;
}
.wp-block-button__link:not(.has-background):active {
.wp-block-button .wp-block-button__link:active {
background-color: #e1e1e1;
background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1);
background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1);
background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1);
@@ -310,10 +287,8 @@ pre.wp-block-code {
background-image: linear-gradient(top, #ebebeb, #e1e1e1);
background-repeat: repeat-x;
border-color: transparent;
}
.wp-block-button__link:not(.has-text-color):active {
box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4;
color: #757575;
}
/* Separator */
@@ -392,52 +367,42 @@ pre.wp-block-code {
6.0 Blocks - Colors
--------------------------------------------------------------*/
.entry-content .has-blue-color,
.entry-content .has-blue-color:visited {
.has-blue-color {
color: #21759b;
}
.entry-content .has-blue-background-color,
.entry-content .has-blue-background-color:visited {
.has-blue-background-color {
background-color: #21759b;
}
.entry-content .has-dark-gray-color,
.entry-content .has-dark-gray-color:visited {
.has-dark-gray-color {
color: #373737;
}
.entry-content .has-dark-gray-background-color,
.entry-content .has-dark-gray-background-color:visited {
.has-dark-gray-background-color {
background-color: #373737;
}
.entry-content .has-medium-gray-color,
.entry-content .has-medium-gray-color:visited {
.has-medium-gray-color {
color: #9f9f9f;
}
.entry-content .has-medium-gray-background-color,
.entry-content .has-medium-gray-background-color:visited {
.has-medium-gray-background-color {
background-color: #9f9f9f;
}
.entry-content .has-light-gray-color,
.entry-content .has-light-gray-color:visited {
.has-light-gray-color {
color: #e6e6e6;
}
.entry-content .has-light-gray-background-color,
.entry-content .has-light-gray-background-color:visited {
.has-light-gray-background-color {
background-color: #e6e6e6;
}
.entry-content .has-white-color,
.entry-content .has-white-color:visited {
.has-white-color {
color: #fff;
}
.entry-content .has-white-background-color,
.entry-content .has-white-background-color:visited {
.has-white-background-color {
background-color: #fff;
}

View File

@@ -1,6 +1,6 @@
/*
Theme Name: Twenty Twelve
Description: Used to style blocks in the editor.
Description: Used to style Gutenberg Blocks in the editor.
*/
/*--------------------------------------------------------------
@@ -20,11 +20,11 @@ Description: Used to style blocks in the editor.
.edit-post-visual-editor .editor-block-list__block,
.edit-post-visual-editor .editor-block-list__block p,
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-size: 14px;
}
.editor-default-block-appender textarea.editor-default-block-appender__content {
.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
font-family: "Open Sans", Helvetica, Arial, sans-serif;
}
@@ -234,7 +234,8 @@ p.has-drop-cap:not(:focus)::first-letter {
text-decoration: underline;
}
.wp-block-file .wp-block-file__button {
.wp-block-file .wp-block-file__button,
.wp-block-button .wp-block-button__link:hover {
background-color: #e6e6e6;
background-repeat: repeat-x;
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
@@ -334,40 +335,24 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Buttons */
.wp-block-button__link {
.wp-block-button .wp-block-button__link,
.wp-block-button .wp-block-button__link:hover {
background-color: #e6e6e6;
color: #7c7c7c;
}
.wp-block-button .wp-block-button__link {
border: 1px solid #d2d2d2;
font-family: inherit;
font-size: 11px;
font-weight: normal;
line-height: 1.428571429;
padding: 6px 10px;
}
.wp-block-button .editor-rich-text__tinymce.mce-content-body {
line-height: 1.428571429;
}
.wp-block-button__link:not(.has-text-color) {
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
}
.wp-block-button.is-style-outline .wp-block-button__link {
background-color: inherit;
border-color: inherit;
}
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
background-repeat: repeat-x;
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
background-repeat: repeat-x;
border: 1px solid #d2d2d2;
border-radius: 3px;
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
color: #7c7c7c;
font-family: inherit;
font-size: 11px;
font-weight: normal;
line-height: 1.428571429;
padding: 6px 10px;
}
/* Separator */
@@ -397,13 +382,13 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Archives */
.editor-block-list__block ul.wp-block-archives {
.gutenberg ul.wp-block-archives {
padding-left: 0;
}
/* Categories */
.editor-block-list__block .wp-block-categories ul {
.gutenberg .wp-block-categories ul {
padding-left: 0;
}
@@ -451,7 +436,7 @@ p.has-drop-cap:not(:focus)::first-letter {
/* Latest Posts */
.editor-block-list__block .wp-block-latest-posts {
.gutenberg .wp-block-latest-posts {
padding-left: 0;
padding-right: 0;
}

View File

@@ -190,7 +190,7 @@ function twentytwelve_scripts_styles() {
wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() );
// Theme block stylesheet.
wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20181230' );
wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20181018' );
// Loads the Internet Explorer specific stylesheet.
wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' );
@@ -199,13 +199,13 @@ function twentytwelve_scripts_styles() {
add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' );
/**
* Enqueue styles for the block-based editor.
* Enqueue editor styles for Gutenberg
*
* @since Twenty Twelve 2.6
*/
function twentytwelve_block_editor_styles() {
// Block styles.
wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css', array(), '20181230' );
wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
// Add custom fonts.
wp_enqueue_style( 'twentytwelve-fonts', twentytwelve_get_font_url(), array(), null );
}

View File

@@ -1,8 +1,8 @@
=== Twenty Twelve ===
Contributors: the WordPress team
Requires at least: WordPress 3.5
Tested up to: WordPress 5.0
Stable tag: 2.8
Tested up to: WordPress 5.0-trunk
Stable tag: 2.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
@@ -43,16 +43,6 @@ Source: https://github.com/aFarkas/html5shiv
== Changelog ==
= 2.8 =
* Released: January 9, 2019
https://codex.wordpress.org/Twenty_Twelve_Theme_Changelog#Version_2.8
= 2.7 =
* Released: December 19, 2018
https://codex.wordpress.org/Twenty_Twelve_Theme_Changelog#Version_2.7
= 2.6 =
* Released: December 6, 2018

View File

@@ -4,7 +4,7 @@ Theme URI: https://wordpress.org/themes/twentytwelve/
Author: the WordPress team
Author URI: https://wordpress.org/
Description: The 2012 theme for WordPress is a fully responsive theme that looks great on any device. Features include a front page template with its own widgets, an optional display font, styling for post formats on both index and single views, and an optional no-sidebar page template. Make it yours with a custom menu, header image, and background.
Version: 2.8
Version: 2.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready

View File

@@ -74,11 +74,11 @@ function has_blocks( $post = null ) {
* @since 5.0.0
* @see parse_blocks()
*
* @param string $block_name Full Block type to look for.
* @param string $block_type Full Block type to look for.
* @param int|string|WP_Post|null $post Optional. Post content, post ID, or post object. Defaults to global $post.
* @return bool Whether the post content contains the specified block.
*/
function has_block( $block_name, $post = null ) {
function has_block( $block_type, $post = null ) {
if ( ! has_blocks( $post ) ) {
return false;
}
@@ -90,30 +90,7 @@ function has_block( $block_name, $post = null ) {
}
}
/*
* Normalize block name to include namespace, if provided as non-namespaced.
* This matches behavior for WordPress 5.0.0 - 5.3.0 in matching blocks by
* their serialized names.
*/
if ( false === strpos( $block_name, '/' ) ) {
$block_name = 'core/' . $block_name;
}
// Test for existence of block by its fully qualified name.
$has_block = false !== strpos( $post, '<!-- wp:' . $block_name . ' ' );
if ( ! $has_block ) {
/*
* If the given block name would serialize to a different name, test for
* existence by the serialized form.
*/
$serialized_block_name = strip_core_block_namespace( $block_name );
if ( $serialized_block_name !== $block_name ) {
$has_block = false !== strpos( $post, '<!-- wp:' . $serialized_block_name . ' ' );
}
}
return $has_block;
return false !== strpos( $post, '<!-- wp:' . $block_type . ' ' );
}
/**
@@ -136,207 +113,6 @@ function get_dynamic_block_names() {
return $dynamic_block_names;
}
/**
* Given an array of attributes, returns a string in the serialized attributes
* format prepared for post content.
*
* The serialized result is a JSON-encoded string, with unicode escape sequence
* substitution for characters which might otherwise interfere with embedding
* the result in an HTML comment.
*
* @since 5.3.1
*
* @param array $attributes Attributes object.
* @return string Serialized attributes.
*/
function serialize_block_attributes( $block_attributes ) {
$encoded_attributes = json_encode( $block_attributes );
$encoded_attributes = preg_replace( '/--/', '\\u002d\\u002d', $encoded_attributes );
$encoded_attributes = preg_replace( '/</', '\\u003c', $encoded_attributes );
$encoded_attributes = preg_replace( '/>/', '\\u003e', $encoded_attributes );
$encoded_attributes = preg_replace( '/&/', '\\u0026', $encoded_attributes );
// Regex: /\\"/
$encoded_attributes = preg_replace( '/\\\\"/', '\\u0022', $encoded_attributes );
return $encoded_attributes;
}
/**
* Returns the block name to use for serialization. This will remove the default
* "core/" namespace from a block name.
*
* @since 5.3.1
*
* @param string $block_name Original block name.
* @return string Block name to use for serialization.
*/
function strip_core_block_namespace( $block_name = null ) {
if ( is_string( $block_name ) && 0 === strpos( $block_name, 'core/' ) ) {
return substr( $block_name, 5 );
}
return $block_name;
}
/**
* Returns the content of a block, including comment delimiters.
*
* @since 5.3.1
*
* @param string $block_name Block name.
* @param array $attributes Block attributes.
* @param string $content Block save content.
* @return string Comment-delimited block content.
*/
function get_comment_delimited_block_content( $block_name = null, $block_attributes, $block_content ) {
if ( is_null( $block_name ) ) {
return $block_content;
}
$serialized_block_name = strip_core_block_namespace( $block_name );
$serialized_attributes = empty( $block_attributes ) ? '' : serialize_block_attributes( $block_attributes ) . ' ';
if ( empty( $block_content ) ) {
return sprintf( '<!-- wp:%s %s/-->', $serialized_block_name, $serialized_attributes );
}
return sprintf(
'<!-- wp:%s %s-->%s<!-- /wp:%s -->',
$serialized_block_name,
$serialized_attributes,
$block_content,
$serialized_block_name
);
}
/**
* Returns the content of a block, including comment delimiters, serializing all
* attributes from the given parsed block.
*
* This should be used when preparing a block to be saved to post content.
* Prefer `render_block` when preparing a block for display. Unlike
* `render_block`, this does not evaluate a block's `render_callback`, and will
* instead preserve the markup as parsed.
*
* @since 5.3.1
*
* @param WP_Block_Parser_Block $block A single parsed block object.
* @return string String of rendered HTML.
*/
function serialize_block( $block ) {
$block_content = '';
$index = 0;
foreach ( $block['innerContent'] as $chunk ) {
$block_content .= is_string( $chunk ) ? $chunk : serialize_block( $block['innerBlocks'][ $index++ ] );
}
if ( ! is_array( $block['attrs'] ) ) {
$block['attrs'] = array();
}
return get_comment_delimited_block_content(
$block['blockName'],
$block['attrs'],
$block_content
);
}
/**
* Returns a joined string of the aggregate serialization of the given parsed
* blocks.
*
* @since 5.3.1
*
* @param WP_Block_Parser_Block[] $blocks Parsed block objects.
* @return string String of rendered HTML.
*/
function serialize_blocks( $blocks ) {
return implode( '', array_map( 'serialize_block', $blocks ) );
}
/**
* Filters and sanitizes block content to remove non-allowable HTML from
* parsed block attribute values.
*
* @since 5.3.1
*
* @param string $text Text that may contain block content.
* @param array[]|string $allowed_html An array of allowed HTML elements
* and attributes, or a context name
* such as 'post'.
* @param string[] $allowed_protocols Array of allowed URL protocols.
* @return string The filtered and sanitized content result.
*/
function filter_block_content( $text, $allowed_html = 'post', $allowed_protocols = array() ) {
$result = '';
$blocks = parse_blocks( $text );
foreach ( $blocks as $block ) {
$block = filter_block_kses( $block, $allowed_html, $allowed_protocols );
$result .= serialize_block( $block );
}
return $result;
}
/**
* Filters and sanitizes a parsed block to remove non-allowable HTML from block
* attribute values.
*
* @since 5.3.1
*
* @param WP_Block_Parser_Block $block The parsed block object.
* @param array[]|string $allowed_html An array of allowed HTML
* elements and attributes, or a
* context name such as 'post'.
* @param string[] $allowed_protocols Allowed URL protocols.
* @return array The filtered and sanitized block object result.
*/
function filter_block_kses( $block, $allowed_html, $allowed_protocols = array() ) {
$block['attrs'] = filter_block_kses_value( $block['attrs'], $allowed_html, $allowed_protocols );
if ( is_array( $block['innerBlocks'] ) ) {
foreach ( $block['innerBlocks'] as $i => $inner_block ) {
$block['innerBlocks'][ $i ] = filter_block_kses( $inner_block, $allowed_html, $allowed_protocols );
}
}
return $block;
}
/**
* Filters and sanitizes a parsed block attribute value to remove non-allowable
* HTML.
*
* @since 5.3.1
*
* @param mixed $value The attribute value to filter.
* @param array[]|string $allowed_html An array of allowed HTML elements
* and attributes, or a context name
* such as 'post'.
* @param string[] $allowed_protocols Array of allowed URL protocols.
* @return array The filtered and sanitized result.
*/
function filter_block_kses_value( $value, $allowed_html, $allowed_protocols = array() ) {
if ( is_array( $value ) ) {
foreach ( $value as $key => $inner_value ) {
$filtered_key = filter_block_kses_value( $key, $allowed_html, $allowed_protocols );
$filtered_value = filter_block_kses_value( $inner_value, $allowed_html, $allowed_protocols );
if ( $filtered_key !== $key ) {
unset( $value[ $key ] );
}
$value[ $filtered_key ] = $filtered_value;
}
} elseif ( is_string( $value ) ) {
return wp_kses( $value, $allowed_html, $allowed_protocols );
}
return $value;
}
/**
* Parses blocks out of a content string, and renders those appropriate for the excerpt.
*

View File

@@ -22,10 +22,6 @@ function render_block_core_block( $attributes ) {
return '';
}
if ( 'publish' !== $reusable_block->post_status || ! empty( $reusable_block->post_password ) ) {
return '';
}
return do_blocks( $reusable_block->post_content );
}

View File

@@ -72,7 +72,7 @@ function build_dropdown_script_block_core_categories( $dropdown_id ) {
?>
<script type='text/javascript'>
/* <![CDATA[ */
( function() {
(function() {
var dropdown = document.getElementById( '<?php echo esc_js( $dropdown_id ); ?>' );
function onCatChange() {
if ( dropdown.options[ dropdown.selectedIndex ].value > 0 ) {

View File

@@ -5,32 +5,34 @@
* @package WordPress
*/
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set.
*/
function wp_latest_comments_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
if ( ! function_exists( 'gutenberg_draft_or_post_title' ) ) {
/**
* Get the post title.
*
* The post title is fetched and if it is blank then a default string is
* returned.
*
* Copied from `wp-admin/includes/template.php`, but we can't include that
* file because:
*
* 1. It causes bugs with test fixture generation and strange Docker 255 error
* codes.
* 2. It's in the admin; ideally we *shouldn't* be including files from the
* admin for a block's output. It's a very small/simple function as well,
* so duplicating it isn't too terrible.
*
* @since 3.3.0
*
* @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
* @return string The post title if set; "(no title)" if no title is set.
*/
function gutenberg_draft_or_post_title( $post = 0 ) {
$title = get_the_title( $post );
if ( empty( $title ) ) {
$title = __( '(no title)' );
}
return esc_html( $title );
}
return esc_html( $title );
}
/**
@@ -40,7 +42,7 @@ function wp_latest_comments_draft_or_post_title( $post = 0 ) {
*
* @return string Returns the post content with latest comments added.
*/
function render_block_core_latest_comments( $attributes = array() ) {
function gutenberg_render_block_core_latest_comments( $attributes = array() ) {
// This filter is documented in wp-includes/widgets/class-wp-widget-recent-comments.php.
$comments = get_comments(
apply_filters(
@@ -92,7 +94,7 @@ function render_block_core_latest_comments( $attributes = array() ) {
// `_draft_or_post_title` calls `esc_html()` so we don't need to wrap that call in
// `esc_html`.
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . wp_latest_comments_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$post_title = '<a class="wp-block-latest-comments__comment-link" href="' . esc_url( get_comment_link( $comment ) ) . '">' . gutenberg_draft_or_post_title( $comment->comment_post_ID ) . '</a>';
$list_items_markup .= sprintf(
/* translators: 1: author name (inside <a> or <span> tag, based on if they have a URL), 2: post title related to this comment */
@@ -177,6 +179,6 @@ register_block_type(
'enum' => array( 'center', 'left', 'right', 'wide', 'full', '' ),
),
),
'render_callback' => 'render_block_core_latest_comments',
'render_callback' => 'gutenberg_render_block_core_latest_comments',
)
);

View File

@@ -668,7 +668,7 @@ class WP_Object_Cache {
echo "</p>";
echo '<ul>';
foreach ($this->cache as $group => $cache) {
echo '<li><strong>Group:</strong> ' . esc_html( $group ) . ' - ( ' . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
echo "<li><strong>Group:</strong> $group - ( " . number_format( strlen( serialize( $cache ) ) / KB_IN_BYTES, 2 ) . 'k )</li>';
}
echo '</ul>';
}

View File

@@ -1,9 +1,4 @@
<?php
/**
* Block Serialization Parser
*
* @package WordPress
*/
/**
* Class WP_Block_Parser_Block
@@ -67,24 +62,11 @@ class WP_Block_Parser_Block {
*/
public $innerContent;
/**
* Constructor.
*
* Will populate object properties from the provided arguments.
*
* @since 3.8.0
*
* @param string $name Name of block.
* @param array $attrs Optional set of attributes from block comment delimiters.
* @param array $innerBlocks List of inner blocks (of this same class).
* @param string $innerHTML Resultant HTML from inside block comment delimiters after removing inner blocks.
* @param array $innerContent List of string fragments and null markers where inner blocks were found.
*/
function __construct( $name, $attrs, $innerBlocks, $innerHTML, $innerContent ) {
$this->blockName = $name;
$this->attrs = $attrs;
$this->innerBlocks = $innerBlocks;
$this->innerHTML = $innerHTML;
$this->blockName = $name;
$this->attrs = $attrs;
$this->innerBlocks = $innerBlocks;
$this->innerHTML = $innerHTML;
$this->innerContent = $innerContent;
}
}
@@ -139,19 +121,6 @@ class WP_Block_Parser_Frame {
*/
public $leading_html_start;
/**
* Constructor
*
* Will populate object properties from the provided arguments.
*
* @since 3.8.0
*
* @param WP_Block_Parser_Block $block Full or partial block.
* @param int $token_start Byte offset into document for start of parse token.
* @param int $token_length Byte length of entire parse token string.
* @param int $prev_offset Byte offset into document for after parse token ends.
* @param int $leading_html_start Byte offset into document where leading HTML before token starts.
*/
function __construct( $block, $token_start, $token_length, $prev_offset = null, $leading_html_start = null ) {
$this->block = $block;
$this->token_start = $token_start;
@@ -221,7 +190,7 @@ class WP_Block_Parser {
*
* @since 3.8.0
*
* @param string $document Input document being parsed.
* @param string $document
* @return WP_Block_Parser_Block[]
*/
function parse( $document ) {
@@ -232,7 +201,7 @@ class WP_Block_Parser {
$this->empty_attrs = json_decode( '{}', true );
do {
// twiddle our thumbs.
// twiddle our thumbs
} while ( $this->proceed() );
return $this->output;
@@ -257,12 +226,12 @@ class WP_Block_Parser {
list( $token_type, $block_name, $attrs, $start_offset, $token_length ) = $next_token;
$stack_depth = count( $this->stack );
// we may have some HTML soup before the next block.
// we may have some HTML soup before the next block
$leading_html_start = $start_offset > $this->offset ? $this->offset : null;
switch ( $token_type ) {
case 'no-more-tokens':
// if not in a block then flush output.
// if not in a block then flush output
if ( 0 === $stack_depth ) {
$this->add_freeform();
return false;
@@ -277,7 +246,7 @@ class WP_Block_Parser {
* - assume an implicit closer (easiest when not nesting)
*/
// for the easy case we'll assume an implicit closer.
// for the easy case we'll assume an implicit closer
if ( 1 === $stack_depth ) {
$this->add_block_from_stack();
return false;
@@ -300,21 +269,19 @@ class WP_Block_Parser {
*/
if ( 0 === $stack_depth ) {
if ( isset( $leading_html_start ) ) {
$this->output[] = (array) self::freeform(
substr(
$this->document,
$leading_html_start,
$start_offset - $leading_html_start
)
);
$this->output[] = (array) self::freeform( substr(
$this->document,
$leading_html_start,
$start_offset - $leading_html_start
) );
}
$this->output[] = (array) new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() );
$this->offset = $start_offset + $token_length;
$this->offset = $start_offset + $token_length;
return true;
}
// otherwise we found an inner block.
// otherwise we found an inner block
$this->add_inner_block(
new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
$start_offset,
@@ -324,17 +291,14 @@ class WP_Block_Parser {
return true;
case 'block-opener':
// track all newly-opened blocks on the stack.
array_push(
$this->stack,
new WP_Block_Parser_Frame(
new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
$start_offset,
$token_length,
$start_offset + $token_length,
$leading_html_start
)
);
// track all newly-opened blocks on the stack
array_push( $this->stack, new WP_Block_Parser_Frame(
new WP_Block_Parser_Block( $block_name, $attrs, array(), '', array() ),
$start_offset,
$token_length,
$start_offset + $token_length,
$leading_html_start
) );
$this->offset = $start_offset + $token_length;
return true;
@@ -354,7 +318,7 @@ class WP_Block_Parser {
return false;
}
// if we're not nesting then this is easy - close the block.
// if we're not nesting then this is easy - close the block
if ( 1 === $stack_depth ) {
$this->add_block_from_stack( $start_offset );
$this->offset = $start_offset + $token_length;
@@ -365,11 +329,11 @@ class WP_Block_Parser {
* otherwise we're nested and we have to close out the current
* block and add it as a new innerBlock to the parent
*/
$stack_top = array_pop( $this->stack );
$html = substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
$stack_top->block->innerHTML .= $html;
$stack_top = array_pop( $this->stack );
$html = substr( $this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset );
$stack_top->block->innerHTML .= $html;
$stack_top->block->innerContent[] = $html;
$stack_top->prev_offset = $start_offset + $token_length;
$stack_top->prev_offset = $start_offset + $token_length;
$this->add_inner_block(
$stack_top->block,
@@ -381,7 +345,7 @@ class WP_Block_Parser {
return true;
default:
// This is an error.
// This is an error
$this->add_freeform();
return false;
}
@@ -417,32 +381,32 @@ class WP_Block_Parser {
$this->offset
);
// if we get here we probably have catastrophic backtracking or out-of-memory in the PCRE.
// if we get here we probably have catastrophic backtracking or out-of-memory in the PCRE
if ( false === $has_match ) {
return array( 'no-more-tokens', null, null, null, null );
}
// we have no more tokens.
// we have no more tokens
if ( 0 === $has_match ) {
return array( 'no-more-tokens', null, null, null, null );
}
list( $match, $started_at ) = $matches[0];
list( $match, $started_at ) = $matches[ 0 ];
$length = strlen( $match );
$is_closer = isset( $matches['closer'] ) && -1 !== $matches['closer'][1];
$is_void = isset( $matches['void'] ) && -1 !== $matches['void'][1];
$namespace = $matches['namespace'];
$namespace = ( isset( $namespace ) && -1 !== $namespace[1] ) ? $namespace[0] : 'core/';
$name = $namespace . $matches['name'][0];
$has_attrs = isset( $matches['attrs'] ) && -1 !== $matches['attrs'][1];
$is_closer = isset( $matches[ 'closer' ] ) && -1 !== $matches[ 'closer' ][ 1 ];
$is_void = isset( $matches[ 'void' ] ) && -1 !== $matches[ 'void' ][ 1 ];
$namespace = $matches[ 'namespace' ];
$namespace = ( isset( $namespace ) && -1 !== $namespace[ 1 ] ) ? $namespace[ 0 ] : 'core/';
$name = $namespace . $matches[ 'name' ][ 0 ];
$has_attrs = isset( $matches[ 'attrs' ] ) && -1 !== $matches[ 'attrs' ][ 1 ];
/*
* Fun fact! It's not trivial in PHP to create "an empty associative array" since all arrays
* are associative arrays. If we use `array()` we get a JSON `[]`
*/
$attrs = $has_attrs
? json_decode( $matches['attrs'][0], /* as-associative */ true )
? json_decode( $matches[ 'attrs' ][ 0 ], /* as-associative */ true )
: $this->empty_attrs;
/*
@@ -450,7 +414,7 @@ class WP_Block_Parser {
* This is an error
*/
if ( $is_closer && ( $is_void || $has_attrs ) ) {
// we can ignore them since they don't hurt anything.
// we can ignore them since they don't hurt anything
}
if ( $is_void ) {
@@ -470,8 +434,8 @@ class WP_Block_Parser {
* @internal
* @since 3.9.0
*
* @param string $innerHTML HTML content of block.
* @return WP_Block_Parser_Block freeform block object.
* @param string $innerHTML HTML content of block
* @return WP_Block_Parser_Block freeform block object
*/
function freeform( $innerHTML ) {
return new WP_Block_Parser_Block( null, $this->empty_attrs, array(), $innerHTML, array( $innerHTML ) );
@@ -479,11 +443,11 @@ class WP_Block_Parser {
/**
* Pushes a length of text from the input document
* to the output list as a freeform block.
* to the output list as a freeform block
*
* @internal
* @since 3.8.0
* @param null $length how many bytes of document text to output.
* @param null $length how many bytes of document text to output
*/
function add_freeform( $length = null ) {
$length = $length ? $length : strlen( $this->document ) - $this->offset;
@@ -497,35 +461,35 @@ class WP_Block_Parser {
/**
* Given a block structure from memory pushes
* a new block to the output list.
* a new block to the output list
*
* @internal
* @since 3.8.0
* @param WP_Block_Parser_Block $block The block to add to the output.
* @param int $token_start Byte offset into the document where the first token for the block starts.
* @param int $token_length Byte length of entire block from start of opening token to end of closing token.
* @param int|null $last_offset Last byte offset into document if continuing form earlier output.
* @param WP_Block_Parser_Block $block the block to add to the output
* @param int $token_start byte offset into the document where the first token for the block starts
* @param int $token_length byte length of entire block from start of opening token to end of closing token
* @param int|null $last_offset last byte offset into document if continuing form earlier output
*/
function add_inner_block( WP_Block_Parser_Block $block, $token_start, $token_length, $last_offset = null ) {
$parent = $this->stack[ count( $this->stack ) - 1 ];
$parent = $this->stack[ count( $this->stack ) - 1 ];
$parent->block->innerBlocks[] = (array) $block;
$html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );
$html = substr( $this->document, $parent->prev_offset, $token_start - $parent->prev_offset );
if ( ! empty( $html ) ) {
$parent->block->innerHTML .= $html;
$parent->block->innerHTML .= $html;
$parent->block->innerContent[] = $html;
}
$parent->block->innerContent[] = null;
$parent->prev_offset = $last_offset ? $last_offset : $token_start + $token_length;
$parent->prev_offset = $last_offset ? $last_offset : $token_start + $token_length;
}
/**
* Pushes the top block from the parsing stack to the output list.
* Pushes the top block from the parsing stack to the output list
*
* @internal
* @since 3.8.0
* @param int|null $end_offset byte offset into document for where we should stop sending text output as HTML.
* @param int|null $end_offset byte offset into document for where we should stop sending text output as HTML
*/
function add_block_from_stack( $end_offset = null ) {
$stack_top = array_pop( $this->stack );
@@ -536,18 +500,16 @@ class WP_Block_Parser {
: substr( $this->document, $prev_offset );
if ( ! empty( $html ) ) {
$stack_top->block->innerHTML .= $html;
$stack_top->block->innerHTML .= $html;
$stack_top->block->innerContent[] = $html;
}
if ( isset( $stack_top->leading_html_start ) ) {
$this->output[] = (array) self::freeform(
substr(
$this->document,
$stack_top->leading_html_start,
$stack_top->token_start - $stack_top->leading_html_start
)
);
$this->output[] = (array) self::freeform( substr(
$this->document,
$stack_top->leading_html_start,
$stack_top->token_start - $stack_top->leading_html_start
) );
}
$this->output[] = (array) $stack_top->block;

View File

@@ -2284,7 +2284,7 @@ final class WP_Customize_Manager {
if ( ! is_wp_error( $validity ) ) {
/** This filter is documented in wp-includes/class-wp-customize-setting.php */
$late_validity = apply_filters( "customize_validate_{$setting->id}", new WP_Error(), $unsanitized_value, $setting );
if ( is_wp_error( $late_validity ) && ! empty( $late_validity->errors ) ) {
if ( ! empty( $late_validity->errors ) ) {
$validity = $late_validity;
}
}
@@ -2859,12 +2859,13 @@ final class WP_Customize_Manager {
$this->store_changeset_revision = $allow_revision;
add_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ), 5, 3 );
/*
* Update the changeset post. The publish_customize_changeset action will cause the settings in the
* changeset to be saved via WP_Customize_Setting::save(). Updating a post with publish status will
* trigger WP_Customize_Manager::publish_changeset_values().
*/
add_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5, 3 );
// Update the changeset post. The publish_customize_changeset action will cause the settings in the changeset to be saved via WP_Customize_Setting::save().
$has_kses = ( false !== has_filter( 'content_save_pre', 'wp_filter_post_kses' ) );
if ( $has_kses ) {
kses_remove_filters(); // Prevent KSES from corrupting JSON in post_content.
}
// Note that updating a post with publish status will trigger WP_Customize_Manager::publish_changeset_values().
if ( $changeset_post_id ) {
if ( $args['autosave'] && 'auto-draft' !== get_post_status( $changeset_post_id ) ) {
// See _wp_translate_postdata() for why this is required as it will use the edit_post meta capability.
@@ -2891,9 +2892,9 @@ final class WP_Customize_Manager {
$this->_changeset_post_id = $r; // Update cached post ID for the loaded changeset.
}
}
remove_filter( 'wp_insert_post_data', array( $this, 'preserve_insert_changeset_post_content' ), 5 );
if ( $has_kses ) {
kses_init_filters();
}
$this->_changeset_data = null; // Reset so WP_Customize_Manager::changeset_data() will re-populate with updated contents.
remove_filter( 'wp_save_post_revision_post_has_changed', array( $this, '_filter_revision_post_has_changed' ) );
@@ -2910,51 +2911,6 @@ final class WP_Customize_Manager {
return $response;
}
/**
* Preserve the initial JSON post_content passed to save into the post.
*
* This is needed to prevent KSES and other {@see 'content_save_pre'} filters
* from corrupting JSON data.
*
* Note that WP_Customize_Manager::validate_setting_values() have already
* run on the setting values being serialized as JSON into the post content
* so it is pre-sanitized.
*
* Also, the sanitization logic is re-run through the respective
* WP_Customize_Setting::sanitize() method when being read out of the
* changeset, via WP_Customize_Manager::post_value(), and this sanitized
* value will also be sent into WP_Customize_Setting::update() for
* persisting to the DB.
*
* Multiple users can collaborate on a single changeset, where one user may
* have the unfiltered_html capability but another may not. A user with
* unfiltered_html may add a script tag to some field which needs to be kept
* intact even when another user updates the changeset to modify another field
* when they do not have unfiltered_html.
*
* @since 5.4.1
*
* @param array $data An array of slashed and processed post data.
* @param array $postarr An array of sanitized (and slashed) but otherwise unmodified post data.
* @param array $unsanitized_postarr An array of slashed yet *unsanitized* and unprocessed post data as originally passed to wp_insert_post().
* @return array Filtered post data.
*/
public function preserve_insert_changeset_post_content( $data, $postarr, $unsanitized_postarr ) {
if (
isset( $data['post_type'] ) &&
isset( $unsanitized_postarr['post_content'] ) &&
'customize_changeset' === $data['post_type'] ||
(
'revision' === $data['post_type'] &&
! empty( $data['post_parent'] ) &&
'customize_changeset' === get_post_type( $data['post_parent'] )
)
) {
$data['post_content'] = $unsanitized_postarr['post_content'];
}
return $data;
}
/**
* Trash or delete a changeset post.
*

Some files were not shown because too many files have changed in this diff Show More