| @@ -295,8 +295,11 @@ | ||
| 295 | 295 | 'post_excerpt', |
| 296 | 296 | $post->post_id, |
| 297 | 297 | 'display' |
| 298 | 298 | ); |
| 299 | + | |
| 300 | + | |
| 301 | + preg_replace( '~^(\s*(?: )?)*~i', '', $excerpt ); | |
| 299 | 302 | |
| 300 | 303 | |
| 301 | 304 | if ( empty( $excerpt ) ) { |
| 302 | 305 | |
| @@ -303,8 +306,9 @@ | ||
| 303 | 306 | $excerpt = preg_replace( |
| 304 | 307 | array( |
| 305 | 308 | '/\<figcaption>.*\<\/figcaption>/', |
| 306 | 309 | '/\[caption.*\[\/caption\]/', |
| 310 | + '`[[^]]*]`' | |
| 307 | 311 | ), |
| 308 | 312 | '', |
| 309 | 313 | $post->post_content |
| 310 | 314 | ); |