' . __( 'Sorry, but you are looking for something that isn\'t here.', 'oenology' ) . '
'; echo apply_filters( 'oenology_hook_loop_no_posts', $loop_no_posts ); } /** * Hook to filter content displayed on Error 404 pages * * This hook can be used to filter to content that is * output in the div#post-entry container on Error * 404 pages. * * Template file: 404.php * * @uses apply_filters() * @uses get_avatar() * @uses get_the_author_meta() * @uses is_page() * * @since Oenology 2.0 */ function oenology_hook_post_404() { $post_404 = oenology_get_404_content(); echo apply_filters( 'oenology_hook_post_404', $post_404 ); } /** * Hook to filter content within div#postmetadata * * This hook can be used to filter to content that is output in the div#postmetadata container. * * Template file: post-footer.php * * @uses apply_filters() * @uses get_avatar() * @uses get_the_author_meta() * @uses is_page() * * @since Oenology 2.0 */ function oenology_hook_post_footer_avatar() { // don't display the author's avatar on Pages global $post; if ( ! is_page() && 'page' != $post->post_type ) { // display a 20px avatar, to fit inside the post footer $avatar = get_avatar( get_the_author_meta( 'email' ), $size = '20' ); $post_footer_avatar = apply_filters( 'oenology_hook_post_footer_avatar', $avatar ); echo ' '; } } /** * Hook to filter content within div#postmetadata * * This hook can be used to filter to content that is output in the div#postmetadata container. To * use this hook, simply pass a string containing the license text. This string is automatically * wrapped in the appropriate container tags. If nothing * is passed to this filter, then nothing is output by default. * * Template file: post-footer.php * * @return string * * @uses apply_filters() * * @since Oenology 2.0 */ function oenology_hook_post_footer_license() { $license = ''; $license = apply_filters( 'oenology_hook_post_footer_license', $license ); if ( '' != $license ) { $post_footer_license = ''; $post_footer_license .= ' '; echo $post_footer_license; } } /** * Hook to filter Post Footer Metadata * * This hook can be used to filter to content that is * output in the div#postmetadata container. * * Template file: post-footer.php * * @uses apply_filters() * @uses get_bloginfo() * @uses get_comments_number() * @uses get_edit_post_link() * @uses get_option() * @uses get_permalink() * @uses get_post_format() * @uses get_post_format_link() * @uses get_post_format_string() * @uses get_the_author() * @uses get_the_date() * @uses get_the_time() * @uses has_post_format() * @uses is_page() * @uses is_user_logged_in() * * @since Oenology 2.0 */ function oenology_hook_post_footer_metadata() { $post_footer_metadata = array(); global $post; if ( ! is_page() && 'page' != $post->post_type ) { $oenology_post_format_string = ( get_post_format() ? '' . get_post_format_string( get_post_format() ) . '' : 'Posted' ); $post_footer_metadata['post-format-string'] = $oenology_post_format_string; $post_footer_metadata['post-format-string'] .= ' by ' . get_the_author() . ' '; if ( has_post_format( 'aside' ) || has_post_format( 'link' ) || has_post_format( 'quote' ) || has_post_format( 'status' ) ) { $post_footer_metadata['permalink'] = '' . get_the_date( get_option( 'date_format' ) ) . ' at ' . get_the_time( get_option( 'time_format' ) ) . ''; // Display total number of post comments $post_footer_metadata['comments'] = ' (' . get_comments_number() . ') '; if ( is_user_logged_in() ) { // Display "Edit" link for logged-in Admin users $post_footer_metadata['editlink'] = '' . __( 'Edit', 'oenology' ) . ''; } } else { $post_footer_metadata['timestamp'] = get_the_date( get_option( 'date_format' ) ) . ' at ' . get_the_time( get_option( 'time_format' ) ); } } else { $post_footer_metadata['copyright'] = '© ' . get_bloginfo( 'name' ); } echo ' '; } /** * Hook to filter Post Header Date * * This hook can be used to filter to content that is * output in the div#post-title container. * * Template file: post-header.php * * @uses apply_filters() * @uses get_the_time() * @uses is_attachment() * @uses is_page() * * @since Oenology 2.0 */ function oenology_hook_post_header_date() { global $post; // don't display timestamp on Pages if ( 'post' == get_post_type() ) { $post_header_date = array(); // Post Date: Year $post_header_date_year = get_the_time('Y'); $post_header_date['year'] = '' . apply_filters( 'oenology_hook_post_header_date_year', $post_header_date_year ) . ''; // Post Date: Weekday $post_header_date_weekday = get_the_time('D'); $post_header_date['weekday'] = '' . apply_filters( 'oenology_hook_post_header_date_weekday', $post_header_date_weekday ) . ''; // Post Date: Day of Month $post_header_date_day = get_the_time('d'); $post_header_date['day'] = '' . apply_filters( 'oenology_hook_post_header_date_day', $post_header_date_day ) . ''; // Post Date: Month $post_header_date_month = get_the_time('M'); $post_header_date['month'] = '' . apply_filters( 'oenology_hook_post_header_date_month', $post_header_date_month ) . ''; echo '' . implode( '', apply_filters( 'oenology_hook_post_header_date', $post_header_date ) ) . ''; } } /** * Hook to filter Post Header Metadata Links * * This hook can be used to filter to content that is * output in the div#post-title container. * * Template file: post-header.php * * @uses apply_filters() * @uses get_comments_number() * @uses get_edit_post_link() * @uses get_permalink() * @uses get_the_ID() * @uses get_the_title() * @uses get_trackback_url() * @uses is_attachment() * @uses is_page() * @uses is_singular() * @uses is_user_logged_in() * @uses wp_get_shortlink() * * @since Oenology 2.0 */ function oenology_hook_post_header_metadata() { $post_header_metadata = array(); // Post Permalink $permalink = ''; $permalink .= '' . __( 'Permalink', 'oenology' ) . ''; $permalink .= ''; $post_header_metadata['permalink'] = $permalink; // Post Metadata Links global $post; if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { if ( ! is_attachment() ) { // Shortlink $shortlink = '' . __( 'Shortlink', 'oenology' ) . ''; $post_header_metadata['shortlink'] = $shortlink; } // Comments Link $commentslink = ''; $commentslink .= __( 'Comments', 'oenology' ) . ' (' . get_comments_number() . ')'; $commentslink .= ' '; $post_header_metadata['commentslink'] = $commentslink; // Trackback $trackbacklink = '' . __( 'Trackback', 'oenology' ) . ''; $post_header_metadata['trackbacklink'] = $trackbacklink; } if ( is_singular() ) { // only display a Print link on single posts, pages, and attachments // Print Link $printlink = 'Print'; $post_header_metadata['printlink'] = $printlink; } if ( is_user_logged_in() ) { // Edit Post Link $editlink = '' . __( 'Edit', 'oenology' ) . ''; // Display "Edit" link for logged-in Admin users $post_header_metadata['editlink'] = $editlink; } echo ' '; } /** * Hook to filter Post Header Taxonomies * * This hook can be used to filter to content that is * output in the div#post-title container. * * Template file: post-header.php * * @uses apply_filters() * @uses get_the_category_list() * @uses get_the_tag_list() * @uses is_page() * * @since Oenology 2.0 */ function oenology_hook_post_header_taxonomies() { $post_header_taxonomies = array(); // Post Taxonomies global $post; if ( 'post' == get_post_type() ) { // Category List $post_header_taxonomies['categorylist'] = ''; $post_header_taxonomies['categorylist'] .= sprintf( __( 'Filed in %s', 'oenology' ), get_the_category_list( ', ' ) ); $post_header_taxonomies['categorylist'] .= ''; // Tag List if ( get_the_tag_list() ) { $post_header_taxonomies['taglist'] = ' '; } } echo '' . implode( '', apply_filters( 'oenology_hook_post_header_taxonomies', $post_header_taxonomies ) ) . ''; } /** * Hook to filter Post Header Title * * This hook can be used to filter to content that is * output in the div#post-title container. * * Template file: post-header.php * * @uses apply_filters() * @uses get_permalink() * @uses get_the_title() * * @since Oenology 2.0 */ function oenology_hook_post_header_title() { $post_header_title = ''; if ( ! is_singular() && ( has_post_format( 'gallery' ) || has_post_format( 'image' ) ) ) { // display post title, no link $post_header_title = '' . $site_header_description . '
'; echo apply_filters( 'oenology_hook_site_header', $site_header, $site_header_name, $site_header_description ); }