Make WordPress Core


Ignore:
Timestamp:
02/23/2021 01:58:21 AM (3 years ago)
Author:
peterwilsoncc
Message:

Security: move Content-Security-Policy script loaders.

Move wp_get_script_tag(), wp_print_script_tag(), wp_print_inline_script_tag() and wp_get_inline_script_tag() functions from functions.php to script-loader.php.

Relocate related tests to dependencies sub-directory.

Follow up to [50167].
Props adamsilverstein, hellofromTonya, SergeyBiryukov.
Fixes #39941.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/dependencies/wpScriptTag.php

    r50408 r50409  
    44 * Test wp_get_script_tag() and wp_print_script_tag().
    55 *
    6  * @group functions.php
     6 * @group dependencies
     7 * @group scripts
    78 */
    89class Tests_Functions_wpScriptTag extends WP_UnitTestCase {
     
    3839    }
    3940
     41    /**
     42     * @covers ::wp_get_script_tag
     43     */
    4044    function test_get_script_tag_type_not_set() {
    4145        add_theme_support( 'html5', array( 'script' ) );
     
    5559    }
    5660
     61    /**
     62     * @covers ::wp_print_script_tag
     63     */
    5764    function test_print_script_tag_prints_get_script_tag() {
    5865        add_filter(
Note: See TracChangeset for help on using the changeset viewer.