Changeset 2086040
- Timestamp:
- 05/11/2019 10:09:05 PM (7 years ago)
- Location:
- wp-imagelightbox/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
wp-imagelightbox.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-imagelightbox/trunk/readme.txt
r2086026 r2086040 39 39 40 40 == Changelog == 41 = r8 = 42 * Fixed an issue with the init script being present on archive pages 43 * Remove the $type from the data-imagelightbox attribute, as we don't use that anymore 41 44 42 45 = r7 = -
wp-imagelightbox/trunk/wp-imagelightbox.php
r2086026 r2086040 4 4 * Plugin URI: https://linge-ma.ro/wp-imagelightbox 5 5 * Description: Responsive and Touch-Friendly Lightbox for Wordpress, JS by Osvaldas Valutis. 6 * Version: r 76 * Version: r8 7 7 * Author: Znuff 8 8 * Author URI: https://linge-ma.ro … … 11 11 12 12 function iljs_enqueue() { 13 wp_enqueue_style('imagelightbox', plugin_dir_url(__FILE__).'imagelightbox.css', false, 'r 6');14 wp_enqueue_script('imagelightbox', plugin_dir_url(__FILE__).'imagelightbox.js', array('jquery'), 'r 6', true);13 wp_enqueue_style('imagelightbox', plugin_dir_url(__FILE__).'imagelightbox.css', false, 'r8'); 14 wp_enqueue_script('imagelightbox', plugin_dir_url(__FILE__).'imagelightbox.js', array('jquery'), 'r8', true); 15 15 } 16 16 … … 18 18 function iljs_mod_tags ($content) { 19 19 global $post; 20 $type="";21 20 22 21 $pattern = "/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i"; 23 $replacement = '<a$1href=$2$3.$4$5$6 data-imagelightbox ="'.$type.'">';22 $replacement = '<a$1href=$2$3.$4$5$6 data-imagelightbox>'; 24 23 $content = preg_replace($pattern, $replacement, $content); 25 24 … … 61 60 // adds the filter for image galleries 62 61 add_filter('wp_get_attachment_link','iljs_mod_tags'); 62 63 // add init script 64 add_action('wp_footer', 'iljs_add_trigger', 9999); 63 65 } 64 66 } 65 67 66 68 add_filter("template_redirect", "iljs_mod_content", 10, 1); 67 add_action('wp_footer', 'iljs_add_trigger', 9999);68 69 ?>
Note: See TracChangeset
for help on using the changeset viewer.