Skip to content

Commit 3348397

Browse files
committed
Fix. Contact Encoder. Every hook that has actions BEFORE modify now have actions AFTER.
1 parent 5997749 commit 3348397

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Cleantalk/ApbctWP/ContactsEncoder/ContactsEncoder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public function init($params)
4646
$this->shortcodes = new ShortCodesService($params);
4747

4848
$this->shortcodes->registerAll();
49-
$this->shortcodes->addActionsAfterModify('the_content', 11);
50-
$this->shortcodes->addActionsAfterModify('the_title', 11);
5149

5250
$this->registerHookHandler();
5351
}
@@ -90,6 +88,8 @@ public function runEncoding($content = '')
9088
} else {
9189
foreach ( $hooks_to_encode as $hook ) {
9290
$this->shortcodes->addActionsBeforeModify($hook, 9);
91+
//any hook that has actions BEFORE modify, must have actions AFTER
92+
$this->shortcodes->addActionsAfterModify($hook, 999);
9393
add_filter($hook, array($this, 'modifyContent'), 10);
9494
}
9595
}

0 commit comments

Comments
 (0)