PHP code example of awesome9 / admin-page

1. Go to this page and download the library: Download awesome9/admin-page library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

awesome9 / admin-page example snippets


$page = new Awesome9\Admin\Page(
	'awesome9_plugin_options',   // Unique id which is page slug
	esc_html__( 'Awesome Page', 'text-domain' )
	[
		'position'   => 40,
		'parent'     => 'awesome-parent',
		'capability' => 'manage_options',
		'render'     => 'some-view-in-file.php',
		'help'       => [
			'redirections-overview'       => [
				'title' => esc_html__( 'Overview', 'text-domain' ),
				'view'  => 'help-tab-overview.php',
			],
			'redirections-screen-content' => [
				'title' => esc_html__( 'Screen Content', 'text-domain' ),
				'view'  => 'help-tab-screen-content.php',
			],
			'redirections-actions'        => [
				'title' => esc_html__( 'Available Actions', 'text-domain' ),
				'view'  => 'help-tab-actions.php',
			],
			'redirections-bulk'           => [
				'title' => esc_html__( 'Bulk Actions', 'text-domain' ),
				'view'  => 'help-tab-bulk.php',
			],
		],
	]
);