Script Modules API: Rename wp_module functions to wp_script_module#5869
Script Modules API: Rename wp_module functions to wp_script_module#5869luisherranz wants to merge 8 commits intoWordPress:trunkfrom
wp_module functions to wp_script_module#5869Conversation
wp...module functions to wp...script_modulewp_module functions to wp_script_module
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
felixarntz
left a comment
There was a problem hiding this comment.
Thanks @luisherranz, LGTM!
Just one point of feedback: Maybe we should also update the function docs to say "script module" instead of just "module"?
|
Sure 🙂 Do you want me to remove the
Or maybe change them to
|
|
@luisherranz I think the latter, let's use |
|
I've renamed all the references to "modules" and replaced them with "script modules". |
wp_module functions to wp_script_modulewp_module functions to wp_script_module
westonruter
left a comment
There was a problem hiding this comment.
Suggested edits to phpdoc and added PHP 7 typing
Co-authored-by: Weston Ruter <westonruter@google.com>
Thanks, @westonruter. I've applied all the necessary changes. |
westonruter
left a comment
There was a problem hiding this comment.
Looks good, though my proposal for including the array shape may need to go.
Co-authored-by: Weston Ruter <westonruter@google.com>
|
Ok, everything looks good now. Thanks for your help, @westonruter 🙂 The PR is ready. |
…tions-to-script-modules
Trac ticket: https://core.trac.wordpress.org/ticket/56313
Renames all the mentions to "module" with "script module", including function names, comments, and tests.
The list of functions renamed are:
wp_module()->wp_script_module()wp_register_module()->wp_register_script_module()wp_enqueue_module()->wp_enqueue_script_module()wp_dequeue_module()->wp_dequeue_script_module()WP_Script_Modules::prints_enqueued_modules()->WP_Script_Modules:: print_enqueued_script_modules()WP_Script_Modules::print_module_preloads()->WP_Script_Modules:: print_script_module_preloads()It also adds PHP 7 typing to all the functions and improves the types of
$dependenciesargument ofwp_register_script_moduleandwp_enqueue_script_moduleusing@type.