From e2b24fd8527ff92e8f7494da4b8572757f2c3ccd Mon Sep 17 00:00:00 2001 From: Andrew Ng Date: Wed, 1 Jul 2009 12:00:46 -0700 Subject: [PATCH] fixed problem with plugin url when installing with zipfile, now only works with 2.8+ as plugins_url takes an extra param in 2.8+ to make my life easier --- jq_img_lazy_load.php | 6 +++--- readme.txt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jq_img_lazy_load.php b/jq_img_lazy_load.php index a509d37..57dcdc6 100644 --- a/jq_img_lazy_load.php +++ b/jq_img_lazy_load.php @@ -4,13 +4,13 @@ Plugin Name: jQuery lazy load plugin Plugin URI: http://github.com/ayn/wp-jquery-lazy-load/ Description: a quick and dirty wordpress plugin to enable image lazy loading. - Version: v0.3 + Version: v0.4 Author: Andrew Ng Author URI: http://blog.andrewng.com */ function jquery_lazy_load_headers() { - $plugin_path = plugins_url('/wp-jquery-lazy-load/'); + $plugin_path = plugins_url('', __FILE__); $lazy_url = $plugin_path . 'javascripts/jquery.lazyload.pack.js'; $jq_url = $plugin_path . 'javascripts/jquery.js'; wp_deregister_script('jquery'); @@ -19,7 +19,7 @@ function jquery_lazy_load_headers() { } function jquery_lazy_load_ready() { - $placeholdergif = plugins_url('/wp-jquery-lazy-load/images/grey.gif'); + $placeholdergif = plugins_url('images/grey.gif', __FILE__); echo << $(document).ready(function($){ diff --git a/readme.txt b/readme.txt index 2c0e84f..fe82c86 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ === jQuery Image Lazy Load WP === Contributors: ayn Tags: images, jquery, javascript, optimization -Requires at least: 2.0 -Tested up to: 2.7.x -Stable tag: 0.3 +Requires at least: 2.8 +Tested up to: 2.8.x +Stable tag: 0.4 add jquery lazy loading to images