Make WordPress Core


Ignore:
Timestamp:
05/10/2015 07:56:15 PM (10 years ago)
Author:
johnbillion
Message:

Add a return value to wp_register_script() and wp_register_style() which matches the return value of WP_Dependencies::add().

Props katzwebdesign, pareshradadiya, DrewAPicture.

Fixes #31126

File:
1 edited

Legend:

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

    r31733 r32483  
    230230    }
    231231
     232    /**
     233     * Testing 'wp_register_style' return boolean success/failure value.
     234     *
     235     * @ticket 31126
     236     */
     237    function test_wp_register_style(){
     238        $this->assertTrue( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
     239        $this->assertFalse( wp_register_style( 'duplicate-handler', 'http://example.com' ) );
     240    }
     241
    232242}
Note: See TracChangeset for help on using the changeset viewer.