function spyfield_auto_embed_tweets($content) { $content = preg_replace( '/https:\/\/twitter\.com\/([a-zA-Z0-9_]+)\/status\/([0-9]+)/', '
', $content ); return $content; } add_filter('the_content', 'spyfield_auto_embed_tweets');