Your IP : 216.73.216.1


Current Path : /home/fotouserdopd8j/agenciacrabli.com/wp-contentn/themes/pally/inc/classes/
Upload File :
Current File : /home/fotouserdopd8j/agenciacrabli.com/wp-contentn/themes/pally/inc/classes/Admin.php

<?php
/**
 * pally Admin class
 *
 * Adds a theme information page to the WordPress admin area
 *
 * @package pally
 * @since 1.0.0
 */

namespace Pally;

/**
 * Admin Theme Information page
 *
 * @since 1.0.0
 */
class Admin {

	/**
	 * Constructor.
	 *
	 * @since 1.0.0
	 * @access public
	 * @return void
	 */
	public function __construct() {
		add_action( 'admin_menu', [ $this, 'action_admin_page_menu' ] );
		add_action( 'admin_enqueue_scripts', [ $this, 'action_admin_scripts' ] );

	}

	/**
	 * Adds the menu item for the theme information page.
	 *
	 * @since 1.0.0
	 * @access public
	 * @return void
	 */
	public function action_admin_page_menu() {
		add_theme_page( __( 'pally Setup Help', 'pally' ), __( 'pally Setup Help', 'pally' ), 'edit_theme_options', 'pally_theme', [ $this, 'docs' ] );
	}

	/**
	 * Enqueue styles for the theme setup help page.
	 *
	 * @since 1.0.0
	 * @access public
	 * @return void
	 */
	public function action_admin_scripts( $hook ) {
		if ( 'appearance_page_ally_theme' !== $hook ) {
			return;
		}
		wp_enqueue_style(
			'pally-admin-style',
			get_template_directory_uri() . '/assets/css/min/admin.min.css',
			null,
			false
		);

		wp_enqueue_script(
			'pally-admin-script',
			get_template_directory_uri() . '/assets/js/admin.js',
			array( 'clipboard' ),
			false,
			true
		);
	}

	/**
	 * Create the documentation page.
	 *
	 * @since 1.0.0
	 * @access public
	 * @return void
	 */
	public function docs() {
		?>
		<div class="wrap">
			<div class="welcome-panel">
				<div class="welcome-panel-content">
					<h1><?php esc_html_e( 'pally Setup Help', 'pally' ); ?></h1><br>
					<p><?php esc_html_e( 'Thank you for choosing pally.', 'pally' ); ?><br>
					<?php esc_html_e( 'For support, please email', 'pally' ); ?> <a href="mailto:a11y@points.de">a11y@points.de</a>.</p>

					<h2><?php esc_html_e( 'Installation & Setup', 'pally' ); ?></h2>

					<p><?php esc_html_e( 'After installing the pally theme, please set your desired language. You will get some starter content (German or English) once you enter the Customizer for the first time and just press save. It is advisable to use it, as you will get some posts with more info about accessibility and a main navigation.', 'pally' ); ?></p>
					<p><?php esc_html_e( 'We are using the pally theme for our own accessibility blog. Here, you can find further information about A11y and what the theme can look like:', 'pally' ); ?><br>
					<a href="https://www.barrierefreiesblog.de"><?php esc_html_e( 'Accessibility Blog by points', 'pally' ); ?></a><br><br></p>

					<h2><?php esc_html_e( 'Personalize your theme', 'pally' ); ?></h2>
						<div class="welcome-panel-column-container">
							<a class="button button-primary button-hero load-customize" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=custom_logo' ) ); ?>">
							<?php esc_html_e( 'Add a logo', 'pally' ); ?></a>
							<a class="button button-primary button-hero load-customize" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=header_textcolor' ) ); ?>">
							<?php esc_html_e( 'Mix your favorite colors', 'pally' ); ?></a>
							<a class="button button-primary button-hero load-customize" href="<?php echo esc_url( admin_url( 'customize.php?autofocus[control]=font_pairing' ) ); ?>">
							<?php esc_html_e( 'Choose your fonts', 'pally' ); ?></a>
						</div>
				</div>
		</div>

		<div class="welcome-panel">
			<h2><?php esc_html_e( 'Recommended plugins', 'pally' ); ?></h2>
			<br>
			<div class="welcome-panel-content">
				<div class="welcome-panel-column-container">
					<div class="w-50">
						<p>
							<?php
							esc_html_e( 'To help you with more A11y, install WP Accessibility by Joe Dolson.', 'pally' );
							?><br>
							<i><?php esc_html_e( 'Please make sure position id of the toolbar is set to:', 'pally' ); ?> #a11yhelper</i><br><br>
							
							<a class="button button-primary button-hero load-customize" href="<?php echo esc_url( 'https://de.wordpress.org/plugins/wp-accessibility/' ); ?>"><?php esc_html_e( 'WP Accessibility', 'pally' ); ?></a>
						</p>
					</div>
					
					<div class="w-50">
						<p>
						<?php
						esc_html_e( 'To automatically generate the structure of an accessibility statement page, you can use the generator by 10 Degress, at the moment it is available from GitHub.', 'pally' );
						?><br><br>
						<a class="button button-primary button-hero load-customize" href="<?php echo esc_url( 'https://github.com/10degrees/accessibility-statement-plugin' ); ?>"><?php esc_html_e( 'Accessibility Statement Feature Plugin', 'pally' ); ?></a>
						</p>
					</div>
				</div>
			</div>

		</div>

		<div class="welcome-panel">
			<h2><?php esc_html_e( 'Tips for creating an accessible website', 'pally' ); ?></h2>
			<div class="welcome-panel-content">
				<p><?php esc_html_e( 'We documented some tips for creating accessible websites for editors over at this page:', 'pally' ); ?>
				<br><a href="admin.php?page=a11y">A11y Tips</a></p>
			</div>
		</div>
	</div>
		<?php
	}
}