wpcom_markdown_transform_pre

Filter the content to be run through Markdown, before it's transformed by Markdown.

Description

apply_filters( 'wpcom_markdown_transform_pre', (string) $text, (array) $args ); 

Parameters (2)

0. $text (string)
Content to be run through Markdown
1. $args (array)
Array of Markdown options.

Usage

To run the hook, copy the example below.
  1. $text = apply_filters( 'wpcom_markdown_transform_pre', $text, $args ); 
  2.  
  3. if ( !empty( $text ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpcom_markdown_transform_pre callback 
  2. function filter_wpcom_markdown_transform_pre( $text, $args ) { 
  3. // make filter magic happen here... 
  4. return $text
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpcom_markdown_transform_pre', 'filter_wpcom_markdown_transform_pre', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpcom_markdown_transform_pre', 'filter_wpcom_markdown_transform_pre', 10, 2 ); 

Defined (1)

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

/modules/markdown/easy-markdown.php  
  1. $text = apply_filters( 'wpcom_markdown_transform_pre', $text, $args );