msg_shortcode

The ColorWay Theme msg shortcode function.

Description

msg_shortcode( $atts, (constant) $content = null ); 

Parameters (2)

0. $atts
The atts.
1. $content — Optional. (constant) => null
The content.

Usage

  1. if ( !function_exists( 'msg_shortcode' ) ) { 
  2. require_once '/functions/shortcodes.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = msg_shortcode($atts, $content); 
  12.  

Defined (1)

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

/functions/shortcodes.php  
  1. function msg_shortcode($atts, $content = null) { 
  2.  
  3.  
  4. extract(shortcode_atts(array( 
  5. 'author' => '',  
  6. ), $atts)); 
  7.  
  8. if( $author != '' ) { 
  9. $output .= "\n" . '<li> <div class="message"><p>' . do_shortcode($content) . ' <br /><strong>by ' .$author. '</strong></p></div></li>'; 
  10. } else { 
  11. $output .= "\n" . '<li> <div class="message"><p>' . do_shortcode($content) . '</p></div></li>'; 
  12.  
  13. return $output;