Skip to content

Instantly share code, notes, and snippets.

@pbroschwitz
Created November 30, 2010 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbroschwitz/721821 to your computer and use it in GitHub Desktop.
Save pbroschwitz/721821 to your computer and use it in GitHub Desktop.
wp-add_filter-example.php
/**
* Test lowercase
*/
function tolower_filter($text) {
return strtolower($text);
}
add_filter('the_content', 'tolower_filter');
/**
* Test more
*/
function thirtyten_excerpt_more($more){
return '&nbsp;… <a href="'. get_permalink() . '">' . __('finish reading '.get_the_title() .'', 'twentyten') . '</a>';
}
remove_filter( 'excerpt_more', 'twentyten_excerpt_more' );
add_filter ('excerpt_more', 'thirtyten_excerpt_more' );
@pbroschwitz
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment