Permalink
Browse files

functions.php cleanup

  • Loading branch information...
1 parent ff81f5f commit 24fca437c441dded5b014036bfe9911039f85bd7 @obenland committed Apr 18, 2012
Showing with 8 additions and 8 deletions.
  1. +8 −8 functions.php
View
@@ -345,13 +345,13 @@ function the_bootstrap_page_menu_args( $args ) {
* @return string
*/
function the_bootstrap_enhanced_image_navigation( $url, $id ) {
- if ( ! is_attachment() AND ! wp_attachment_is_image( $id ) )
- return $url;
-
- $image = get_post( $id );
- if ( $image->post_parent AND $image->post_parent != $id )
- $url .= '#primary';
-
+
+ if ( is_attachment() AND wp_attachment_is_image( $id ) ) {
+ $image = get_post( $id );
+ if ( $image->post_parent AND $image->post_parent != $id )
+ $url .= '#primary';
+ }
+
return $url;
}
add_filter( 'attachment_link', 'the_bootstrap_enhanced_image_navigation', 10, 2 );
@@ -562,7 +562,7 @@ function the_bootstrap_comment_form_field_url( $html ) {
*
* @return string
*/
-function the_bootstrap_get_attachment_link( $link, $id, $size, $permalink, $icon, $text) {
+function the_bootstrap_get_attachment_link( $link, $id, $size, $permalink, $icon, $text ) {
if ( ! $text ) {
$link = str_replace( '<a ', '<a class="thumbnail" ', $link );
}

0 comments on commit 24fca43

Please sign in to comment.