Skip to content

Commit

Permalink
Remove $display param from ::get_inline_script() function
Browse files Browse the repository at this point in the history
Co-authored-by: Weston Ruter <[email protected]>
  • Loading branch information
thelovekesh and westonruter authored Jul 7, 2023
1 parent 403af64 commit 5247813
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/php/src/Admin/PolyfillsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ public function test_registration() {
*
* @param string $handle Script handle.
* @param string $position Script position.
* @param bool $display Whether to display the script.
*
* @return string
*/
public static function get_inline_script( $handle, $position = 'after', $display = false ) {
public static function get_inline_script( $handle, $position = 'after' ) {
if ( method_exists( wp_scripts(), 'get_inline_script_tag' ) ) {
$script = wp_scripts()->get_inline_script_tag( $handle, $position );

Expand All @@ -119,7 +118,7 @@ public static function get_inline_script( $handle, $position = 'after', $display

return $script;
} else {
return wp_scripts()->print_inline_script( $handle, $position, $display );
return wp_scripts()->print_inline_script( $handle, $position, false );
}
}
}

0 comments on commit 5247813

Please sign in to comment.