Skip to content

Commit 90e024d

Browse files
committed
Update wp-tevko-responsive-images.php
You want to enqueue the script on the ‘wp_enqueue_scripts’ action instead of the ‘init’ action. See http://wordpress.stackexchange.com/questions/55924/when-to-use-add-actioninit-vs-add-actionwp-enqueue-scripts
1 parent 0beca16 commit 90e024d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wp-tevko-responsive-images.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
function get_picturefill() {
1616
wp_enqueue_script('picturefill', plugins_url('/js/picturefill.js', __FILE__ ));
1717
}
18-
add_action('init', 'get_picturefill');
18+
add_action('wp_enqueue_scripts', 'get_picturefill');
1919

2020

2121
// Add support for our desired image sizes - if you add to these, you may have to adjust your shortcode function
@@ -67,4 +67,4 @@ function responsive_insert_image($html, $id, $caption, $title, $align, $url) {
6767
}
6868
add_filter('image_send_to_editor', 'responsive_insert_image', 10, 9);
6969

70-
?>
70+
?>

0 commit comments

Comments
 (0)