sPageSlug}_{$this->sTabSlug}", array( $this, 'replyToAddInlineCSS' ) ); $oFactory->addSettingSections( $this->sPageSlug, // the target page slug array( 'tab_slug' => $this->sTabSlug, 'section_id' => $this->sTabSlug, 'section_tab_slug' => 'welcome', 'title' => __( "What's New", 'admin-page-framework-loader' ), // ' 'content' => $this->_getReadmeContents( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', '', // TOC title array( 'New Features' ) // section ) ), array( 'tab_slug' => $this->sTabSlug, 'section_tab_slug' => $this->sTabSlug, 'section_id' => 'getting_started', 'title' => __( "Getting Started", 'admin-page-framework-loader' ), // ' 'content' => $this->_getReadmeContents( AdminPageFrameworkLoader_Registry::$sDirPath . '/asset/text/about.txt', "
" . __( 'Admin Page Framework is created by the following contributors.', 'admin-page-framework-loader' ) . "
" ), array( 'field_id' => '_contributors', 'type' => '_contributors', 'show_title_column' => false, 'content' => $this->_getContributors(), ), array( 'field_id' => 'github_star', 'type' => 'github', 'user_name' => 'michaeluno', // the GitHub account ID 'button_type' => 'star', // either of the followings: follow, star, watch, fork, issue 'count' => false, 'repository' => 'admin-page-framework', 'size' => 'mega', 'attributes' => array( 'data-text' => ' ' . AdminPageFramework_Registry::NAME . ' ' . AdminPageFramework_Registry::getVersion() . ' ', // 'data-icon' => 'octicon-mark-github', ), 'description' => __( 'Star the repository and get Involved!', 'admin-page-framework-loader' ), 'show_title_column' => false, ) ); } /** * * @since 3.5.0 * @return void */ public function replyToAddInlineCSS( $sCSSRules ) { return $sCSSRules . ".changelog h4 { /* margin: 0; */ } .form-table td p { margin: 1em 0; } .admin-page-framework-section-tab h4 { padding: 10px 16px 12px; font-size: 1.6em; font-weight: 400; } .admin-page-framework-content .toc ul li { margin-left: 2em; } .admin-page-framework-content ul li { margin-left: 0; }"; } /** * Retrieves contents of a change log section of a readme file. * @since 3.6.1 * @return void */ private function _getChangeLog( $sSection='Changelog' ) { $_aReplacements = array( '%PLUGIN_DIR_URL%' => AdminPageFrameworkLoader_Registry::getPluginURL(), '%WP_ADMIN_URL%' => admin_url(), ); $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( AdminPageFrameworkLoader_Registry::$sDirPath . '/readme.txt', $_aReplacements ); $_sChangeLog = $_oWPReadmeParser->getSection( $sSection ); $_oWPReadmeParser = new AdminPageFramework_WPReadmeParser( AdminPageFrameworkLoader_Registry::$sDirPath . '/changelog.md', $_aReplacements ); $_sChangeLog .= $_oWPReadmeParser->getSection( $sSection ); $_sChangeLog = $_sChangeLog ? $_sChangeLog : '' . __( 'No valid changlog was found.', 'admin-page-framework-loader' ) . '
'; return "