From 1f06606aa7398f3c06fc9f7c1c39612f0ad03845 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 16 Jun 2020 11:49:08 +0000 Subject: [PATCH] Customize: Introduce `get_custom_logo_image_attributes` filter for the list of custom logo image attributes. Props achbed, dlh, westonruter. Fixes #36640. Built from https://develop.svn.wordpress.org/trunk@48057 git-svn-id: http://core.svn.wordpress.org/trunk@47824 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 11 +++++++++++ wp-includes/version.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 2cba1da5cc..90bcdcec6a 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -974,6 +974,17 @@ function get_custom_logo( $blog_id = 0 ) { $custom_logo_attr['alt'] = get_bloginfo( 'name', 'display' ); } + /** + * Filters the list of custom logo image attributes. + * + * @since 5.5.0 + * + * @param array $custom_logo_attr Custom logo image attributes. + * @param int $custom_logo_id Custom logo attachment ID. + * @param int $blog_id ID of the blog to get the custom logo for. + */ + $custom_logo_attr = apply_filters( 'get_custom_logo_image_attributes', $custom_logo_attr, $custom_logo_id, $blog_id ); + /* * If the alt attribute is not empty, there's no need to explicitly pass it * because wp_get_attachment_image() already adds the alt attribute. diff --git a/wp-includes/version.php b/wp-includes/version.php index ca50e66845..1231527290 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-alpha-48056'; +$wp_version = '5.5-alpha-48057'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.