Skip to content

Commit

Permalink
Use $post->ID, not $post_id.
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Tadlock committed Sep 12, 2012
1 parent 23bbea0 commit 475d4a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/post-stylesheets.php
Expand Up @@ -151,15 +151,15 @@ function post_stylesheets_stylesheet_uri( $stylesheet_uri, $stylesheet_dir_uri )
$stylesheet_uri = trailingslashit( $stylesheet_dir_uri ) . "css/{$stylesheet}";

/* Set the post stylesheet to the correct directory. */
set_post_stylesheet( $post_id, str_replace( get_stylesheet_directory_uri(), 'css/', $stylesheet_uri ) );
set_post_stylesheet( $post->ID, str_replace( get_stylesheet_directory_uri(), 'css/', $stylesheet_uri ) );
}

/* Else, if the stylesheet is found in the parent theme '/css' folder, use it. */
elseif ( file_exists( trailingslashit( get_template_directory() ) . "css/{$stylesheet}" ) ) {
$stylesheet_uri = trailingslashit( get_template_directory_uri() ) . "css/{$stylesheet}";

/* Set the post stylesheet to the correct directory. */
set_post_stylesheet( $post_id, str_replace( get_template_directory_uri(), 'css/', $stylesheet_uri ) );
set_post_stylesheet( $post->ID, str_replace( get_template_directory_uri(), 'css/', $stylesheet_uri ) );
}
}
}
Expand Down

0 comments on commit 475d4a7

Please sign in to comment.