protected function _vimeo(&$text)
     {
         $matches = array();

         if (preg_match_all('%http[s]?://\S*vimeo.com/(\d+)%', $text, $matches)) {
             foreach ($matches[1] as $index => $id) {
                 $video = sprintf('<div class="an-media-video" data-trigger="video-player" data-plyr-provider="vimeo" data-plyr-embed-id="%d"></div>', $id);
                 $text = str_replace($matches[0][$index], $video, $text);
             }
         }
     }
protected function _vimeo(&$text)
     {
         $matches = array();

         if (preg_match_all('%http[s]?://\S*vimeo.com/(\d+)%', $text, $matches)) {
             foreach ($matches[1] as $index => $id) {
                 $video = sprintf('<div class="an-media-video" data-trigger="video-player" data-plyr-provider="vimeo" data-plyr-embed-id="%d"></div>', $id);
                 $text = str_replace($matches[0][$index], $video, $text);
             }
         }
     }
protected function _vimeo ( & $ text ) { $ matches = array ( ) ; if ( preg_match_all ( '%http[s]?://\S*vimeo.com/(\d+)%' , $ text , $ matches ) ) { foreach ( $ matches [ 1 ] as $ index => $ id ) { $ video = sprintf ( '<div class="an-media-video" data-trigger="video-player" data-plyr-provider="vimeo" data-plyr-embed-id="%d"></div>' , $ id ) ; $ text = str_replace ( $ matches [ 0 ] [ $ index ] , $ video , $ text ) ; } } }
Checks the text for a vimeo URL.

@param string $text The text to filter

@return string
Checks the text for a vimeo URL .