latex_shortcode

The shortcode way.

Description

latex_shortcode( $atts, (string) $content = '' ); 

The attributes are the same as the old ones - fg and bg,, instead of foreground and background, and s is for the font size.

Example: [latex s=4 bg=00f fg=ff0]\LaTeX[/latex]

Parameters (2)

0. $atts
The atts.
1. $content — Optional. (string) => ''
The content.

Usage

  1. if ( !function_exists( 'latex_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/latex.php'; 
  3.  
  4. // The atts. 
  5. $atts = null; 
  6.  
  7. // The content. 
  8. $content = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = latex_shortcode($atts, $content); 
  12.  

Defined (1)

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

/modules/latex.php  
  1. function latex_shortcode( $atts, $content = '' ) { 
  2. extract( shortcode_atts( array( 
  3. 's' => 0,  
  4. 'bg' => latex_get_default_color( 'bg' ),  
  5. 'fg' => latex_get_default_color( 'text', '000' ) 
  6. ), $atts, 'latex' ) ); 
  7.  
  8. return latex_render( latex_entity_decode( $content ), $fg, $bg, $s );