Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #32 from kovshenin/patch-1

Stop passing global $post->ID to wp_attachment_is_image() in _s_scripts() - It is not needed. fixes #32. props @kovshenin.
  • Loading branch information...
commit 90429bf5b00d5ec946812c84a0a96eda846db68d 2 parents 31c5a39 + c5b01c3
@mfields mfields authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 functions.php
View
4 functions.php
@@ -100,8 +100,6 @@ function _s_widgets_init() {
* Enqueue scripts and styles
*/
function _s_scripts() {
- global $post;
-
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );
@@ -110,7 +108,7 @@ function _s_scripts() {
wp_enqueue_script( 'comment-reply' );
}
- if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
+ if ( is_singular() && wp_attachment_is_image() ) {
wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.