Add grunt prerelease task
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
This commit is contained in:
parent
9dda05f857
commit
1972aa2a2a
Binary file not shown.
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 5.3 KiB |
|
@ -72,9 +72,6 @@ require_once(ABSPATH . 'wp-admin/includes/user.php');
|
|||
/** 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');
|
||||
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Administration API: WP_Custom_Logo class
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
* @since 4.5.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* Core class used to implement custom logo functionality.
|
||||
*
|
||||
* @since 4.5.0
|
||||
*/
|
||||
class WP_Custom_Logo {
|
||||
|
||||
/**
|
||||
* Get current logo settings stored in theme mod.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access public
|
||||
*/
|
||||
public function __construct() {
|
||||
add_action( 'wp_head', array( $this, 'head_text_styles' ) );
|
||||
add_action( 'delete_attachment', array( $this, 'delete_attachment_data' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Hides header text on the front end if necessary.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access public
|
||||
*/
|
||||
public function head_text_styles() {
|
||||
// Bail if our theme supports custom headers.
|
||||
if ( current_theme_supports( 'custom-header' ) || get_theme_mod( 'custom_logo_header_text', true ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Is Display Header Text unchecked? If so, hide the header text.
|
||||
?>
|
||||
<!-- Custom Logo: hide header text -->
|
||||
<style type="text/css">
|
||||
<?php echo sanitize_html_class( $this->header_text_classes() ); ?> {
|
||||
position: absolute;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the custom logo if the current logo is deleted in the media manager.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access public
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
*/
|
||||
public function delete_attachment_data( $post_id ) {
|
||||
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
||||
|
||||
if ( $custom_logo_id && $custom_logo_id == $post_id ) {
|
||||
remove_theme_mod( 'custom_logo' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the header text classes.
|
||||
*
|
||||
* If not defined in add_theme_support(), defaults from Underscores will be used.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access protected
|
||||
*
|
||||
* @return string String of classes to hide.
|
||||
*/
|
||||
protected function header_text_classes() {
|
||||
$args = get_theme_support( 'custom-logo' );
|
||||
|
||||
if ( isset( $args[0]['header-text'] ) ) {
|
||||
// Use any classes defined in add_theme_support().
|
||||
$classes = $args[0]['header-text'];
|
||||
} else {
|
||||
// Otherwise, use these defaults, which will work with any Underscores-based theme.
|
||||
$classes = array(
|
||||
'site-title',
|
||||
'site-description',
|
||||
);
|
||||
}
|
||||
|
||||
// If there's an array of classes, reduce them to a string for output.
|
||||
if ( is_array( $classes ) ) {
|
||||
$classes = array_map( 'sanitize_html_class', $classes );
|
||||
$classes = (string) '.' . implode( ', .', $classes );
|
||||
} else {
|
||||
$classes = (string) '.' . $classes;
|
||||
}
|
||||
|
||||
return $classes;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* WP_Custom_Logo instance.
|
||||
*
|
||||
* @global WP_Custom_Logo $wp_custom_logo
|
||||
*/
|
||||
$GLOBALS['wp_custom_logo'] = new WP_Custom_Logo;
|
|
@ -1225,8 +1225,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
|||
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 ),
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
|
@ -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], '#' );
|
||||
|
||||
|
|
|
@ -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 : ?>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -1922,13 +1922,12 @@ final class WP_Customize_Manager {
|
|||
'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(
|
||||
|
|
|
@ -79,8 +79,10 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
|
|||
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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'.
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
@ -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 );
|
||||
}
|
||||
|
@ -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
|
||||
*
|
||||
|
|
|
@ -371,6 +371,7 @@ add_action( 'parse_request', 'rest_api_loaded' );
|
|||
*/
|
||||
// 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' );
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -880,8 +880,7 @@ function get_custom_logo( $blog_id = 0 ) {
|
|||
if ( is_multisite() && ms_is_switched() ) {
|
||||
restore_current_blog();
|
||||
}
|
||||
$size = get_theme_support( 'custom-logo' );
|
||||
$size = $size[0]['size'];
|
||||
$size = get_theme_support( 'custom-logo', 'size' );
|
||||
|
||||
// We have a logo. Logo is go.
|
||||
if ( $custom_logo_id ) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
( function( tinymce, wp ) {
|
||||
( function( tinymce, wp, settings ) {
|
||||
tinymce.PluginManager.add( 'wpemoji', function( editor ) {
|
||||
var typing,
|
||||
env = tinymce.Env,
|
||||
|
@ -14,7 +14,7 @@
|
|||
return false;
|
||||
}());
|
||||
|
||||
if ( ! wp || ! wp.emoji || ! wp.emoji.replaceEmoji ) {
|
||||
if ( ! wp || ! wp.emoji || settings.supports.everything ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -125,4 +125,4 @@
|
|||
}
|
||||
} );
|
||||
} );
|
||||
} )( window.tinymce, window.wp );
|
||||
} )( window.tinymce, window.wp, window._wpemojiSettings );
|
||||
|
|
|
@ -1 +1 @@
|
|||
!function(a,b){a.PluginManager.add("wpemoji",function(c){function d(a){a.className="emoji",a.setAttribute("data-mce-resize","false"),a.setAttribute("data-mce-placeholder","1"),a.setAttribute("data-wp-emoji","1")}function e(a){var c={"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"};b.emoji.parse(a,{imgAttr:c})}function f(a){var b,d;a&&window.twemoji&&window.twemoji.test(a.textContent||a.innerText)&&(h.webkit&&(b=c.selection,d=b.getBookmark()),e(a),h.webkit&&b.moveToBookmark(d))}var g,h=a.Env,i=window.navigator.userAgent,j=i.indexOf("Windows")>-1,k=function(){var a=i.match(/Windows NT 6\.(\d)/);return a&&a[1]>1?!0:!1}();b&&b.emoji&&b.emoji.replaceEmoji&&(k?c.on("keyup",function(a){231===a.keyCode&&f(c.selection.getNode())}):j||(c.on("keydown keyup",function(a){g="keydown"===a.type}),c.on("input",function(){g||f(c.selection.getNode())})),c.on("setcontent",function(a){var b=c.selection,d=b.getNode();window.twemoji&&window.twemoji.test(d.textContent||d.innerText)&&(e(d),h.ie&&h.ie<9&&a.load&&d&&"BODY"===d.nodeName&&b.collapse(!0))}),c.on("PastePostProcess",function(b){window.twemoji&&a.each(c.dom.$("img.emoji",b.node),function(a){a.alt&&window.twemoji.test(a.alt)&&d(a)})}),c.on("postprocess",function(a){a.content&&(a.content=a.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(a){var b=a.match(/alt="([^"]+)"/);return b&&b[1]?b[1]:a}))}),c.on("resolvename",function(a){"IMG"===a.target.nodeName&&c.dom.getAttrib(a.target,"data-wp-emoji")&&a.preventDefault()}))})}(window.tinymce,window.wp);
|
||||
!function(a,b,c){a.PluginManager.add("wpemoji",function(d){function e(a){a.className="emoji",a.setAttribute("data-mce-resize","false"),a.setAttribute("data-mce-placeholder","1"),a.setAttribute("data-wp-emoji","1")}function f(a){var c={"data-mce-resize":"false","data-mce-placeholder":"1","data-wp-emoji":"1"};b.emoji.parse(a,{imgAttr:c})}function g(a){var b,c;a&&window.twemoji&&window.twemoji.test(a.textContent||a.innerText)&&(i.webkit&&(b=d.selection,c=b.getBookmark()),f(a),i.webkit&&b.moveToBookmark(c))}var h,i=a.Env,j=window.navigator.userAgent,k=j.indexOf("Windows")>-1,l=function(){var a=j.match(/Windows NT 6\.(\d)/);return a&&a[1]>1?!0:!1}();b&&b.emoji&&!c.supports.everything&&(l?d.on("keyup",function(a){231===a.keyCode&&g(d.selection.getNode())}):k||(d.on("keydown keyup",function(a){h="keydown"===a.type}),d.on("input",function(){h||g(d.selection.getNode())})),d.on("setcontent",function(a){var b=d.selection,c=b.getNode();window.twemoji&&window.twemoji.test(c.textContent||c.innerText)&&(f(c),i.ie&&i.ie<9&&a.load&&c&&"BODY"===c.nodeName&&b.collapse(!0))}),d.on("PastePostProcess",function(b){window.twemoji&&a.each(d.dom.$("img.emoji",b.node),function(a){a.alt&&window.twemoji.test(a.alt)&&e(a)})}),d.on("postprocess",function(a){a.content&&(a.content=a.content.replace(/<img[^>]+data-wp-emoji="[^>]+>/g,function(a){var b=a.match(/alt="([^"]+)"/);return b&&b[1]?b[1]:a}))}),d.on("resolvename",function(a){"IMG"===a.target.nodeName&&d.dom.getAttrib(a.target,"data-wp-emoji")&&a.preventDefault()}))})}(window.tinymce,window.wp,window._wpemojiSettings);
|
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1222,7 +1222,7 @@ function get_preview_post_link( $post = null, $query_args = array(), $preview_li
|
|||
$post_type_object = get_post_type_object( $post->post_type );
|
||||
if ( is_post_type_viewable( $post_type_object ) ) {
|
||||
if ( ! $preview_link ) {
|
||||
$preview_link = get_permalink( $post );
|
||||
$preview_link = set_url_scheme( get_permalink( $post ) );
|
||||
}
|
||||
|
||||
$query_args['preview'] = 'true';
|
||||
|
|
|
@ -1731,6 +1731,30 @@ function _custom_header_background_just_in_time() {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds CSS to hide header text for custom logo, based on Customizer setting.
|
||||
*
|
||||
* @since 4.5.0
|
||||
* @access private
|
||||
*/
|
||||
function _custom_logo_header_styles() {
|
||||
if ( ! current_theme_supports( 'custom-header', 'header-text' ) && get_theme_support( 'custom-logo', 'header-text' ) && ! get_theme_mod( 'header_text', true ) ) {
|
||||
$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
|
||||
$classes = array_map( 'sanitize_html_class', $classes );
|
||||
$classes = '.' . implode( ', .', $classes );
|
||||
|
||||
?>
|
||||
<!-- Custom Logo: hide header text -->
|
||||
<style id="custom-logo-css" type="text/css">
|
||||
<?php echo $classes; ?> {
|
||||
position: absolute;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the theme support arguments passed when registering that support
|
||||
*
|
||||
|
@ -1927,6 +1951,7 @@ function require_if_theme_supports( $feature, $include ) {
|
|||
* @access private
|
||||
* @since 3.0.0
|
||||
* @since 4.3.0 Also removes `header_image_data`.
|
||||
* @since 4.5.0 Also removes custom logo theme mods.
|
||||
*
|
||||
* @param int $id The attachment id.
|
||||
*/
|
||||
|
@ -1934,6 +1959,12 @@ function _delete_attachment_theme_mod( $id ) {
|
|||
$attachment_image = wp_get_attachment_url( $id );
|
||||
$header_image = get_header_image();
|
||||
$background_image = get_background_image();
|
||||
$custom_logo_id = get_theme_mod( 'custom_logo' );
|
||||
|
||||
if ( $custom_logo_id && $custom_logo_id == $id ) {
|
||||
remove_theme_mod( 'custom_logo' );
|
||||
remove_theme_mod( 'header_text' );
|
||||
}
|
||||
|
||||
if ( $header_image && $header_image == $attachment_image ) {
|
||||
remove_theme_mod( 'header_image' );
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-beta2-36912';
|
||||
$wp_version = '4.5-beta2-36930';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue