PHP code example of sixach / wp-snippets

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

    

sixach / wp-snippets example snippets



namespace Package\Subpackage;

use Sixa_Snippets\Dashboard\Menu_Options as Menu_Options;

class My_Class {

    public function some_cool_function(): void {
        // The class imported from Sixa_Snippets
        new Menu_Options (
            array (
                array (
                    'default'     => 'no',
                    'type'        => 'checkbox',
                    'id'          => 'edit-menu-item-is-button',
                    'name'        => 'is_button',
                    'description' => __( 'Style this item as a CTA button? (Top-level only)', '@@textdomain' ),
                ),
            )
        );
    }
    
}