public function _replyToModifyFileContents($sFileContents, $sPathInArchive) { // Check the file extension. $_aAllowedExtensions = apply_filters(AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_allowed_file_extensions', array('php', 'css', 'js')); if (!in_array(pathinfo($sPathInArchive, PATHINFO_EXTENSION), $_aAllowedExtensions)) { return $sFileContents; } // Modify the file contents. $sFileContents = apply_filters(AdminPageFrameworkLoader_Registry::HOOK_SLUG . '_filter_generator_file_contents', $sFileContents, $sPathInArchive, $this->oFactory->oUtil->getElement($_POST, array($this->oFactory->oProp->sOptionKey), array()), $this->oFactory); // At this point, it is a php file. return $this->_modifyClassNameByPath($sFileContents, $sPathInArchive); }