post_parent ) && $image->post_parent != $id ) $url .= '#main'; return $url; } add_filter( 'attachment_link', 'ideation_enhanced_image_navigation', 10, 2 ); /** * Auto Excerpt More. * * @since Ideation and Intent 1.0 */ function ideation_auto_excerpt_more( $more ) { return ' …'; } add_filter( 'excerpt_more', 'ideation_auto_excerpt_more' ); /** * Post class filter. * * @since Ideation and Intent 1.0 */ function ideation_post_class( $classes ) { $classes[] = 'entry'; $featured_image = ideation_get_featured_image(); if ( ! empty( $featured_image ) ) $classes[] = 'has-featured-image'; return $classes; } add_filter( 'post_class', 'ideation_post_class' ); /** * Body class filter. * * @since Ideation and Intent 1.0 */ function ideation_body_class( $classes ) { if ( is_attachment() && wp_attachment_is_image( get_the_ID() ) ) { $classes[] = 'column-2'; return $classes; } // Pages and posts always get the photo sidebar if present. if ( is_page() || is_single() ) { if ( Ideation_Gallery_Sidebar::has_galleries() ) $classes[] = 'column-3'; else $classes[] = 'column-2'; return $classes; } $columns = 1; if ( is_active_sidebar( 'sidebar-1' ) ) $columns++; if ( Ideation_Gallery_Sidebar::has_galleries() ) $columns++; $classes[] = 'column-' . $columns; return $classes; } add_filter( 'body_class', 'ideation_body_class' ); /** * Modify the font sizes of WordPress' tag cloud * * @since Ideation and Intend 1.1 * * @param array $args Tag cloud arguments. * @return array */ function ideation_widget_tag_cloud_args( $args ) { $args['smallest'] = 16; $args['unit'] = 'px'; return $args; } add_filter( 'widget_tag_cloud_args', 'ideation_widget_tag_cloud_args' ); /** * Filters wp_title to print a neat tag based on what is being viewed. * * @since Ideation and Intent 1.0 */ function ideation_wp_title( $title, $sep ) { global $page, $paged; if ( is_feed() ) return $title; // Add the blog name $title .= get_bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title .= " $sep $site_description"; // Add a page number if necessary: if ( $paged >= 2 || $page >= 2 ) $title .= " $sep " . sprintf( __( 'Page %s', 'ideation' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'ideation_wp_title', 10, 2 );