Custom excerpt function re-factoring
I’d simply set a flag as second input argument for the function: function new_wp_trim_excerpt( $text, $case=”plain” ) { switch ( $case ) { default : case ‘plain’ : // do stuff – your function so far break; case ‘image’ : break; } } Notes: Avoid names like class=”moarplz”. It’s hard to read for others and … Read more