-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenhanceImages.php
More file actions
44 lines (32 loc) · 1.52 KB
/
enhanceImages.php
File metadata and controls
44 lines (32 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/*
enhanceImages
------
Plugin Name: enhanceImages
Plugin URI:
Description: Replace low-src images with higher-src version, depending on cutoff-width. Depends on jQuery. Add 'data-fullsrc="full_img.png"' and 'class="conditional"' to your images.
Author: Georg Tremmel
Version: 1.0
Author URI: http://www.trembl.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE
OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.COPYRIGHT HOLDERS WILL NOT
BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL
DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://gnu.org/licenses/>.
*/
// add JS, depends on jQuery
function addEnhanceImagesScript() {
wp_register_script('enhance-js', plugins_url('/enhanceImages.js', __FILE__, array('jquery'), '1.0', false) ); // depends on jQuery
wp_enqueue_script('enhance-js');
}
add_action('wp_enqueue_scripts', 'addEnhanceImagesScript');
?>