Appearance. * * @package Aamla * @since 1.0.2 */ namespace aamla; /** * Display Aamla theme admin page in Dashboard > Appearance. * * @since 1.0.2 */ class Admin_Page { /** * Constructor method. * * @since 1.0.2 */ public function __construct() {} /** * Register hooked functions. * * @since 1.0.2 */ public function init() { global $pagenow; // Add Welcome message on Theme activation. if ( is_admin() && 'themes.php' === $pagenow && isset( $_GET['activated'] ) ) { add_action( 'admin_notices', [ $this, 'welcome_theme_notice' ], 99 ); } // Add Aamla theme help page to Dashboard > appearance. add_action( 'admin_menu', [ $this, 'add_theme_page' ] ); } /** * Display Welcome Message on Theme activation. * * @since 1.0.2 * * @return void */ public function welcome_theme_notice() { // Since Manta is not the active theme, let user know Manta Plus will not work. printf( '
', esc_html__( 'Hi there!', 'aamla' ), esc_html__( 'Thanks for trying Aamla. Just need to inform that Aamla has some unique and powerful features. Knowing them in advance will certainly help to build your site. Use following link to quickly go through these features.', 'aamla' ), esc_url( admin_url( 'themes.php?page=aamla-docs' ) ), esc_html__( 'Getting started with Aamla', 'aamla' ), esc_html__( 'If you cannot read it now, you can find quick documentation later at Appearance > Aamla Docs.', 'aamla' ), esc_html__( 'Thank You', 'aamla' ) ); ?> init();