Skip to content

Commit

Permalink
Remove function_exists since we don't support WP before 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobattocchi committed Mar 15, 2024
1 parent b9a5818 commit 9e816b2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ui/asset-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ public function register_scripts() {
\DUPLICATE_POST_CURRENT_VERSION,
true
);
if ( function_exists( '\\wp_set_script_translations' ) ) {
\wp_set_script_translations( 'duplicate_post_edit_script', 'duplicate-post' );
}
\wp_set_script_translations( 'duplicate_post_edit_script', 'duplicate-post' );

\wp_register_script(
'duplicate_post_strings',
Expand All @@ -63,9 +61,7 @@ public function register_scripts() {
\DUPLICATE_POST_CURRENT_VERSION,
true
);
if ( function_exists( '\\wp_set_script_translations' ) ) {
\wp_set_script_translations( 'duplicate_post_strings', 'duplicate-post' );
}
\wp_set_script_translations( 'duplicate_post_strings', 'duplicate-post' );

\wp_register_script(
'duplicate_post_quick_edit_script',
Expand Down

0 comments on commit 9e816b2

Please sign in to comment.