Code Duplication    Length = 26-26 lines in 2 locations

core/exceptions/ExceptionStackTraceDisplay.php 1 location

@@ 403-428 (lines=26) @@
400
     * @param bool $force_print
401
     * @return string
402
     */
403
    private function printScripts($force_print = false)
404
    {
405
        if (! $force_print && (did_action('admin_enqueue_scripts') || did_action('wp_enqueue_scripts'))) {
406
            if (wp_script_is('ee_error_js', 'enqueued')) {
407
                return '';
408
            }
409
            if (wp_script_is('ee_error_js', 'registered')) {
410
                wp_enqueue_style('espresso_default');
411
                wp_enqueue_style('espresso_custom_css');
412
                wp_enqueue_script( 'ee_error_js' );
413
				wp_localize_script( 'ee_error_js', 'ee_settings', array( 'wp_debug' => WP_DEBUG ) );
414
            }
415
        } else {
416
            return '
417
<script>
418
/* <![CDATA[ */
419
var ee_settings = {"wp_debug":"' . WP_DEBUG . '"};
420
/* ]]> */
421
</script>
422
<script src="' . includes_url() . 'js/jquery/jquery.js" type="text/javascript"></script>
423
<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/espresso_core.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
424
<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/EE_Error.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
425
';
426
        }
427
        return '';
428
    }
429
430
431

core/EE_Error.core.php 1 location

@@ 1018-1043 (lines=26) @@
1015
     * @param    bool $force_print
1016
     * @return    string
1017
     */
1018
    private static function _print_scripts($force_print = false)
1019
    {
1020
        if (! $force_print && (did_action('admin_enqueue_scripts') || did_action('wp_enqueue_scripts'))) {
1021
            if (wp_script_is('ee_error_js', 'enqueued')) {
1022
                return '';
1023
            }
1024
            if (wp_script_is('ee_error_js', 'registered')) {
1025
                wp_enqueue_style('espresso_default');
1026
                wp_enqueue_style('espresso_custom_css');
1027
                wp_enqueue_script('ee_error_js');
1028
                wp_localize_script('ee_error_js', 'ee_settings', array('wp_debug' => WP_DEBUG));
1029
            }
1030
        } else {
1031
            return '
1032
<script>
1033
/* <![CDATA[ */
1034
var ee_settings = {"wp_debug":"' . WP_DEBUG . '"};
1035
/* ]]> */
1036
</script>
1037
<script src="' . includes_url() . 'js/jquery/jquery.js" type="text/javascript"></script>
1038
<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/espresso_core.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
1039
<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/EE_Error.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
1040
';
1041
        }
1042
        return '';
1043
    }
1044
1045
1046