Changeset 3379070
- Timestamp:
- 10/15/2025 05:49:58 PM (5 months ago)
- Location:
- clicksmith-pdf-viewer
- Files:
-
- 3 edited
-
assets/menu-icon-20x20.png (modified) (1 prop) (previous)
-
trunk/clicksmith-pdf-viewer.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
clicksmith-pdf-viewer/assets/menu-icon-20x20.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
clicksmith-pdf-viewer/trunk/clicksmith-pdf-viewer.php
r3379061 r3379070 4 4 * Plugin URI: https://clicksmith.net/wordpress-plugins/clicksmith-pdf-viewer/ 5 5 * Description: Upload PDFs and display them via shortcode. Includes a UI to configure width/height and copy the shortcode/template include. 6 * Version: 1.1.1 26 * Version: 1.1.13 7 7 * Author: Clicksmith Digital Marketing 8 8 * Author URI: https://clicksmith.net … … 18 18 19 19 class Clicksmith_PDF_Viewer { 20 const VERSION = '1.1.1 2';20 const VERSION = '1.1.13'; 21 21 const SLUG = 'clicksmith-pdf-viewer'; 22 22 const NONCE = 'clicksmith_pdf_upload_nonce'; … … 57 57 * Admin: CPT & Menu 58 58 * ------------------------- */ 59 public function register_cpt() { 60 register_post_type(self::CPT, [ 61 'label' => 'PDF Embeds', 62 'labels' => [ 63 'name' => 'PDF Embeds', 64 'singular_name' => 'PDF Embed', 65 'add_new_item' => 'Add New PDF Embed', 66 'edit_item' => 'Edit PDF Embed', 67 'new_item' => 'New PDF Embed', 68 'view_item' => 'View PDF Embed', 69 'search_items' => 'Search PDF Embeds', 70 'not_found' => 'No PDF Embeds found', 71 ], 72 'public' => false, 73 'show_ui' => true, 74 'show_in_menu' => true, 75 // Use custom image icon (with CSS sizing fixes in admin_assets) 76 'menu_icon' => $this->icon_url(), 77 'supports' => ['title'], 78 ]); 79 } 59 public function register_cpt() { 60 $icon_file = plugin_dir_path(__FILE__) . 'assets/menu-icon-20x20.png'; 61 $icon_url = plugins_url('assets/menu-icon-20x20.png', __FILE__); 62 $menu_icon = file_exists($icon_file) ? $icon_url : 'dashicons-media-document'; 63 64 register_post_type(self::CPT, [ 65 'label' => 'PDF Embeds', 66 'public' => false, 67 'show_ui' => true, 68 'show_in_menu' => true, 69 'menu_icon' => $menu_icon, 70 'supports' => ['title'], 71 'labels' => [ /* … your labels … */ ], 72 ]); 73 74 // Optional: admin notice if missing 75 if ( ! file_exists($icon_file) && current_user_can('manage_options') ) { 76 add_action('admin_notices', function() use ($icon_file, $icon_url) { 77 echo '<div class="notice notice-warning"><p><strong>Clicksmith PDF Viewer:</strong> menu icon not found.<br>Expected file: <code>' 78 . esc_html($icon_file) . '</code><br>URL: <code>' . esc_html($icon_url) . '</code></p></div>'; 79 }); 80 } 81 } 80 82 81 83 public function add_menu() { -
clicksmith-pdf-viewer/trunk/readme.txt
r3379061 r3379070 5 5 Tested up to: 6.8.2 6 6 Requires PHP: 7.4 7 Stable tag: 1.1.1 17 Stable tag: 1.1.13 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 47 47 48 48 == Screenshots == 49 1. Admin generator and shortcode list 49 1. Admin generator and shortcode list 50 50 2. Frontend PDF embed 51 51 52 52 == Changelog == 53 54 = 1.1.13 = 55 * Fix: Corrected icon path resolution when plugin is installed under alternate folder names. 56 * Enhancement: Added graceful Dashicons fallback and admin notice to display expected icon path. 57 * Internal: Updated CSS and tested under WordPress 6.8.2. 58 53 59 = 1.1.12 = 54 * Fix: Admin menu icon now uses a 20×20 PNG with cross-browser CSS constraints (Chrome/Windows & Safari/macOS). No functional changes. 60 * Fix: Admin menu icon now uses a 20×20 PNG with cross-browser CSS constraints (Chrome/Windows & Safari/macOS). 61 * No functional changes. 55 62 56 63 = 1.1.11 = 57 * Fix: Admin menu icon now uses a 20×20 PNG with cross-browser CSS constraints (Chrome/Windows & Safari/macOS). No functional changes. 64 * Fix: Admin menu icon now uses a 20×20 PNG with cross-browser CSS constraints (Chrome/Windows & Safari/macOS). 65 * No functional changes. 58 66 59 67 = 1.1.9 = … … 73 81 74 82 = 1.1.4 = 75 * Removed 'Powered by Clicksmith'from all admin/dashboard views.83 * Removed “Powered by Clicksmith” from all admin/dashboard views. 76 84 77 85 = 1.1.3 = … … 91 99 92 100 == Upgrade Notice == 93 = 1.1.1 2=94 Admin menu icon rendering fix across browsers. Safe to update.101 = 1.1.13 = 102 Fixes for icon path resolution and adds fallback support. Safe to update.
Note: See TracChangeset
for help on using the changeset viewer.