This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HTML 5 complete</title> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
<style> | |
/* http://meyerweb.com/eric/tools/css/reset/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Comments Menu | |
function remove_menus () { | |
global $menu; | |
$restricted = array(__('Dashboard'), __('Posts'), __('Media'), __('Links'), __('Pages'), __('Appearance'), __('Tools'), __('Users'), __('Settings'), __('Comments'), __('Plugins')); | |
end ($menu); | |
while (prev($menu)){ | |
$value = explode(' ',$menu[key($menu)][0]); | |
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Enable thumbnails in Wordpress 3.0 | |
add_theme_support( 'post-thumbnails' ); | |
set_post_thumbnail_size( 220, 220, true ); // slideshow size 220 pixels wide by 220 pixels tall, hard crop mode | |
add_image_size( 'thumbnail-tall', 220, 450 ); // TALL THUMBNAIL | |
add_image_size( 'thumbnail-wide', 450, 220 ); // WIDE THUMBNAIL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use the thumbnails in the RSS feed | |
function diw_post_thumbnail_feeds($content) { | |
global $post; | |
if(has_post_thumbnail($post->ID)) { | |
$content = '<div>' . get_the_post_thumbnail($post->ID) . '</div>' . $content; | |
} | |
return $content; | |
} | |
add_filter('the_excerpt_rss', 'diw_post_thumbnail_feeds'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Crap in Head | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds | |
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed | |
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link | |
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file. | |
remove_action( 'wp_head', 'index_rel_link' ); // index link | |
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link | |
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link | |
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Comments Inline Style from Head | |
function twentyten_remove_recent_comments_style() { | |
global $wp_widget_factory; | |
remove_action( 'wp_head', array( $wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style' ) ); | |
} | |
add_action( 'widgets_init', 'twentyten_remove_recent_comments_style' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Default "none" in media upload url | |
update_option('image_default_link_type','none'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove AIM YIM and Jabber, replace with Facebook, Twitter | |
function extra_contact_info($contactmethods) { | |
unset($contactmethods['aim']); | |
unset($contactmethods['yim']); | |
unset($contactmethods['jabber']); | |
$contactmethods['facebook'] = 'Facebook'; | |
$contactmethods['twitter'] = 'Twitter'; | |
return $contactmethods; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make the HTML Editor Default! | |
add_filter('wp_default_editor', create_function('', 'return "html";')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Maximum 10 Words in Post Title !!! | |
function maxWord($title){ | |
global $post; | |
$title = $post->post_title; | |
if (str_word_count($title) >= 10 ) //set this to the maximum number of words | |
wp_die( __('Error: your post title is over the maximum word count.') ); | |
} | |
add_action('publish_post', 'maxWord'); |
OlderNewer