10 | | |
11 | | ---- |
12 | | [https://github.com/WordPress/wordpress.org/pull/186#issuecomment-1867281078 GitHub Comment] |
13 | | |
14 | | > I am not sure how to test this PR 😆 |
15 | | |
16 | | Testing the Trac integrations is never easy :) because of that I don't usually actually test it.. I just do it live 🤠 |
17 | | |
18 | | The part that can be tested though is the PHP in a standalone file, and a Trac admin can edit the existing trac tickets/comments with the new generated text to see how it works. |
19 | | |
20 | | Unfortunately, the link in the PR as-is is a bit.. finicky with Trac.. the Trac linking code gets a bit confused by the { and [ in the link. |
21 | | |
22 | | > The zip file URL used in the comment follows this pattern: |
23 | | > |
24 | | > https://wordpress.org/themes/download/... |
25 | | |
26 | | Ha.. there's no reason that specific link format was used here, other than legacy reasons, it pre-dates downloads.wordpress.org being a "thing", so I'll change that as part of this. |
27 | | |
28 | | > Missing images in the theme unit test data |
29 | | > This is outside of scope for this PR and can be addressed separately if needed. |
30 | | |
31 | | Agreed, this is a change that should be made, but it doesn't need to be done before this is implemented. |
32 | | |
33 | | |
34 | | |
35 | | I'm not 100% sure on the blueprint, the PR used one which doesn't import the test data, so I've used the one from the description, which seems to work. |
36 | | |
37 | | I'm also not 100% sure that hard-coding the blueprint into the Trac tickets is the right way to go, we might be better off having a redirect location like `https://wordpress.org/themes/wp-json/trt/live-preview?slug={$slug}&version={$version}`, but I guess in a way it's good that it's hard-coded, it means that future PHP version changes in the blueprint won't change the url in older tickets, etc.. so I'm just going to hard-code it for now. |