# acymailing/11.0.5/back/Partial/editor/template.php

AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress, version 11.0.5. 19 lines.

- Page: https://pluginprobe.com/plugins/acymailing/11.0.5/code/back/Partial/editor/template.php
- Raw: https://pluginprobe.com/plugins/acymailing/11.0.5/raw/back/Partial/editor/template.php
- Modified: 2026-08-03T10:18:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/acymailing/11.0.5/code/back/Partial/editor/template.php#L10-L20`.

```php
<?php
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals.
defined('ABSPATH') || die('Restricted Access');
if (strpos($this->content, 'acym__wysid__template') !== false) {
    $bodyPos = strpos($this->content, '<body>');
    $endBodyPos = strpos($this->content, '</body>');

    $emailContent = $this->content;

    if ($bodyPos !== false && $endBodyPos !== false) {
        $emailContent = substr(substr($this->content, 0, $endBodyPos), $bodyPos + 6);
    }

    // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Raw newsletter content built by the user with the email editor.
    echo $emailContent;
} else {
    include acym_getPartial('editor', 'default_template');
}

```
