wpseo_strip_shortcode

Strip out the shortcodes with a filthy regex, because people don't properly register their shortcodes.

Description

(string) wpseo_strip_shortcode( (string) $text ); 

Returns (string)

$text string without shortcodes

Parameters (1)

0. $text (string)
Input string that might contain shortcodes.

Usage

  1. if ( !function_exists( 'wpseo_strip_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions-deprecated.php'; 
  3.  
  4. // Input string that might contain shortcodes. 
  5. $text = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpseo_strip_shortcode($text); 
  9.  

Defined (1)

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

/inc/wpseo-functions-deprecated.php  
  1. function wpseo_strip_shortcode( $text ) { 
  2. _deprecated_function( __FUNCTION__, 'WPSEO 1.6.1', 'WPSEO_Utils::strip_shortcode()' ); 
  3.  
  4. return WPSEO_Utils::strip_shortcode( $text );