PHP code example of dream-encode / de-wordpress-plugin-utils
1. Go to this page and download the library: Download dream-encode/de-wordpress-plugin-utils 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/ */
dream-encode / de-wordpress-plugin-utils example snippets
new Asset_Manager(
handle_prefix: 'my-plugin-',
plugin_path: MY_PLUGIN_PATH,
plugin_url: MY_PLUGIN_URL,
plugin_version: MY_PLUGIN_VERSION,
screens_to_assets: [ 'edit-post' => [ ['name' => 'editor'] ] ],
localization_global: 'MY_PLUGIN',
screens_localization_data: [ 'edit-post' => [ 'REST_URL' => '...' ] ],
asset_subdir: 'admin/', // default ''
asset_file_prefix: 'admin-', // default ''
);