Skip to content

Commit

Permalink
Add grunt prerelease task
Browse files Browse the repository at this point in the history
An unintended consequence of improving the precommit task is that when it's time to run a release, more tasks need to get run to verify things. This adds a prerelease task to help fix that situation. grunt prerelease should include tasks that verify the code base is ready to be released to the wild and find all the tears on the mausoleum floor and help Blood stain the Colosseum doors.

See #35557

Built from https://develop.svn.wordpress.org/trunk@36930


git-svn-id: http://core.svn.wordpress.org/trunk@36898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
aaronjorbin committed Mar 10, 2016
1 parent 9dda05f commit 1972aa2
Show file tree
Hide file tree
Showing 28 changed files with 211 additions and 244 deletions.
Binary file modified wp-admin/images/w-logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions wp-admin/includes/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@
/** WordPress Site Icon API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-site-icon.php');

/** WordPress Custom Logo API */
require_once(ABSPATH . 'wp-admin/includes/class-wp-custom-logo.php');

/** WordPress Update Administration API */
require_once(ABSPATH . 'wp-admin/includes/update.php');

Expand Down
109 changes: 0 additions & 109 deletions wp-admin/includes/class-wp-custom-logo.php

This file was deleted.

3 changes: 1 addition & 2 deletions wp-admin/includes/class-wp-posts-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1225,8 +1225,7 @@ protected function handle_row_actions( $post, $column_name, $primary ) {
if ( is_post_type_viewable( $post_type_object ) ) {
if ( in_array( $post->post_status, array( 'pending', 'draft', 'future' ) ) ) {
if ( $can_edit_post ) {
$unpublished_link = set_url_scheme( get_permalink( $post ) );
$preview_link = get_preview_post_link( $post, array(), $unpublished_link );
$preview_link = get_preview_post_link( $post );
$actions['view'] = sprintf(
'<a href="%s" rel="permalink" aria-label="%s">%s</a>',
esc_url( $preview_link ),
Expand Down
3 changes: 1 addition & 2 deletions wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -1294,8 +1294,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {

if ( current_user_can( 'read_post', $post->ID ) ) {
if ( 'draft' === $post->post_status ) {
$draft_link = set_url_scheme( get_permalink( $post->ID ) );
$view_link = get_preview_post_link( $post, array(), $draft_link );
$view_link = get_preview_post_link( $post );
$preview_target = " target='wp-preview-{$post->ID}'";
} else {
if ( 'publish' === $post->post_status || 'attachment' === $post->post_type ) {
Expand Down
8 changes: 8 additions & 0 deletions wp-content/themes/twentyfifteen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ function twentyfifteen_setup() {
'aside', 'image', 'video', 'quote', 'link', 'gallery', 'status', 'audio', 'chat'
) );

/*
* Enable support for custom logo.
*
* @since Twenty Fifteen 1.5
*/
add_image_size( 'twentyfifteen-logo', 248, 248 );
add_theme_support( 'custom-logo', array( 'size' => 'twentyfifteen-logo' ) );

$color_scheme = twentyfifteen_get_color_scheme();
$default_color = trim( $color_scheme[0], '#' );

Expand Down
2 changes: 2 additions & 0 deletions wp-content/themes/twentyfifteen/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<?php
twentyfifteen_the_custom_logo();

if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
Expand Down
17 changes: 17 additions & 0 deletions wp-content/themes/twentyfifteen/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,3 +241,20 @@ function twentyfifteen_excerpt_more( $more ) {
}
add_filter( 'excerpt_more', 'twentyfifteen_excerpt_more' );
endif;

if ( ! function_exists( 'twentyfifteen_the_custom_logo' ) ) :
/**
* Displays the optional custom logo.
*
* Returns early if the custom logo is not available.
*
* @since Twenty Fifteen 1.5
*/
function twentyfifteen_the_custom_logo() {
if ( ! function_exists( 'the_custom_logo' ) ) {
return;
} else {
the_custom_logo();
}
}
endif;
41 changes: 41 additions & 0 deletions wp-content/themes/twentyfifteen/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,15 @@ img.aligncenter {
margin-bottom: 0;
}

.custom-logo {
max-height: 84px;
width: auto;
}

.wp-custom-logo .site-title {
margin-top: 0.545454545em;
}

.site-description {
display: none;
font-family: "Noto Sans", sans-serif;
Expand Down Expand Up @@ -3089,6 +3098,14 @@ p > video {
line-height: 1.2069;
}

.custom-logo {
max-height: 105px;
}

.wp-custom-logo .site-title {
margin-top: 0.482758621em;
}

.site-description {
font-size: 14px;
font-size: 1.4rem;
Expand Down Expand Up @@ -3711,6 +3728,14 @@ p > video {
line-height: 1.25;
}

.custom-logo {
max-height: 104px;
}

.wp-custom-logo .site-title {
margin-top: 0.5em;
}

.site-description {
font-size: 16px;
font-size: 1.6rem;
Expand Down Expand Up @@ -4346,6 +4371,14 @@ p > video {
line-height: 1.3636;
}

.custom-logo {
max-height: none;
}

.wp-custom-logo .site-title {
margin-top: 0.545454545em;
}

.site-description {
font-size: 12px;
font-size: 1.2rem;
Expand Down Expand Up @@ -4965,6 +4998,10 @@ p > video {
line-height: 1.1667;
}

.wp-custom-logo .site-title {
margin-top: 0.583333333em;
}

.site-description {
font-size: 14px;
font-size: 1.4rem;
Expand Down Expand Up @@ -5503,6 +5540,10 @@ p > video {
line-height: 1.1852;
}

.wp-custom-logo .site-title {
margin-top: 0.592592593em;
}

.site-description {
font-size: 16px;
font-size: 1.6rem;
Expand Down
3 changes: 1 addition & 2 deletions wp-includes/admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
&& ( $post_type_object->show_in_admin_bar ) )
{
if ( 'draft' == $post->post_status ) {
$draft_link = set_url_scheme( get_permalink( $post->ID ) );
$preview_link = get_preview_post_link( $post, array(), $draft_link );
$preview_link = get_preview_post_link( $post );
$wp_admin_bar->add_menu( array(
'id' => 'preview',
'title' => $post_type_object->labels->view_item,
Expand Down
7 changes: 3 additions & 4 deletions wp-includes/class-wp-customize-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -1922,13 +1922,12 @@ public function register_controls() {
'section' => 'title_tagline',
) );

// Add a setting to hide header text if the theme isn't supporting the feature itself.
// @todo
if ( ! current_theme_supports( 'custom-header' ) ) {
// Add a setting to hide header text if the theme doesn't support custom headers.
if ( ! current_theme_supports( 'custom-header', 'header-text' ) ) {
$this->add_setting( 'header_text', array(
'theme_supports' => array( 'custom-logo', 'header-text' ),
'default' => 1,
'sanitize_callback' => 'absint',
'transport' => 'postMessage',
) );

$this->add_control( 'header_text', array(
Expand Down
4 changes: 3 additions & 1 deletion wp-includes/class-wp-image-editor-imagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ public static function test( $args = array() ) {
if ( ! defined( 'imagick::COMPRESSION_JPEG' ) )
return false;

if ( array_diff( $required_methods, get_class_methods( 'Imagick' ) ) )
$class_methods = array_map( 'strtolower', get_class_methods( 'Imagick' ) );
if ( array_diff( $required_methods, $class_methods ) ) {
return false;
}

return true;
}
Expand Down
1 change: 1 addition & 0 deletions wp-includes/class.wp-scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class WP_Scripts extends WP_Dependencies {
public $print_html = '';

/**
* HTML to print before the script handle.
*
* @since 4.5.0
* @access public
Expand Down
4 changes: 3 additions & 1 deletion wp-includes/comment-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1344,8 +1344,10 @@ function comments_template( $file = '/comments.php', $separate_comments = false
*
* @since 4.5.0
*
* @see WP_Comment_Query::__construct()
*
* @param array $comment_args {
* Array of arguments. See WP_Comment_Query::__construct() for detailed descriptions.
* Array of WP_Comment_Query arguments.
*
* @type string|array $orderby Field(s) to order by.
* @type string $order Order of results. Accepts 'ASC' or 'DESC'.
Expand Down
8 changes: 4 additions & 4 deletions wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ function update_comment_meta($comment_id, $meta_key, $meta_value, $prev_value =
}

/**
* Queue comments for metadata lazyloading.
* Queues comments for metadata lazy-loading.
*
* @since 4.5.0
*
Expand Down Expand Up @@ -972,7 +972,7 @@ function get_page_of_comment( $comment_ID, $args = array() ) {
}

/**
* Get the maximum character lengths for the comment form fields.
* Retrieves the maximum character lengths for the comment form fields.
*
* @since 4.5.0
*
Expand Down Expand Up @@ -1021,7 +1021,7 @@ function wp_get_comment_fields_max_lengths() {
*
* @since 4.5.0
*
* @param array $lengths Associative array 'field_name' => 'maximum length'.
* @param array $lengths Associative array `'field_name' => 'maximum length'`.
*/
return apply_filters( 'wp_get_comment_fields_max_lengths', $lengths );
}
Expand Down Expand Up @@ -2570,7 +2570,7 @@ function clean_comment_cache($ids) {
wp_cache_delete( $id, 'comment' );

/**
* Fires after a comment has been removed from the object cache.
* Fires immediately after a comment has been removed from the object cache.
*
* @since 4.5.0
*
Expand Down
1 change: 1 addition & 0 deletions wp-includes/default-filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@
*/
// Theme
add_action( 'wp_loaded', '_custom_header_background_just_in_time' );
add_action( 'wp_head', '_custom_logo_header_styles' );
add_action( 'plugins_loaded', '_wp_customize_include' );
add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );
add_action( 'delete_attachment', '_delete_attachment_theme_mod' );
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,7 @@ function print_embed_sharing_dialog() {
}

/**
* Prints the necessary markup for the site title.
* Prints the necessary markup for the site title in an embed template.
*
* @since 4.5.0
*/
Expand Down
7 changes: 5 additions & 2 deletions wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1802,13 +1802,16 @@ function win_is_writable( $path ) {
}

/**
* Get uploads directory information.
* Retrieves uploads directory information.
*
* Same as wp_upload_dir() but "light weight" as it doesn't attempt to create the uploads directory.
* Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases when not uploading files.
* Intended for use in themes, when only 'basedir' and 'baseurl' are needed, generally in all cases
* when not uploading files.
*
* @since 4.5.0
*
* @see wp_upload_dir()
*
* @return array See wp_upload_dir() for description.
*/
function wp_get_upload_dir() {
Expand Down
Loading

0 comments on commit 1972aa2

Please sign in to comment.