wc_format_product_short_description

Format product short description.

Description

(string) wc_format_product_short_description( (string) $content ); 

Adds support for Jetpack Markdown.

Returns (string)

Parameters (1)

0. $content (string)
The content.

Usage

  1. if ( !function_exists( 'wc_format_product_short_description' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-formatting-functions.php'; 
  3.  
  4. // The content. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_format_product_short_description($content); 
  9.  

Defined (1)

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

/includes/wc-formatting-functions.php  
  1. function wc_format_product_short_description( $content ) { 
  2. // Add support for Jetpack Markdown 
  3. if ( class_exists( 'WPCom_Markdown' ) ) { 
  4. $markdown = WPCom_Markdown::get_instance(); 
  5.  
  6. return wpautop( $markdown->transform( $content, array( 'unslash' => false ) ) ); 
  7.  
  8. return $content;