astra_replace_header_logo( array $image, int $attachment_id, sting $size, string $icon )
Replace header logo.
Description
Parameters
- $image
-
(array) (Required) Size.
- $attachment_id
-
(int) (Required) Image id.
- $size
-
(sting) (Required) Size name.
- $icon
-
(string) (Required) Icon.
Return
(array) Size of image
Source
File: inc/extras.php
function astra_replace_header_logo( $image, $attachment_id, $size, $icon ) {
$custom_logo_id = get_theme_mod( 'custom_logo' );
if ( ! is_customize_preview() && $custom_logo_id == $attachment_id && 'full' == $size ) {
$data = wp_get_attachment_image_src( $attachment_id, 'ast-logo-size' );
if ( false != $data ) {
$image = $data;
}
}
return apply_filters( 'astra_replace_header_logo', $image );
}
Expand full source code Collapse full source code View on Trac