PHP code example of automattic / jetpack-wp-build-polyfills

1. Go to this page and download the library: Download automattic/jetpack-wp-build-polyfills 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/ */

    

automattic / jetpack-wp-build-polyfills example snippets


use Automattic\Jetpack\WP_Build_Polyfills\WP_Build_Polyfills;

WP_Build_Polyfills::register( 'my-plugin', array(
    'wp-notices',
    'wp-private-apis',
    '@wordpress/boot',
    '@wordpress/route',
) );

WP_Build_Polyfills::register( 'my-plugin', array( 'wp-notices' ), '7.1' );