1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/*
Plugin Name: wpse27049 Add Shortcodes
Plugin URI: http://pmg.co/
Description: Adds shortcodes to the excerpt
Version: 1.0
Author: Christopher Davis
Author URI: http://pmg.co/people/chris
License: creative commons/GPL
*/

add_filter( 'the_excerpt', 'do_shortcode' );

remove_filter( 'get_the_excerpt', 'wp_trim_excerpt', 10 );
add_filter( 'get_the_excerpt', 'wpse27049_wp_trim_excerpt', 99, 1 );
function wpse27049_wp_trim_excerpt( $text )
{
	$raw_excerpt = $text;
	if ( '' == $text ) {
		$text = get_the_content('');
	}
	return $text;

}