ContentShortcode.php
5 months ago
EmailEncoderFormShortcode.php
5 months ago
EmailShortcode.php
5 months ago
MailtoShortcode.php
5 months ago
ProtectContentShortcode.php
5 months ago
ProtectEmailsShortcode.php
5 months ago
Shortcodes.php
5 months ago
ContentShortcode.php
33 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 | public function handle( array $atts = [], ?string $content = null ): string |
| 22 | { |
| 23 | _doing_it_wrong( |
| 24 | __METHOD__, |
| 25 | sprintf( 'The [%s] shortcode is deprecated. Use [%s] instead.', $this->tag, $this->newTag ), |
| 26 | '2.3.0' |
| 27 | ); |
| 28 | |
| 29 | return ( new ProtectContentShortcode() )->handle( $atts, $content ); |
| 30 | } |
| 31 | |
| 32 | } |
| 33 |