Just illustrating this in full effect here with the filters and functions for both the adding of custom column and testing for excerpt existence.
Note, I\'ve purposely ripped the guts out of has_excerpt
to show you in effect what is occurring under the hood. You can use !has_excerpt
in its place.
add_filter(\'the_excerpt\', \'no_excerpt\');
add_filter(\'manage_posts_columns\' , \'excerpt_column\');
add_action( \'manage_posts_custom_column\' , \'excerpt_column_content\', 10, 2 );
function no_excerpt(){
//replace empty( $post->post_excerpt ) with !has_excerpt if you wish
if ( is_admin() && empty( $post->post_excerpt ) )
return \'not here buddy!\';
}
function excerpt_column($columns) {
return array_merge( $columns, array(\'excerpt_column\' => __(\'Excerpt\')) );
}
function excerpt_column_content( $column, $post_id ) {
the_excerpt();
}
This does not take into account any efficiencies that can be had by arranging and or calling your functions by different means, this is only an example. In my test case,
"not here buddy!"
...is what will be returned when no excerpt is present. Change to suit your needs.