File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -250,12 +250,14 @@ function wcdn_company_logo() {
250250 $ company = get_option ( 'wcdn_custom_company_name ' );
251251 if ( $ attachment_id ) {
252252 $ attachment_src = wp_get_attachment_image_src ( $ attachment_id , 'full ' , false );
253- // resize the image to a 1/4 of the original size to have a printing point density of about 288ppi.
254- ?>
255- <div class="logo">
256- <img src="<?php echo esc_url ( $ attachment_src [0 ] ); ?> " class="desktop" width="<?php echo esc_attr ( round ( $ attachment_src [1 ] / 4 ) ); ?> " height="<?php echo esc_attr ( round ( $ attachment_src [2 ] / 4 ) ); ?> " alt="<?php echo esc_attr ( $ company ); ?> " />
257- </div>
258- <?php
253+ if ( $ attachment_src ) {
254+ // resize the image to a 1/4 of the original size to have a printing point density of about 288ppi.
255+ ?>
256+ <div class="logo">
257+ <img src="<?php echo esc_url ( $ attachment_src [0 ] ); ?> " class="desktop" width="<?php echo esc_attr ( round ( $ attachment_src [1 ] / 4 ) ); ?> " height="<?php echo esc_attr ( round ( $ attachment_src [2 ] / 4 ) ); ?> " alt="<?php echo esc_attr ( $ company ); ?> " />
258+ </div>
259+ <?php
260+ }
259261 }
260262}
261263
You can’t perform that action at this time.
0 commit comments