function thematic_postheader() { global $id, $post, $authordata; // Create $posteditlink $posteditlink .= '<a href="' . get_bloginfo('wpurl') . '/wp-admin/post.php?action=edit&post=' . $id; $posteditlink .= '" title="' . __('Edit post', 'thematic') . '">'; $posteditlink .= __('Edit', 'thematic') . '</a>'; $posteditlink = apply_filters('thematic_postheader_posteditlink', $posteditlink); if (is_single() || is_page()) { $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n"; } elseif (is_404()) { $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n"; } else { $posttitle = '<h2 class="entry-title"><a href="'; $posttitle .= get_permalink(); $posttitle .= '" title="'; $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0'); $posttitle .= '" rel="bookmark">'; $posttitle .= get_the_title(); $posttitle .= "</a></h2>\n"; } $posttitle = apply_filters('thematic_postheader_posttitle', $posttitle); $postmeta = '<div class="entry-meta">'; $postmeta .= '<span class="meta-prep meta-prep-author">' . __('By ', 'thematic') . '</span>'; $postmeta .= '<span class="author vcard">' . '<a class="url fn n" href="'; $postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename); $postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">'; $postmeta .= get_the_author(); $postmeta .= '</a></span><span class="meta-sep meta-sep-entry-date"> | </span>'; $postmeta .= '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>'; $postmeta .= '<span class="entry-date"><abbr class="published" title="'; $postmeta .= get_the_time(thematic_time_title()) . '">'; $postmeta .= get_the_time(thematic_time_display()); $postmeta .= '</abbr></span>'; // Display edit link if (current_user_can('edit_posts')) { $postmeta .= ' <span class="meta-sep meta-sep-edit">|</span> ' . '<span class="edit">' . $posteditlink . '</span>'; } $postmeta .= "</div><!-- .entry-meta -->\n"; $postmeta = apply_filters('thematic_postheader_postmeta', $postmeta); if ($post->post_type == 'page' || is_404()) { $postheader = $posttitle; } else { $postheader = $posttitle . $postmeta; } echo apply_filters('thematic_postheader', $postheader); // Filter to override default post header }
/** * Create entry date for post meta * * Override: childtheme_override_postmeta_entrydate <br> * Filter: thematic_postmeta_entrydate */ function thematic_postmeta_entrydate() { $entrydate = '<span class="meta-prep meta-prep-entry-date">' . __('Published:', 'thematic') . ' </span>'; $entrydate .= '<span class="entry-date"><abbr class="published" title="'; $entrydate .= get_the_time(thematic_time_title()) . '">'; $entrydate .= get_the_time(thematic_time_display()); $entrydate .= '</abbr></span>'; return apply_filters('thematic_postmeta_entrydate', $entrydate); }
/** * Create the post content * * Detects whether to use the full length or excerpt of a post and displays it. Post thumbnails are included on * excerpt posts. * * Override: childtheme_override_content <br> * Filter: thematic_post_thumbs <br> * Filter: thematic_post_thumb_size <br> * Filter: thematic_post_thumb_attr <br> * Filter: thematic_post */ function thematic_content() { global $thematic_content_length; if (strtolower($thematic_content_length) == 'full') { $post = get_the_content(thematic_more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } elseif (strtolower($thematic_content_length) == 'excerpt') { $post = ''; $post .= get_the_excerpt(); $post = apply_filters('the_excerpt', $post); if (apply_filters('thematic_post_thumbs', TRUE)) { $post_title = get_the_title(); $size = apply_filters('thematic_post_thumb_size', array(100, 100)); $attr = apply_filters('thematic_post_thumb_attr', array('title' => sprintf(esc_attr__('Permalink to %s', 'thematic'), the_title_attribute('echo=0')))); if (has_post_thumbnail()) { $post = sprintf('<a class="entry-thumb" href="%s" title="%s">%s</a>', get_permalink(), sprintf(esc_attr__('Permalink to %s', 'thematic'), the_title_attribute('echo=0')), get_the_post_thumbnail(get_the_ID(), $size, $attr)) . $post; } } } elseif (strtolower($thematic_content_length) == 'none') { $post = ''; } else { $post = get_the_content(thematic_more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } $post .= '<span class="entry-date">' . get_the_time(thematic_time_title()) . '</span>'; echo apply_filters('thematic_post', $post); }