Skip to content

Commit 9935d5a

Browse files
committed
fix: fatal error thrown because get_current_screen function is not loaded
1 parent 3b05cc8 commit 9935d5a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

inc/media_rename/attachment_edit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ public function enqueue_scripts( $hook ) {
8585
* @return array Modified form fields.
8686
*/
8787
public function add_attachment_fields( $form_fields, $post ) {
88+
if ( ! function_exists( 'get_current_screen' ) ) {
89+
return $form_fields;
90+
}
91+
8892
$screen = get_current_screen();
8993

9094
$attachment = new Optml_Attachment_Model( $post->ID );

0 commit comments

Comments
 (0)