PluginProbe
Tracking Code Manager / 2.3.0
Tracking Code Manager v2.3.0
2.8.0 2.7.0 trunk 1.11.8 1.11.9 1.12.0 1.12.1 1.12.2 1.12.3 1.4 1.5 2.0.0 2.0.1 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.2.0 All 29 releases
tracking-code-manager / includes / classes / html / MainTag.php
MainTag.php
28 lines 928 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) exit;
3
4 class IRP_MainTag extends IRP_HTMLTag {
5 public function __construct() {
6 parent::__construct();
7 }
8
9 public function write(IRP_HTMLContext $context) {
10 global $irp;
11 foreach ($this->tags as $tag) {
12 $tag->write($context);
13 }
14
15 //try to write the last box only if no boxes are written before
16 //this prevent from inserting at the end a box due to tipically
17 //marketer insert a CTA box (for instance download free book)
18 if($irp->Options->isRewriteAtEnd() && $irp->Options->getRewriteBoxesWritten()==0) {
19 $context->clearSkipNext();
20 $context->setUncuttable(FALSE);
21 $context->writeRelatedBox(TRUE);
22 } elseif(!$irp->Options->isRewriteAtEnd()) {
23 $args=array('last'=>TRUE);
24 $context->popRelatedBox($args);
25 }
26 }
27 }
28