Day: January 1, 2010
How to filter post titles
If you know that you will want to apply a filter to all of your post titles in WordPress, such as forcing uppercase, lowercase, or title capitalization, you can use a filter to do so. The filter below will force a title to lowercase as the post is saved:
[code lang=”php”]
if ( !function_exists( ‘ucc_post_title_filter’ ) ) :
function ucc_post_title_filter( $data ) {
$title = $data[‘post_title’];
$title = strtolower( $title );
$data[‘post_title’] = $title;
return( $data );
}
add_filter( ‘wp_insert_post_data’ , ‘ucc_post_title_filter’ );
endif;
[/code]
On line 5, strtolower()
can be exchanged for any text-transforming function.
Free online graph paper/grid paper PDFs
Free online graph paper/grid paper PDFs
Free online graph paper/grid paper PDFs.
Web Developer’s Handbook
Resource for web site developers with information on CSS, design, HTML, accessibility, and related topics.
HOW
Resource for graphic designers. News, jobs, inspiration, links, and more.
Honeyville
Seller of dried foods and staples, with a flat $4.95 shipping charge.
W5YI
Resources for amateur and commercial radio.