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
add_filter('wp_mail_from', 'new_mail_from'); | |
add_filter('wp_mail_from_name', 'new_mail_from_name'); | |
function new_mail_from($old) { | |
return '[email protected]'; | |
} | |
function new_mail_from_name($old) { | |
return 'Your Blog Name'; | |
} |
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
/*! | |
Theme Name: Twenty Ten | |
Theme URI: http://wordpress.org/ | |
Description: The 2010 default theme for WordPress. | |
Author: wordpressdotorg | |
Author URI: http://wordpress.org/ | |
Version: 1.0 | |
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu (optional) | |
License: |
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
function tinymce_excerpt_js(){ ?> | |
<script type="text/javascript"> | |
jQuery(document).ready( tinymce_excerpt ); | |
function tinymce_excerpt() { | |
jQuery("#excerpt").addClass("mceEditor"); | |
tinyMCE.execCommand("mceAddControl", false, "excerpt"); | |
tinyMCE.onAddEditor.add(function(mgr,ed) { | |
if(ed.id=="excerpt"){ | |
ed.settings.theme_advanced_buttons2 =""; | |
ed.settings.theme_advanced_buttons1 = "bold,italic,underline,seperator,justifyleft,justifycenter,justifyright,separator,link,unlink,seperator,pastetext,pasteword,removeformat,seperator,undo,redo,seperator,spellchecker,"; |
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
<h1>Heading 1</h1> | |
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, <a href="http://www.leandaryan.com">ut fermentum massa</a> justo sit amet risus. Aenean eu leo quam. <strong>Pellentesque ornare sem lacinia</strong> quam venenatis vestibulum. | |
<h2>Heading 2</h2> | |
Aenean lacinia <em>bibendum nulla sed consectetur</em>. Praesent commodo cursus magna, <del>vel scelerisque nisl consectetur</del> et. | |
<h3>Heading 3</h3> | |
Fusce dapibus, <em><strong>tellus ac cursus commodo, tortor mauris condimentum</strong></em> nibh, ut fermentum massa justo sit amet risus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. | |
<h4>Heading 4</h4> | |
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum. | |
<ol> | |
<li>List Item</li> |
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
<?php | |
$variable = wp_list_categories('echo=0&show_count=1&include=1,2,3,4,5&title_li='); | |
$variable = str_replace('(', '<sup>', $variable); | |
$variable = str_replace(')', '</sup>', $variable); | |
echo $variable; | |
?> |
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
<?php | |
if ( is_active_widget( 'widget_name' ) ) { | |
echo '<h3>Heading</h3>'; | |
} | |
?> |
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
<?php | |
$cats = explode("<br />",wp_list_categories('title_li=&echo=0&depth=1&style=none')); | |
$cat_n = count($cats) - 1; | |
for ($i=0;$i<$cat_n;$i++): | |
if ($i<$cat_n/2): | |
$cat_left = $cat_left.'<li>'.$cats[$i].'</li>'; | |
elseif ($i>=$cat_n/2): | |
$cat_right = $cat_right.'<li>'.$cats[$i].'</li>'; | |
endif; | |
endfor; |
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
/*--- Custom Login Image ---*/ | |
function my_custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { | |
background-image:url('.get_bloginfo('template_directory').'/images/login_logo.png) !important; | |
} | |
</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
/*--- Catch the first image function use <?php echo catch_that_image() ?> ---*/ | |
function catch_that_image() { | |
global $post, $posts; | |
$first_img = ''; | |
ob_start(); | |
ob_end_clean(); | |
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches); | |
$first_img = $matches [1] [0]; |
OlderNewer