forked from WordPress/wordpress-develop
-
Notifications
You must be signed in to change notification settings - Fork 0
DRAFT: PR for enhancing WP_Scripts with a loading strategy #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
joemcgill
wants to merge
307
commits into
trunk
from
feature/enhance-wp-scripts-api-with-a-loading-strategy
Closed
Changes from all commits
Commits
Show all changes
307 commits
Select commit
Hold shift + click to select a range
5795b4c
restore default values
kt-12 0ebfaa5
phpcs fixes
kt-12 f6b0483
Update text
kt-12 7b36d21
Readability
kt-12 f71319c
consistent with other docblock descriptions
kt-12 624e797
casting the result
kt-12 b7334b7
wordpress coding standards
kt-12 2cb01be
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' of ht…
kt-12 5305f1c
restore test case
kt-12 073684a
add temporary ticket id
kt-12 5e343b8
fix test bug
kt-12 b56c0e1
restore test case
kt-12 9caf8bb
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' into …
kt-12 b70ee6c
temporary ticket added for testing
kt-12 dbf6da9
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' into …
kt-12 2deadcf
remove extra line
kt-12 fcaa62e
remove after dependency function
kt-12 150ba8b
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' into …
kt-12 d578e50
fix doc block text
kt-12 5262bf7
Correct grammar
kt-12 2970f1a
Fix doc block string.
kt-12 28af60d
change variable name
kt-12 f746dfd
doc block changes, better word
kt-12 00a50d1
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' into …
kt-12 d4bbaff
spacing issue.
kt-12 01e1d4f
update placeholder with numbered placeholder
kt-12 a367951
Change ticket id to trac id
kt-12 51e3e41
Switching from numbered to normal substitution
kt-12 62cbf60
Breaking test into multiple test functions
kt-12 0f80794
breaking test to dataprovider
kt-12 f20cfea
add async and defer check in dependent check
kt-12 e406a13
Merge branch 'enhancement/get_eligible_loading_strategy-ML2-12' into …
kt-12 b961108
defer with async dependent
kt-12 70fb6c6
Add failure messages
kt-12 2b3d11c
Merge pull request #38 from 10up/enhancement/do_item-ML2-14
kt-12 16c4634
Merge pull request #35 from 10up/enhancement/get_eligible_loading_str…
kt-12 a10cb5c
phpcs-fixes
kt-12 dfbecd8
add parameter
kt-12 4fa3d7b
butification
kt-12 043c244
Handling inline before
kt-12 53a54e6
TODO Note for on Load logic for after
kt-12 d90ed89
Before Logic.
kt-12 514876f
test cases
kt-12 2c31104
bug fix
kt-12 4e1aaaf
Add non standalone test cases.
kt-12 df906be
stand alone test case
kt-12 6be6f16
passing standalone
kt-12 7564a68
doc block update
kt-12 484789f
Merge branch 'enhancement/wp-add-inline-script-standalone' into enhan…
kt-12 3ad953f
keep a track of standalone and non-standalone
kt-12 dcd2a32
standalone and non-standalone
kt-12 8d33fac
phpcs fixes
kt-12 e4b461d
set defaults
kt-12 8421a1c
update print_inline_script for stand alone
kt-12 371e42f
fix issue with standalone appending
kt-12 c517bc1
bug fix incorrect strategy check
kt-12 04aabf5
numbered attributes
kt-12 e366d5d
onload script
kt-12 0fafd88
fix bug
kt-12 386022e
sprintf issue with \n
kt-12 fe7acc0
phpcs fixes
kt-12 394405f
print template loader script
kt-12 cc5dace
\n to EOL
kt-12 b558f34
Loading the script before other script
kt-12 f04a246
temp commit
kt-12 b5f4df4
check if any delayed inline scripts
kt-12 2eb8aed
Update src/wp-includes/class-wp-scripts.php
kt-12 e0e560e
non-stanadalone after script test cases
kt-12 c856372
test standalone and non-standalone script combined
kt-12 ff25567
phpcs fix
kt-12 b2d6ec1
for consistency
kt-12 d9a0f39
Merge add_text_template to implement_load_handlers
kt-12 d110556
add new line
kt-12 b6b7022
backward compatibility
kt-12 9e8c378
update test utility and scripts.
kt-12 ffc40c1
php cs fixes
kt-12 8af918c
fix csfix issue
kt-12 d952da5
Update test message.
kt-12 b71b557
Update test comment
kt-12 479d656
Update test error message
kt-12 968d5b7
change function names
kt-12 ad9d9c3
Merge branch 'enhancement/implement_load_handlers' of https://github.…
kt-12 d522c46
Update doc header.
kt-12 ce5fc87
Update comment text
kt-12 0a0b253
comment text grammar.
kt-12 a24665a
update doc block
kt-12 f29c144
comment grammar fixes
kt-12 0988655
comment grammar fixes
kt-12 d66907e
comment grammar
kt-12 b7bff57
doc block grammar
kt-12 013cb1e
comment grammar
kt-12 db02925
update doc block for grammar
kt-12 42bc576
updated grammar
kt-12 07179c8
update comment text
kt-12 169fc28
Update comment
kt-12 ad9cafb
Update comment
kt-12 5cda63d
Update comment
kt-12 a587e5e
Update doc block.
kt-12 b861844
Update doc block
kt-12 70122ff
Update comment
kt-12 c81fdf2
Update comment
kt-12 2dce5f4
Update comment
kt-12 2571691
Update comment
kt-12 b7ac63f
grammar fix
kt-12 326555d
use unregister column
kt-12 8d5729c
Merge branch 'enhancement/update-wp-add-inline-script-standalone' int…
kt-12 6187dd1
Merge branch 'enhancement/add_text_template' into enhancement/impleme…
kt-12 1321d6f
avoid removal of jquery libraries
kt-12 66ab60c
Dataprovider doc block.
kt-12 bbdad37
doc block change
kt-12 24452a6
Abort/reset script concatenation if the handle in question is of a de…
10upsimon 08f200f
Fixed comment typo
10upsimon 966be0c
Update src/wp-includes/class-wp-scripts.php
kt-12 f9355cd
Merge branch 'enhancement/implement_load_handlers' into add/issue-48-…
kt-12 ae38432
strategy already available
kt-12 54c74be
Add more specific defer and async strategy checks for concatenation e…
10upsimon 31e4507
test defer script with concat
kt-12 2031aff
concat with async
kt-12 6beabce
blocking before and after defer
kt-12 a8dba9f
Merge origin into local
10upsimon 6d75add
Merge branch 'add/issue-48-abort-script-strategy-logic-when-concat-sc…
10upsimon ffe725c
Remove two trailing spaces in printed output that were failing test i…
10upsimon c656495
Replaced hard coded references to default script directory string to …
10upsimon 23630b9
Fix spacing for PHPCS
joemcgill 2087305
Update script handle name to match async strategy in tests
joemcgill dcbf0af
Update doc text
kt-12 01c890e
bug: multiple type in a single script.
kt-12 9aaca52
print_display
kt-12 8e08454
Merge branch 'enhancement/add_text_template' into enhancement/impleme…
kt-12 b3f7225
fix type_attr no there issue
kt-12 4df5288
adding description
kt-12 264853c
broke standalone script test to multiple function
kt-12 556ae91
non-standalone after script test broken
kt-12 d4be88d
before standalone test broken
kt-12 180a6ae
non standalone with before and defer
kt-12 fdf0bd3
Merge branch 'enhancement/implement_load_handlers' into add/issue-48-…
kt-12 4b16162
remove extra variable
kt-12 0c7d18e
remove hardcoded type
kt-12 4d0140d
used function instead of arrow function.
kt-12 a5b83a4
single condition
kt-12 0269128
put back handle
kt-12 db29ae2
Merge pull request #47 from 10up/enhancement/update-wp-add-inline-scr…
kt-12 28ba27c
Merge pull request #46 from 10up/enhancement/wp-add-inline-script-sta…
10upsimon 4cc2502
Merge pull request #50 from 10up/enhancement/implement_load_handlers
10upsimon 0007785
Merge pull request #49 from 10up/enhancement/add_text_template
10upsimon 59ee419
Merge branch 'enhancement/wp-script-api-strategy-base' of github.com:…
10upsimon 6125283
Merge branch 'trunk' of github.com:10up/wordpress-develop into trunk
10upsimon 71811ab
Merge branch 'trunk' into enhancement/wp-script-api-strategy-base
10upsimon f61d867
Merge branch 'enhancement/implement_load_handlers' into add/issue-48-…
kt-12 90e6105
Merge pull request #51 from 10up/add/issue-48-abort-script-strategy-l…
kt-12 88fe91d
Merge branch 'enhancement/wp-script-api-strategy-base' of github.com:…
10upsimon 82d5ea8
Merge pull request #53 from 10up/trunk
10upsimon 569fd3e
Merge branch 'trunk' of github.com:10up/wordpress-develop into trunk
10upsimon 9eb6336
Merge branch 'trunk' into enhancement/wp-script-api-strategy-base
10upsimon 76b3705
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
joemcgill 1b7ac23
Merge branch 'trunk' into feature/enhance-wp-scripts-api-with-a-loadi…
joemcgill 5114138
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
joemcgill 204ff24
Merge pull request #52 from 10up/enhancement/wp-script-api-strategy-base
10upsimon 2e8cbfa
moving down the code by few lines
kt-12 70aed2d
adding a new line - clean code
kt-12 146499d
add some useful information in comment
kt-12 0be95f2
code readability
kt-12 24003f0
optional in doc type
kt-12 a3baa8d
Update comment text.
kt-12 4945a14
default true
kt-12 f062f0b
standalone optional
kt-12 239ee0b
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
kt-12 626e2bf
default false
kt-12 c3f5898
typo
kt-12 fefe6ee
add line
kt-12 1052b59
add a line for clean code
kt-12 1d7b9bd
add a line
kt-12 b10982d
fixing comment
kt-12 30747d1
add a line for clean code
kt-12 0b393b7
comment language fix.
kt-12 4df050c
$handle is not optional
kt-12 e4c5128
update comment.
kt-12 ae5797b
improve doc block comment
kt-12 90764c8
clean code add a line
kt-12 08ed2d3
add a line
kt-12 97846ba
doc type text update.
kt-12 03cb904
add a line for clean code.
kt-12 a569440
update doc block.
kt-12 5be4ecf
add a line for clean code.
kt-12 5bc5864
add a new line.
kt-12 37eeff9
Update doc block comments
kt-12 9f91ccb
change function name
kt-12 09c4abb
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
kt-12 4e59471
is_valid_script
kt-12 a75c67d
fix grammar
kt-12 bfc27f9
bug fix get_intended_strategy
kt-12 06514c4
return false if invalid strategy used.
kt-12 59d2503
invalid script strategy test
kt-12 fb93f94
script strategy doing it wrong.
kt-12 9804459
in_array with helper function
kt-12 83b2b27
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
10upsimon 286d589
update doc block
kt-12 15dfe0f
typo fix
kt-12 909714e
code cleanup
kt-12 4534440
fix grammar.
kt-12 f5d4b55
fix grammar
kt-12 4be6d42
update comment
kt-12 3385b26
inline type template
kt-12 3b46fe9
hardcode type
kt-12 b1d57ea
function name change
kt-12 5508cf0
placeholder
kt-12 996e018
fix issue
kt-12 654d1e7
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
kt-12 a80156f
Change docblock description for is_non_blocking_strategy method
10upsimon b92f5be
Merge pull request #57 from 10up/enhancement/create-helper-for-delaye…
10upsimon 8549c52
Updated description and param decription within docblock of is_valid_…
10upsimon 281aadc
Merge pull request #56 from 10up/enhancement/add_valid_strategy_function
10upsimon 69f20dd
Merge branch 'feature/enhance-wp-scripts-api-with-a-loading-strategy'…
10upsimon bd4c18c
Handle malicious attempts more robustly
10upsimon 156555d
Return empty string if no strategy set as part of get_intended_strate…
10upsimon e0c60d4
Renamed wp_print_template_loader_script function to wp_print_delayed_…
10upsimon 07ae509
Change let to const within wpLoadAfterScripts as scripts assignment i…
10upsimon 35bc9c7
Replace usage of innerHTML with textContent within wp_print_delayed_i…
10upsimon 2b6155a
Replaced usage of printf with wp_print_inline_script_tag within wp_pr…
10upsimon 3ad9b74
Updated docblock for wp_register_script to indicate change from to
10upsimon 8116c22
Updated docblock for wp_enqueue_script to indicate change from to
10upsimon 6bccf2e
Additon of @since 6.3.0 to docblock for changes to add_inline_script …
10upsimon 213d83d
Added @since 6.3.0 for newly added has_delayed_inline_script function
10upsimon dc9f902
Added @since 6.3.0 for newly added add_data function
10upsimon fd16848
Added @since 6.3.0 for newly added get_normalized_script_args function
10upsimon 1a77dd4
Added @since 6.3.0 for newly added get_dependents function
10upsimon d0e740e
Added @since 6.3.0 for newly added is_valid_strategy function
10upsimon 6801291
Added @since 6.3.0 for newly added get_intended_strategy function
10upsimon dbca402
Added @since 6.3.0 for newly added is_non_blocking_strategy function
10upsimon 17516c7
Added @since 6.3.0 for newly added has_non_standalone_inline_script f…
10upsimon 9813ba8
Added @since 6.3.0 for newly added has_only_deferrable_dependents fun…
10upsimon 0c90511
Added @since 6.3.0 for newly added get_eligible_loading_strategy func…
10upsimon 25db6e8
Added @since 6.3.0 for newly added wp_print_delayed_inline_script_loa…
10upsimon b61fe3d
Remove space prior to command in argument list, causing linting error
10upsimon 343e5ed
Update unit test logic for test_non_standalone_and_standalone_after_s…
10upsimon 79ef56d
Update unit test logic for test_non_standalone_and_standalone_after_s…
10upsimon f75a8d2
Replace double quotes with '"' for certain inline script conditi…
10upsimon 2770ba9
Updates to test suite logic to account for new double quotes and esca…
10upsimon 9d0e68c
Updates to test_non_standalone_after_inline_script_with_defer_main_sc…
10upsimon 3044aa3
Added private var to store a handles dependents against, in order to…
10upsimon 3ca847e
Cleaner output handling within print_inline_script when display condi…
10upsimon edd3d52
Cleanup/optimzation of code within do_item function for inline script…
10upsimon 59324a8
Docblock wording change
10upsimon 6ab9511
Update applicable core calls to wp_register_script() to reflect new f…
10upsimon 5a94bfa
Fix formatting issue causing PHPCS failure
10upsimon 0e120b7
Rewrite function body for wpLoadAfterScripts to be ES5 and not requir…
10upsimon da5668f
Updated function body for wpLoadAfterScripts to reflect updated funct…
10upsimon 9c3ded2
Update js formatting within wpLoadAfterScripts function
10upsimon 3d9d0d8
Update js formatting within wpLoadAfterScripts function used in test …
10upsimon 430e5b2
Updated formatting of wpLoadAfterScripts js function to satisfy WP co…
10upsimon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.