/** * * @since 3 */ protected function _getReadmeContents($sFilePath, $sTOCTitle, $asSections = array()) { $_oWPReadmeParser = new AmazonAutoLinks_AdminPageFramework_WPReadmeParser($sFilePath, array('%PLUGIN_DIR_URL%' => AmazonAutoLinks_Registry::getPluginURL(), '%WP_ADMIN_URL%' => admin_url())); $_sContent = ''; foreach ((array) $asSections as $_sSection) { $_sContent .= $_oWPReadmeParser->getSection($_sSection); } if ($sTOCTitle) { $_oTOC = new AmazonAutoLinks_AdminPageFramework_TableOfContents($_sContent, 4, $sTOCTitle); return $_oTOC->get(); } return $_sContent; }
/** * * @callback action do_{page slug}_{tab slug} */ public function replyToDoTab($oFactory) { $_oWPReadmeParser = new AmazonAutoLinks_AdminPageFramework_WPReadmeParser(AmazonAutoLinks_Registry::$sDirPath . '/readme.txt'); echo "<h3>" . __('Other Notes', 'amazon-auto-links') . "</h3>" . $_oWPReadmeParser->getSection('Other Notes'); }