shortcodes.php
34 lines
| 1 | <?php |
| 2 | $allowed_attr_html = EEB()->settings->get_safe_html_attr(); |
| 3 | ?> |
| 4 | <h3><?php echo __( 'Shortcodes', 'email-encoder-bundle' ); ?></h3> |
| 5 | <p><?php echo __( 'You can protect those addresses using the following shortcode. Everything you add within these both tags, will be checked for emails automatically.', 'email-encoder-bundle' ); ?></p> |
| 6 | <p><code>[eeb_protect_emails protect_using="with_javascript"]…[/eeb_protect_emails]</code> |
| 7 | </p> |
| 8 | <p><?php echo __( 'Create a protected mailto link:', 'email-encoder-bundle' ); ?></p> |
| 9 | <p><code>[eeb_mailto email="info@myemail.com" extra_attrs="target='_blank'" method="rot13" display="Custom Text"]</code></p> |
| 10 | <p><?php echo __( 'For security reasons, we only allow specific HTML tags within the display arguments. You will find a full list below.', 'email-encoder-bundle' ); ?></p> |
| 11 | <p><?php echo __( 'You can also protect phone numbers and any kind of text by using the following shortcode:', 'email-encoder-bundle' ); ?></p> |
| 12 | <p><code>[eeb_protect_content protection_text="I am a noscript text" method="rot13" do_shortcode="yes"]My Email[/eeb_protect_content]</code></p> |
| 13 | <p><?php echo __( 'Display the encoder form', 'email-encoder-bundle' ); ?></p> |
| 14 | <p><code>[eeb_form]</code></p> |
| 15 | <p><strong><?php echo __( 'Allowed HTML attributes + arguments', 'email-encoder-bundle' ); ?></strong> |
| 16 | <?php |
| 17 | echo '<ul>'; |
| 18 | |
| 19 | foreach ($allowed_attr_html as $tag => $attributes) { |
| 20 | echo '<li><strong>' . htmlentities( '<' . $tag . '>' ) . '</strong>: '; |
| 21 | |
| 22 | if (!empty($attributes)) { |
| 23 | echo trim( implode( ', ', array_keys( $attributes ) ), ', ' ); |
| 24 | } else { |
| 25 | echo 'n/a'; |
| 26 | } |
| 27 | |
| 28 | echo '</li>'; |
| 29 | } |
| 30 | |
| 31 | echo '</ul>'; |
| 32 | ?> |
| 33 | </p> |
| 34 |