| 1 |
<?php defined( 'ABSPATH' ) or die( 'This script cannot be accessed directly.' ); |
| 2 |
|
| 3 |
add_action( 'init', 'conv_register_shortcodes', 20 ); |
| 4 |
function conv_register_shortcodes() { |
| 5 |
add_shortcode( 'convertful', 'conv_handle_shortcode' ); |
| 6 |
add_shortcode( 'optin', 'conv_handle_shortcode' ); |
| 7 |
} |
| 8 |
|
| 9 |
function conv_handle_shortcode( $atts, $content, $shortcode ) { |
| 10 |
return isset( $atts['id'] ) ? '<div class="' . $shortcode . '-' . intval( $atts['id'] ) . '"></div>' : ''; |
| 11 |
} |
| 12 |
|