<?php

/**
 * @title aMember Branding Removal
 * @desc allows you to remove the visible aMember copyright from all pages
 */

class Am_Plugin_BrandingRemoval extends Am_Plugin
{
    const PLUGIN_STATUS = self::STATUS_PRODUCTION;
    const PLUGIN_COMM = self::COMM_COMMERCIAL;
    const PLUGIN_REVISION = '6.3.43';

    protected $_configPrefix = 'misc.';

    function onAfterRender(Am_Event $e)
    {
        //WP
        $e->setOutput(str_replace('<p class="am-copyright">Built on <a href="http://www.amember.com/" title="flexible, user-friendly membership software (subscription script)">aMember Pro&trade; membership software</a></p>', '', $e->getOutput()));
        //Std
        $e->setOutput(str_replace('<div class="am-credits">Built on <a href="http://www.amember.com/" style="text-decoration: none;" title="flexible, user-friendly membership software (subscription script)">aMember Pro&trade; membership software</a></div>', '', $e->getOutput()));
    }
}