vimeo_link

Replaces shortcodes and plain-text URLs to Vimeo videos with Vimeo embeds.

Description

(string) vimeo_link( (string) $content ); 

Returns (string)

The content with embeds instead of URLs

Parameters (1)

0. $content (string)
The content.

Usage

  1. if ( !function_exists( 'vimeo_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/shortcodes/vimeo.php'; 
  3.  
  4. // The content. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = vimeo_link($content); 
  9.  

Defined (1)

The function is defined in the following location(s).

/modules/shortcodes/vimeo.php  
  1. function vimeo_link( $content ) { 
  2. return preg_replace_callback( '#https://vimeo.com/\d*#', 'vimeo_link_callback', $content );