jetpack_fix_youtube_shortcode_display_filter

Core changes to do_shortcode (https://core.trac.wordpress.org/changeset/34747) broke "improper" shortcodes with the format [shortcode=http://url.com].

Description

jetpack_fix_youtube_shortcode_display_filter( $content ); 

This removes the = from the shortcode so it can be parsed.

Parameters (1)

0. $content
The content.

Usage

  1. if ( !function_exists( 'jetpack_fix_youtube_shortcode_display_filter' ) ) { 
  2. require_once '/modules/shortcodes/youtube.php'; 
  3.  
  4. // The content. 
  5. $content = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = jetpack_fix_youtube_shortcode_display_filter($content); 
  9.  

Defined (1)

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

/modules/shortcodes/youtube.php  
  1. function jetpack_fix_youtube_shortcode_display_filter( $content ) { 
  2. if ( strpos( $content, '[youtube=' ) !== false ) { 
  3. $content = preg_replace( '@\[youtube=(.*?)\]@', '[youtube $1]', $content ); 
  4.  
  5. return $content;