$value) { if ($key !== (int) $key) { $return = true; } } } return $return; } } /** * Adds a few wrapper functions for less serious (aka lazy) developers * * @author Fabian Wolf */ if( !function_exists('cc2_parse_args' ) ) : function cc2_parse_args( $defaults = false, $new_params = array() ) { return cc2_Helper::parse_args( $defaults, $new_params ); } endif; if( !function_exists('is_admin_page') ) : function is_admin_page( $path = false ) { return cc2_Helper::is_admin_page( $path ); } endif; endif; /* * @package _tk */ /** * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. */ if( !function_exists( '_tk_page_menu_args' ) ): function _tk_page_menu_args( $args ) { $args['show_home'] = true; return $args; } add_filter( 'wp_page_menu_args', '_tk_page_menu_args' ); endif; /** * Adds custom classes to the array of body classes. */ if( !function_exists( '_tk_body_classes' ) ) : function _tk_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author if ( is_multi_author() ) { $classes[] = 'group-blog'; } return $classes; } add_filter( 'body_class', '_tk_body_classes' ); endif; /** * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages */ if( !function_exists( '_tk_enhanced_image_navigation' ) ) : function _tk_enhanced_image_navigation( $url, $id ) { if ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) return $url; $image = get_post( $id ); if ( ! empty( $image->post_parent ) && $image->post_parent != $id ) $url .= '#main'; return $url; } add_filter( 'attachment_link', '_tk_enhanced_image_navigation', 10, 2 ); endif; /** * Filters wp_title to print a neat