*/ class Amp_WP_Help { /** * Initialize the class and set its properties. * * @since 1.2.0 * @param string $plugin_name The name of this plugin. * @param string $version The version of this plugin. */ public function __construct() { // Action - Add Settings Menu add_action( 'admin_menu', array($this, 'admin_menu'), 50 ); } /** * Add Add-ons Page Under AMP WP Admin Menu. * * @since 1.2.0 */ public function admin_menu() { add_submenu_page( 'amp-wp-welcome', // string $parent_slug 'Help', // string $page_title 'Help', // string $menu_title 'manage_options', // string $capability 'amp-wp-help', // string $menu_slug array( $this, 'amp_wp_help' ) // callable $function ); } /** * Add Add-ons Page. * * @Since 1.2.0 */ public function amp_wp_help() { $page = filter_input(INPUT_GET, 'page'); require_once AMPWP_TEMPLATE_DIR_PATH . 'admin/partials/amp-wp-admin-help.php'; } } new Amp_WP_Help();