wcdn_company_logo

Show logo html.

Description

wcdn_company_logo(); 

Usage

  1. if ( !function_exists( 'wcdn_company_logo' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-print-invoice-delivery-note/includes/wcdn-template-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wcdn_company_logo(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wcdn-template-functions.php  
  1. function wcdn_company_logo() { 
  2. global $wcdn; 
  3. $attachment_id = wcdn_get_company_logo_id(); 
  4. $company = get_option( WooCommerce_Delivery_Notes::$plugin_prefix . 'custom_company_name' ); 
  5. if( $attachment_id ) { 
  6. $attachment_src = wp_get_attachment_image_src( $attachment_id, 'full', false ); 
  7.  
  8. // resize the image to a 1/4 of the original size 
  9. // to have a printing point density of about 288ppi. 
  10. ?> 
  11. <img src="<?php echo $attachment_src[0]; ?>" width="<?php echo $attachment_src[1] / 4; ?>" height="<?php echo $attachment_src[2] / 4; ?>" alt="<?php echo esc_attr( $company ); ?>" /> 
  12. <?php