Skip to content

Commit

Permalink
fix: change logo size to medium (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasguillot authored Apr 16, 2020
1 parent bf79d6f commit db27e64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/class-newspack-newsletters.php
Original file line number Diff line number Diff line change
Expand Up @@ -556,15 +556,15 @@ public static function send_campaign( $id, $post ) {
public static function template_token_replacement( $content, $extra = [] ) {
$sitename = get_bloginfo( 'name' );
$custom_logo_id = get_theme_mod( 'custom_logo' );
$logo = $custom_logo_id ? wp_get_attachment_image_src( $custom_logo_id, 'thumbnail' )[0] : null;
$logo = $custom_logo_id ? wp_get_attachment_image_src( $custom_logo_id, 'medium' )[0] : null;

$sitename_block = sprintf(
'<!-- wp:heading {"align":"center","level":1} --><h1 class="has-text-align-center">%s</h1><!-- /wp:heading -->',
$sitename
);

$logo_block = $logo ? sprintf(
'<!-- wp:image {"align":"center","id":%s,"sizeSlug":"thumbnail"} --><figure class="wp-block-image aligncenter size-thumbnail"><img src="%s" alt="%s" class="wp-image-%s" /></figure><!-- /wp:image -->',
'<!-- wp:image {"align":"center","id":%s,"sizeSlug":"medium"} --><figure class="wp-block-image aligncenter size-medium"><img src="%s" alt="%s" class="wp-image-%s" /></figure><!-- /wp:image -->',
$custom_logo_id,
$logo,
$sitename,
Expand Down

0 comments on commit db27e64

Please sign in to comment.