1. Go to this page and download the library: Download themeplate/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/ */
themeplate / page example snippets
use ThemePlate\Page\MenuPage;
use ThemePlate\Page\SubMenuPage;
// One-liner
( new MenuPage( 'Theme Options' ) )->setup();
( new SubMenuPage( 'Plugin Settings' ) )->parent( 'plugins.php' )->setup();
/** https://developer.wordpress.org/reference/functions/add_menu_page/#parameters */
$args = array(
'menu_title' => 'Site Reports',
'icon_url' => 'dashicons-printer',
'position' => 2,
);
( new MenuPage( 'Available Reports', $args ) )->setup();
/** https://developer.wordpress.org/reference/functions/add_submenu_page/#parameters */
$args = array(
// Used as the settings group name
'menu_slug' => 'site-reports/print-download',
'capability' => 'moderate_comments',
);
( new SubMenuPage( 'Print or Download', '', $args ) )->parent( 'site-reports' )->setup();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.