Error – ‘create_function is deprecated’

Question

Our WP Debug is report that ‘Function create_function() is deprecated’. Any idea how to rewrite this code to not include create_function ?

 self::register_form_init_scripts( $form, $field_values, $ajax );

            if ( apply_filters( 'gform_init_scripts_footer', false ) ) {
                add_action( 'wp_footer', create_function( '', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');' ), 20 );
                add_action( 'gform_preview_footer', create_function( '', 'GFFormDisplay::footer_init_scripts(' . $form['id'] . ');' ) );
            }
0
user3217495 4 months 0 Answers 23 views 0

Leave an answer