mdwp_add_p

The Pods - Custom Content Types and Fields mdwp add p function.

Description

mdwp_add_p( $text ); 

Parameters (1)

0. $text
The text.

Usage

  1. if ( !function_exists( 'mdwp_add_p' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'pods-custom-content-types-and-fields/components/Markdown.php'; 
  3.  
  4. // The text. 
  5. $text = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = mdwp_add_p($text); 
  9.  

Defined (1)

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

/components/Markdown.php  
  1. function mdwp_add_p($text) { 
  2. if (!preg_match('{^$|^<(p|ul|ol|dl|pre|blockquote)>}i', $text)) { 
  3. $text = '<p>'.$text.'</p>'; 
  4. $text = preg_replace('{\n{2, }}', "</p>\n\n<p>", $text); 
  5. return $text;