PHP code example of dwalkr / wp-admin-utility
1. Go to this page and download the library: Download dwalkr/wp-admin-utility 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/ */
dwalkr / wp-admin-utility example snippets
add_action('adminutility-pagecreator-init', function($pageCreator){
$pageCreator->addPostType('/path/to/config.yml');
});
$config = [
'active' => true,
'name' => 'specials',
'public' => true
//...
];
$pageCreator->addPostType($config, \dwalkr\WPAdminUtility\PageCreator::FROM_ARRAY);