google_map_shortcode

Frontend functions.

Description

google_map_shortcode( $atts, $content ); 

Parameters (2)

0. $atts
The atts.
1. $content
The content.

Usage

  1. if ( !function_exists( 'google_map_shortcode' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'embed-google-map/embed_google_map.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 = google_map_shortcode($atts, $content); 
  12.  

Defined (1)

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

/embed_google_map.php  
  1. function google_map_shortcode( $atts, $content ) { 
  2. // If $atts is not empty, loop through the attributes 
  3. if (!empty($atts)) { 
  4. // Append attributes to content 
  5. foreach($atts as $key => $value) { 
  6. $content .= "|$key:$value"; 
  7. // Wrap content inside {google_map} tags 
  8. $content = "{google_map}$content{/google_map}"; 
  9. // Process the content 
  10. return the_google_map_embedder($content);