" . $doctitle . "" . "\n\n";
echo $doctitle;
} // end thematic_doctitle
// Creates the content-type section
function thematic_create_contenttype() {
$content = "\t";
$content .= "";
$content .= "\n\n";
echo apply_filters('thematic_create_contenttype', $content);
} // end thematic_create_contenttype
// The master switch for SEO functions
function thematic_seo() {
$content = TRUE;
return apply_filters('thematic_seo', $content);
}
// Creates the canonical URL
function thematic_canonical_url() {
if (thematic_seo()) {
if ( is_singular() ) {
$canonical_url = "\t";
$canonical_url .= '';
$canonical_url .= "\n\n";
echo apply_filters('thematic_canonical_url', $canonical_url);
}
}
} // end thematic_canonical_url
// switch use of thematic_the_excerpt() - default: ON
function thematic_use_excerpt() {
$display = TRUE;
$display = apply_filters('thematic_use_excerpt', $display);
return $display;
} // end thematic_use_excerpt
// switch use of thematic_the_excerpt() - default: OFF
function thematic_use_autoexcerpt() {
$display = FALSE;
$display = apply_filters('thematic_use_autoexcerpt', $display);
return $display;
} // end thematic_use_autoexcerpt
// Creates the meta-tag description
function thematic_create_description() {
if (thematic_seo()) {
if (is_single() || is_page() ) {
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
if (thematic_the_excerpt() == "") {
if (thematic_use_autoexcerpt()) {
$content ="\t";
$content .= "";
$content .= "\n\n";
}
} else {
if (thematic_use_excerpt()) {
$content ="\t";
$content .= "";
$content .= "\n\n";
}
}
}
}
} elseif ( is_home() || is_front_page() ) {
$content ="\t";
$content .= "";
$content .= "\n\n";
}
echo apply_filters ('thematic_create_description', $content);
}
} // end thematic_create_description
// meta-tag description is switchable using a filter
function thematic_show_description() {
$display = TRUE;
$display = apply_filters('thematic_show_description', $display);
if ($display) {
thematic_create_description();
}
} // end thematic_show_description
// create meta-tag robots
function thematic_create_robots() {
if (thematic_seo()) {
$content = "\t";
if((is_home() && ($paged < 2 )) || is_front_page() || is_single() || is_page() || is_attachment()) {
$content .= "";
} elseif (is_search()) {
$content .= "";
} else {
$content .= "";
}
$content .= "\n\n";
if (get_option('blog_public')) {
echo apply_filters('thematic_create_robots', $content);
}
}
} // end thematic_create_robots
// meta-tag robots is switchable using a filter
function thematic_show_robots() {
$display = TRUE;
$display = apply_filters('thematic_show_robots', $display);
if ($display) {
thematic_create_robots();
}
} // end thematic_show_robots
// Located in header.php
// creates link to style.css
function thematic_create_stylesheet() {
$content = "\t";
$content .= "";
$content .= "\n\n";
echo apply_filters('thematic_create_stylesheet', $content);
}
// rss usage is switchable using a filter
function thematic_show_rss() {
$display = TRUE;
apply_filters('thematic_show_rss', $display);
if ($display) {
$content = "\t";
$content .= "";
$content .= "\n";
echo apply_filters('thematic_rss', $content);
}
} // end thematic_show_rss
// comments rss usage is switchable using a filter
function thematic_show_commentsrss() {
$display = TRUE;
apply_filters('thematic_show_commentsrss', $display);
if ($display) {
$content = "\t";
$content .= "";
$content .= "\n\n";
echo apply_filters('thematic_commentsrss', $content);
}
} // end thematic_show_commentsrss
// pingback usage is switchable using a filter
function thematic_show_pingback() {
$display = TRUE;
apply_filters('thematic_show_pingback', $display);
if ($display) {
$content = "\t";
$content .= "";
$content .= "\n\n";
echo $content;
}
} // end thematic_show_pingback
// comment reply usage is switchable using a filter
function thematic_show_commentreply() {
$display = TRUE;
apply_filters('thematic_show_commentreply', $display);
if ($display)
if ( is_singular() )
wp_enqueue_script( 'comment-reply' ); // support for comment threading
} // end thematic_show_commentreply
// Load scripts for the jquery Superfish plugin http://users.tpg.com.au/j_birch/plugins/superfish/#examples
function thematic_head_scripts() {
$scriptdir_start = "\t";
$scriptdir_start .= '';
$scripts = "\n";
$scripts .= $scriptdir_start . 'hoverIntent.js' . $scriptdir_end . "\n";
$scripts .= $scriptdir_start . 'superfish.js' . $scriptdir_end . "\n";
$scripts .= $scriptdir_start . 'supersubs.js' . $scriptdir_end . "\n";
$dropdown_options = $scriptdir_start . 'thematic-dropdowns.js' . $scriptdir_end . "\n";
$scripts = $scripts . apply_filters('thematic_dropdown_options', $dropdown_options);
$scripts .= "\n";
$scripts .= "\t";
$scripts .= '' . "\n";
// Print filtered scripts
print apply_filters('thematic_head_scripts', $scripts);
}
add_action('wp_head','thematic_head_scripts');
// Add ID and CLASS attributes to the first
occurence in wp_page_menu
function thematic_add_menuclass($ulclass) {
return preg_replace('/
/', '
', $ulclass, 1);
} // end thematic_add_menuclass
add_filter('wp_page_menu','thematic_add_menuclass');
// Just after the opening body tag, before anything else.
function thematic_before() {
do_action('thematic_before');
} // end thematic_before
// Just before the header div
function thematic_aboveheader() {
do_action('thematic_aboveheader');
} // end thematic_aboveheader
// Used to hook in the HTML and PHP that creates the content of div id="header">
function thematic_header() {
do_action('thematic_header');
} // end thematic_header
// Functions that hook into thematic_header()
// Open #branding
// In the header div
function thematic_brandingopen() { ?>