yit_plugin_decode_title

Change some special characters to put easily html into a string.

Description

(string) yit_plugin_decode_title( (string) $title ); 

E.G. string: This is [my title] with | a new line return: This is my title with
a new line

Returns (string)

The html

Parameters (1)

0. $title (string)
The string to convert

Usage

  1. if ( !function_exists( 'yit_plugin_decode_title' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yith-woocommerce-wishlist/plugin-fw/yit-functions.php'; 
  3.  
  4. // The string to convert 
  5. $title = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = yit_plugin_decode_title($title); 
  9.  

Defined (1)

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

/plugin-fw/yit-functions.php  
  1. function yit_plugin_decode_title ( $title ) { 
  2. $replaces = apply_filters ( 'yit_title_special_characters', array () ); 
  3.  
  4. return preg_replace ( array_keys ( $replaces ), array_values ( $replaces ), $title );