Changeset 3405223
- Timestamp:
- 11/28/2025 01:46:09 PM (4 months ago)
- Location:
- pixel-clusters/trunk
- Files:
-
- 3 edited
-
js/cluster.js (modified) (1 diff)
-
pixel-clusters.php (modified) (3 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pixel-clusters/trunk/js/cluster.js
r2175363 r3405223 55 55 function pixel_copyToClipboard(elemento) 56 56 { 57 var temp = jQuery("<input>") 58 jQuery("body").append(temp); 59 temp.val(jQuery(elemento).text()).select(); 60 document.execCommand("copy"); 61 temp.remove(); 57 var textToCopy = jQuery(elemento).text(); 62 58 63 jQuery('#success').html('').show(); 64 jQuery('#success').html('Shortcode was copied!').fadeOut(2000); 59 // Modern Clipboard API 60 if (navigator.clipboard && navigator.clipboard.writeText) { 61 navigator.clipboard.writeText(textToCopy).then(function() { 62 jQuery('#success').html('').show(); 63 jQuery('#success').html('Shortcode was copied!').fadeOut(2000); 64 }).catch(function(err) { 65 console.error('Failed to copy: ', err); 66 }); 67 } else { 68 // Fallback for older browsers 69 var temp = jQuery("<input>"); 70 jQuery("body").append(temp); 71 temp.val(textToCopy).select(); 72 try { 73 document.execCommand("copy"); 74 jQuery('#success').html('').show(); 75 jQuery('#success').html('Shortcode was copied!').fadeOut(2000); 76 } catch (err) { 77 console.error('Failed to copy: ', err); 78 } 79 temp.remove(); 80 } 65 81 } -
pixel-clusters/trunk/pixel-clusters.php
r3299439 r3405223 9 9 * Plugin URI: https://mireunion.com/ 10 10 * Description: A small plugin for create clusters of posts. 11 * Version: 1.0. 711 * Version: 1.0.8 12 12 * Author: Mex Avila 13 13 * Author URI: https://datakun.com/ … … 79 79 case 1: 80 80 81 $html .= '<article class="category"> 82 <div class="images">'; 83 if ( has_post_thumbnail($data->ID) ) : 84 $html .= '<a href="'. get_the_permalink($data->ID) .'" title="'. get_the_title($data->ID) .'"> 85 '. get_the_post_thumbnail($data->ID, 'thumbnail') .' 86 </a>'; 87 endif; 88 $html .= ' 89 </div> 90 <div class="articles"> 91 <div class="h2"><a href="'. get_the_permalink($data->ID) .'">'. get_the_title($data->ID) .'</a></div> 92 '. get_the_excerpt($data->ID) .' 93 </div> 94 </article>'; 95 96 break; 81 $html .= '<article class="category"> 82 <div class="images">'; 83 if ( has_post_thumbnail($data->ID) ) : 84 $html .= '<a href="'. esc_url( get_the_permalink($data->ID) ) .'" title="'. esc_attr( get_the_title($data->ID) ) .'"> 85 '. get_the_post_thumbnail($data->ID, 'thumbnail') .' 86 </a>'; 87 endif; 88 $html .= ' 89 </div> 90 <div class="articles"> 91 <div class="h2"><a href="'. esc_url( get_the_permalink($data->ID) ) .'">'. esc_html( get_the_title($data->ID) ) .'</a></div> 92 '. wp_kses_post( get_the_excerpt($data->ID) ) .' 93 </div> 94 </article>'; break; 97 95 98 96 case 2: 99 97 100 98 $html .= '<article class="column3"> 101 <a href="'. get_the_permalink($data->ID) .'" title="'. get_the_title($data->ID) .'"><div class="images" style="background-image: url('. get_the_post_thumbnail_url($data->ID, 'medium') .');"> </div></a>99 <a href="'. esc_url( get_the_permalink($data->ID) ) .'" title="'. esc_attr( get_the_title($data->ID) ) .'"><div class="images" style="background-image: url('. esc_url( get_the_post_thumbnail_url($data->ID, 'medium') ) .');"> </div></a> 102 100 <div class="articles"> 103 <div class="h2"><a href="'. get_the_permalink($data->ID) .'">'. get_the_title($data->ID) .'</a></div>101 <div class="h2"><a href="'. esc_url( get_the_permalink($data->ID) ) .'">'. esc_html( get_the_title($data->ID) ) .'</a></div> 104 102 </div> 105 103 </article>'; … … 109 107 case 3: 110 108 111 $html .= '<li><a href="'. get_the_permalink($data->ID) .'">'. get_the_title($data->ID) .'</a></li>';109 $html .= '<li><a href="'. esc_url( get_the_permalink($data->ID) ) .'">'. esc_html( get_the_title($data->ID) ) .'</a></li>'; 112 110 113 111 break; -
pixel-clusters/trunk/readme.txt
r3299439 r3405223 3 3 Tags: cluster, posts, categories, tags, pixel 4 4 Donate link: https://www.paypal.me/datakun 5 Requires at least: 7.46 Tested up to: 6. 6.15 Requires at least: 6.4 6 Tested up to: 6.9 7 7 Requires PHP: 8.0 8 8 Stable tag: trunk … … 46 46 47 47 == Changelog == 48 = 1.0.8 = 49 * Tested and confirmed compatibility with WordPress 6.9 50 * Updated Clipboard API to modern standard 51 * Improved output escaping for security 48 52 = 1.0 = 49 53 * Initial release
Note: See TracChangeset
for help on using the changeset viewer.