Created
November 27, 2014 10:24
-
-
Save tribulant/6be645c82fea82c4a9bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('newsletters_theme_before_wpmlcontent_replace', 'replace_wpmlcontent', 10, 1); | |
function replace_wpmlcontent($body = null) { | |
//let's see if this is a post/page editing screen | |
//if it is, we'll replace the [wpmlcontent] code in the newsletter theme with nothing | |
if (preg_match("/(post\.php|post\-new\.php)/", $_SERVER['REQUEST_URI'], $matches)) { | |
return preg_replace("/\[wpmlcontent\]/si", "", $body); | |
} | |
return $body; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment