ContentShortcode.php
3 months ago
EmailEncoderFormShortcode.php
1 month ago
EmailShortcode.php
3 months ago
MailtoShortcode.php
3 months ago
ProtectContentShortcode.php
3 months ago
ProtectEmailsShortcode.php
4 months ago
Shortcodes.php
3 months ago
ContentShortcode.php
38 lines
| 1 | <?php |
| 2 | |
| 3 | namespace OnlineOptimisation\EmailEncoderBundle\Front\Shortcodes; |
| 4 | |
| 5 | use OnlineOptimisation\EmailEncoderBundle\Traits\PluginHelper; |
| 6 | |
| 7 | class ContentShortcode |
| 8 | { |
| 9 | use PluginHelper; |
| 10 | |
| 11 | protected string $tag = 'eeb_content'; |
| 12 | protected string $newTag = 'eeb_protect_content'; |
| 13 | |
| 14 | |
| 15 | public function tag(): string |
| 16 | { |
| 17 | return $this->tag; |
| 18 | } |
| 19 | |
| 20 | |
| 21 | /** |
| 22 | * @param array< string, string > $atts |
| 23 | * @param string $content |
| 24 | * @return string |
| 25 | */ |
| 26 | public function handle( array $atts = [], string $content = '' ): string |
| 27 | { |
| 28 | _doing_it_wrong( |
| 29 | __METHOD__, |
| 30 | sprintf( 'The [%s] shortcode is deprecated. Use [%s] instead.', esc_html( $this->tag ), esc_html( $this->newTag ) ), |
| 31 | '2.3.0' |
| 32 | ); |
| 33 | |
| 34 | return ( new ProtectContentShortcode() )->handle( $atts, $content ); |
| 35 | } |
| 36 | |
| 37 | } |
| 38 |