Skip to content

Commit 54214b4

Browse files
committed
Document new method
1 parent 08fca13 commit 54214b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/wp-includes/class-wp-script-modules.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,16 @@ public function print_a11y_script_module_html() {
950950
. '</div>';
951951
}
952952

953+
/**
954+
* Creates a clone of the instance without enqueued modules.
955+
*
956+
* This method creates a copy of the current instance without any
957+
* state related to enqueued or printed modules.
958+
*
959+
* @since 7.0.0
960+
*
961+
* @return WP_Script_Modules A new instance.
962+
*/
953963
public function clone_without_enqueued_modules(): self {
954964
$clone = clone $this;
955965
$clone->queue = array();

0 commit comments

Comments
 (0)