PHP code example of bmd / enable-button-icons

1. Go to this page and download the library: Download bmd/enable-button-icons 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/ */

    

bmd / enable-button-icons example snippets


use Bmd\EnableButtonIcons\Plugin;

$dependency_url  = plugin_dir_url( __FILE__ ) . 'vendor/bmd/enable-button-icons/';
$dependency_path = plugin_dir_path( __FILE__ ) . 'vendor/bmd/enable-button-icons/';

$plugin = new Plugin(
    $dependency_url,
    $dependency_path
);

$plugin->mount();

add_filter( 'enable_button_icons_icon_families', function ( $families ) {
    $families['brand-icons'] = array(
        'label' => 'Brand Icons',
        'url'   => plugin_dir_url( __FILE__ ) . 'icons/brand-icons.json',
    );

    return $families;
} );