PluginProbe
WP MapIt / 1.2
WP MapIt v1.2
3.1.1 trunk 1.0 1.1 1.2 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.7.1 3.0 3.1.0
wp-mapit / wp_mapit / classes / class.wp_mapit_shortcode.php

class.wp_mapit_shortcode.php in WP MapIt 1.2, at wp_mapit/classes/class.wp_mapit_shortcode.php

42 lines 897 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if( ! class_exists( 'wp_mapit_shortcode' ) ) {
4 /**
5 * Class to manage the shortcodes of the plugins
6 */
7 class wp_mapit_shortcode
8 {
9 /**
10 * Add hooks and filters for shortcode
11 *
12 * @since 1.0
13 * @static
14 * @access public
15 */
16 public static function init()
17 {
18 /* Shortcode to display current page map */
19 add_shortcode( 'wp_mapit', __CLASS__ . '::wp_mapit' );
20 }
21
22 /**
23 * Hook to handle the shortcode wp_mapit
24 *
25 * @since 1.0
26 * @static
27 * @access public
28 * @return string Returns Map markup as string
29 */
30 public static function wp_mapit() {
31 if ( wp_mapit_map::has_map() ){
32 return wp_mapit_map::generate_map();
33 }
34 }
35 }
36
37 /**
38 * Calling init function to activate hooks and filters.
39 */
40 wp_mapit_shortcode::init();
41
42 }