PHP code example of carloswph / ilk

1. Go to this page and download the library: Download carloswph/ilk 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/ */

    

carloswph / ilk example snippets


$cpt = new Builder('Foot'); // The plural 'Feet' is automatically found and generated

$cpt->enableRest(); // If you want the post type to show in rest (default is false)
$cpt->setSupports('excerpt'); // If you want to add any new feature support
$cpt->setI18n('ilk-rulez'); // Sets a slug for translations, if necessary

$tax = new TermBuilder('Knife', $cpt); // Again, the plural 'Knives' will be automatically managed

$tax->enableRest(); // Same logic as CPTs
$tax->likeCategory(); // Taxonomies are by default non-hierarchical, but you can make them hierarchical using this method

$cpt->setMenu(false); // No post type in backend menu
$cpt->setMenu('options-general.php'); // Post type as submenu for Settings

$cpt->dropSupports('excerpt');