post_parent ) && $image->post_parent != $id )
$url .= '#main';
return $url;
}
add_filter( 'attachment_link', 'islev_enhanced_image_navigation', 10, 2 );
/**
* Filters wp_title to print a neat
tag based on what is being viewed.
*/
function islev_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', 'islev' ), max( $paged, $page ) );
return $title;
}
add_filter( 'wp_title', 'islev_wp_title', 10, 2 );
add_filter( 'islev_portfolio_args', 'islev_portfolio_cat', 10, 1 );
function islev_portfolio_cat($args) {
$portfolio_cat = of_get_option('g_portfolio_cat', 'from_all');
$portfolio_cat = isset( $portfolio_cat ) ? $portfolio_cat : "from_all";
if ( 'from_all' != $portfolio_cat ) {
$args['cat'] = esc_attr($portfolio_cat);
}
return $args;
}
function islev_portfolio_show() {
wp_reset_query();
global $post;
$post_num = of_get_option( 'g_portfolio_per_page', 8 );
$post_num = intval($post_num);
if ( '' == $post_num || 0 == $post_num ) {
$post_num = 8;
}
$default_args = array(
'posts_per_page' => $post_num,
'ignore_sticky_posts' => 1
);
$args = apply_filters( 'islev_portfolio_args', $default_args );
$portf_query = new WP_Query( $args );
$islev_modals = '';
if ( $portf_query->have_posts() ): ?>
have_posts() ) :
$portf_query->the_post();
if ( has_post_thumbnail() ) {
?>
-
$post_num,
'ignore_sticky_posts' => 1
);
$args = apply_filters( 'islev_portfolio_args', $default_args );
$portf_query = new WP_Query( $args );
$islev_modals = '';
if ( $portf_query->have_posts() ): ?>
have_posts() ) :
$portf_query->the_post();
if ( has_post_thumbnail() ) {
?>
-