Changeset 45457
- Timestamp:
- 05/28/2019 03:31:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/script-loader.php
r45456 r45457 50 50 51 51 $compressed = $compress_scripts && $concatenate_scripts && isset( $_SERVER['HTTP_ACCEPT_ENCODING'] ) 52 52 && false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip' ) && ! $force_uncompressed; 53 53 54 54 // Load tinymce.js when running from /src, otherwise load wp-tinymce.js.gz (in production) or … … 755 755 continue; 756 756 } elseif ( ! empty( $value ) && is_string( $value ) && ( 757 ( '{' == $value{0} && '}'== $value{strlen( $value ) - 1} ) ||758 ( '[' == $value{0} && ']'== $value{strlen( $value ) - 1} ) ||757 ( '{' === $value{0} && '}' === $value{strlen( $value ) - 1} ) || 758 ( '[' === $value{0} && ']' === $value{strlen( $value ) - 1} ) || 759 759 preg_match( '/^\(?function ?\(/', $value ) ) ) { 760 760 $init_obj .= $key . ':' . $value . ','; … … 845 845 $suffix = wp_scripts_get_suffix(); 846 846 $dev_suffix = wp_scripts_get_suffix( 'dev' ); 847 848 if ( ! $guessurl = site_url() ) { 847 $guessurl = site_url(); 848 849 if ( ! $guessurl ) { 849 850 $guessed_url = true; 850 851 $guessurl = wp_guess_url(); … … 1470 1471 'themeInstallUnavailable' => sprintf( 1471 1472 /* translators: %s: URL to Add Themes admin screen */ 1472 1473 __( 'You won’t be able to install new themes from here yet since your install requires SFTP credentials. For now, please <a href="%s">add themes in the admin</a>.' ), 1473 1474 esc_url( admin_url( 'theme-install.php' ) ) 1474 1475 ), … … 1884 1885 } 1885 1886 1886 if ( ! $guessurl = site_url() ) { 1887 $guessurl = site_url(); 1888 1889 if ( ! $guessurl ) { 1887 1890 $guessurl = wp_guess_url(); 1888 1891 } … … 1908 1911 $subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' ); 1909 1912 1910 if ( 'cyrillic' == $subset ) {1913 if ( 'cyrillic' === $subset ) { 1911 1914 $subsets .= ',cyrillic,cyrillic-ext'; 1912 } elseif ( 'greek' == $subset ) {1915 } elseif ( 'greek' === $subset ) { 1913 1916 $subsets .= ',greek,greek-ext'; 1914 } elseif ( 'vietnamese' == $subset ) {1917 } elseif ( 'vietnamese' === $subset ) { 1915 1918 $subsets .= ',vietnamese'; 1916 1919 } … … 2111 2114 */ 2112 2115 function wp_prototype_before_jquery( $js_array ) { 2113 if ( false === $prototype = array_search( 'prototype', $js_array, true ) ) { 2116 $prototype = array_search( 'prototype', $js_array, true ); 2117 2118 if ( false === $prototype ) { 2114 2119 return $js_array; 2115 2120 } 2116 2121 2117 if ( false === $jquery = array_search( 'jquery', $js_array, true ) ) { 2122 $jquery = array_search( 'jquery', $js_array, true ); 2123 2124 if ( false === $jquery ) { 2118 2125 return $js_array; 2119 2126 } … … 2331 2338 } 2332 2339 2333 if ( 'colors' == $handle ) {2340 if ( 'colors' === $handle ) { 2334 2341 $color = get_user_option( 'admin_color' ); 2335 2342 … … 2451 2458 } 2452 2459 2453 if ( $concat = trim( $wp_scripts->concat, ', ' ) ) { 2454 2460 $concat = trim( $wp_scripts->concat, ', ' ); 2461 2462 if ( $concat ) { 2455 2463 if ( ! empty( $wp_scripts->print_code ) ) { 2456 2464 echo "\n<script type='text/javascript'>\n"; … … 2461 2469 } 2462 2470 2463 $concat = str_split( $concat, 128 );2471 $concat = str_split( $concat, 128 ); 2464 2472 $concatenated = ''; 2465 2473 … … 2631 2639 } 2632 2640 2633 if ( $concat = trim( $wp_styles->concat, ', ' ) ) { 2641 $concat = trim( $wp_styles->concat, ', ' ); 2642 2643 if ( $concat ) { 2634 2644 $dir = $wp_styles->text_direction; 2635 2645 $ver = $wp_styles->default_version; 2636 2646 2637 $concat = str_split( $concat, 128 );2647 $concat = str_split( $concat, 128 ); 2638 2648 $concatenated = ''; 2639 2649 … … 2669 2679 global $concatenate_scripts, $compress_scripts, $compress_css; 2670 2680 2671 $compressed_output = ( ini_get( 'zlib.output_compression' ) || 'ob_gzhandler' == ini_get( 'output_handler' ) );2681 $compressed_output = ( ini_get( 'zlib.output_compression' ) || 'ob_gzhandler' === ini_get( 'output_handler' ) ); 2672 2682 2673 2683 if ( ! isset( $concatenate_scripts ) ) { … … 2724 2734 * @since 5.0.0 2725 2735 */ 2726 2736 do_action( 'enqueue_block_assets' ); 2727 2737 } 2728 2738
Note: See TracChangeset
for help on using the changeset viewer.