| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') || die(); |
| 4 |
|
| 5 |
class HashFormShortcode { |
| 6 |
|
| 7 |
public function __construct() { |
| 8 |
add_shortcode('hashform', array($this, 'get_form_shortcode')); |
| 9 |
} |
| 10 |
|
| 11 |
public static function get_form_shortcode($atts) { |
| 12 |
$shortcode_atts = shortcode_atts(array( |
| 13 |
'id' => '', |
| 14 |
), $atts); |
| 15 |
ob_start(); |
| 16 |
HashFormPreview::show_form($shortcode_atts['id']); |
| 17 |
return ob_get_clean(); |
| 18 |
} |
| 19 |
|
| 20 |
} |
| 21 |
|
| 22 |
new HashFormShortcode(); |
| 23 |
|