Skip to content

Commit 10e55a0

Browse files
committed
chore: use defined constant
1 parent 99f9cf9 commit 10e55a0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

search-replace-for-block-editor.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
die;
2121
}
2222

23+
define( 'SRFBE', 'search-replace-for-block-editor' );
24+
2325
/**
2426
* Load Search & Replace Script for Block Editor.
2527
*
@@ -36,21 +38,21 @@
3638
$assets = get_assets( plugin_dir_path( __FILE__ ) . './dist/app.asset.php' );
3739

3840
wp_enqueue_script(
39-
'search-replace-for-block-editor',
41+
SRFBE,
4042
trailingslashit( plugin_dir_url( __FILE__ ) ) . 'dist/app.js',
4143
$assets['dependencies'],
4244
$assets['version'],
4345
false,
4446
);
4547

4648
wp_set_script_translations(
47-
'search-replace-for-block-editor',
48-
'search-replace-for-block-editor',
49+
SRFBE,
50+
SRFBE,
4951
plugin_dir_path( __FILE__ ) . 'languages'
5052
);
5153

5254
wp_localize_script(
53-
'search-replace-for-block-editor',
55+
SRFBE,
5456
'srfbe',
5557
[
5658
'wpVersion' => $wp_version,
@@ -67,7 +69,7 @@
6769
*/
6870
add_action( 'init', function() {
6971
load_plugin_textdomain(
70-
'search-replace-for-block-editor',
72+
SRFBE,
7173
false,
7274
dirname( plugin_basename( __FILE__ ) ) . '/languages'
7375
);

0 commit comments

Comments
 (0)