What's an upgrade safe way of removing a theme's default stylesheets? (reset & amember) I see how they added a stylesheet from the sample theme example, but they don't show a way of removing ones that are being loaded into the theme via the <?php $this->printLayoutHead() ?> Sorry if this is a silly question, I just don't think I should muck around in library/Am/View.php which is where the printLayoutHead() function lives. Anyone have experience with this?
Create empty files in /amember/application/default/themes/YOURTHEMENAME/public/css/amember.css and reset.css
I'm sorry but that doesn't really solve the problem. There will still be two useless http requests in each of the template files.
These responses will be cached by client browser, and will not be repeated for each request. To remove these CSS completely, you have to : - either edit Am/View.php : printLayoutHead() function (not recommended) - setup a hook for AFTER_RENDER event: application/configs/site.php PHP: <?phpAm_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, 'myAfterRender');function myAfterRender(Am_Event_AfterRender $event){ $event->replace('|<style.+?public/css/amember.css">|',''); // regexp is not tested (!)}
Just for reference - correct code to remove amember.css from layout is: PHP: Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, function (Am_Event_AfterRender $event) { $event->replace('|<link.+?public/css/amember.css".*?>|','');});