[PATCH] REFERENCELINKS template parameter doesn't include links
-
In plain text email, when using the {REFERENCELINKS} code, the numbers are appended to text which includes links but the table of links is not included at the bottom. The reason seems to be because {REFERENCELINKS} is removed prior to the check for its presence when adding the link table. See below for a patch on version 10.18.3 which seems to fix the issue.
diff -Naur subscribe2.orig/classes/class-s2-core.php subscribe2/classes/class-s2-core.php --- subscribe2/classes/class-s2-core.php 2015-02-04 22:27:55.000000000 +0000 +++ /var/sites/secblog/wp-content/plugins/subscribe2/classes/class-s2-core.php 2015-02-09 17:42:09.949548744 +0000 @@ -497,7 +497,6 @@ $excerpttext = $plaintext; if ( strstr($mailtext, "{REFERENCELINKS}") ) { - $mailtext = str_replace("{REFERENCELINKS}", '', $mailtext); $plaintext_links = ''; $i = 0; while ( preg_match('|<a([^>]*)>(.*)<\/a>|Ui', $plaintext, $matches) ) { @@ -514,6 +513,7 @@ $plaintext = trim(strip_tags($plaintext)); if ( strstr($mailtext, "{REFERENCELINKS}") && $plaintext_links != '' ) { + $mailtext = str_replace("{REFERENCELINKS}", '', $mailtext); $plaintext .= "\r\n\r\n" . trim($plaintext_links); }
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘[PATCH] REFERENCELINKS template parameter doesn't include links’ is closed to new replies.