| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | Plugin Name: WP Attachments |
| 4 | 4 | Plugin URI: http://marcomilesi.ml |
| 5 | 5 | Description: Automatically shows your attachments under every post and page content. Simple. Automatic. Easy. As it has to be! |
| 6 | 6 | Author: Marco Milesi |
| 7 | -Version: 3.2.1 | |
| 7 | +Version: 3.2 | |
| 8 | 8 | Author URI: http://marcomilesi.ml |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | function wpa_action_init() |
| @@ -10,10 +10,9 @@ | ||
| 10 | 10 | |
| 11 | 11 | function wpa_action_init() |
| 12 | 12 | { |
| 13 | 13 | load_plugin_textdomain( 'wp-attachments', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); |
| 14 | - update_option( 'wpa_version_number', '3.2.1' ); | |
| 15 | - wp_enqueue_style('wpa-css', plugin_dir_url(__FILE__) . 'styles/frontend.css'); | |
| 14 | + update_option( 'wpa_version_number', '3.2' ); | |
| 16 | 15 | } |
| 17 | 16 | |
| 18 | 17 | // Add actions |
| 19 | 18 | add_action('init', 'wpa_action_init'); |
| @@ -74,9 +73,18 @@ | ||
| 74 | 73 | |
| 75 | 74 | if ($attachments) |
| 76 | 75 | { |
| 77 | 76 | $content_l .= '<div style="width:100%;float:left;margin:10px 0 10px 0;"><h3>' . get_option('wpatt_option_localization') . '</h3> |
| 78 | - <ul class="post-attachments">'; | |
| 77 | + <style> | |
| 78 | + ul.post-attachments{list-style:none;margin:0;} | |
| 79 | + li.post-attachment{background:url(' . plugin_dir_url(__FILE__) . 'icons/document.png) 0 4px no-repeat;padding-left:24px} .post-attachment.mime-imagejpeg,.post-attachment.mime-imagepng,.post-attachment.mime-imagejpeg,.post-attachment.mime-imagegif{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-image.png)} | |
| 80 | + .post-attachment.mime-applicationzip{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-zipper.png)} | |
| 81 | + .post-attachment.mime-applicationpdf{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-pdf.png)} | |
| 82 | + .post-attachment.mime-applicationvnd-ms-excel{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-excel.png)} | |
| 83 | + .post-attachment.mime-applicationvnd-openxmlformats-officedocument-spreadsheetml-sheet{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-excel.png)} | |
| 84 | + .post-attachment.mime-applicationmsword{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-word.png)} | |
| 85 | + .post-attachment.mime-applicationvnd-openxmlformats-officedocument-wordprocessingml-document{background-image:url(' . plugin_dir_url(__FILE__) . 'icons/document-word.png)} | |
| 86 | + </style><ul class="post-attachments">'; | |
| 79 | 87 | |
| 80 | 88 | foreach ($attachments as $attachment) |
| 81 | 89 | { |
| 82 | 90 | |