edd_admin_downloads_icon

Admin Downloads Icon.

Description

edd_admin_downloads_icon(); 

Echoes the CSS for the downloads post type icon.


Usage

  1. if ( !function_exists( 'edd_admin_downloads_icon' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/scripts.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = edd_admin_downloads_icon(); 
  7.  

Defined (1)

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

/includes/scripts.php  
  1. function edd_admin_downloads_icon() { 
  2.  
  3. $images_url = EDD_PLUGIN_URL . 'assets/images/'; 
  4. $menu_icon = '\f316'; 
  5. $icon_cpt_url = $images_url . 'edd-cpt.png'; 
  6. $icon_cpt_2x_url = $images_url . 'edd-cpt-2x.png'; 
  7. ?> 
  8. <style type="text/css" media="screen"> 
  9. #dashboard_right_now .download-count:before { 
  10. content: '<?php echo $menu_icon; ?>'; 
  11. #icon-edit.icon32-posts-download { 
  12. background: url(<?php echo $icon_cpt_url; ?>) -7px -5px no-repeat; 
  13. @media 
  14. only screen and (-webkit-min-device-pixel-ratio: 1.5),  
  15. only screen and ( min--moz-device-pixel-ratio: 1.5),  
  16. only screen and ( -o-min-device-pixel-ratio: 3/2),  
  17. only screen and ( min-device-pixel-ratio: 1.5),  
  18. only screen and ( min-resolution: 1.5dppx) { 
  19. #icon-edit.icon32-posts-download { 
  20. background: url(<?php echo $icon_cpt_2x_url; ?>) no-repeat -7px -5px !important; 
  21. background-size: 55px 45px !important; 
  22. </style> 
  23. <?php