config = $config; self::$instance->setup_config(); self::$instance->setup_actions(); } } } /** * Setup the class props based on the config array. */ public function setup_config() { $this->theme_name = isset( $this->config['theme_name'] ) ? $this->config['theme_name'] : ''; $this->theme_slug = isset( $this->config['theme_name'] ) ? $this->config['theme_slug'] : ''; $this->theme_version = isset( $this->config['theme_version'] ) ? $this->config['theme_version'] : ''; $this->theme_pro_name = isset( $this->config['theme_pro_name'] ) ? $this->config['theme_pro_name'] : ''; $this->theme_pro_slug = isset( $this->config['theme_pro_slug'] ) ? $this->config['theme_pro_slug'] : ''; $this->menu_name = isset( $this->config['menu_name'] ) ? $this->config['menu_name'] : ''; $this->page_name = isset( $this->config['page_name'] ) ? $this->config['page_name'] : ''; $this->welcome_title = isset( $this->config['welcome_title'] ) ? $this->config['welcome_title'] : ''; $this->welcome_content = isset( $this->config['welcome_content'] ) ? $this->config['welcome_content'] : ''; $this->tabs = isset( $this->config['tabs'] ) ? $this->config['tabs'] : array(); $this->utm = isset( $this->config['utm'] ) ? $this->config['utm'] : ''; } /** * Setup the actions used for this page. */ public function setup_actions() { add_action( 'admin_menu', array( $this, 'about_page_register' ) ); add_action( 'admin_enqueue_scripts', array( $this, 'style_and_scripts' ) ); } /** * Register the menu page under Appearance menu. */ function about_page_register() { if ( ! empty( $this->menu_name ) && ! empty( $this->page_name ) ) { add_theme_page( $this->menu_name, $this->page_name, 'edit_theme_options', $this->theme_slug . '-welcome', array( $this, 'about_page_render', ) ); } } /** * Render the main content page. */ public function about_page_render() { echo '
' . wp_kses_post( $this->welcome_content ) . '
'; } echo '' . wp_kses_post( sprintf( __( 'If you ♥ %1$s, you’ll love all the extra features %2$s come with.', 'abc-studio' ), $this->theme_name, $this->theme_pro_name ) ) . '
'; echo '' . esc_html( sprintf( __( 'Get %s now', 'abc-studio' ), $this->theme_pro_name ) ) . '
'; echo '' . wp_kses_post( sprintf( __( 'To get more block patterns and templates, try %s', 'abc-studio' ), $this->theme_pro_name ) ) . '
'; echo ''; echo '| '; echo ' | ' . esc_html( 'Free', 'abc-studio' ) . ' | '; echo '' . esc_html( 'PRO', 'abc-studio' ) . ' | '; echo '
|---|---|---|
' . esc_html( 'Full Site Editing', 'abc-studio' ) . '' . esc_html( 'Design and build your website using the WordPress block editor. No coding, no plugins needed.', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Block Patterns', 'abc-studio' ) . '' . esc_html( 'Quickly build new pages with our carefully designed patterns.', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Theme Styles', 'abc-studio' ) . '' . esc_html( sprintf( __( 'Switch between the theme styles included in %s, or easily adjust the theme\'s colors, typography, and block styles as you see fit.', 'abc-studio' ), $this->theme_name ) ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Lightweight & fast', 'abc-studio' ) . '' . esc_html( sprintf( __( 'With %s your website loads fast and runs smoothly, keeping your visitors engaged and satisfied.', 'abc-studio' ), $this->theme_name ) ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Priority Support', 'abc-studio' ) . '' . esc_html( 'You will benefit of our full support for any issues you have with the theme.', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Easy One-Click Demo Import', 'abc-studio' ) . '' . esc_html( 'Quickly import the sample content and easily customize it. Add your logo, colors, and fonts to give it a custom look.', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Full Page Layouts', 'abc-studio' ) . '' . esc_html( 'Add professionally designed page layouts with one click to kick-start your page creation. They include About page, Services page, Portfolio page, Contact page, and more!', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
' . esc_html( 'Additional Patterns', 'abc-studio' ) . '' . esc_html( '80+ block patterns that you can insert in your templates with a click.', 'abc-studio' ) . ' | ';
echo ''; echo ' | '; echo ' |
| '; echo ' | theme_pro_slug-wordpress-theme/$this->utm" ) . '" target="_blank" class="button button-primary button-hero">' . esc_html( sprintf( __( 'Get %s now', 'abc-studio' ), $this->theme_pro_name ) ) . ' | '; echo '|