Skip to content

Commit

Permalink
Update disable-shortcode-pasting.php
Browse files Browse the repository at this point in the history
  • Loading branch information
schlotterer authored Aug 24, 2024
1 parent efa87cf commit 0db0a94
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions disable-shortcode-pasting.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
* Plugin Name: Disable Shortcode Pasting in Plain Text Blocks
* Description: Prevents automatic shortcode blocks from being inserted when pasting into plain text blocks like paragraphs or headings.
* Version: 1.0
* Author: Your Name
* Author: Joel Schlotterer
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

function dsp_enqueue_block_editor_assets() {
namespace Flexline\DisableShortcodePasting;

// Enqueue the block editor script
function enqueue_block_editor_assets() {
wp_enqueue_script(
'dsp-shortcode-paste-handler',
plugin_dir_url(__FILE__) . 'shortcode-paste-handler.js',
Expand All @@ -18,4 +21,4 @@ function dsp_enqueue_block_editor_assets() {
);
}

add_action('enqueue_block_editor_assets', 'dsp_enqueue_block_editor_assets');
add_action('enqueue_block_editor_assets', __NAMESPACE__ . '\\enqueue_block_editor_assets');

0 comments on commit 0db0a94

Please sign in to comment.