PHP code example of piotrpress / asset-block

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

    

piotrpress / asset-block example snippets


add_action( 'init', function() {
    wp_register_script( 'example', 'https://example.com/script.js' );
    wp_register_style( 'example', 'https://example.com/style.css' );