| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | <?php/*Plugin Name: DWP GutenPlugin URI: https://wp.davidwindham.comDescription: Add custom fields and blocks to the Gutenberg editor.( Pairs with DWP Theme )Author: windhamdavidAuthor URI: https://davidwindham.comText Domain: dwp-gutenVersion: 0.4@package dwp_guten*/defined( 'ABSPATH' ) or die( 'DIE' );/*********  add dwp-guten.js to Gutenberg wp.editor.RichTextToolbarButton **********/function dwp_guten_script_register() {	wp_register_script(		'dw-guten-js',		plugins_url( 'dwp-guten.js', __FILE__ ),		array( 'wp-rich-text' , 'wp-element', 'wp-editor')	);}add_action( 'init', 'dwp_guten_script_register' );function dwp_guten_enqueue () {	wp_enqueue_script( 'dwp-guten-js');}add_action( 'enqueue_block_editor_assets', 'dwp_guten_enqueue' );/*********  add custom metaboxes (meta_desc,media) to Gutenberg sidebar **********/include_once('dwp-metaboxes.php');function dwp_guten_enqueue_assets() {	wp_enqueue_script(		'dwp-gutenberg-sidebar',		plugins_url( 'build/index.js', __FILE__ ),		array( 'wp-plugins', 'wp-edit-post', 'wp-element', 'wp-components', 'wp-data' )	);}add_action( 'enqueue_block_editor_assets', 'dwp_guten_enqueue_assets' );?>
 |