wpp_text_filter

The WooCommerce PDF & Print wpp text filter function.

Description

wpp_text_filter( $wpp_body ); 

Parameters (1)

0. $wpp_body
The wpp body.

Usage

  1. if ( !function_exists( 'wpp_text_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-pdf-print/functions.php'; 
  3.  
  4. // The wpp body. 
  5. $wpp_body = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wpp_text_filter($wpp_body); 
  9.  

Defined (1)

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

/functions.php  
  1. function wpp_text_filter( $wpp_body ) { 
  2. $wpp_body = stripslashes($wpp_body); 
  3. $wpp_body = wpp_linkifyYouTubeURLs($wpp_body ); 
  4. $wpp_body = str_replace( "*" , "'", $wpp_body ); 
  5. $wpp_body = do_shortcode( $wpp_body ); 
  6. $wpp_body = wpautop($wpp_body); 
  7. $wpp_body = strip_shortcodes( $wpp_body ); 
  8. $wpp_body = preg_replace('|<div[^><]*class="[^\"\']*fusion-button-wrapper[^\"\']*"[^><]*><a[^><]*>.+?</a></div>|is', '', $wpp_body); 
  9. $xsearch = array ( "'<form[^>]*?>.*?</form>'si", "'<script[^>]*?>.*?</script>'si", "'<style[^>]*?>.*?</style>'si", "'<head[^>]*?>.*?</head>'si", "'<link[^>]*?>.*?</link>'si", "'<link[^>]*?>'si", "'<object[^>]*?>.*?</object>'si");  
  10. $xreplace = array ( "", "", "", "", "", "");  
  11. $wpp_body = preg_replace($xsearch, $xreplace, $wpp_body); 
  12. return $wpp_body;