yit_title_special_characters

The chars used in yit_decode_title() and yit_encode_title().

Description

(string) yit_title_special_characters( (string) $chars ); 

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. $chars (string)
The string to convert

Usage

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

Defined (1)

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

/plugin-fw/yit-functions.php  
  1. function yit_title_special_characters ( $chars ) { 
  2. return array_merge ( $chars, array ( 
  3. '/[=\[](.*?)[=\]]/' => '<span class="title-highlight">$1</span>',  
  4. '/\|/' => '<br />',  
  5. ) );