diff --git a/packages/docs/site/docusaurus.config.js b/packages/docs/site/docusaurus.config.js index e9454614d4..1747c6cc34 100644 --- a/packages/docs/site/docusaurus.config.js +++ b/packages/docs/site/docusaurus.config.js @@ -33,7 +33,7 @@ const config = { i18n: { defaultLocale: 'en', path: 'i18n', - locales: ['en', 'es', 'fr', 'ja', 'pt-br'], + locales: ['en', 'es', 'fr', 'ja', 'pt-br', 'tl'], localeConfigs: { en: { label: 'English', @@ -55,6 +55,10 @@ const config = { label: 'Português (BR)', path: 'pt-BR', }, + tl: { + label: 'Tagalog', + path: 'tl', + }, }, }, themes: ['@docusaurus/theme-live-codeblock'], diff --git a/packages/docs/site/i18n/tl/code.json b/packages/docs/site/i18n/tl/code.json new file mode 100644 index 0000000000..a00b63a695 --- /dev/null +++ b/packages/docs/site/i18n/tl/code.json @@ -0,0 +1,472 @@ +{ + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Nabegasyón para sa pahina na listahan ng blog", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Mas bagong mga éntri", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Mas lumang mga éntri", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Nabegasyón para sa page ng blog post", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Mas Bagong Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Mas Lumang Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.tags.tagsPageLink": { + "message": "Tingnan Lahat ng mga Tag", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.DocCard.categoryDescription.plurals": { + "message": "1 item|{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs Pages", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Naraaan", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Sumunod", + "description": "The label used to navigate to the next doc" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "Ito ay hindi pa nailalabas na dokumentasyón para sa bersiyón na {siteTitle} {versionLabel}.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "Ito ay dokumentasyón para sa {siteTitle} {versionLabel} na hindi na aktibong mine-maintain.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "Para sa up-to-date na dokumentasyón, tingnan ang {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "pinakahuling bersiyón", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "I-edit ang page", + "description": "The link label to edit the current page" + }, + "theme.common.headingLinkTitle": { + "message": "Direktang link patungo sa {heading}", + "description": "Title for link to heading" + }, + "theme.lastUpdated.atDate": { + "message": " noong {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " ni {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Huling inapdeyt{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.NotFound.title": { + "message": "Hindi Nahanap ang Pahina", + "description": "The title of the 404 page" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Mga Tag:", + "description": "The label alongside a tag list" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.warning": { + "message": "warning", + "description": "The default label used for the Warning admonition (:::warning)" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Isara", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Kinopya", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Kopyahin ang code sa clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Kopyahin", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.expandCategoryAriaLabel": { + "message": "Expand sidebar category '{label}'", + "description": "The ARIA label to expand the sidebar category" + }, + "theme.DocSidebarItem.collapseCategoryAriaLabel": { + "message": "Collapse sidebar category '{label}'", + "description": "The ARIA label to collapse the sidebar category" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.NotFound.p1": { + "message": "Hindi namin mahanap ang iyong hinananap.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Mangyaring makipag-ugnayan sa may-ari ng site na nag-link sa iyo sa orihinal na URL at sabihin sa kanila na ang kanilang link ay putol.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Basahin Pa", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "Isang minutong basahin|{readingTime} minutong basahin", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Itupî ang sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Itupî ang sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Palakihin ang sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Palakihin ang sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.SearchBar.seeAll": { + "message": "See all {count} results" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "Isang dokumento ang nahanap|{count} na mga dokumento ang nahanap", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Resulta ng paghahanap para sa \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Maghanap sa dokumentasyón", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "I-type and inyong hinahanap dito", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Maghanap", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Paghahanap hatid ng Algolia", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "Walang resultang nahanap", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Kumukuha ng mga bagong resulta...", + "description": "The paragraph for fetching new search results" + }, + "theme.SearchBar.label": { + "message": "Maghanap", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchModal.searchBox.resetButtonTitle": { + "message": "Clear the query", + "description": "The label and ARIA label for search box reset button" + }, + "theme.SearchModal.searchBox.cancelButtonText": { + "message": "Cancel", + "description": "The label and ARIA label for search box cancel button" + }, + "theme.SearchModal.startScreen.recentSearchesTitle": { + "message": "Recent", + "description": "The title for recent searches" + }, + "theme.SearchModal.startScreen.noRecentSearchesText": { + "message": "No recent searches", + "description": "The text when no recent searches" + }, + "theme.SearchModal.startScreen.saveRecentSearchButtonTitle": { + "message": "Save this search", + "description": "The label for save recent search button" + }, + "theme.SearchModal.startScreen.removeRecentSearchButtonTitle": { + "message": "Remove this search from history", + "description": "The label for remove recent search button" + }, + "theme.SearchModal.startScreen.favoriteSearchesTitle": { + "message": "Favorite", + "description": "The title for favorite searches" + }, + "theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle": { + "message": "Remove this search from favorites", + "description": "The label for remove favorite search button" + }, + "theme.SearchModal.errorScreen.titleText": { + "message": "Unable to fetch results", + "description": "The title for error screen of search modal" + }, + "theme.SearchModal.errorScreen.helpText": { + "message": "You might want to check your network connection.", + "description": "The help text for error screen of search modal" + }, + "theme.SearchModal.footer.selectText": { + "message": "to select", + "description": "The explanatory text of the action for the enter key" + }, + "theme.SearchModal.footer.selectKeyAriaLabel": { + "message": "Enter key", + "description": "The ARIA label for the Enter key button that makes the selection" + }, + "theme.SearchModal.footer.navigateText": { + "message": "to navigate", + "description": "The explanatory text of the action for the Arrow up and Arrow down key" + }, + "theme.SearchModal.footer.navigateUpKeyAriaLabel": { + "message": "Arrow up", + "description": "The ARIA label for the Arrow up key button that makes the navigation" + }, + "theme.SearchModal.footer.navigateDownKeyAriaLabel": { + "message": "Arrow down", + "description": "The ARIA label for the Arrow down key button that makes the navigation" + }, + "theme.SearchModal.footer.closeText": { + "message": "to close", + "description": "The explanatory text of the action for Escape key" + }, + "theme.SearchModal.footer.closeKeyAriaLabel": { + "message": "Escape key", + "description": "The ARIA label for the Escape key button that close the modal" + }, + "theme.SearchModal.footer.searchByText": { + "message": "Search by", + "description": "The text explain that the search is making by Algolia" + }, + "theme.SearchModal.noResultsScreen.noResultsText": { + "message": "No results for", + "description": "The text explains that there are no results for the following search" + }, + "theme.SearchModal.noResultsScreen.suggestedQueryText": { + "message": "Try searching for", + "description": "The text for the suggested query when no results are found for the following search" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsText": { + "message": "Believe this query should return results?", + "description": "The text for the question where the user thinks there are missing results" + }, + "theme.SearchModal.noResultsScreen.reportMissingResultsLinkText": { + "message": "Let us know.", + "description": "The text for the link to report missing results" + }, + "theme.SearchModal.placeholder": { + "message": "Search docs", + "description": "The placeholder of the input of the DocSearch pop-up modal" + }, + "theme.IdealImageMessage.loading": { + "message": "Loading...", + "description": "When the full-scale image is loading" + }, + "theme.IdealImageMessage.load": { + "message": "Click to load{sizeMessage}", + "description": "To prompt users to load the full image. sizeMessage is a parenthesized size figure." + }, + "theme.IdealImageMessage.offline": { + "message": "Your browser is offline. Image not loaded", + "description": "When the user is viewing an offline document" + }, + "theme.IdealImageMessage.404error": { + "message": "404. Image not found", + "description": "When the image is not found" + }, + "theme.IdealImageMessage.error": { + "message": "Error. Click to reload", + "description": "When the image fails to load for unknown error" + }, + "theme.Playground.result": { + "message": "Resulta", + "description": "The result label of the live codeblocks" + }, + "theme.Playground.liveEditor": { + "message": "Live na Editor", + "description": "The live editor label of the live codeblocks" + }, + "theme.blog.post.plurals": { + "message": "Isang post|{count} na mga post", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} na may tag na \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.blog.author.pageTitle": { + "message": "{authorName} - {nPosts}", + "description": "The title of the page for a blog author" + }, + "theme.blog.authorsList.pageTitle": { + "message": "Authors", + "description": "The title of the authors page" + }, + "theme.blog.authorsList.viewAll": { + "message": "View All Authors", + "description": "The label of the link targeting the blog authors page" + }, + "theme.blog.author.noPosts": { + "message": "This author has not written any posts yet.", + "description": "The text for authors with 0 blog post" + }, + "theme.contentVisibility.unlistedBanner.title": { + "message": "Unlisted page", + "description": "The unlisted content banner title" + }, + "theme.contentVisibility.unlistedBanner.message": { + "message": "This page is unlisted. Search engines will not index it, and only users having a direct link can access it.", + "description": "The unlisted content banner message" + }, + "theme.contentVisibility.draftBanner.title": { + "message": "Draft page", + "description": "The draft content banner title" + }, + "theme.contentVisibility.draftBanner.message": { + "message": "This page is a draft. It will only be visible in dev and be excluded from the production build.", + "description": "The draft content banner message" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Lumaktaw patungo sa pangunahing content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Mga Tag", + "description": "The title of the tag list page" + } +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-blog/options.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-blog/options.json new file mode 100644 index 0000000000..33d69121c2 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-blog/options.json @@ -0,0 +1,14 @@ +{ + "title": { + "message": "Blog", + "description": "The title for the blog used in SEO" + }, + "description": { + "message": "Blog", + "description": "The description for the blog used in SEO" + }, + "sidebar.title": { + "message": "Recent posts", + "description": "The label for the left sidebar" + } +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current.json new file mode 100644 index 0000000000..bc3e218536 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,54 @@ +{ + "version.label": { + "message": "Susunod", + "description": "The label for version current" + }, + "sidebar.mainSidebar.category.Documentation": { + "message": "Dokumentasyon", + "description": "The label for category Documentation in sidebar mainSidebar" + }, + "sidebar.mainSidebar.category.About Playground": { + "message": "Tungkol sa Playground", + "description": "The label for category About Playground in sidebar mainSidebar" + }, + "sidebar.mainSidebar.category.Guides": { + "message": "Mga Gabay", + "description": "The label for category Guides in sidebar mainSidebar" + }, + "sidebar.mainSidebar.category.Contributing": { + "message": "Kontribusyon", + "description": "The label for category Contributing in sidebar mainSidebar" + }, + "sidebar.blueprintsSidebar.category.Blueprints": { + "message": "Blueprints", + "description": "The label for category Blueprints in sidebar blueprintsSidebar" + }, + "sidebar.blueprintsSidebar.category.Tutorial": { + "message": "Tutorial", + "description": "The label for category Tutorial in sidebar blueprintsSidebar" + }, + "sidebar.blueprintsSidebar.category.Steps": { + "message": "Hakbang", + "description": "The label for category Steps in sidebar blueprintsSidebar" + }, + "sidebar.developersSidebar.category.Developers": { + "message": "Developers", + "description": "The label for category Developers in sidebar developersSidebar" + }, + "sidebar.developersSidebar.category.Local Development": { + "message": "Local Development", + "description": "The label for category Local Development in sidebar developersSidebar" + }, + "sidebar.developersSidebar.category.Playground APIs": { + "message": "Playground APIs", + "description": "The label for category Playground APIs in sidebar developersSidebar" + }, + "sidebar.developersSidebar.category.Javascript API": { + "message": "Javascript API", + "description": "The label for category Javascript API in sidebar developersSidebar" + }, + "sidebar.developersSidebar.category.Architecture": { + "message": "Architecture", + "description": "The label for category Architecture in sidebar developersSidebar" + } +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/01-index.md new file mode 100644 index 0000000000..3accbae0ac --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/01-index.md @@ -0,0 +1,40 @@ +--- +title: Magsimula +slug: /blueprints/getting-started +--- + +# Magsimula sa paggamit ng Mga Blueprint + +Ang mga Blueprint ay mga JSON file para i-setup ang iyong sariling WordPress Playground instance. Halimbawa: + +Mayroong tatlong paraan para gamitin ang Mga Blueprint: + +- [Idikit ang Blueprint sa URL fragment ng WordPress Playground website](/blueprints/using-blueprints#url-fragment) + +- [Gamitin ito sa JavaScript API](/blueprints/using-blueprints#javascript-api) + +- [I-referensya ang JSON file ng Blueprint gamit ang QueryParam `blueprint-url`](/developers/apis/query-api/) + +## Anong mga problema ang nalulutas ng Mga Blueprint? + +### Hindi Kailangan ng Kasanayang Coding + +Ang Mga Blueprint ay nakasulat sa format na JSON. Hindi mo kailangan ng development environment, anumang library, o kahit kaalaman sa JavaScript. Maaari mo itong isulat sa kahit anong text editor. + +Subalit, kung mayroon kang development environment, maganda iyon. Maaari mong gamitin ang [Blueprint JSON schema](https://playground.wordpress.net/blueprint-schema.json) para sa autocomplete at validation. + +### Awtomatikong Pinamamahalaan ang HTTP Requests + +Awtomatikong kino-consume ng Blueprint ang anumang resources na ideklara mo. Hindi mo na kailangang pamahalaan ang maraming `fetch()` calls o hintayin silang matapos. I-declare lang ang ilang links at ang Blueprint na ang bahala sa pag-download at pag-optimize. + +### Maaaring Mag-link sa Preconfigured Playground gamit ang Blueprint + +Dahil puwedeng idikit ang Blueprint sa URL, maaari mong i-embed o i-link ang isang Playground na may partikular na configuration. Halimbawa, kapag kinlik mo ang button na ito, magbubukas ng Playground na may PHP 7.4 at naka-install ang pendant theme: + +### Pinagkakatiwalaan Nang Default + +Ang mga Blueprint ay simpleng JSON. Hindi kailangan ng tiwala para patakbuhin ang Blueprint ng iba. Dahil hindi ito nakakapag-execute ng arbitrary JavaScript, limitado ang kaya nitong gawin. + +### Isusulat Isang Beses at Magagamit Kahit Saan + +Gumagana ang mga Blueprint sa web at sa Node.js. Maaari mo itong patakbuhin sa parehong JavaScript process o sa pamamagitan ng remote Playground client. Universal na wika ng configuration ang Mga Blueprint: kung saan mo man patakbuhin ang Playground, gagana rin ang Blueprint. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/02-using-blueprints.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/02-using-blueprints.md new file mode 100644 index 0000000000..34daffa2f8 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/02-using-blueprints.md @@ -0,0 +1,101 @@ +--- +title: Paggamit ng Blueprint +slug: /blueprints/using-blueprints +--- + +# Paggamit ng Blueprint + +Maaari mong gamitin ang Blueprint sa isa sa mga sumusunod na paraan. + +- Ibigay ito bilang URL fragment sa Playground. +- I-load mula sa URL gamit ang `blueprint-url` na parameter. +- Gumamit ng Blueprint bundle (ZIP file o directory). +- Gumamit ng JavaScript API. + +## URL Fragment + +Ang pinakamadaling paraan para magsimula ay i-paste ang Blueprint sa URL "fragment" ng WordPress Playground website (hal. `https://playground.wordpress.net/#{"preferredVersions...`). + +Halimbawa, para gumawa ng Playground na may partikular na bersyon ng WordPress at PHP, gamitin ang sumusunod na Blueprint: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "preferredVersions": { + "php": "7.4", + "wp": "6.5" + } +} +``` + +Pagkatapos, pumunta sa `https://playground.wordpress.net/#{"preferredVersions":{"php":"7.4","wp":"6.5"}}`. + +Hindi mo kailangang i-paste ang link. Kapag nag-click ka ng "Subukan", awtomatikong tatakbo ang code example. + +### Base64 na naka-encode na Blueprint + +Sa ilang mga tool tulad ng GitHub, maaaring hindi tama ang pag-format ng Blueprint kapag ipinaste sa URL. Sa ganitong kaso, i-encode ang Blueprint sa Base64 at idagdag ito sa URL. Halimbawa, ang Blueprint sa itaas ay ganito ang hitsura sa Base64: `eyIkc2NoZW1hIjogImh0dHBzOi8vcGxheWdyb3VuZC53b3JkcHJlc3MubmV0L2JsdWVwcmludC1zY2hlbWEuanNvbiIsInByZWZlcnJlZFZlcnNpb25zIjogeyJwaHAiOiAiNy40Iiwid3AiOiAiNi41In19`. + +Para patakbuhin ito, pumunta sa https://playground.wordpress.net/#eyIkc2NoZW1hIjogImh0dHBzOi8vcGxheWdyb3VuZC53b3JkcHJlc3MubmV0L2JsdWVwcmludC1zY2hlbWEuanNvbiIsInByZWZlcnJlZFZlcnNpb25zIjogeyJwaHAiOiAiNy40Iiwid3AiOiAiNi41In19 + +:::tip +Sa JavaScript, maaari mong gamitin ang global function na `btoa()` para makuha ang anumang Blueprint JSON sa [Base64 format](https://developer.mozilla.org/en-US/docs/Glossary/Base64#javascript_support). + +Halimbawa: + +```js +const blueprintJson = `{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "preferredVersions": { + "php": "7.4", + "wp": "6.5" + } +}`; +const minifiedBlueprintJson = btoa(blueprintJson); // eyIkc2NoZW1hIjogImh0dHBzOi8vcGxheWdyb3VuZC53b3JkcHJlc3MubmV0L2JsdWVwcmludC1zY2hlbWEuanNvbiIsInByZWZlcnJlZFZlcnNpb25zIjogeyJwaHAiOiAiNy40Iiwid3AiOiAiNi41In19 +``` + +::: + +### I-load ang Blueprint mula sa URL + +Kapag masyado nang mahaba ang iyong Blueprint, maaari mo itong i-load gamit ang `?blueprint-url` query parameter sa URL, ganito: + +[https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/adamziel/blueprints/trunk/blueprints/latest-gutenberg/blueprint.json](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/adamziel/blueprints/trunk/blueprints/latest-gutenberg/blueprint.json) + +Tandaan na ang Blueprint ay dapat publicly accessible at may [tamang `Access-Control-Allow-Origin` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin): + +``` +Access-Control-Allow-Origin: * +``` + +#### Blueprint Bundle + +Sinusuportahan na rin ng `?blueprint-url` parameter ang Blueprint bundles sa ZIP format. Ang Blueprint bundle ay isang ZIP file na may `blueprint.json` sa root at iba pang resources na tinutukoy ng Blueprint. + +Halimbawa, maaari kang mag-load ng Blueprint bundle ng ganito: + +[https://playground.wordpress.net/?blueprint-url=https://example.com/my-blueprint-bundle.zip](https://playground.wordpress.net/?blueprint-url=https://example.com/my-blueprint-bundle.zip) + +Kapag gumagamit ng Blueprint bundle, maaari mong i-refer ang bundled resources gamit ang resource type na `bundled`: + +```json +{ + "landingPage": "/my-file.txt", + "steps": [ + { + "step": "writeFile", + "path": "/wordpress/my-file.txt", + "data": { + "resource": "bundled", + "path": "/bundled-text-file.txt" + } + } + ] +} +``` + +Para sa karagdagang impormasyon tungkol sa Blueprint bundles, tingnan ang [Blueprint Bundles](/blueprints/bundles) na dokumentasyon. + +## JavaScript API + +Maaari mo ring gamitin ang Blueprints sa JavaScript API gamit ang `startPlaygroundWeb()` function mula sa `@wp-playground/client` package. Narito ang isang maliit na halimbawa na maaari mong patakbuhin sa JSFiddle o CodePen: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/03-data-format.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/03-data-format.md new file mode 100644 index 0000000000..5f317c79f1 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/03-data-format.md @@ -0,0 +1,116 @@ +--- +sidebar_position: 1 +title: Blueprint data Format +slug: /blueprints/data-format +--- + +# Blueprint data format + +A Blueprint JSON file can have many different properties that will be used to define your Playground instance. The most important properties are detailed below. + +Here's an example that uses many of them: + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + + + +## JSON schema + +JSON files can be tedious to write and easy to get wrong. To help with that, Playground provides a [JSON schema](https://playground.wordpress.net/blueprint-schema.json) file that you can use to get auto-completion and validation in your editor. Just set the `$schema` property to the following: + +```js +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", +} +``` + +## Landing page + +The `landingPage` property tells Playground which URL to navigate to after the Blueprint has been run. This is a great tool, especially when creating theme or plugin demos. Often, you will want to start Playground in the Site Editor or have a specific post open in the Post Editor. Make sure you use a relative path. + +```js +{ + "landingPage": "/wp-admin/site-editor.php", +} +``` + +## Preferred versions + +The `preferredVersions` property declares your preferred PHP and WordPress versions. It can contain the following properties: + +- `php` (string): Loads the specified PHP version. Accepts `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `8.4`, or `latest`. Minor versions like `7.4.1` are not supported. +- `wp` (string): Loads the specified WordPress version. Accepts the last four major WordPress versions. As of June 1, 2024, that's `6.2`, `6.3`, `6.4`, or `6.5`. You can also use the generic values `latest`, `nightly`, or `beta`. To use a pre-release version of WordPress, `beta` will load the latest beta or release candidate versions of a release cycle (Beta or RC). + +```js +{ + "preferredVersions": { + "php": "8.0", + "wp": "6.5" + }, +} +``` + +## Features + +You can use the `features` property to turn on or off certain features of the Playground instance. It can contain the following properties: + +- `networking`: Defaults to `true`. Enables or disables the networking support for Playground. If enabled, [`wp_safe_remote_get`](https://developer.wordpress.org/reference/functions/wp_safe_remote_get/) and similar WordPress functions will actually use `fetch()` to make HTTP requests. If disabled, they will immediately fail instead. You will need this property enabled if you want the user to be able to install plugins or themes. + +```js +{ + "features": { + "networking": false + }, +} +``` + +## Extra libraries + +You can preload extra libraries into the Playground instance. The following libraries are supported: + +- `wp-cli`: Enables WP-CLI support for Playground. If included, WP-CLI will be installed during boot. If not included, you will get an error message when trying to run WP-CLI commands using the JS API. WP-CLI will be installed by default if the blueprint contains any `wp-cli` steps. + +```js +{ + "extraLibraries": [ "wp-cli" ], +} +``` + +## Steps + +Arguably the most powerful property, `steps` allows you to configure the Playground instance with preinstalled themes, plugins, demo content, and more. The following example logs the user in with a dedicated username and password. It then installs and activates the Gutenberg plugin. [Learn more about steps](/blueprints/steps). + +```js +{ + "steps": [ + { + "step": "login", + "username": "admin", + "password": "password" + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "gutenberg" + } + }, + ] +} +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/04-resources.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/04-resources.md new file mode 100644 index 0000000000..26b8f6a9d6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/04-resources.md @@ -0,0 +1,161 @@ +--- +slug: /blueprints/steps/resources +--- + +# Resources References + +"Resource References" allow you use external files in Blueprints + +:::info +Blueprints steps such as [`installPlugin`](/blueprints/steps#InstallPluginStep) or [`installTheme`](/blueprints/steps#InstallThemeStep) require a location of the plugin or theme to be installed. + +That location can be defined as [a `URL` resource](#urlreference) of the `.zip` file containing the theme or plugin. It can also be defined as a [`wordpress.org/plugins`](#corepluginreference) or [`wordpress.org/themes`](#corethemereference) resource for those plugins/themes published in the official WordPress directories. +::: + +The following resource references are available: + +import TOCInline from '@theme/TOCInline'; + + + +### URLReference + +The `URLReference` resource is used to reference files that are stored on a remote server. The `URLReference` resource is defined as follows: + +```typescript +type URLReference = { + resource: 'url'; + url: string; +}; +``` + +To use the `URLReference` resource, you need to provide the URL of the file. For example, to reference a file named "index.html" that is stored on a remote server, you can create a `URLReference` as follows: + +```json +{ + "resource": "url", + "url": "https://example.com/index.html" +} +``` + +The resource `url` type works really in combination with blueprint steps such as [`installPlugin`](/blueprints/steps#InstallPluginStep) or +[`installTheme`](http://localhost:3000/wordpress-playground/blueprints/steps#InstallThemeStep). +These steps require a `ResourceType` to define the location of the plugin or the theme to install. + +With a `"resource": "url"` we can define the location of a `.zip` containing the plugin/theme via a URL that can point directly to a GitHub repo. + +:::tip +The Playground project provides a [GitHub Proxy](https://playground.wordpress.net/proxy) that allows you to generate a `.zip` from a repository (or even a folder inside a repo) containing your plugin or theme. This tool is very useful for avoiding CORS issues, among others. +::: + +### CoreThemeReference + +The _CoreThemeReference_ resource is used to reference WordPress core themes. The _CoreThemeReference_ resource is defined as follows: + +```typescript +type CoreThemeReference = { + resource: 'wordpress.org/themes'; + slug: string; + version?: string; +}; +``` + +To use the _CoreThemeReference_ resource, you need to provide the slug of the theme. For example, to reference the "Twenty Twenty-One" theme, you can create a _CoreThemeReference_ as follows: + +```json +{ + "resource": "wordpress.org/themes", + "slug": "twentytwentyone" +} +``` + +### CorePluginReference + +The _CorePluginReference_ resource is used to reference WordPress core plugins. The _CorePluginReference_ resource is defined as follows: + +```typescript +type CorePluginReference = { + resource: 'wordpress.org/plugins'; + slug: string; + version?: string; +}; +``` + +To use the _CorePluginReference_ resource, you need to provide the slug of the plugin. For example, to reference the "Akismet" plugin, you can create a _CorePluginReference_ as follows: + +```json +{ + "resource": "wordpress.org/plugins", + "slug": "akismet" +} +``` + +### VFSReference + +The _VFSReference_ resource is used to reference files that are stored in a virtual file system (VFS). The VFS is a file system that is stored in memory and can be used to store files that are not part of the file system of the operating system. The _VFSReference_ resource is defined as follows: + +```typescript +type VFSReference = { + resource: 'vfs'; + path: string; +}; +``` + +To use the _VFSReference_ resource, you need to provide the path to the file in the VFS. For example, to reference a file named "index.html" that is stored in the root of the VFS, you can create a _VFSReference_ as follows: + +```json +{ + "resource": "vfs", + "path": "/index.html" +} +``` + +### LiteralReference + +The _LiteralReference_ resource is used to reference files that are stored as literals in the code. The _LiteralReference_ resource is defined as follows: + +```typescript +type LiteralReference = { + resource: 'literal'; + name: string; + contents: string | Uint8Array; +}; +``` + +To use the _LiteralReference_ resource, you need to provide the name of the file and its contents. For example, to reference a file named "index.html" that contains the text "Hello, World!", you can create a _LiteralReference_ as follows: + +```json +{ + "resource": "literal", + "name": "index.html", + "contents": "Hello, World!" +} +``` + +### BundledReference + +The `BundledReference` resource is used to reference files that are bundled with the Blueprint itself. This is particularly useful for creating self-contained Blueprint bundles that include all necessary resources. The `BundledReference` resource is defined as follows: + +```typescript +type BundledReference = { + resource: 'bundled'; + path: string; +}; +``` + +To use the `BundledReference` resource, you need to provide the relative path to the file within the bundle. For example, to reference a file named "plugin.php" that is bundled with the Blueprint, you can create a `BundledReference` as follows: + +```json +{ + "resource": "bundled", + "path": "plugin.php" +} +``` + +Blueprint bundles can be distributed in various formats, including: + +- ZIP files with a top-level `blueprint.json` file +- Directories containing a `blueprint.json` file and related resources +- Remote URLs where the Blueprint and its resources are hosted together + +For more information on Blueprint bundles, see the [Blueprint Bundles](/blueprints/bundles) documentation. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps-shorthands.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps-shorthands.md new file mode 100644 index 0000000000..3a039907ff --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps-shorthands.md @@ -0,0 +1,129 @@ +--- +slug: /blueprints/steps/shorthands +--- + +# Shorthands + +You can specify some `steps` using a `shorthand` syntax. The following `steps` are currently supported: + +### `login` + +Use + +```json + "login": true, +``` + +Or + +```json +{ + "step": "login", + "username": "admin", + "password": "password" +} +``` + +### `plugins` + +(replaces the `installPlugin` step) + +Use + +```json + "plugins": [ + "hello-dolly", + "https://raw.githubusercontent.com/adamziel/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip" + ] +``` + +Or + +```json +[ + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "hello-dolly" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "url", + "url": "https://raw.githubusercontent.com/adamziel/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip" + } + } +] +``` + +### `siteOptions` + +Use + +```json + "siteOptions": { + "blogname": "My first Blueprint" + } +``` + +Or + +```json + "step": "setSiteOptions", + "options": { + "blogname": "My first Blueprint" + } +``` + +### `defineWpConfigConsts` + +(`constants` only) + +Use + +```json +{ + "step": "defineWpConfigConsts", + "consts": { + "WP_DISABLE_FATAL_ERROR_HANDLER": true, + "WP_DEBUG": true, + "WP_DEBUG_DISPLAY": true + } +} +``` + +Or + +```json + { + "step": "defineWpConfigConsts", + "consts": { + "WP_DISABLE_FATAL_ERROR_HANDLER": true + } + }, + { + "step": "defineWpConfigConsts", + "consts": { + "WP_DEBUG": true + } + }, + { + "step": "defineWpConfigConsts", + "consts": { + "WP_DEBUG_DISPLAY": true + } + } +``` + +--- + +The `shorthand` syntax and the `step` syntax correspond to each other. Every `step` specified with the `shorthand` syntax is added to the top of the `steps` array in arbitrary order. + +:::info **Which should you choose?** + +- Use `shorthands` when **brevity** is your main concern. +- Use explicit `steps` when you need more control over the **execution order**. + +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps.md new file mode 100644 index 0000000000..9e53b3ebf7 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/05-steps.md @@ -0,0 +1,60 @@ +--- +sidebar_position: 3 +slug: /blueprints/steps +--- + +# Steps + +The `steps` property of a Blueprint is an array of steps to run. For example this Blueprint logs the user in as an admin: + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + + + +Each step is an object that contains a `step` property that specifies the type of step to run. The rest of the properties depend on the type of step. Learn and try each step type below. + +The following step-related topics are addressed on dedicated pages included in this section: + +- [Resources References](/blueprints/steps/resources) allow you use external files in Blueprints. + +- Some steps have a shorthand version. Check the [Shorthands](/blueprints/steps/shorthands) section for more information about them. + +- For each step listed below, you'll find both a "Blueprint API" and a "Function API". Refer to the [API Consistency](/blueprints/steps/api-consistency) page for further details. + +:::tip +The [WordPress Playground Step Library](https://akirk.github.io/playground-step-library/#) tool provides a visual interface to drag or click the steps to create a blueprint for WordPress Playground. You can also [create your own steps](https://github.com/akirk/playground-step-library/#contributing)! +::: + +--- + +import BlueprintStep from '@site/src/components/BlueprintsAPI/BlueprintStep'; +import { BlueprintSteps, getStepAPI } from '@site/src/components/BlueprintsAPI/model'; +import UpdateTopLevelToc from '@site/src/components/UpdateTopLevelToc'; + + ({ +value: getStepAPI(name).stepId, +id: name, +level: 2 +})) +} /> + + + {BlueprintSteps.map((name) => ( + <> + +
+ + ))} +
diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/06-bundles.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/06-bundles.md new file mode 100644 index 0000000000..6d5043aaab --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/06-bundles.md @@ -0,0 +1,150 @@ +--- +title: Blueprint Bundles +slug: /blueprints/bundles +--- + +# Blueprint Bundles + +Blueprint bundles are self-contained packages that include a Blueprint declaration (`blueprint.json`) along with all the additional resources required to compile and run it. This makes it easier to distribute and share complete WordPress Playground setups. + +## What are Blueprint Bundles? + +A Blueprint bundle is a collection of files that includes: + +1. A `blueprint.json` file that defines the Blueprint configuration +2. Any additional resources referenced by the Blueprint (themes, plugins, content files, etc.) + +Blueprint bundles can be distributed in various formats: + +- A ZIP file with a top-level `blueprint.json` file and additional resources +- A directory inside a git repository where `blueprint.json` resides alongside other resources +- A local directory on your computer +- An inline JavaScript object with the relevant files inlined + +## Using Blueprint Bundles + +### On the Website + +The WordPress Playground website supports Blueprint bundles through the `?blueprint-url=` query parameter. You can provide a URL to a ZIP file containing your Blueprint bundle: + +``` +https://playground.wordpress.net/?blueprint-url=https://example.com/my-blueprint-bundle.zip +``` + +The ZIP file should contain a `blueprint.json` file at the root level, along with any additional resources referenced by the Blueprint. + +### In the CLI + +The Playground CLI supports Blueprint bundles through the `--blueprint=` option. You can provide: + +- A path to a local directory containing a Blueprint bundle +- A path to a local ZIP file containing a Blueprint bundle +- A URL to a remote Blueprint bundle (http:// or https://) + +For example: + +```bash +# Using a local ZIP file +npx @wp-playground/cli --blueprint=./my-blueprint.zip server + +# Using a remote URL +npx @wp-playground/cli --blueprint=https://example.com/my-blueprint.zip server + +# Using a local directory +npx @wp-playground/cli --blueprint=./my-blueprint-directory server +``` + +By default, the CLI restricts access to local files for security reasons. If your Blueprint needs to access files in the same parent directory, you need to explicitly grant permission using the `--blueprint-may-read-adjacent-files` flag: + +```bash +npx @wp-playground/cli --blueprint=./my-blueprint.json --blueprint-may-read-adjacent-files server +``` + +## Creating Blueprint Bundles + +### Basic Structure + +A basic Blueprint bundle might look like this: + +``` +my-blueprint-bundle/ +├── blueprint.json +├── theme.zip +├── plugin.zip +└── content/ + └── sample-content.wxr +``` + +### Example Blueprint with Bundled Resources + +Here's an example of a `blueprint.json` file that references bundled resources: + +```json +{ + "landingPage": "/my-file.txt", + "steps": [ + { + "step": "writeFile", + "path": "/wordpress/my-file.txt", + "data": { + "resource": "bundled", + "path": "/bundled-text-file.txt" + } + }, + { + "step": "installTheme", + "themeData": { + "resource": "bundled", + "path": "/theme.zip" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "bundled", + "path": "/plugin.zip" + } + }, + { + "step": "importWxr", + "file": { + "resource": "bundled", + "path": "/content/sample-content.wxr" + } + } + ] +} +``` + +In this example, the Blueprint references several bundled resources: + +- A text file at `/bundled-text-file.txt` +- A theme ZIP file at `/theme.zip` +- A plugin ZIP file at `/plugin.zip` +- A WXR content file at `/content/sample-content.wxr` + +### Creating a ZIP Bundle + +To create a ZIP bundle, simply create a directory with your `blueprint.json` and all required resources, then zip it up: + +```bash +# Create a directory for your bundle +mkdir my-blueprint-bundle +cd my-blueprint-bundle + +# Create your blueprint.json and add resources +# ... + +# Zip it up +zip -r ../my-blueprint-bundle.zip . +``` + +## Troubleshooting + +If you encounter issues with Blueprint bundles: + +1. Ensure your `blueprint.json` file is at the root level of your ZIP file +2. Check that all paths in your bundled resource references are correct +3. Verify that your ZIP file is properly formatted +4. When using the CLI, check if you need the `--blueprint-may-read-adjacent-files` flag +5. Ensure all required resources are included in the bundle diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/07-json-api-and-function-api.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/07-json-api-and-function-api.md new file mode 100644 index 0000000000..7c78dba4ff --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/07-json-api-and-function-api.md @@ -0,0 +1,30 @@ +--- +title: API Consistency +slug: /blueprints/steps/api-consistency +--- + +# JSON API and Function API + +Blueprints are defined in JSON format, but the underlying implementation uses JavaScript functions to execute the steps. While JSON is the most convenient way of interacting with Blueprints, you can also use the underlying functions directly. + +JSON is merely a wrapper around the functions. Whether you use the JSON steps or the exported functions, you'll have to provide the same parameters (except for the step name): + +You can use Blueprints both with the web and the node.js versions of WordPress Playground. + +:::info Blueprints version 2 + +The team is exploring ways to transition Blueprints from a TypeScript library to a PHP library. This would allow people to run Blueprints in any WordPress environments: Playground, a hosted site, or a local setup. + +The proposed [new specification](https://github.com/WordPress/blueprints-library/issues/6) is discussed on a separate [GitHub repository](https://github.com/WordPress/blueprints-library/), and you’re more than welcome to join (there or on the [#meta-playground](https://wordpress.slack.com/archives/C04EWKGDJ0K) Slack channel) and help shape the next generation of Playground. +::: + +## Differences between JSON and Function APIs + +There are two main differences between the JSON and Function APIs: + +1. Blueprints handle the progress bar and error reporting for you. The function API requires you to handle these yourself. +2. The function API requires importing the API client library while Blueprints may be just pasted into the URL fragment. + +:::note +Check the [Use the same structure for Blueprint JSON definitions and step handlers](https://github.com/WordPress/wordpress-playground/pull/215) issue at [wordpress-playground](https://github.com/WordPress/wordpress-playground) repo for more detailed info about this topic +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/08-examples.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/08-examples.md new file mode 100644 index 0000000000..c542a85eb2 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/08-examples.md @@ -0,0 +1,298 @@ +--- +sidebar_position: 8 +title: Examples +slug: /blueprints/examples +--- + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + +# Blueprints Examples + +:::tip +Check the [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) to explore real-world code examples of using WordPress Playground to launch a WordPress site with a variety of setups. +::: + +Let's see some cool things you can do with Blueprints. + +## Install a Theme and a Plugin + + + +## Run custom PHP code + + 'Post title', 'post_content' => 'Post content', 'post_status' => 'publish', 'post_author' => 1 )); " + } + ] +}` } +blueprint={{ + "steps": [ + { + "step": "runPHP", + "code": ` 'Post title', +'post_content' => 'Post content', +'post_status' => 'publish', +'post_author' => 1 +)); +` +} +] +}} /> + +## Enable an option on the Gutenberg Experiments page + +Here: Switch on the "new admin views" feature. + + true ) );" + } + ] +}`} +blueprint={{ + "steps": [ + { + "step": "runPHP", + "code": " true ) );" + } + ] +}} /> + +## Showcase a product demo + + + +## Enable networking + + + +## Load PHP code on every request (mu-plugin) + +Use the `writeFile` step to add code to a mu-plugin that runs on every request. + +set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );" + } + ] +}} /> + +## Code editor (as a Gutenberg block) + + 'WordPress Playground block demo!','post_content' => '', 'post_status' => 'publish', 'post_type' => 'post',]);" + } + ] +}} /> + +You can share your own Blueprint examples in [this dedicated wiki](https://github.com/WordPress/wordpress-playground/wiki/Blueprint-examples). + +## Load an older WordPress version + +Playground only ships with a few recent WordPress releases. If you need to use an older version, this Blueprint can help you: change the version number in `"url": "https://playground.wordpress.net/plugin-proxy.php?url=https://wordpress.org/wordpress-5.9.9.zip"` from `5.9.9` to the release you want to load. + +**Note:** the oldest supported WordPress version is `5.9.9`, following the SQLite integration plugin. + + + +## Run WordPress from trunk or a specific commit. + +WordPress Playground can run `trunk` (the latest commit), the HEAD of a specific branch or a specific commit from the [WordPress/WordPress](https://github.com/WordPress/WordPress) GitHub repository. + +You can specify the reference in `"url": "https://playground.wordpress.net/plugin-proxy.php?build-ref=trunk"`. + +To specify the latest commit of a particular branch, you can change the reference to the branch version number, eg `6.6`. To run a specific commit, you can use the commit hash from [WordPress/WordPress](https://github.com/WordPress/WordPress), eg `7d7a52367dee9925337e7d901886c2e9b21f70b6`. + +**Note:** the oldest supported WordPress version is `5.9.9`, following the SQLite integration plugin. + + + +## Using Blueprint Bundles + +Here's an example of a Blueprint that uses bundled resources from a Blueprint bundle: + +```json +{ + "landingPage": "/", + "preferredVersions": { + "php": "8.0", + "wp": "latest" + }, + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "bundled", + "path": "/my-theme.zip" + }, + "activate": true + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "bundled", + "path": "/my-plugin.zip" + }, + "activate": true + }, + { + "step": "writeFile", + "path": "/wordpress/custom-page.html", + "data": { + "resource": "bundled", + "path": "/assets/custom-page.html" + } + } + ] +} +``` + +This Blueprint bundle would be zip file containing the following files: + +- `/blueprint.json` - The blueprint declaration outlined above +- `/my-theme.zip` - A theme package +- `/my-plugin.zip` - A plugin package +- `/assets/custom-page.html` - A custom HTML file + +You can use this Blueprint bundle by: + +1. Creating a ZIP file with these files and the blueprint.json +2. Hosting the ZIP file on a server +3. Loading it with `?blueprint-url=https://example.com/my-blueprint-bundle.zip` + +For more information on Blueprint bundles, see the [Blueprint Bundles](/blueprints/bundles) documentation. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/09-troubleshoot-and-debug-blueprints.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/09-troubleshoot-and-debug-blueprints.md new file mode 100644 index 0000000000..55557f07b6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/09-troubleshoot-and-debug-blueprints.md @@ -0,0 +1,77 @@ +--- +title: Troubleshoot and debug +slug: /blueprints/troubleshoot-and-debug +--- + +# Troubleshoot and debug Blueprints + +When you build Blueprints, you might run into issues. Here are tips and tools to help you debug them: + +## Review Common gotchas + +- Require `wp-load`: to run a WordPress PHP function using the `runPHP` step, you’d need to require [wp-load.php](https://github.com/WordPress/WordPress/blob/master/wp-load.php). So, the value of the `code` key should start with `" JavaScript API > Debugging and testing](/developers/apis/javascript-api/#debugging-and-testing)). Some examples: + +``` +> await playground.isDir("/wordpress/wp-content/plugins") +true +> await playground.listFiles("/wordpress/wp-content/plugins") +(3) ['hello.php', 'index.php', 'WordPress-Importer-master'] +``` + +Full list of methods we can use is available [here](/api/client/interface/PlaygroundClient) + +::: + +## Check for errors in the browser console + +If your Blueprint isn’t running as expected, open the browser developer tools to see if there are any errors. + +To open the developer tools in Chrome, Firefox, Safari\*, and Edge: press `Ctrl + Shift + I` on Windows/Linux or `Cmd + Option + I` on macOS. + +:::caution + +If you haven't yet, enable the Develop menu: go to **Safari > Settings... > Advanced** and check **Show features for web developers**. + +::: + +The developer tools window allows you to inspect network requests, view console logs, debug JavaScript, and examine the DOM and CSS styles applied to your webpage. This is crucial for diagnosing and fixing issues with Blueprints. + +## Log your own error messages + +You can `error_log` your own error messages through [`runPHP` step](/blueprints/steps#RunPHPStep) (see [blueprint example](https://github.com/wordpress/blueprints/blob/trunk/blueprints/reset-data-and-import-content/blueprint.json) and [live demo](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/reset-data-and-import-content/blueprint.json)) and check them from the ["View Logs" option](/web-instance#playground-options-menu) or from the browser's console. + +![Log errors snapshot](./_assets/log-errors.png) + +:::info +When you download your Playground instance as a `zip` through the ["Download as zip" option](/web-instance#playground-options-menu) you'll also download the `debug.log` file containing all the logs from your Playground instance. +::: + +## Ask for help + +The community is here to help! If you have questions or comments, [open a new issue](https://github.com/adamziel/blueprints/issues) in this repository. Remember to include the following details: + +- The Blueprint you’re trying to run. +- The error message you’re seeing, if any. +- The full output from the browser developer tools. +- Any other relevant information that might help us understand the issue: OS, browser version, etc. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-adventurer-theme.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-adventurer-theme.png new file mode 100644 index 0000000000..8fdf9324bf Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-adventurer-theme.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-custom-plugin.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-custom-plugin.png new file mode 100644 index 0000000000..af82d50611 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/installed-custom-plugin.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/log-errors.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/log-errors.png new file mode 100644 index 0000000000..4e97a434b9 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/log-errors.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/schema-autocompletion.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/schema-autocompletion.png new file mode 100644 index 0000000000..b1337c3746 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/_assets/schema-autocompletion.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/intro.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/intro.md new file mode 100644 index 0000000000..613094207e --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/intro.md @@ -0,0 +1,44 @@ +--- +title: Introduction +slug: /blueprints +id: introduction +--- + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + +# Blueprints Docs + +:::tip +Check the [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) to explore real-world code examples of using WordPress Playground to launch a WordPress site with a variety of setups. +::: + +Hi! Welcome to WordPress Playground Blueprints documentation. + +Blueprints are JSON files for setting up your very own WordPress Playground instance. This subsite (Blueprints Docs) is where you will find all the information you need to use Blueprints. + +

The WordPress Playground documentation is distributed across four separate hubs (subsites):

+ +- [**Documentation**](/) – Introduction to WP Playground, starter guides and your entry point to WP Playground Docs. +- 👉 [**Blueprints**](/blueprints) (you're here) – Blueprints are JSON files for setting up your WordPress Playground instance. Learn about their possibilities from this Blueprints docs hub. +- [**Developers**](/developers) – WordPress Playground was created as a programmable tool. Discover all the things you can do with it from your code in the Developers docs hub. +- [**API Reference**](/api) – All the APIs exposed by WordPress Playground + +## Navigating the Blueprints documentation hub + +This docs hub is focused on Blueprints info and is divided into the following major sections: + +- [Getting started with Blueprints](/blueprints/getting-started): Quick Start Guide to setting up a WordPress Playground instance using Blueprint JSON files. + +- [Tutorial - Blueprints 101](/blueprints/tutorial) - Blueprints API crash course. The tutorial will guide you through the complete process of creating a blueprint that loads a theme and plugin (among other things). + +- [Blueprint data Format](/blueprints/data-format): Blueprint JSON files define your Playground instance with various properties. This section highlights the key properties you need to know. + +- [Using Blueprints](/blueprints/using-blueprints): Learn in this section different ways to use Blueprints. + +- [Steps](/blueprints/steps): API Reference of all the available steps that can be set in a blueprint to run tasks such as login, plugin/theme activation, file operations, and more. + +- [Blueprint Bundles](/blueprints/bundles): Learn how to create and use Blueprint bundles - self-contained packages that include a Blueprint and all its resources. + +- [Examples](/blueprints/examples): Compilation of Blueprint examples for various WordPress Playground setups, including installing themes/plugins, running PHP code, enabling features, and loading specific WordPress versions. + +- [Troubleshoot and debug Blueprints](/blueprints/troubleshoot-and-debug): Tips and tools for troubleshooting and debugging Blueprints. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/01-what-are-blueprints-what-you-can-do-with-them.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/01-what-are-blueprints-what-you-can-do-with-them.md new file mode 100644 index 0000000000..212cbab1d1 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/01-what-are-blueprints-what-you-can-do-with-them.md @@ -0,0 +1,66 @@ +--- +title: What are Blueprints? +slug: /blueprints/tutorial/what-are-blueprints-what-you-can-do-with-them +description: Getting started with Blueprints +--- + +# What are Blueprints, and what can you do with them? + +With WordPress Playground you can create a whole website, including plugins, themes, content (posts, pages, taxonomy, and comments), settings (site name, users, permalinks, and more), etc. They allow you to generate a WooCommerce store complete with products, a magazine populated with articles, a corporate blog with multiple users, and more. + +Blueprints are `JSON` files that you can use to configure Playground instances. + +Blueprints support advanced use cases, like file system and database manipulation, and give you fine-grained control over the instance you create. The WordPress Test Team has been using Playground in [the 6.5 beta release cycle](https://wordpress.org/news/2024/03/wordpress-6-5-release-candidate-2/), creating a Blueprint that loads the latest version, several testing plugins, and dummy data. + +## A simple example + +A Blueprint might look something like this: + +```json +{ + "plugins": ["akismet", "gutenberg"], + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "twentynineteen" + } + } + ], + "siteOptions": { + "blogname": "My Blog", + "blogdescription": "Just another WordPress site" + }, + "constants": { + "WP_DEBUG": true + } +} +``` + +The Blueprint above installs the _Akismet_ and _Gutenberg_ plugins and the _Twenty Nineteen_ theme, sets the site name and description, and enables the WordPress debugging mode. + +## The benefits of Blueprints + +Blueprints are an invaluable tool for building WordPress sites via Playground + +- **Flexibility**: developers can make granular adjustments to the build process. +- **Consistency**: ensure that every new site starts with the same configuration. +- **Lightweight**: small text files that are easy to store and transfer. +- **Transparency**: A Blueprint includes all the commands needed to build a snapshot of a WordPress site. You can read through it and understand how the site is built. +- **Productivity**: reduces the time-consuming process of manually setting up a new WordPress site. Instead of installing and configuring themes and plugins for each new project, apply a Blueprint and set everything in one process. +- **Up-to-date dependencies**: fetch the latest version of WordPress, a particular plugin, or a theme. Your snapshot is always up to date with the latest features and security fixes. +- **Collaboration**: the `JSON` files are easy to review in tools like GitHub. Share Blueprints with your team or the WordPress community. Allowing others to use your well-configured setup. +- **Experimentation and Learning**: For those new to WordPress or looking to experiment with different configurations, Blueprints provide a safe and easy way to try new setups without "breaking" a live site. +- **WordPress.org integration**: offer a [demo of your plugin](https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/) in the WordPress plugin directory, or a preview in a [Theme Trac ticket](https://meta.trac.wordpress.org/ticket/7382). +- **Spinning a development environment**: A new developer in the team could download the Blueprint, run a hypothetical `wp up` command, and get a fresh developer environments—loaded with everything they need. The entire CI/CD process can reuse the same Blueprint. + +:::info **More Resources** +Visit these links to learn more about the (endless) possibilities of Blueprints: + +- [Introduction to WordPress Playground](https://developer.wordpress.org/news/2024/04/05/introduction-to-playground-running-wordpress-in-the-browser/) +- Embed a pre-configured WordPress site in your website using the [WordPress Playground Block](https://wordpress.org/plugins/interactive-code-block/). +- [Blueprints examples](/blueprints/examples) +- [Demos and apps built with Blueprints](/resources#apps-built-with-wordpress-playground) + +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/02-how-to-load-run-blueprints.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/02-how-to-load-run-blueprints.md new file mode 100644 index 0000000000..5db5233b55 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/02-how-to-load-run-blueprints.md @@ -0,0 +1,47 @@ +--- +title: How to run Blueprints +slug: /blueprints/tutorial/how-to-load-run-blueprints +description: Learn about the multiple ways to use blueprints +--- + +# How to load and run Blueprints + +## URL fragment + +The fastest way to run Blueprints is to paste one into the URL "fragment" of a WordPress Playground website. Just add a `#` after the `.net/`. + +Let's say you want to create a Playground with specific versions of WordPress and PHP using the following Blueprint: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "preferredVersions": { + "php": "7.4", + "wp": "5.9" + } +} +``` + +To run it, go to `https://playground.wordpress.net/#{"preferredVersions": {"php":"7.4", "wp":"5.9"}}`. You can also use the button below: + +[   Run Blueprint   ](https://playground.wordpress.net/#{"preferredVersions":{"php":"7.4","wp":"5.9"}}) + +Use this method to run the example code in the next chapter, [**Build your first Blueprint**](/blueprints/tutorial/build-your-first-blueprint). + +### Base64 encoded Blueprints + +Some tools, including GitHub, might not format the Blueprint correctly when pasted into the URL. In such cases, [encode your Blueprint in Base64](https://www.base64encode.org) and append it to the URL. For example, that's the above Blueprint in Base64 format: `eyJwcmVmZXJyZWRWZXJzaW9ucyI6IHsicGhwIjoiNy40IiwgIndwIjoiNS45In19`. + +To run it, go to [https://playground.wordpress.net/#eyJwcmVmZXJyZWRWZXJzaW9ucyI6IHsicGhwIjoiNy40IiwgIndwIjoiNS45In19](https://playground.wordpress.net/#eyJwcmVmZXJyZWRWZXJzaW9ucyI6IHsicGhwIjoiNy40IiwgIndwIjoiNS45In19) + +### Load Blueprint from a URL + +When your Blueprint gets too wieldy, you can load it via the `?blueprint-url` query parameter in the URL, like this: + +[https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/latest-gutenberg/blueprint.json](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/latest-gutenberg/blueprint.json) + +Note that the Blueprint must be publicly accessible and served with [the correct `Access-Control-Allow-Origin` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin): + +``` +Access-Control-Allow-Origin: * +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/03-build-your-first-blueprint.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/03-build-your-first-blueprint.md new file mode 100644 index 0000000000..8e0473ea2a --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/03-build-your-first-blueprint.md @@ -0,0 +1,417 @@ +--- +title: Build your first Blueprint +slug: /blueprints/tutorial/build-your-first-blueprint +description: Six steps to your first blueprint +--- + +Let's build an elementary Blueprint that + +1. Creates a new WordPress site +2. Sets the site title to "My first Blueprint" +3. Installs the _Adventurer_ theme +4. Installs the _Hello Dolly_ plugin from the WordPress plugin directory +5. Installs a custom plugin +6. Changes the site content + +## 1. Create a new WordPress site + +Let's start by creating a `blueprint.json` file with the following contents: + +```json +{} +``` + +It may seem like nothing is happening, but this Blueprint already spins up a WordPress site with the latest major version. + +[   Run Blueprint   ](https://playground.wordpress.net/#{}) + +:::tip **Autocomplete** + +If you use an IDE, like VS Code or PHPStorm, you can use the [Blueprint JSON Schema](https://playground.wordpress.net/blueprint-schema.json) for an autocompleted Blueprint development experience. Add the following line at the top of your `blueprint.json` file: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json" +} +``` + +::: +Here's what it looks like in VS Code: + +![Autocompletion visualized](../_assets/schema-autocompletion.png) + +## 2. Set the site title to "My first Blueprint" + +Blueprints consist of a series of [steps](/blueprints/steps) that define how to build a WordPress site. Before you write the first step, declare an empty list of steps: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "steps": [] +} +``` + +This Blueprint isn't very exciting—it creates the same default site as the empty Blueprint above. Let's do something about it! + +WordPress stores the site title in the `blogname` option. Add your first step and set that option to "My first Blueprint": + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "steps": [ + { + "step": "setSiteOptions", + "options": { + "blogname": "My first Blueprint" + } + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#https://playground.wordpress.net/#eyIkc2NoZW1hIjoiaHR0cHM6Ly9wbGF5Z3JvdW5kLndvcmRwcmVzcy5uZXQvYmx1ZXByaW50LXNjaGVtYS5qc29uIiwic3RlcHMiOlt7InN0ZXAiOiJzZXRTaXRlT3B0aW9ucyIsIm9wdGlvbnMiOnsiYmxvZ25hbWUiOiJNeSBmaXJzdCBCbHVlcHJpbnQifX1dfQ==) + +The [`setSiteOptions` step](/blueprints/steps#SetSiteOptionsStep) specifies the site options in the WordPress database. The `options` object contains the key-value pairs to set. In this case, you changed the value of the `blogname` key to "My first Blueprint". You can read more about all available steps in the [Blueprint Steps API Reference](/blueprints/steps). + +### Shorthands + +You can specify some steps using a shorthand syntax. For example, you could write the `setSiteOptions` step like this: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "siteOptions": { + "blogname": "My first Blueprint" + } +} +``` + +The shorthand syntax and the step syntax correspond with each other. Every step specified with the shorthand syntax is automatically added at the beginning of the `steps` array in an arbitrary order. Which should you choose? Use shorthands when brevity is your main concern, use steps when you need more control over the order of execution. + +## 3. Install the _Adventurer_ theme + +Adventurer is an open-source theme [available in the WordPress theme directory](https://wordpress.org/themes/adventurer/). Let's install it using the [`installTheme` step](/blueprints/steps#InstallThemeStep): + +```json +{ + "siteOptions": { + "blogname": "My first Blueprint" + }, + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#eyIkc2NoZW1hIjoiaHR0cHM6Ly9wbGF5Z3JvdW5kLndvcmRwcmVzcy5uZXQvYmx1ZXByaW50LXNjaGVtYS5qc29uIiwib3B0aW9ucyI6eyJibG9nbmFtZSI6Ik15IGZpcnN0IEJsdWVwcmludCJ9LCJzdGVwcyI6W3sic3RlcCI6Imluc3RhbGxUaGVtZSIsInRoZW1lWmlwRmlsZSI6eyJyZXNvdXJjZSI6IndvcmRwcmVzcy5vcmcvdGhlbWVzIiwic2x1ZyI6ImFkdmVudHVyZXIifX1dfQ==) + +The site should now look like the screenshot below: + +![Site with the adventurer theme](../_assets/installed-adventurer-theme.png) + +### Resources + +The `themeData` defines a [resource](/blueprints/steps/resources) and referrences an external file required to complete the step. Playground supports different types of resources, including + +- `url`, +- `wordpress.org/themes`, +- `wordpress.org/plugins`, +- `vfs`(virtual file system), or +- `literal`. + +The example uses the `wordpress.org/themes` resource, which requires a `slug` identical to the one used in WordPress theme directory: + +In this case, `https://wordpress.org/themes//` becomes `https://wordpress.org/themes/adventurer/`. + +:::note +Learn more about the supported resources in the [Blueprint Resources API Reference](/blueprints/steps/resources/). +::: + +## 4. Install the _Hello Dolly_ plugin + +A classic WordPress plugin that displays random lyrics from the song "Hello, Dolly!" in the admin dashboard. Let's install it using the [`installPlugin` step](/blueprints/steps#InstallPluginStep): + +```json +{ + "siteOptions": { + "blogname": "My first Blueprint" + }, + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "hello-dolly" + } + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#eyJzaXRlT3B0aW9ucyI6eyJibG9nbmFtZSI6Ik15IGZpcnN0IEJsdWVwcmludCJ9LCJzdGVwcyI6W3sic3RlcCI6Imluc3RhbGxUaGVtZSIsInRoZW1lWmlwRmlsZSI6eyJyZXNvdXJjZSI6IndvcmRwcmVzcy5vcmcvdGhlbWVzIiwic2x1ZyI6ImFkdmVudHVyZXIifX0seyJzdGVwIjoiaW5zdGFsbFBsdWdpbiIsInBsdWdpblppcEZpbGUiOnsicmVzb3VyY2UiOiJ3b3JkcHJlc3Mub3JnL3BsdWdpbnMiLCJzbHVnIjoiaGVsbG8tZG9sbHkifX1dfQ==) + +The Hello Dolly plugin is now installed and activated. + +Like the `themeData`, the `pluginData` defines a reference to an external file required for the step. The example uses the `wordpress.org/plugins` resource to install the plugin with the matching `slug` from the WordPress plugin directory. + +## 5. Install a custom plugin + +Let's install a custom WordPress plugin that adds a message to the admin dashboard: + +```php +Hello from My Custom Plugin!'; +} + +add_action('admin_notices', 'my_custom_plugin'); +``` + +You can use the [installPlugin](/blueprints/steps#InstallPluginStep), but that requires creating a ZIP file. Let's start with something different to see if the plugin works: + +1. Create a `wp-content/plugins/hello-from-the-dashboard` directory using the [`mkdir` step](/blueprints/steps#MkdirStep). +2. Write a `plugin.php` file using the [`writeFile` step](/blueprints/steps#WriteFileStep). +3. Activate the plugin using the [`activatePlugin` step](/blueprints/steps#ActivatePluginStep). + +Here's what that looks like in a Blueprint: + +```json +{ + // ... + "steps": [ + // ... + { + "step": "mkdir", + "path": "/wordpress/wp-content/plugins/hello-from-the-dashboard" + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/plugins/hello-from-the-dashboard/plugin.php", + "data": "Hello from My Custom Plugin!';\n}\n\nadd_action('admin_notices', 'my_custom_plugin');" + }, + { + "step": "activatePlugin", + "pluginPath": "hello-from-the-dashboard/plugin.php" + } + ] +} +``` + +The last thing to do is log the user in as an admin. You can do that with a shorthand of the [`login` step](/blueprints/steps#LoginStep): + +```json +{ + "login": true, + "steps": { + // ... + } +} +``` + +Here's the complete Blueprint: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "login": true, + "siteOptions": { + "blogname": "My first Blueprint" + }, + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "hello-dolly" + } + }, + { + "step": "mkdir", + "path": "/wordpress/wp-content/plugins/hello-from-the-dashboard" + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/plugins/hello-from-the-dashboard/plugin.php", + "data": "Hello from My Custom Plugin!';\n}\n\nadd_action('admin_notices', 'my_custom_plugin');" + }, + { + "step": "activatePlugin", + "pluginPath": "hello-from-the-dashboard/plugin.php" + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#eyJsb2dpbiI6dHJ1ZSwic2l0ZU9wdGlvbnMiOnsiYmxvZ25hbWUiOiJNeSBmaXJzdCBCbHVlcHJpbnQifSwic3RlcHMiOlt7InN0ZXAiOiJpbnN0YWxsVGhlbWUiLCJ0aGVtZVppcEZpbGUiOnsicmVzb3VyY2UiOiJ3b3JkcHJlc3Mub3JnL3RoZW1lcyIsInNsdWciOiJhZHZlbnR1cmVyIn19LHsic3RlcCI6Imluc3RhbGxQbHVnaW4iLCJwbHVnaW5aaXBGaWxlIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy9wbHVnaW5zIiwic2x1ZyI6ImhlbGxvLWRvbGx5In19LHsic3RlcCI6Im1rZGlyIiwicGF0aCI6Ii93b3JkcHJlc3Mvd3AtY29udGVudC9wbHVnaW5zL2hlbGxvLW9uLXRoZS1kYXNoYm9hcmQifSx7InN0ZXAiOiJ3cml0ZUZpbGUiLCJwYXRoIjoiL3dvcmRwcmVzcy93cC1jb250ZW50L3BsdWdpbnMvaGVsbG8tb24tdGhlLWRhc2hib2FyZC9wbHVnaW4ucGhwIiwiZGF0YSI6Ijw/cGhwXG4vKlxuUGx1Z2luIE5hbWU6IFwiSGVsbG9cIiBvbiB0aGUgRGFzaGJvYXJkXG5EZXNjcmlwdGlvbjogQSBjdXN0b20gcGx1Z2luIHRvIHNob3djYXNlIFdvcmRQcmVzcyBCbHVlcHJpbnRzXG5WZXJzaW9uOiAxLjBcbkF1dGhvcjogV29yZFByZXNzIENvbnRyaWJ1dG9yc1xuKi9cblxuZnVuY3Rpb24gbXlfY3VzdG9tX3BsdWdpbigpIHtcbiAgICBlY2hvICc8aDE+SGVsbG8gZnJvbSBNeSBDdXN0b20gUGx1Z2luITwvaDE+Jztcbn1cblxuYWRkX2FjdGlvbignYWRtaW5fbm90aWNlcycsICdteV9jdXN0b21fcGx1Z2luJyk7In0seyJzdGVwIjoiYWN0aXZhdGVQbHVnaW4iLCJwbHVnaW5QYXRoIjoiaGVsbG8tb24tdGhlLWRhc2hib2FyZC9wbHVnaW4ucGhwIn1dfQ==) + +That's what it looks like when you navigate to the dashboard: + +![Site with the custom plugin](../_assets/installed-custom-plugin.png) + +### Create a plugin and zip it + +Encoding PHP files as `JSON` can be useful for quick testing, but it's inconvenient and difficult to read. Instead, create a file with the plugin code, compress it, and use the `ZIP` file as the `resource` in the [`installPlugin` step](/blueprints/steps#InstallPluginStep) to install it (the path in the `URL` should match the one in your GitHub repository): + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "login": true, + "siteOptions": { + "blogname": "My first Blueprint" + }, + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "hello-dolly" + } + }, + { + "step": "installPlugin", + "pluginData": { + "resource": "url", + "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip" + } + } + ] +} +``` + +You can shorten that Blueprint even more using the shorthand syntax: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "login": true, + "siteOptions": { + "blogname": "My first Blueprint" + }, + "plugins": ["hello-dolly", "https://raw.githubusercontent.com/wordpress/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip"], + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#eyIkc2NoZW1hIjoiaHR0cHM6Ly9wbGF5Z3JvdW5kLndvcmRwcmVzcy5uZXQvYmx1ZXByaW50LXNjaGVtYS5qc29uIiwibG9naW4iOnRydWUsInNpdGVPcHRpb25zIjp7ImJsb2duYW1lIjoiTXkgZmlyc3QgQmx1ZXByaW50In0sInBsdWdpbnMiOlsiaGVsbG8tZG9sbHkiLCJodHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vYWRhbXppZWwvYmx1ZXByaW50cy90cnVuay9kb2NzL2hlbGxvLW9uLXRoZS1kYXNoYm9hcmQuemlwIl0sInN0ZXBzIjpbeyJzdGVwIjoiaW5zdGFsbFRoZW1lIiwidGhlbWVaaXBGaWxlIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy90aGVtZXMiLCJzbHVnIjoiYWR2ZW50dXJlciJ9fV19) + +## 6. Change the site content + +Finally, let's delete the default content of the site and import a new one from a WordPress export file (WXR). + +### Delete the old content + +There isn't a Blueprint step to delete the default content, but you can do that with a snippet of PHP code: + +```php + -1, + 'post_type' => array('post', 'page'), + 'post_status' => 'any' +)); + +foreach ($posts as $post) { + wp_delete_post($post->ID, true); +} +``` + +To run that code during the site setup, use the [`runPHP` step](/blueprints/steps#RunPHPStep): + +```json +{ + // ... + "steps": [ + // ... + { + "step": "runPHP", + "code": " -1,\n 'post_type' => array('post', 'page'),\n 'post_status' => 'any'\n));\n\nforeach ($posts as $post) {\n wp_delete_post($post->ID, true);\n}" + } + ] +} +``` + +### Import the new content + +Let's use the [`importWxr` step](/blueprints/steps#ImportWXRStep) to import a WordPress export (`WXR`) file that helps test WordPress themes. The file is available in the [WordPress/theme-test-data](https://github.com/WordPress/theme-test-data) repository, and you can access it via its `raw.githubusercontent.com` address: [https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xml](https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xml). + +Here's what the final Blueprint looks like: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "login": true, + "siteOptions": { + "blogname": "My first Blueprint" + }, + "plugins": ["hello-dolly", "https://raw.githubusercontent.com/wordpress/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip"], + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "adventurer" + } + }, + { + "step": "runPHP", + "code": " -1,\n 'post_type' => array('post', 'page'),\n 'post_status' => 'any'\n));\n\nforeach ($posts as $post) {\n wp_delete_post($post->ID, true);\n}" + }, + { + "step": "importWxr", + "file": { + "resource": "url", + "url": "https://raw.githubusercontent.com/WordPress/theme-test-data/master/themeunittestdata.wordpress.xml" + } + } + ] +} +``` + +[   Run Blueprint   ](https://playground.wordpress.net/#eyIkc2NoZW1hIjoiaHR0cHM6Ly9wbGF5Z3JvdW5kLndvcmRwcmVzcy5uZXQvYmx1ZXByaW50LXNjaGVtYS5qc29uIiwibG9naW4iOnRydWUsInNpdGVPcHRpb25zIjp7ImJsb2duYW1lIjoiTXkgZmlyc3QgQmx1ZXByaW50In0sInBsdWdpbnMiOlsiaGVsbG8tZG9sbHkiLCJodHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vYWRhbXppZWwvYmx1ZXByaW50cy90cnVuay9kb2NzL2Fzc2V0cy9oZWxsby1mcm9tLXRoZS1kYXNoYm9hcmQuemlwIl0sInN0ZXBzIjpbeyJzdGVwIjoiaW5zdGFsbFRoZW1lIiwidGhlbWVaaXBGaWxlIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy90aGVtZXMiLCJzbHVnIjoiYWR2ZW50dXJlciJ9fSx7InN0ZXAiOiJydW5QSFAiLCJjb2RlIjoiPD9waHBcbnJlcXVpcmUgJy93b3JkcHJlc3Mvd3AtbG9hZC5waHAnO1xuXG4kcG9zdHMgPSBnZXRfcG9zdHMoYXJyYXkoXG4gICAgJ251bWJlcnBvc3RzJyA9PiAtMSxcbiAgICAncG9zdF90eXBlJyA9PiBhcnJheSgncG9zdCcsICdwYWdlJyksXG4gICAgJ3Bvc3Rfc3RhdHVzJyA9PiAnYW55J1xuKSk7XG5cbmZvcmVhY2ggKCRwb3N0cyBhcyAkcG9zdCkge1xuICAgIHdwX2RlbGV0ZV9wb3N0KCRwb3N0LT5JRCwgdHJ1ZSk7XG59In0seyJzdGVwIjoiaW1wb3J0V3hyIiwiZmlsZSI6eyJyZXNvdXJjZSI6InVybCIsInVybCI6Imh0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9Xb3JkUHJlc3MvdGhlbWUtdGVzdC1kYXRhL21hc3Rlci90aGVtZXVuaXR0ZXN0ZGF0YS53b3JkcHJlc3MueG1sIn19XX0=) + +And that's it. Congratulations on creating your first Blueprint! 🥳 diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/index.md new file mode 100644 index 0000000000..02b0aa5e21 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/blueprints/tutorial/index.md @@ -0,0 +1,18 @@ +--- +title: Blueprints 101 +description: Entrance to a short course on Blueprints +hide_table_of_contents: false +slug: /blueprints/tutorial +--- + +# Blueprints 101 - A crash course + +Welcome to a Blueprints crash course, where you'll find everything you need to know about Blueprints: what they are, how to create them, and how to use them effectively. + +1. [What are Blueprints, and what can you do with them?](/blueprints/tutorial/what-are-blueprints-what-you-can-do-with-them) +2. [How to load and run Blueprints](/blueprints/tutorial/how-to-load-run-blueprints) +3. [Build your first Blueprint](/blueprints/tutorial/build-your-first-blueprint) + +:::tip +If you encounter any issues while following this tutorial, refer to the [Troubleshoot and debug Blueprints](/blueprints/troubleshoot-and-debug) section for tips and tools to help you solve them. +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/03-build-an-app/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/03-build-an-app/01-index.md new file mode 100644 index 0000000000..076e5217c2 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/03-build-an-app/01-index.md @@ -0,0 +1,202 @@ +--- +title: Quick Start Guide for Developers +slug: /developers/build-your-first-app +--- + +# Quick Start Guide for Developers + +WordPress Playground was created as a programmable tool. Below you'll find a few examples of what you can do with it. Each discussed API is described in detail in the [APIs section](/developers/apis/): + +import TOCInline from '@theme/TOCInline'; + + + +## Embed WordPress on your website + +Playground can be embedded on your website using the HTML ` +``` + +Every visitor will get their own private WordPress instance for free. You can then customize it using one of the [Playground APIs](/developers/apis/). + +import PlaygroundWpNetWarning from '@site/docs/\_fragments/\_playground_wp_net_may_stop_working.md'; + + + +## Control the embedded website + +WordPress Playground provides three APIs you can use to control the iframed website. All the examples in this section are built using one of these: + +import APIList from '@site/docs/\_fragments/\_api_list.mdx'; + + + +Learn more about each of these APIs in the [APIs overview section](/developers/apis/). + +## Showcase a plugin or theme from WordPress directory + +import ThisIsQueryApi from '@site/docs/\_fragments/\_this_is_query_api.md'; + +You can install plugins and themes from the WordPress directory with only URL parameters. For example this iframe would come with the `coblocks` and `friends` plugins preinstalled as well as the `pendant` theme. + + + +```html + +``` + +## Showcase any plugin or theme + +What if your plugin is not in the WordPress directory? + +You can still showcase it on Playground by using [JSON Blueprints](/blueprints). For example, this Blueprint would download and install a plugin and a theme from your website and also import some starter content: + +```json +{ + "steps": [ + { + "step": "installPlugin", + "pluginData": { + "resource": "url", + "url": "https://your-site.com/your-plugin.zip" + } + }, + { + "step": "installTheme", + "themeData": { + "resource": "url", + "url": "https://your-site.com/your-theme.zip" + } + }, + { + "step": "importWxr", + "pluginData": { + "resource": "url", + "url": "https://your-site.com/starter-content.wxr" + } + } + ] +} +``` + +See [getting started with Blueprints](/blueprints/getting-started) to learn more. + +## Preview pull requests from your repository + +See the [live example of Gutenberg PR previewer](https://playground.wordpress.net/gutenberg.html). + +You can use Playground as a Pull Request previewer if: + +- Your WordPress plugin or theme uses a CI pipeline +- Your CI pipeline bundles your plugin or theme +- You can expose the zip file generated by your CI pipeline publicly + +Those zip bundles aren't any different from regular WordPress Plugins, which means you can install them in Playground using the [JSON Blueprints](/blueprints) API. Once you exposed an endpoint like https://your-site.com/pull-request-1234.zip, the following Blueprint will do the rest: + +```json +{ + "steps": [ + { + "step": "installPlugin", + "pluginData": { + "resource": "url", + "url": "https://your-site.com/pull-request-1234.zip" + } + } + ] +} +``` + +The official Playground demo uses this technique to preview pull requests from the Gutenberg repository: + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + + + +## Build a compatibility testing environment + +A live plugin demo with a configurable PHP and WordPress makes an excellent compatibility testing environment. + +With the Query API, you'd simply add the `php` and `wp` query parameters to the URL: + +```html + +``` + +With JSON Blueprints, you'd use the `preferredVersions` property: + +```json +{ + "preferredVersions": { + "php": "7.4", + "wp": "6.1" + } +} +``` + +## Run PHP code in the browser + +The JavaScript API provides the `run()` method which you can use to run PHP code in the browser: + +```html + + +``` + +Combine that with a code editor like Monaco or CodeMirror, and you'll get live code snippets like in [this article](https://adamadam.blog/2023/02/16/how-to-modify-html-in-a-php-wordpress-plugin-using-the-new-tag-processor-api/)! diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/01-wp-now.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/01-wp-now.md new file mode 100644 index 0000000000..5a63e821ef --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/01-wp-now.md @@ -0,0 +1,50 @@ +--- +title: wp-now +slug: /developers/local-development/wp-now +--- + +# wp-now NPM package + +[wp-now](https://www.npmjs.com/package/@wp-now/wp-now) is a command-line tool designed to simplify the process of running WordPress locally. It provides a quick and easy way to set up a local WordPress environment with minimal configuration. + +Key Features: + +- **Command-line Interface**: Easy to use for developers comfortable with CLI. +- **Quick Setup**: Set up a local WordPress environment in seconds. +- **Customizable**: Allows for configuration to suit specific development needs. + +[`@wp-now/wp-now`](https://www.npmjs.com/package/@wp-now/wp-now) is a CLI tool to spin up a WordPress site with a single command. Similarly to the [VS Code extension](/developers/local-development/vscode-extension), it uses a portable WebAssembly version of PHP and SQLite. No Docker, MySQL, or Apache are required. + +:::info **Documentation** + +`wp-now` is maintained in a different GitHub repository, [Playground Tools](https://github.com/WordPress/playground-tools/). You can find the latest documentation in the [dedicated README file](https://github.com/WordPress/playground-tools/blob/trunk/packages/wp-now/README.md). + +::: + +## Launch wp-now in a plugin or theme directory + +Navigate to your plugin or theme directory and start `wp-now` with the following commands: + +```bash +cd my-plugin-or-theme-directory +npx @wp-now/wp-now start +``` + +## Launch wp-now in the `wp-content` directory with options + +You can also start `wp-now` from any `wp-content` folder. The following example passes parameters for changing the PHP and WordPress versions and loading a blueprint file. + +```bash +cd my-wordpress-folder/wp-content +npx @wp-now/wp-now start --wp=6.4 --php=8.0 --blueprint=path/to/blueprint.json +``` + +## Install wp-now globally + +Alternatively, you can install `@wp-now/wp-now` globally to load it from any directory: + +```bash +npm install -g @wp-now/wp-now +cd my-plugin-or-theme-directory +wp-now start +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/02-vscode-extension.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/02-vscode-extension.md new file mode 100644 index 0000000000..520f46fb50 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/02-vscode-extension.md @@ -0,0 +1,31 @@ +--- +slug: /developers/local-development/vscode-extension +--- + +# VS Code extension + +Start a zero-setup development environment using the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground), and develop your plugin or theme locally without installing Apache or MySQL. + +Key Features: + +- **Integrated Development**: Develop WordPress sites directly within VS Code. +- **Ease of Use**: Simplifies the development workflow with integrated tools. + +:::info **Documentation** + +The VS Code extension is maintained in a different GitHub repository, [Playground Tools](https://github.com/WordPress/playground-tools/). You can find the latest documentation in the [dedicated README file](https://github.com/WordPress/playground-tools/blob/trunk/packages/vscode-extension/README.md). + +::: + +## Installation and Usage: + +1. **Install the Extension**: Search for “WordPress Playground” in the VS Code extensions marketplace and install it. +2. **Setup**: Follow the setup instructions provided in the extension to configure your development environment. +3. **Develop and Debug**: Use the integrated tools to develop and debug your WordPress site. + +The extension ships with a portable WebAssembly version of PHP and sets up WordPress to use SQLite. Once installed, all you have to do is click the **Start WordPress Server** button in VS Code: + +import Image from '@theme/IdealImage'; +import vsCodeScreenshot from '@site/static/img/start-wordpress-server.png'; + +
diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/03-php-wasm-node.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/03-php-wasm-node.md new file mode 100644 index 0000000000..cc75499dc2 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/03-php-wasm-node.md @@ -0,0 +1,20 @@ +--- +title: php-wasm/node +slug: /developers/local-development/php-wasm-node +--- + +# Using WordPress Playground in Node.js + +As a WebAssembly project, you can also use WordPress Playground in Node.js. + +If you need low-level control over the underlying WebAssembly PHP build, take a look at the [`@php-wasm/node` package](https://npmjs.org/@php-wasm/node) which ships the PHP WebAssembly runtime. This package is at the core of all WordPress Playground tools for Node.js. + +:::info **API reference** + +Consult the [complete list](/api/node) of Classes, Functions, Interfaces, and Type Aliases. + +::: + +import PHPWASMNode from '@php-wasm/node/\README.md'; + + diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/_category_.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/_category_.json new file mode 100644 index 0000000000..2db6aaf32f --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Local Development" +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/intro.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/intro.md new file mode 100644 index 0000000000..bc83bacbd8 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/05-local-development/intro.md @@ -0,0 +1,20 @@ +--- +title: Local Development +slug: /developers/local-development +--- + +## Local Development with WordPress Playground + +Playground powers offers several development environments designed to streamline the process of setting up and managing WordPress sites. + +The easiest way to get WordPress site up and running is to open a [public Playground web instance](/web-instance) from https://playground.wordpress.net/ (you could also [host your own WordPress Playground](/developers/architecture/host-your-own-playground)). + +Playground provides additional tools to check your code on a local WordPress environment. These tools are designed to enhance the development experience by prioritizing ease of installation and usability: + +- [`wp-now`](/developers/local-development/wp-now) - CLI tool to spin up a WordPress site with a single command + +- [Visual Studio Code Extension](/developers/local-development/vscode-extension) - Integrates WordPress development directly into Visual Studio Code to get a seamless development experience within the popular code editor. + +But Playground also provides tools to use WordPress Playground in Node.js: + +- [WordPress Playground in Node.js](/developers/local-development/php-wasm-node) - If you need low-level control over the underlying WebAssembly PHP build, take a look at the [`@php-wasm/node` package](https://npmjs.org/@php-wasm/node) which ships the PHP WebAssembly runtime. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/01-index.md new file mode 100644 index 0000000000..c8dc18eb7f --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/01-index.md @@ -0,0 +1,154 @@ +--- +title: APIs overview +slug: /developers/apis/ +--- + +import ThisIsQueryApi from '@site/docs/\_fragments/\_this_is_query_api.md'; + +## WordPress Playground APIs overview + +WordPress Playground exposes a few APIs that you can use to interact with the Playground: + +import TOCInline from '@theme/TOCInline'; + + + +### Query API + +Basic operations can be done by adjusting the URL, for example here's how you can preinstall a coblocks plugin: + +[https://playground.wordpress.net/?plugin=coblocks](https://playground.wordpress.net/?plugin=coblocks) + +Or a theme: + +[https://playground.wordpress.net/?theme=pendant](https://playground.wordpress.net/?theme=pendant) + + Once you have a URL that you like, you can embed it in your website using an iframe: + +```html + +``` + +:::info +Check the [Query API](/developers/apis/query-api) section for more info. +::: + +### Blueprints + +If you need more control over your Playground, you can use JSON Blueprints. For example, here's how to create a post and install a plugin: + +import BlueprintExample from '@site/src/components/Blueprints/BlueprintExample.mdx'; + + 'Post title', 'post_content' => 'Post content', 'post_status' => 'publish', 'post_author' => 1)); ?>" + } + ] +}` } +blueprint={{ + "steps": [ + { + "step": "login" + }, + { + step: 'installPlugin', + pluginData: { + resource: 'wordpress.org/plugins', + slug: 'friends', + }, + }, + { + "step": "runPHP", + "code": ` 'Post title', +'post_content' => 'Post content', +'post_status' => 'publish', +'post_author' => 1 +)); +` +} +] +}} /> + +

+ +:::info + +Blueprints play a significant role in WordPress Playground, so they have their own dedicated documentation hub. Learn more about JSON Blueprints at the [Blueprints Docs Hub](/blueprints). + +::: + +### JavaScript API + +The `@wp-playground/client` package provides a JavaScript API you can use to fully control your Playground instance. Here's a very example of what you can do: + +import JSApiShortExample from '@site/docs/\_fragments/\_js_api_short_example.mdx'; + + + +:::info +Check the [JavaScript API](/developers/apis/javascript-api/) section for more info. +::: + +## Playground APIs Concepts + +WordPress Playground in the browser is all about links and iframes. Regardless of which API you choose, you will use it in one of the following ways: + +### Link to the Playground site + +You can customize WordPress Playground by modifying the https://playground.wordpress.net/ link. You can, for example, create a post, request a specific plugin, or run any PHP code. + +To prepare such a link, use either the [Query API](/developers/apis/query-api) (easy) or the [JSON Blueprints API](/blueprints) (medium). + +Once it's ready, simply post it on your site. It makes a great "Try it yourself" button in a tutorial, for example. + +#### Embed in an ` +``` + +To customize that Playground instance, you can: + +- Load it from special link prepared using the [Query API](/developers/apis/query-api) (easy) or the [JSON Blueprints API](/blueprints) (medium). +- Control it using the [JavaScript API](/developers/apis/javascript-api/). + +The JavaScript API gives you the most control, but it is also the least convenient option as it requires loading the Playground Client library. + +import PlaygroundWpNetWarning from '@site/docs/\_fragments/\_playground_wp_net_may_stop_working.md'; + + + +### Browser APIs + +The following Playground APIs are available in the browser: + +import APIList from '@site/docs/\_fragments/\_api_list.mdx'; + + + +### In Node.js + +The following Playground APIs are available in Node.js: + +- [JSON Blueprints API](/blueprints) +- [JavaScript API](/developers/apis/javascript-api/) + +These APIs are very similar to their web counterparts, but, unsurprisingly, they are not based or links or iframes. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/_category_.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/_category_.json new file mode 100644 index 0000000000..ffb0a58c6a --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Playground APIs" +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/javascript-api/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/javascript-api/01-index.md new file mode 100644 index 0000000000..a1659a8ba9 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/06-apis/javascript-api/01-index.md @@ -0,0 +1,55 @@ +--- +slug: /developers/apis/javascript-api +--- + +# JavaScript API + +WordPress Playground comes with a JavaScript API client that grants you full control over your WordPress. + +:::info API here doesn't mean "REST API" + +WordPress Playground is a browser-based application. +The term API here refers to a set of functions you can +call inside JavaScript. This is **not** a network-based REST API. + +::: + +## Quick start + +To use the JavaScript API, you'll need: + +- An ` +``` + +## Available options + +| Option | Default Value | Description | +| ------------------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `php` | `8.0` | Loads the specified PHP version. Accepts `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `8.4` or `latest`. | +| `wp` | `latest` | Loads the specified WordPress version. Accepts the last three major WordPress versions. As of June 1, 2024, that's `6.3`, `6.4`, or `6.5`. You can also use the generic values `latest`, `nightly`, or `beta`. | +| `blueprint-url` | | The URL of the Blueprint that will be used to configure this Playground instance. | +| `networking` | `yes` | Enables or disables the networking support for Playground. Accepts `yes` or `no`. | +| `plugin` | | Installs the specified plugin. Use the plugin name from the WordPress Plugins Directory URL. For example, if the URL is `https://wordpress.org/plugins/wp-lazy-loading/`, the plugin name would be `wp-lazy-loading`. You can pre-install multiple plugins by saying `plugin=coblocks&plugin=wp-lazy-loading&…`. Installing a plugin automatically logs the user in as an admin. | +| `theme` | | Installs the specified theme. Use the theme name from the WordPress Themes Directory URL. For example, if the URL is `https://wordpress.org/themes/disco/`, the theme name would be `disco`. Installing a theme automatically logs the user in as an admin. | +| `url` | `/wp-admin/` | Load the specified initial WordPress page in this Playground instance. | +| `mode` | `browser-full-screen` | Determines how the WordPress instance is displayed. Either wrapped in a browser UI or full width as a seamless experience. Accepts `browser-full-screen`, or `seamless`. | +| `lazy` | | Defer loading the Playground assets until someone clicks on the "Run" button. Does not accept any values. If `lazy` is added as a URL parameter, loading will be deferred. | +| `login` | `yes` | Log the user in as an admin. Accepts `yes` or `no`. | +| `multisite` | `no` | Enables the WordPress multisite mode. Accepts `yes` or `no`. | +| `import-site` | | Imports site files and database from a ZIP file specified by a URL. | +| `import-wxr` | | Imports site content from a WXR file specified by a URL. It uses the WordPress Importer plugin, so the default admin user must be logged in. | +| `site-slug` | | Selects which site to load from browser storage. | +| `language` | `en_US` | Sets the locale for the WordPress instance. This must be used in combination with `networking=yes` otherwise WordPress won't be able to download translations. | +| `core-pr` | | Installs a specific https://github.com/WordPress/wordpress-develop core PR. Accepts the PR number. For example, `core-pr=6883`. | +| `gutenberg-pr` | | Installs a specific https://github.com/WordPress/gutenberg PR. Accepts the PR number. For example, `gutenberg-pr=65337`. | +| `if-stored-site-missing` | | Indicates how to handle the scenario where the `site-slug` parameter identifies a site that does not exist. Use `if-stored-site-missing=prompt` to indicate that the user should be asked whether they would like to save a new site with the specified `site-slug`. | + +For example, the following code embeds a Playground with a preinstalled Gutenberg plugin and opens the post editor: + +```html + +``` + +:::info CORS policy + +To import files from a URL, such as a site zip package, they must be served with `Access-Control-Allow-Origin` header set. For reference, see: [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#the_http_response_headers). + +::: + +## GitHub Export Options + +The following additional query parameters may be used to pre-configure the GitHub export form: + +- `gh-ensure-auth`: If set to `yes`, Playground will display a modal to ensure the + user is authenticated with GitHub before proceeding. +- `ghexport-repo-url`: The URL of the GitHub repository to export to. +- `ghexport-pr-action`: The action to take when exporting (create or update). +- `ghexport-playground-root`: The root directory in the Playground to export from. +- `ghexport-repo-root`: The root directory in the repository to export to. +- `ghexport-content-type`: The content type of the export (plugin, theme, wp-content, custom-paths). +- `ghexport-plugin`: Plugin path. When the content type is `plugin`, pre-select the plugin to export. +- `ghexport-theme`: Theme directory name. When the content type is `theme`, pre-select the theme to export. +- `ghexport-path`: A path relative to `ghexport-playground-root`. Can be provided multiple times. When the + content type is `custom-paths`, it pre-populates the list of paths to export. +- `ghexport-commit-message`: The commit message to use when exporting. +- `ghexport-allow-include-zip`: Whether to offer an option to include a zip file in the GitHub + export (yes, no). Optional. Defaults to `yes`. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/01-index.md new file mode 100644 index 0000000000..346e2e96d4 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/01-index.md @@ -0,0 +1,35 @@ +--- +title: Architecture +slug: /developers/architecture +--- + +# Architecture overview + +WordPress Playground consists of the following high-level components: + +- [WordPress](/developers/architecture/wordpress) +- [WebAssembly PHP](/developers/architecture/wasm-php-overview) +- [Browser bindings](/developers/architecture/browser-concepts) +- Node.js bindings via [@php-wasm/node](https://npmjs.com/package/@php-wasm/node) +- [Public API](/developers/apis/) + +Visit each section to learn more about the specific parts of the architecture. + +## Tooling + +### NX: building packages and projects + +WordPress Playground uses [NX](https://nx.dev/), a build system designed for monorepos. + +The dependencies between Playground packages and projects [are too complex](https://github.com/WordPress/wordpress-playground/pull/151) for a bundler like Webpack, and NX handles this complexity much better: +![Dependency graph](@site/static/img/dependencies.png) + +To learn more, head over to the [NX developer docs](https://nx.dev/getting-started/intro). + +### Lerna: publishing packages and projects + +WordPress Playground includes several NPM packages, a VS Code extension, WordPress plugins, a web app, and other GitHub releases, all managed across two monorepos: the main [wordpress-playground](https://github.com/WordPress/wordpress-playground) and [Playground Tools](https://github.com/WordPress/playground-tools/). + +We use [Lerna](https://lerna.js.org) to build, manage, and publish all JavaScript/TypeScript packages. Lerna handles everything simultaneously: it increments the version number, sets a new tag, and publishes the modified packages to `npm`. + +The published packages share the same version number, so when updating a single package, Lerna bumps the version number of all dependent packages. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/02-wasm-php-overview.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/02-wasm-php-overview.md new file mode 100644 index 0000000000..9950f1387b --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/02-wasm-php-overview.md @@ -0,0 +1,30 @@ +--- +slug: /developers/architecture/wasm-php-overview +--- + +# WebAssembly PHP + +WordPress Playground build [the PHP interpreter](https://github.com/php/php-src) to WebAssembly using [Emscripten](https://emscripten.org/docs/porting/networking.html) and a [dedicated pipeline](https://github.com/WordPress/wordpress-playground/blob/0d451c33936a8db5b7a158fa8aad288c19370a7d/packages/php-wasm/compile/Dockerfile). + +![Building C programs to WebAssembly](@site/static/img/c-programs-general.png) + +Building PHP to WebAssembly is very similar to building vanilla PHP. The wasm build required [adjusting a function signature here](https://github.com/WordPress/wordpress-playground/blob/0d451c33936a8db5b7a158fa8aad288c19370a7d/packages/php-wasm/compile/build-assets/php7.1.patch#L8-L9), [forcing a config variable there](https://github.com/WordPress/wordpress-playground/blob/0d451c33936a8db5b7a158fa8aad288c19370a7d/packages/php-wasm/compile/Dockerfile#L495), and applying [a few small patches](https://github.com/WordPress/wordpress-playground/tree/0d451c33936a8db5b7a158fa8aad288c19370a7d/packages/php-wasm/compile/build-assets), but there's relatively few adjustments involved. + +![Building PHP to WebAssembly](@site/static/img/c-programs-php.png) + +However, vanilla PHP builds aren't very useful in the browser. As a server software, PHP doesn't have a JavaScript API to pass the request body, upload files, or populate the `php://stdin` stream. WordPress Playground had to build one from scratch. The WebAssembly binary comes with a [dedicated PHP API module](https://github.com/WordPress/wordpress-playground/blob/0d451c33936a8db5b7a158fa8aad288c19370a7d/packages/php-wasm/compile/build-assets/php_wasm.c) written in C and a [JavaScript PHP class](https://github.com/WordPress/wordpress-playground/blob/da38192af57a95699d8731c855b82ac0222df61b/packages/php-wasm/common/src/lib/php.ts) that exposes methods like writeFile() or run(). + +Because every PHP version is just a static .wasm file, the PHP version switcher is actually pretty boring. It simply tells the browser to download, for example, `php_7_3.wasm` instead of, say, `php_8_2.wasm`. + +![Building different versions of PHP to WebAssembly](@site/static/img/c-programs-php-versions.png) + +### Networking support varies between platforms + +When it comes to networking, WebAssembly programs are limited to calling JavaScript APIs. It is a safety feature, but also presents a challenge. How do you support low-level, synchronous networking code used by PHP with the high-level asynchronous APIs available in JavaScript? + +In Node.js, the answer involves a WebSocket to TCP socket proxy, [Asyncify](https://emscripten.org/docs/porting/asyncify.html), and patching deep PHP internals like php_select. It's complex, but there's a reward. The Node.js-targeted PHP build can request web APIs, install composer packages, and even connect to a MySQL server. + +In the browser, networking is supported in two ways: + +- A fast transport for `wp_safe_remote_get` to translate them into `fetch()` calls. +- A slower transport for all other network calls that [parses the TLS transmission](https://github.com/WordPress/wordpress-playground/pull/1926) initiated by PHP and translates it to a `fetch()` call. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/03-wasm-php-compiling.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/03-wasm-php-compiling.md new file mode 100644 index 0000000000..9ac2c16f96 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/03-wasm-php-compiling.md @@ -0,0 +1,57 @@ +--- +slug: /developers/architecture/wasm-php-compiling +--- + +# Compiling PHP + +The build pipeline lives in a [`Dockerfile`](https://github.com/WordPress/wordpress-playground/blob/trunk/src/packages/php-wasm/compile/Dockerfile). It was originally forked from [seanmorris/php-wasm](https://github.com/seanmorris/php-wasm) + +In broad strokes, that `Dockerfile`: + +- Installs all the necessary linux packages (like `build-essential`) +- Downloads PHP and the required libraries, e.g. `sqlite3`. +- Applies a few patches. +- Compiles everything using [Emscripten](https://emscripten.org/), a drop-in replacement for the C compiler. +- Compiles `php_wasm.c` – a convenient API for JavaScript. +- Outputs a `php.wasm` file and one or more JavaScript loaders, depending on the configuration. +- Transforms the Emscripten's default `php.js` output into an ESM module with additional features. + +To find out more about each step, refer directly to the [Dockerfile](https://github.com/WordPress/wordpress-playground/blob/trunk/src/packages/php-wasm/compile/Dockerfile). + +### Building + +To build all PHP versions, run `nx recompile-php:all php-wasm-web` (or `php-wasm-node`) in the repository root. You'll find the output files in `packages/php-wasm/php-web/public`. To build a specific version, run `nx recompile-php:all php-wasm-node --PHP_VERSION=8.0 --WITH_JSPI=yes` (and repeat with `--WITH_JSPI=no`). + +### PHP extensions + +PHP is built with several extensions listed in the [`Dockerfile`](https://github.com/WordPress/wordpress-playground/blob/trunk/src/packages/php-wasm/compile/Dockerfile). + +Some extensions, like `zip`, can be turned on or off during the build. Others, like `sqlite3`, are hardcoded. + +If you need to turn off one of the hardcoded extensions, feel free to open an issue in this repo. Better yet, this project needs contributors. You are more than welcome to open a PR and author the change you need. + +### C API exposed to JavaScript + +The C API exposed to JavaScript lives in the [`php_wasm.c`](https://github.com/WordPress/wordpress-playground/blob/trunk/src/packages/php-wasm/compile/build-assets/php_wasm.c) file. The most important functions are: + +- `void phpwasm_init()` – It creates a new PHP context and must be called before running any PHP code. +- `int phpwasm_run(char *code)` – Runs a PHP script and writes the output to /tmp/stdout and /tmp/stderr. Returns the exit code. +- `void phpwasm_refresh()` – Destroy the current PHP context and starts a new one. Call it after running one PHP script and before running another. + +Refer to the inline documentation in [`php_wasm.c`](https://github.com/WordPress/wordpress-playground/blob/trunk/src/packages/php-wasm/compile/build-assets/php_wasm.c) to learn more. + +### Build configuration + +The build is configurable via the [Docker `--build-arg` feature](https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables---build-arg). You can set them up through the `build.js` script, just run this command to get the usage message: + +```sh +nx recompile-php php-wasm-web +``` + +**Supported build options:** + +- `PHP_VERSION` – The PHP version to build, default: `8.0.24`. This value must point to an existing branch of the https://github.com/php/php-src.git repository when prefixed with `PHP-`. For example, `7.4.0` is valid because the branch `PHP-7.4.0` exists, but just `7` is invalid because there's no branch `PHP-7`. The PHP versions that are known to work are `7.4.*` and `8.0.*`. Others likely work as well but they haven't been tried. +- `EMSCRIPTEN_ENVIRONMENT` – `web` or `node`, default: `web`. The platform to build for. When building for `web`, two JavaScript loaders will be created: `php-web.js` and `php-webworker.js`. When building for Node.js, only one loader called `php-node.js` will be created. +- `WITH_LIBXML` – `yes` or `no`, default: `no`. Whether to build with `libxml2` and the `dom`, `xml`, and `simplexml` PHP extensions (`DOMDocument`, `SimpleXML`, ..). +- `WITH_LIBZIP` – `yes` or `no`, default: `yes`. Whether to build with `zlib`, `libzip`, and the `zip` PHP extension (`ZipArchive`). +- `WITH_NODEFS` – `yes` or `no`, default: `no`. Whether to include [the Emscripten's NODEFS JavaScript library](https://emscripten.org/docs/api_reference/Filesystem-API.html#filesystem-api-nodefs). It's useful for loading files and mounting directories from the local filesystem when running php.wasm from Node.js. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/04-wasm-php-javascript-module.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/04-wasm-php-javascript-module.md new file mode 100644 index 0000000000..f58efc0d0d --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/04-wasm-php-javascript-module.md @@ -0,0 +1,41 @@ +--- +title: PHP.js JavaScript module +--- + +### PHP.js JavaScript module + +The `php.js` file generated by the [WebAssembly PHP build pipeline](/developers/architecture/wasm-php-compiling) is **not** a vanilla Emscripten module. Instead, it's an ESM module that wraps the regular Emscripten output and adds some extra functionality. + +Here's the API it exposes: + +```js +// php.wasm size in bytes: +export const dependenciesTotalSize = 5644199; + +// php.wasm filename: +export const dependencyFilename = 'php.wasm'; + +// Run Emscripten's generated module: +export default function (jsEnv, emscriptenModuleArgs) {} +``` + +The generated JavaScript module is not meant for direct use. Instead, it can be consumed through the `PHP` class: + +```js +// In Node.js: +const php = new PHP(await loadNodeRuntime('8.0')); + +// On the web: +const php = new PHP(await loadWebRuntime('8.0')); +``` + +Both of these classes extend the `BasePHP` class exposed by the `@php-wasm/universal` package and implement the `UniversalPHP` interface that standardizes the API across all PHP environments. + +### Loading the PHP runtime + +The load() method handles the entire PHP initialization pipeline. In particular, it: + +- Instantiates the Emscripten PHP module +- Wires it together with the data dependencies and loads them +- Ensures is all happens in a correct order +- Waits until the entire loading sequence is finished diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/05-wasm-php-filesystem.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/05-wasm-php-filesystem.md new file mode 100644 index 0000000000..eb876fdaea --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/05-wasm-php-filesystem.md @@ -0,0 +1,34 @@ +--- +slug: /developers/architecture/wasm-php-filesystem +--- + +# PHP Filesystem + +The PHP module has its own filesystem separate from your computer's filesystem. It is provided by [Emscripten's FS library](https://emscripten.org/docs/api_reference/Filesystem-API.html) and the default APIs is low-level and cumbersome to use. The `PHP` JavaScript class shipped with WordPress Playground wraps it with a more convenient higher-level API. + +In general, WordPress Playground uses an in-memory virtual filesystem. + +However, in Node.js, you can also mount a real directory from the host filesystem into the PHP filesystem. + +Here's how to interact with the filesystem in WordPress Playground: + +```js +// Recursively create a /var/www directory +php.mkdirTree('/var/www'); + +console.log(php.fileExists('/var/www/file.txt')); +// false + +php.writeFile('/var/www/file.txt', 'Hello from the filesystem!'); + +console.log(php.fileExists('/var/www/file.txt')); +// true + +console.log(php.readFile('/var/www/file.txt')); +// "Hello from the filesystem! + +// Delete the file: +php.unlink('/var/www/file.txt'); +``` + +For more details consult the BasePHP class directly – it has some great documentation strings. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/07-wasm-asyncify.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/07-wasm-asyncify.md new file mode 100644 index 0000000000..07e04d42b6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/07-wasm-asyncify.md @@ -0,0 +1,43 @@ +# Asyncify + +[Asyncify](https://emscripten.org/docs/porting/asyncify.html) lets synchronous C or C++ code interact with asynchronous JavaScript. Technically, it saves the entire C call stack before yielding control back to JavaScript, and then restores it when the asynchronous call is finished. This is called **stack switching**. + +Networking support in the WebAssembly PHP build is implemented using Asyncify. When PHP makes a network request, it yields control back to JavaScript, which makes the request, and then resumes PHP when the response is ready. It works well enough that PHP build can request web APIs, install composer packages, and even connect to a MySQL server. + +## Asyncify crashes + +Stack switching requires wrapping all C functions that may be found at a call stack at a time of making an asynchronous call. Blanket-wrapping of every single C function adds a **significant** overhead, which is why we maintain a list of specific function names: + +https://github.com/WordPress/wordpress-playground/blob/15a660940ee9b4a332965ba2a987f6fda0c159b1/packages/php-wasm/compile/Dockerfile#L624-L632 + +Unfortunately, missing even a single item from that list results in a WebAssembly crash whenever that function is a part of the call stack when an asynchronous call is made. It looks like this: + +![A screenshot of an asyncify error in the terminal](../../../../../../static/img/asyncify-error.png) + +Asyncify can auto-list all the required C functions when built without `ASYNCIFY_ONLY`, but that auto-detection is overeager and ends up listing about 70,000 C functions which increases the startup time to 4.5s. That's why we maintain the list manually. + +If you are interested in more details, [see GitHub issue 251](https://github.com/WordPress/wordpress-playground/issues/251). + +## Fixing Asyncify crashes + +[Pull Request 253](https://github.com/WordPress/wordpress-playground/pull/253) adds a `fix-asyncify` command that runs a specialized test suite and automatically adds any identified missing C functions to the `ASYNCIFY_ONLY` list. + +If you run into a crash like the one above, you can fix it by: + +1. Identifying a PHP code path that triggers the crash – the stack trace in the terminal should help with that. +2. Adding a test case that triggers a crash to `packages/php-wasm/node/src/test/php-asyncify.spec.ts` +3. Running: `npm run fix-asyncify` +4. Committing the test case, the updated Dockerfile, and the rebuilt PHP.wasm + +## The upcoming JSPI API will make Asyncify unnecessary + +Eventually, [V8 will likely handle stack switching for us](https://github.com/WordPress/wordpress-playground/issues/134) and remove this problem entirely. [Issue 134](https://github.com/WordPress/wordpress-playground/issues/134) tracks the status of that effort. + +Here's [a relevant note](https://github.com/fgmccabe) from @fgmccabe: + +> The current implementation in V8 is essentially 'experimental status'. We have arm64 and x64 implementations. +> The next steps are to implement on 32 bit arm/intel. That requires us to solve some issues that we did not have to solve so far. +> As for node.js, my guess is that it is already in node, behind a flag. +> To remove the flag requirement involves getting other implementations. The best estimate for that is towards the end of this year; but it obviously depends on resources and funding. +> In addition, it would need further progress in the standardization effort; but, given that it is a 'small' spec, that should not be a long term burden. +> Hope that this helps you understand the roadmap :) diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/08-browser-concepts.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/08-browser-concepts.md new file mode 100644 index 0000000000..c66cd7b0c6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/08-browser-concepts.md @@ -0,0 +1,26 @@ +--- +slug: /developers/architecture/browser-concepts +--- + +# Running PHP apps in the browser with ServiceWorkers and Worker Threads + +On a high level, WordPress Playground works in web browsers as follows: + +- The `index.html` file on playground.wordpress.net loads the `remote.html` file via an ` +``` + +**/app.ts**: + +```ts +import { consumeAPI, PHPClient, registerServiceWorker, spawnPHPWorkerThread } from '@php-wasm/web'; + +const workerUrl = '/worker-thread.js'; + +export async function startApp() { + const phpClient = consumeAPI( + await spawnPHPWorkerThread( + workerUrl, // Valid Worker script URL + { + wpVersion: 'latest', + phpVersion: '7.4', // Startup options + } + ) + ); + + // Await the two-way communication channel + await phpClient.isReady(); + + // Must point to a valid Service Worker script: + await registerServiceWorker( + phpClient, + 'default', // PHP instance scope, keep reading to learn more. + '/sw.js', // Valid Service Worker script URL. + '1' // Service worker version, used for reloading the script. + ); + + // Create a few PHP files to browse: + await workerThread.writeFile('/index.php', 'Go to page.php'); + await workerThread.writeFile('/page.php', ''); + + // Navigate to index.php: + document.getElementById('my-app').src = playground.pathToInternalUrl('/index.php'); +} +startApp(); +``` + +Keep reading to learn how all these pieces fit together. + +### Data flow + +Here's what happens whenever the iframe issues a same-domain request: + +![The data flow](@site/static/img/data-flow.png) + +A step-by-step breakdown: + +1. The request is intercepted by the Service Worker +2. The Service Worker passes it to the Worker Thread +3. The Worker Thread calls `PHP.request` to convert that request to a response +4. The Worker Thread passes the response to the Service Worker +5. The Service Worker provides the browser with a response + +At this point, if the request was triggered by user clicking on a link, the browser will render PHPRequestHandler's response inside the iframe. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/10-browser-iframe-rendering.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/10-browser-iframe-rendering.md new file mode 100644 index 0000000000..474ab33e69 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/10-browser-iframe-rendering.md @@ -0,0 +1,36 @@ +--- +slug: /developers/architecture/browser-iframe-rendering +--- + +# Iframe-based rendering + +To avoid page reloads, all the `PHPRequestHandler` responses must be rendered in an iframe. Remember, the entire setup only lives as long as the main `index.html`. We want to avoid reloading the main app at all costs. + +In our app example above, `index.php` renders the following HTML: + +```html +Go to page.php +``` + +Imagine our `index.html` rendered it in a `
` instead of an ` +``` + +This time, click the link in the browser to load `page.php` **inside the iframe**. The top-level `index.html`, where the PHP application runs, remains unaffected. That's why iframes are crucial for the `@php-wasm/web` setup. + +:::info Crash reports +Playground doesn't collect crash reports automatically. Instead, it prompts users to submit a crash report when an instance fails to run in the browser. + +The report includes a log, description, and a URL, and users can modify it before submitting it. + +The [Logger API](https://github.com/WordPress/wordpress-playground/blob/trunk/packages/playground/website/public/logger.php) handles it from there. This simple REST API validates the data and sends it to the **Making WordPress** [#playground-logs Slack channel](https://wordpress.slack.com/archives/C06Q5DCKZ3L). +::: + +## Iframes caveats + +- `target="_top"` isn't handled yet, so clicking links with `target="_top"` will reload the page you’re working on. +- JavaScript popups originating in the `iframe` may not always display. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/11-browser-php-worker-threads.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/11-browser-php-worker-threads.md new file mode 100644 index 0000000000..b2daa5ad60 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/11-browser-php-worker-threads.md @@ -0,0 +1,36 @@ +--- +slug: /developers/architecture/browser-php-worker-threads +--- + +# PHP Worker Threads + +PHP is always ran in a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) to ensure the PHP runtime doesn't slow down the user interface of the main website. + +Imagine the following code: + +```js + + +``` + +As soon as you click that button the browser will freeze and you won't be able to type in the input. That's just how browsers work. Whether it's a for loop or a PHP server, running intensive tasks slows down the user interface. + +### Initiating web workers + +Web workers are separate programs that can process heavy tasks outside of the main application. They must be initiated by the main JavaScript program living in the browser tab. Here's how: + +```ts +const phpClient = consumeAPI( + spawnPHPWorkerThread( + '/worker-thread.js' // Valid Worker script URL + ) +); +await phpClient.isReady(); +await phpClient.run({ code: ` + + John's Website + + + Homepage + Blog + Contact + + +``` + +When the user clicks, say the `Blog` link, the browser would normally send a HTTP request to the remote server to fetch the `/blog` page and then display it instead of the current iframe contents. However, our app isn't running on the remote server. The browser would just display a 404 page. + +Enter [Service Workers](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers) – a tool to intercept the HTTP requests and handle them inside the browser: + +![Service worker data flow](@site/static/img/workers-diagram.png) + +### Service Worker setup + +The main application living in `/index.html` is responsible for registering the service worker. + +Here's the minimal setup: + +**/app.js:** + +```js +import { registerServiceWorker } from '@php-wasm/web'; + +function main() { + await registerServiceWorker( + phpClient, + "default", // PHP instance scope + "/sw.js", // Must point to a valid Service Worker implementation. + "1" // Service worker version, used for reloading the script. + ); + +} +``` + +You will also need a separate `/service-worker.js` file that actually intercepts and routes the HTTP requests. Here's what a minimal implementation looks like: + +**/service-worker.js**: + +```js +import { initializeServiceWorker } from '@php-wasm/web'; + +// Intercepts all HTTP traffic on the current domain and +// passes it to the Worker Thread. +initializeServiceWorker(); +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/13-browser-scopes.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/13-browser-scopes.md new file mode 100644 index 0000000000..e8db33327e --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/13-browser-scopes.md @@ -0,0 +1,49 @@ +# Scopes + +Scopes keep your app working when you open it in two different browser tabs. + +The Service Worker passes the intercepted HTTP requests to the PHPRequestHandler for rendering. Technically, it sends a message through a [`BroadcastChannel`](https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel) which then gets delivered to every browser tab where the application is open. This is undesirable, slow, and leads to unexpected behaviors. + +Unfortunately, the Service Worker cannot directly communicate with the relevant Worker Thread – see [PR #31](https://github.com/WordPress/wordpress-playground/pull/31) and [issue #9](https://github.com/WordPress/wordpress-playground/issues/9) for more details. + +Scopes enable each browser tab to: + +- Brand the outgoing HTTP requests with a unique tab id +- Ignore any `BroadcastChannel` messages with a different id + +Technically, a scope is a string included in the `PHPRequestHandler.absoluteUrl`. For example: + +- In an **unscoped app**, `/index.php` would be available at `http://localhost:8778/wp-login.php` +- In an **scoped app**, `/index.php` would be available at `http://localhost:8778/scope:96253/wp-login.php` + +The service worker is aware of this concept and will attach the `/scope:` found in the request URL to the related `BroadcastChannel` communication. + +A worker thread initiated with a scoped `absoluteUrl` is said to be **scoped**: + +```js +import { + PHP, + setURLScope, + exposeAPI, + parseWorkerStartupOptions, +} from '@php-wasm/web'; + +// Don't use the absoluteURL directly: +const absoluteURL = 'http://127.0.0.1' + +// Instead, set the scope first: +const scope = Math.random().toFixed(16) +const scopedURL = setURLScope(absoluteURL, scope).toString() + +const { phpVersion } = parseWorkerStartupOptions<{ phpVersion?: string }>(); +const php = await PHP.load('8.0', { + requestHandler: { + documentRoot: '/', + absoluteUrl: scopedSiteUrl + } +}); + +// Expose the API to app.ts: +const [setApiReady, ] = exposeAPI( php ); +setApiReady(); +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/14-browser-cross-process-communication.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/14-browser-cross-process-communication.md new file mode 100644 index 0000000000..9c3c02e8bf --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/14-browser-cross-process-communication.md @@ -0,0 +1,39 @@ +# Cross-process communication + +`@php-wasm/web` uses the [Comlink](https://github.com/GoogleChromeLabs/comlink) library to turns the one-way `postMessage` available in JavaScript into a two-way communication channel. + +If `postMessage` sounds unfamiliar, it's what JavaScript threads use to communicate. Please review the [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage) before continuing. + +By default, `postMessage` does not offer any request/response mechanics. You may send messages to another thread and you may independently receive messages from it, but you can't send a message and await a response to that specific message. + +To quote the [Comlink](https://github.com/GoogleChromeLabs/comlink) library documentation: + +**main.js** + +```js +import * as Comlink from 'https://unpkg.com/comlink/dist/esm/comlink.mjs'; +async function init() { + const worker = new Worker('worker.js'); + // WebWorkers use `postMessage` and therefore work with Comlink. + const obj = Comlink.wrap(worker); + alert(`Counter: ${await obj.counter}`); + await obj.inc(); + alert(`Counter: ${await obj.counter}`); +} +init(); +``` + +**worker.js** + +```js +importScripts('https://unpkg.com/comlink/dist/umd/comlink.js'); + +const obj = { + counter: 0, + inc() { + this.counter++; + }, +}; + +Comlink.expose(obj); +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/15-wordpress.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/15-wordpress.md new file mode 100644 index 0000000000..427567fe35 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/15-wordpress.md @@ -0,0 +1,23 @@ +--- +slug: /developers/architecture/wordpress +--- + +# WordPress support + +WordPress, as a PHP application, can run on PHP WebAssembly. However, there are a few caveats. + +## SQLite + +First, WordPress requires MySQL. However, there isn't a WebAssembly version of MySQL you could run in the browser. WordPress Playground, therefore, ships PHP with the [native SQLite driver](https://www.php.net/manual/en/ref.pdo-sqlite.php) and leans on SQLite. + +But how can WordPress run on a different database? + +Behind the scenes, the official [SQLite Database Integration](https://github.com/WordPress/sqlite-database-integration) plugin intercepts all MySQL queries and rewrites them in SQLite dialect. The x.0 release ships [a new WordPress Playground-informed translation layer](https://github.com/WordPress/sqlite-database-integration/pull/9) that allows WordPress on SQLite to pass 99% of the WordPress unit test suite. + +## WordPress in the browser + +You can use any WordPress build in the browser. For convenience and to reduce the data transfer size, WordPress Playground ships a few [minified WordPress releases](https://github.com/WordPress/wordpress-playground/tree/trunk/packages/playground/wordpress-builds) that you can use in the browser. + +## WordPress in Node.js + +In Node.js, you'll typically want to [mount WordPress](/developers/architecture/wasm-php-filesystem) from a disk directory. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/16-wordpress-database.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/16-wordpress-database.md new file mode 100644 index 0000000000..bfc3745510 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/16-wordpress-database.md @@ -0,0 +1,11 @@ +--- +title: How does it work? +--- + +## Database is supported via MySQL\<\-\>SQLite translation layer + +WordPress requires MySQL. However, there isn't a WebAssembly version of MySQL you could run in the browser. WordPress Playground therefore ships PHP with the [native SQLite driver](https://www.php.net/manual/en/ref.pdo-sqlite.php) and leans on SQLite. + +But how can WordPress run on a different database? + +Behind the scenes, the official [SQLite Database Integration](https://github.com/WordPress/sqlite-database-integration) plugin intercepts all MySQL queries and rewrites them in SQLite dialect. The 2.0 release ships [a new WordPress Playground-informed translation layer](https://github.com/WordPress/sqlite-database-integration/pull/9) that allows WordPress on SQLite to pass 99% of the WordPress unit test suite. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/17-browser-wordpress.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/17-browser-wordpress.md new file mode 100644 index 0000000000..4f2bc23155 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/17-browser-wordpress.md @@ -0,0 +1,21 @@ +# Bundling WordPress for the browser + +The [web bundler Dockerfile](https://github.com/WordPress/wordpress-playground/blob/trunk/src/wordpress-playground/wordpress/Dockerfile) turns a vanilla WordPress into a browser-optimized one: + +- Makes WordPress run on SQLite using the [official drop-in plugin](https://github.com/WordPress/sqlite-database-integration) as MySQL is unsupported in the browser. +- Reduces the WordPress website size from about 70MB to about 10MB, or 5MB compressed. +- Runs the WordPress installation wizard. +- Bundles WordPress as a minified zip file. + +Build a new bundle with `nx bundle-wordpress playground-wordpress-builds --wp-version=`, e.g.: + +``` +nx bundle-wordpress playground-wordpress-builds --wp-version=6.1 +``` + +The bundler outputs: + +- `packages/playground/wordpress-builds/public/wp-6.1.zip` – zipped WordPress files +- `packages/playground/wordpress-builds/public/wp-6.1/` – a directory with static assets for the specified WordPress versions + +Consult [the web bundler Dockerfile](https://github.com/WordPress/wordpress-playground/blob/trunk/src/wordpress-playground/wordpress/Dockerfile) for more details (like the list of supported WordPress versions) and modify it to customize the default WordPress installation. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/18-host-your-own-playground.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/18-host-your-own-playground.md new file mode 100644 index 0000000000..1160b4246a --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/18-host-your-own-playground.md @@ -0,0 +1,183 @@ +--- +slug: /developers/architecture/host-your-own-playground +--- + +# Host your own Playground + +You can host the Playground on your own domain instead of `playground.wordpress.net`. + +This is useful for having full control over its content and behavior, as well as removing dependency on a third-party server. It can provide a more customized user experience, for example: a playground with preinstalled plugins and themes, default site settings, or demo content. + +#### Usage + +A self-hosted Playground can be embedded as an iframe. + +```html + +``` + +Or dynamically loaded by passing the remote URL to the Playground Client. + +```ts +import { startPlaygroundWeb } from '@wp-playground/client'; + +const client = await startPlaygroundWeb({ + iframe: document.getElementById('wp'), + remoteUrl: `https://my-playground.com/remote.html`, +}); +``` + +## Static assets + +There are several ways to get the static assets necessary to host the Playground. + +In order of convenience and ease: + +- Download pre-built package +- Fork the repository and build with GitHub Action +- Build locally + +### Download pre-built package + +To host the Playground as is, without making changes, you can download the built artifact from [the latest successful GitHub Action](https://github.com/WordPress/wordpress-playground/actions/workflows/build-website.yml?query=is%3Asuccess). + +- Click on **Deploy to playground.wordpress.net**. +- In the section **Artifacts** at the bottom of the page, click `playground-website`. +- It's a zip package with the same files deployed to the public site. + +### Fork the repository and build with GitHub Action + +To customize the Playground, you can [fork the Git repository](https://github.com/WordPress/wordpress-playground/fork). + +Build it from the fork's GitHub page by going to: **Actions -> Deploy to playground.wordpress.net -> Run workflow**. + +### Build locally + +The most flexible and customizable method is to build the site locally. + +Create a shallow clone of the Playground repository, or your own fork. + +```sh +git clone -b trunk --single-branch --depth 1 --recurse-submodules https://github.com/WordPress/wordpress-playground.git +``` + +Enter the `wordpress-playground` directory. + +```sh +cd wordpress-playground +``` + +Install dependencies, and build the website. + +```sh +npm install +npm run build:website +``` + +This command internally runs the `nx` task `build:wasm-wordpress-net`. It copies the built assets from packages `remote` and `website` into a new folder at the following path: + +``` +dist/packages/playground/wasm-wordpress-net +``` + +The entire service of the Playground consists of the content of this folder. + +## Summary of included files + +The static assets include: + +- Data and WASM files for all available PHP and WordPress versions +- `remote.html` - the core of Playground +- `index.html` - the shell, or browser chrome +- Web Worker script + +You can deploy the content of the folder to your server using SSH, such as `scp` or `rsync`. + +It is a static site, except for these dynamic aspects. + +- Apache server directive `.htaccess` file from the package `remote` + +For these to work, you need a server environment with Apache and PHP installed. + +## NGINX configuration + +As an alternative to Apache, here is an example of using NGINX to serve the Playground. + +:::info Refer to the source file + +The example may be outdated. Please check [the source file](https://github.com/WordPress/wordpress-playground/blob/trunk/packages/playground/remote/.htaccess) for the latest version. + +::: + +The combined Apache `.htaccess` file looks like this. + +```htaccess +AddType application/wasm .wasm +``` + +An equivalent in NGINX. + +```nginx +location ~* .wasm$ { + types { + application/wasm wasm; + } +} +``` + +You may need to adjust the above according to server specifics, particularly how to invoke PHP for the path `/plugin-proxy`. + +[Caddy web server](https://caddyserver.com) doesn't require any special config to work. + +## Customize bundled data + +The file `wp.zip` is a bundle of all the files for the virtual file system in Playground. There's a data file for each available WordPress version. + +The package at `packages/playground/wordpress` is responsible for building these data files. + +Edit the build script in `Dockerfile` to create a custom bundle that includes preinstalled plugins or content. + +### Install plugins + +Here's an example of installing plugins for the data bundle. + +Before the section titled `Strip whitespaces from PHP files`. + +```docker +# === Preinstall plugins === + +RUN cd wordpress/wp-content/mu-plugins && \ + # Install plugins + for plugin_name in example-plugin-1 example-plugin-2; do \ + curl -L https://downloads.wordpress.org/plugin/{$plugin_name}.latest-stable.zip -o {$plugin_name}.zip && \ + unzip $plugin_file && \ + rm $plugin_file && \ + # Create entry file in mu-plugins root + echo " $plugin_name.php; \ + done; +``` + +You can download plugins from URLs other than the WordPress plugin directory, or use Git to pull them from elsewhere. + +It's also possible to copy from a local folder. For example, before `RUN`: + +``` +COPY ./build-assets/*.zip /root/ +``` + +Then put the plugin zip files in `build-assets`. In this case, you may want to add their paths to `.gitignore`. + +### Import content + +Here's an example of importing content. + +```docker +# === Demo content === + +COPY ./build-assets/content.xml /root/ +RUN cd wordpress ; \ + echo "Importing content.."; \ + ../wp-cli.phar --allow-root import /root/content.xml --authors=create +``` + +This assumes that you have put a WXR export file named `content.xml` in the folder `build-assets`. You can add its path to `.gitignore`. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/_category_.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/_category_.json new file mode 100644 index 0000000000..371cd2618a --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/23-architecture/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Architecture" +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/24-limitations/01-index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/24-limitations/01-index.md new file mode 100644 index 0000000000..55b7a6df1d --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/24-limitations/01-index.md @@ -0,0 +1,53 @@ +--- +slug: /developers/limitations +--- + +# Limitations + +WordPress Playground is under active development and has some limitations you should keep in mind when running it and developing with it. + +You can track the status of these issues on the [Playground Project board](https://github.com/orgs/WordPress/projects/180). + +## In the browser + +### Temporary by design + +As Playground [streams rather than serves](/about#streamed-not-served) WordPress, all database changes and uploads will be gone when you refresh the page. To avoid losing your work, either [export your work](/quick-start-guide#save-your-site) before or enable storage in the browser/device via the "Save" button found in the "Open Playground Manager" menu on the top left of the site. + +
+
+
The open Playground Manager button:
+ +![Open Playground Manager](@site/static/img/open-site-manager.png) + +
+ +
+
The save button:
+ +![Save Button](@site/static/img/save-button.png) + +
+
+ +## When developing with Playground + +### Iframe quirks + +Playground renders WordPress in an `iframe` so clicking links with `target="_top"` will reload the page you’re working on. +Also, JavaScript popups originating in the `iframe` may not always display. + +### Run WordPress PHP functions + +Playground supports running PHP code in Blueprints using the [`runPHP` step](/blueprints/steps#RunPHPStep). To run WordPress-specific PHP functions, you’d need to first require [wp-load.php](https://github.com/WordPress/WordPress/blob/master/wp-load.php): + +```json +{ + "step": "runPHP", + "code": "" +} +``` + +### Using WP-CLI + +You can execute `wp-cli` commands via the Blueprints [`wp-cli`](/blueprints/steps#WPCLIStep) step. However, since Playground runs in the browser, it doesn't support the [full array](https://developer.wordpress.org/cli/commands/) of available commands. While there is no definite list of supported commands, experimenting in [the online demo](https://playground.wordpress.net/demos/wp-cli.html) will help you assess what's possible. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/intro-devs.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/intro-devs.md new file mode 100644 index 0000000000..139fb5619c --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/developers/intro-devs.md @@ -0,0 +1,30 @@ +--- +title: WordPress Playground Developers Docs +slug: /developers/ +id: intro +--- + +# Developers Docs + +Hi! Welcome to WordPress Playground Developer documentation. + +

The WordPress Playground documentation is distributed across four separate hubs (subsites):

+ +- [**Documentation**](/) – Introduction to WP Playground, starter guides and your entry point to WP Playground Docs. +- [**Blueprints**](/blueprints) – Blueprints are JSON files for setting up your WordPress Playground instance. Learn about their possibilities from the Blueprints docs hub. +- 👉 [**Developers**](/developers) (you're here)– WordPress Playground was created as a programmable tool. Discover all the things you can do with it from your code in this Developers docs hub. +- [**API Reference**](/api) – All the APIs exposed by WordPress Playground + +## Navigating the Developers documentation hub + +This docs hub is focused on Developers info and is divided into the following major sections: + +- [Quick Start Guide for Developers](/developers/build-your-first-app): Begin your development journey with Playground by exploring some examples of what you can achieve using Playground APIs. + +- [Local Development](/developers/local-development): Discover the tools provided by Playground to streamline the process of setting up and managing WordPress sites and build your apps. + +- [Playground APIs](/developers/apis): Explore the main APIs exposed by WordPress Playground to interact with the Playground: [Query API](/developers/apis/query-api/), [Blueprints](/blueprints/), [Javascript API](/developers/apis/javascript-api/) + +- [Architecture](/developers/architecture): The specifics of WordPress Playground's architecture, including its various components and tools. + +- [Limitations](/developers/limitations/): Learn more about the current limitations of WordPress Playground, which include disabled network connections, temporary data, iframe quirks, PHP function execution requirements, and partial WP-CLI support. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Address_Bar.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Address_Bar.png new file mode 100644 index 0000000000..9b559f86f2 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Address_Bar.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Interface.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Interface.png new file mode 100644 index 0000000000..85393a60fe Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Interface.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Toolbar.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Toolbar.png new file mode 100644 index 0000000000..6054524475 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Playground_Toolbar.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Explorer.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Explorer.png new file mode 100644 index 0000000000..6d32fee530 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Explorer.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Preview.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Preview.png new file mode 100644 index 0000000000..fe97422c42 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/Site_Preview.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/builder-mode.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/builder-mode.png new file mode 100644 index 0000000000..7e630c2b93 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/builder-mode.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/customize-playground.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/customize-playground.png new file mode 100644 index 0000000000..4d6d0b5105 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/customize-playground.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/import-from-github-option.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/import-from-github-option.png new file mode 100644 index 0000000000..63c1f98b94 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/import-from-github-option.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/options.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/options.png new file mode 100644 index 0000000000..53b3653985 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/options.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/storage-type-device.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/storage-type-device.png new file mode 100644 index 0000000000..4092b7347b Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/storage-type-device.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/toolbar.png b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/toolbar.png new file mode 100644 index 0000000000..93e3fd8560 Binary files /dev/null and b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/_assets/toolbar.png differ diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/build.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/build.md new file mode 100644 index 0000000000..06c34d6516 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/build.md @@ -0,0 +1,76 @@ +--- +title: Build +slug: /about/build +description: Pagbuo gamit ang WP Playground +sidebar_class_name: navbar-build-item +--- + +# Build + +Makakatulong ang WordPress Playground upang mabilis kang makalikha at makapag-aral ng WordPress, kahit pa sa mobile na walang signal. Maaari mong gamitin ang Playground kung saan ka pinakamahusay na magtrabaho, maging ito man ay sa browser, Node.js, mobile apps, VS Code, o iba pa. + +## Mabilis na Pag-set up ng Lokal na WordPress Environment + +Maaari mong i-integrate nang seamless ang Playground sa iyong development workflow upang mabilis na ilunsad ang lokal na WordPress environment para sa pag-test ng iyong code. Magagawa mo ito nang direkta [mula sa terminal](/developers/local-development/wp-now) o sa [paborito mong IDE](/developers/local-development/vscode-extension). + +## I-save ang Mga Pagbabago sa Isang Block Theme at Gumawa ng GitHub Pull Requests + +Maaari mong ikonekta ang iyong Playground instance sa isang GitHub repository at lumikha ng Pull Request para sa mga pagbabagong ginawa mo sa pamamagitan ng WordPress UI, gamit ang [Create Block Theme](https://wordpress.org/plugins/create-block-theme/) plugin. + +Sa workflow na ito, maaari kang bumuo ng block theme nang buo sa iyong browser at i-save ang iyong mga pagbabago sa GitHub, o pagandahin/ayusin ang isang umiiral na theme. + + + +

+Narito ang ilan pang halimbawa ng workflow na ito: + +- [Developer Hours: Creating WordPress Playground Blueprints for Testing and Demos](https://www.youtube.com/watch?v=gKrij8V3nK0&t=2488s) +- [Recap Hallway Hangout: Theme Building with Playground, Create-block-theme plugin, and GitHub](https://make.wordpress.org/core/2024/06/25/recap-hallway-hangout-theme-building-with-playground-create-block-theme-plugin-and-github/) + +## Pag-synchronize ng Iyong Playground Instance sa Lokal na Folder at Paglikha ng GitHub Pull Requests + +![Storage Type Device Snapshot](../_assets/storage-type-device.png) + +Sa Google Chrome, maaari mong i-synchronize ang iyong Playground instance sa isang lokal na directory, na maaaring: + +- Isang walang laman na directory – para i-save ang Playground at simulang mag-sync +- Isang umiiral na directory – para i-load ito dito at simulang mag-sync + +:::info + +Ang tampok na ito ay available lamang sa Google Chrome sa ngayon. Hindi pa ito gumagana sa ibang browser. + +::: + +Tungkol sa mga pagbabagong ginawa sa magkabilang panig ng koneksyon: + +- Ang mga file na nabago sa Playground ay masi-sync sa iyong computer. +- Ang mga file na nabago sa iyong computer ay **hindi** masi-sync pabalik sa Playground. Kailangan mong i-click ang button na "Sync local files." + +Sa workflow na ito maaari kang direktang gumawa ng GitHub PR mula sa iyong mga pagbabagong ginawa sa lokal na directory. + +Tingnan dito ang maikling demo ng workflow na ito sa aksyon: + + + +

+ +## Integrasyon sa Iba Pang API para Gumawa ng Bagong Mga Tool + +Maaari mong pagsamahin ang Playground sa iba't ibang API upang lumikha ng kahanga-hangang mga tool. Walang katapusang mga posibilidad. + +Maaari mong [gamitin ang WordPress Playground sa Node.js](/developers/local-development/php-wasm-node) upang gumawa ng mga bagong tool. Ang [@php-wasm/node package](https://npmjs.org/@php-wasm/node), na nagdadala ng PHP WebAssembly runtime, ay ang package na ginagamit para sa [https://playground.wordpress.net/](https://playground.wordpress.net/), halimbawa. + +Isa pang kawili-wiling app na ginawa sa ibabaw ng Playground ay ang **Translate Live** (tingnan ang [halimbawa](https://translate.wordpress.org/projects/wp-plugins/friends/dev/de/default/playground/)) na, sa kombinasyon ng Open AI, ay nagbibigay ng WordPress translations tool “in place” kung saan makikita at maayos ang mga pagsasalin sa kanilang totoong konteksto (tingnan ang halimbawa). Basahin pa tungkol sa tool na ito sa [Translate Live: Updates to the Translation Playground](https://make.wordpress.org/polyglots/2023/05/08/translate-live-updates-to-the-translation-playground/). + +## Gumana Offline at Bilang Native App + +Kapag unang binisita mo ang [playground.wordpress.net](https://playground.wordpress.net/), awtomatikong kino-cache ng iyong browser ang lahat ng kinakailangang file para magamit ang Playground. Mula noon, maaari mong i-access ang [playground.wordpress.net](https://playground.wordpress.net/), kahit walang internet connection, tinitiyak na maaari kang magpatuloy sa iyong proyekto nang hindi napuputol. + +Maaari mo ring i-install ang Playground sa iyong device bilang Progressive Web App (PWA) upang ilunsad ang Playground nang direkta mula sa iyong home screen—parang native app lang. + +Basahin ang [Introducing Offline Mode and PWA Support for WordPress Playground](https://make.wordpress.org/playground/2024/08/05/offline-mode-and-pwa-support/) para sa karagdagang impormasyon. + +## I-embed ang WordPress Site sa Non-Web Environments + +Ang gabay na [How to ship a real WordPress site in a native iOS app via Playground?](../guides/wordpress-native-ios-app) ay nagpapakita kung paano natin magagamit ang Playground upang i-wrap ang isang WordPress site sa isang iOS app. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/index.md new file mode 100644 index 0000000000..ff479b93b9 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/index.md @@ -0,0 +1,57 @@ +--- +title: Tungkol sa Playground +slug: /about +--- + +# Tungkol sa WordPress Playground + +## Ano ang WordPress Playground? + +**Ang WordPress Playground ay ang platform na nagpapahintulot sa iyo na patakbuhin ang WordPress kaagad sa anumang device nang hindi kailangan ng host**. Pinapayagan kang mag-eksperimento at matuto tungkol sa WordPress nang hindi naaapektuhan ang iyong live na website. Isa itong virtual na sandbox kung saan maaari kang maglaro sa iba't ibang feature, disenyo, at setting sa isang ligtas at kontroladong kapaligiran. + +Ang WordPress Playground ang iyong lugar para mag: + +- [Build](/about/build): Makakatulong ang WordPress Playground na lumikha ng mga produkto gamit ang WordPress. Gamitin ito kung saan ka pinakamahusay magtrabaho, maging sa browser, Node.js, mobile apps, VS Code, o iba pa. +- [Test](/about/test): I-upgrade ang iyong QA process gamit ang WordPress Playground. Mabilis na subukan ang iyong mga plugin o theme, mag-eksperimento sa isang pribadong sandbox, at lumikha ng PRs mula sa iyong WP Playground instance papunta sa anumang repo. +- [Launch](/about/launch): Gamitin ang WordPress Playground upang ipakita ang iyong produkto, hayaan ang mga user subukan ito nang live, o ilunsad ito sa App Store nang walang delay. + +## Bakit WordPress Playground? + +### Sumubok ng mga theme at plugin agad-agad + +Sa WordPress Playground, maaari mong tuklasin ang anumang [theme](https://developer.wordpress.org/themes/getting-started/what-is-a-theme/). Maaari kang pumili mula sa malawak na seleksyon ng mga theme at makita kung paano ito lumilitaw sa iyong site. Maaari mo ring baguhin ang mga kulay, font, layout, at iba pang visual na elemento upang lumikha ng natatanging disenyo. +Bilang karagdagan sa mga theme, maaari ka ring mag-eksperimento sa mga plugin. Sa WordPress Playground, maaari mong i-install at subukan ang iba't ibang plugin upang makita kung paano ito gumagana at kung ano ang maibibigay nito sa iyong site. Pinapayagan ka nitong tuklasin at maunawaan ang mga kakayahan ng WordPress nang hindi nag-aalala sa pagbasag ng ano man. + +### Gumawa ng content kahit saan + +Isa pang mahusay na feature ng WordPress Playground ay ang kakayahang lumikha at mag-edit ng content. Maaari kang magsulat ng blog post, gumawa ng mga pahina, at magdagdag ng media tulad ng larawan at video sa iyong site. Tinutulungan ka nitong maunawaan kung paano maayos i-organisa at istruktura ang iyong content. + +Ang content na iyong nilikha ay limitado sa Playground sa iyong device at mawawala kapag umalis ka, kaya malaya kang mag-eksperimento nang hindi nagri-risk ng pagbasag ng totoong site. + +Pero tandaan! Maaari mo ring ikonekta ang iyong Playground instance sa isang GitHub repo at gumawa ng PR upang mapanatili ang mga pagbabagong iyon. + +### Napaka-ligtas nito + +Sa kabuuan, nagbibigay ang WordPress Playground ng isang walang risk na kapaligiran para sa mga baguhan upang matuto at magkaroon ng hands-on na karanasan sa WordPress. Tinutulungan ka nitong magkaroon ng kumpiyansa at kaalaman bago gumawa ng pagbabago sa iyong live na website. + +:::tip +Tingnan ang [mga gabay section](/guides) upang malaman kung paano mas mapapakinabangan ang WordPress Playground sa pag-test ng iyong mga theme at plugin at paglikha ng content on the fly. +::: + +## Paano gumagana ang WordPress Playground? + +Kapag unang beses mong ginamit ang WordPress Playground, bibigyan ka ng hiwalay na espasyo kung saan maaari kang lumikha at mag-customize ng sarili mong WordPress website. Ang espasyong ito ay ganap na hiwalay sa iyong aktwal na website. + +### Streamed, hindi served + +Ang WordPress na nakikita mo kapag binuksan mo ang Playground sa browser ay isang WordPress na dapat gumana tulad ng anumang WordPress, na may [ilang limitasyon](/developers/limitations) at ang mahalagang eksepsyon na hindi ito permanenteng server na may internet address na maglilimita ng koneksyon sa ilang third-party na serbisyo (automation, sharing, analysis, email, backups, atbp.) sa isang patuloy na paraan. + +Ang loading screen at progress bar na nakikita mo sa Playground ay kinabibilangan ng streaming ng mga pundamental na teknolohiyang iyon papunta sa iyong browser at mga configuration step mula sa [WordPress Blueprints](/blueprints) (tingnan ang [mga halimbawa](/blueprints/examples)), upang ang isang buong server, WordPress software, Theme & Plugin solutions, at mga instruction sa configuration ay ma-stream nang over-the-wire. + +## Ano ang pinagkaiba ng Playground sa pagpapatakbo ng WordPress sa web server o lokal na desktop app? + +Matagal nang umaasa ang mga web application tulad ng WordPress sa teknolohiya ng server [para patakbuhin ang logic](/developers/architecture/wasm-php-overview) at [mag-imbak ng data](/developers/architecture/wordpress#sqlite). + +Ang paggamit ng mga teknolohiyang iyon ay nangangahulugang kailangang patakbuhin ang web server na konektado sa internet o gamitin ang mga teknolohiyang iyon sa desktop service o app (minsan tinatawag na "WordPress local environment") na umaasa sa virtual server na may naka-install na teknolohiya o sa mga teknolohiyang naka-install sa kasalukuyang device. + +Ang Playground ay isang bago at natatanging paraan upang i-stream ang mga teknolohiyang server—kabilang ang WordPress (at WP-CLI)—bilang mga file na maaari nang patakbuhin sa browser. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/launch.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/launch.md new file mode 100644 index 0000000000..adedf8ecc6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/launch.md @@ -0,0 +1,38 @@ +--- +title: Launch +slug: /about/launch +--- + +# Launch + +Abutin ang iyong mga kliyente o customer nang mas mabilis. Ipakita ang iyong produkto, hayaan ang mga user na subukan ito nang live, o ilunsad ito sa App Store nang walang anumang paghihintay. + +## I-embed ang interactive na demo ng produkto sa mga website + +Samantalahin ang potensyal ng [blueprints](/blueprints) upang lumikha ng interactive na demo ng iyong mga plugin o theme. Halimbawa, maaari kang magbigay ng link sa iyong mga user/kliyente upang ipakita kung paano nagsasama ang iyong custom plugin sa isang naangkop na theme, na ipinapakita ang kanilang pinagsamang functionality at hitsura. + +Basahin ang higit pa tungkol dito sa [Paano gamitin ang WordPress Playground para sa interactive na demo](https://developer.wordpress.org/news/2024/04/25/how-to-use-wordpress-playground-for-interactive-demos/) + +Kumuha ng inspirasyon tungkol sa uri ng interactive na demo na maaari mong likhain sa [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) + +Pinapayagan ka ng tool na [Blueprints builder](https://playground.wordpress.net/builder/builder.html) na i-edit ang iyong blueprint online at patakbuhin ito nang direkta sa isang Playground instance. + + + +

+ +Isang kapaki-pakinabang na tool upang lumikha ng blueprint ay ang [WordPress Playground Step Library](https://akirk.github.io/playground-step-library/#) tool na nagbibigay ng visual na interface upang i-drag o i-click ang mga hakbang upang lumikha ng blueprint para sa WordPress Playground. Maaari ka ring [gumawa ng sarili mong mga hakbang](https://github.com/akirk/playground-step-library/#contributing)! + +## I-embed ang mga demo sa mga post at pahina gamit ang WordPress Playground block + +Ang [WordPress Playground block](https://wordpress.org/plugins/interactive-code-block/) na ito ay nagpapahintulot sa iyo na i-embed ang WordPress Playground sa iyong mga post at pahina. Maaari ka ring maglagay ng interactive na code editor upang ipakita at turuan ang iyong mga mambabasa kung paano binubuo ang mga WordPress plugin. + +Sa block na ito ay mayroon kang diretso at epektibong paraan upang lumikha ng live WordPress environment na maaaring i-embed sa loob ng iyong mga blog post. + +:::info +Para sa anumang isyu o katanungan tungkol sa WordPress Playground Block, mangyaring magbukas ng GitHub issue sa repositoryang [playground-tools](https://github.com/WordPress/playground-tools). +::: + +## Ilagay ang isang native app na nagpapatakbo ng WordPress sa App Store + +Tingnan ang gabay na [Paano mag-ship ng tunay na WordPress site sa isang native iOS app gamit ang Playground?](../guides/wordpress-native-ios-app) para sa impormasyon tungkol sa kasong ito. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/test.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/test.md new file mode 100644 index 0000000000..0cd7eb1e65 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/about/test.md @@ -0,0 +1,42 @@ +--- +title: Test +slug: /about/test +--- + +# Subukan + +I-upgrade ang iyong QA process sa kakayahang suriin ang progreso sa iyong browser sa isang click lang. Kapag handa ka na, agad na i-push ang mga update. + +## Subukan ang anumang theme o plugin + +Sa Playground, maaari mong subukan ang anumang plugin o theme. Gamitin ang [Query API](/developers/apis/query-api) upang mabilis na i-load ang anumang plugin o theme na naka-publish sa direktoryo ng wordpress.org na mga [plugin](https://wordpress.org/plugins) at [theme](https://wordpress.org/themes/). + +Halimbawa, ang sumusunod na link ay maglo-load ng [“pendant” theme](https://wordpress.org/themes/pendant/) at ang [“gutenberg” plugin](https://wordpress.org/plugins/gutenberg/) sa isang Playground instance: + +[https://playground.wordpress.net/?theme=pendant&plugin=gutenberg](https://playground.wordpress.net/?theme=pendant&plugin=gutenberg) + +Ngunit maaari ka ring magsubok ng [mas komplikadong mga konfigurasyon gamit ang blueprints](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md), halimbawa pagsubok ng code ng plugin mula sa isang gist (tingnan ang [blueprint](https://github.com/wordpress/blueprints/blob/trunk/blueprints/install-plugin-from-gist/blueprint.json) at [live demo](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-plugin-from-gist/blueprint.json)). + +## Live preview ng pull requests + +Ang pagsusuri ng pull requests ay isa sa mga pinakakapana-panabik na use case para sa proyekto ng Playground. Sa Playground, maaari mong paganahin ang Live preview link sa bawat Pull Request ng isang WordPress-related na proyekto sa GitHub upang makita agad ng mga developer ang epekto ng code sa Pull Request na iyon. Basahin pa tungkol dito sa [Preview WordPress Core Pull Requests with Playground](https://wptavern.com/preview-wordpress-core-pull-requests-with-playground#:~:text=Previewing%20WordPress%20Pull%20Requests%20requires,testing%20and%20team%20workflows%20difficult.). + +May ilang pampublikong implementasyon ng use case na ito tulad ng [WordPress Core PR previewer](https://playground.wordpress.net/wordpress.html) at [Gutenberg PR previewer](https://playground.wordpress.net/gutenberg.html). Maaaring ilagay ng user ang PR number o URL upang ire-direct sa isang WordPress instance, na pinapagana ng Playground, kung saan naiaaplay ang mga pagbabago mula sa PR. + +Ang GitHub actions tulad ng [WP Playground PR Preview](https://github.com/vcanales/action-wp-playground-pr-preview) ay nagpapahintulot sa iyo na magdagdag ng PR previews na pinapagana ng WP Playground sa anumang repository. Halimbawa, [na-enable ito](https://github.com/WordPress/twentytwentyfive/pull/359) sa repositoryong [WordPress/twentytwentyfive](https://github.com/WordPress/twentytwentyfive). + +## I-clone ang iyong site at mag-eksperimento sa isang pribadong sandbox + +Sa pamamagitan ng plugin na [Sandbox Site powered by Playground](https://wordpress.org/plugins/playground/), maaari kang lumikha ng pribadong WordPress Playground na kopya ng iyong site upang ligtas na subukan ang mga plugin o gumawa ng anumang iba pang eksperimento sa kopya ng iyong site nang hindi nag-a-upload ng anumang data sa cloud at hindi naaapektuhan ang orihinal na site. + +## Subukan ang iba't ibang bersyon ng WordPress at PHP + +Sa Playground, maaari mong mabilis na subukan ang anumang major na bersyon ng WordPress o PHP sa pamamagitan ng _pag-customize ng mga setting_ nito o paggamit ng custom blueprint na may property na `preferredVersions`. + +Halimbawa, maaari mong lagiang subukan ang pinakabagong development version ng WordPress, na tinatawag ding [Beta Nightly](https://wordpress.org/download/beta-nightly/), mula sa link na ito: [https://playground.wordpress.net/?wp=nightly](https://playground.wordpress.net/?wp=nightly) + +Sa panahon ng Beta ng anumang WordPress release, maaari mo ring subukan ang pinakabagong WordPress Beta o RC na release kasama ang theme test data at debugging plugins (tingnan ang [blueprint](https://github.com/WordPress/blueprints/blob/trunk/blueprints/beta-rc/blueprint.json) at [live demo](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/beta-rc/blueprint.json)). + +Maaari mo ring i-load ang anumang [theme, plugin](/developers/apis/query-api), o [konigurasyon](/blueprints) sa anumang available na bersyon ng WordPress at PHP upang suriin kung paano ito gumagana sa environment na iyon. + +Ang [WordPress Playground: the ultimate learning, testing, & teaching tool for WordPress](https://www.youtube.com/watch?v=dN_LaenY8bI) ay nagbibigay ng mahusay na overview ng mga posibilidad sa pagsusuri gamit ang Playground. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/changelog.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/changelog.md new file mode 100644 index 0000000000..e319cea29f --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/changelog.md @@ -0,0 +1,2401 @@ +--- +title: Changelog +slug: /changelog +--- + +# Changelog + +All notable changes to this project are documented in this file by a CI job +that runs on every NPM release. The file follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) +format. + +## [v1.0.38] (2025-05-22) + +### Various + +- Revert "[ php-wasm ] add Intl support (#150)". ([#154](https://github.com/Automattic/wordpress-playground-private/pull/154)) +- Use the new SQLite driver. ([#144](https://github.com/Automattic/wordpress-playground-private/pull/144)) +- [ php-wasm ] Add intl support. ([#155](https://github.com/Automattic/wordpress-playground-private/pull/155)) +- [ php-wasm ] Intl : Improve integration. ([#159](https://github.com/Automattic/wordpress-playground-private/pull/159)) +- [ php-wasm ] add Intl support. ([#150](https://github.com/Automattic/wordpress-playground-private/pull/150)) +- [CLI] Enable users to automatically mount their current working directory into Playground. ([#39](https://github.com/Automattic/wordpress-playground-private/pull/39)) +- [PHP-wasm Node] Fix Identifier '\_\_filename' has already been declared. ([#143](https://github.com/Automattic/wordpress-playground-private/pull/143)) +- [Website] Support data URLs in blueprint-url query parameter. ([#158](https://github.com/Automattic/wordpress-playground-private/pull/158)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @JanJakes @mho22 + +## [v1.0.37] (2025-05-15) + +### Various + +- Define `DB_NAME` constant when it's missing. ([#140](https://github.com/Automattic/wordpress-playground-private/pull/140)) +- Support limiting files added to self-hosted packages. ([#149](https://github.com/Automattic/wordpress-playground-private/pull/149)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton @JanJakes + +## [v1.0.36] (2025-05-08) + +### Various + +- Document mounting OPFS storage _after_ the boot. ([#141](https://github.com/Automattic/wordpress-playground-private/pull/141)) +- QUERY_STRING should default to empty string. ([#139](https://github.com/Automattic/wordpress-playground-private/pull/139)) +- Remove null steps that are added. ([#135](https://github.com/Automattic/wordpress-playground-private/pull/135)) +- [CLI] Fix package entry point path. ([#136](https://github.com/Automattic/wordpress-playground-private/pull/136)) + +### Contributors + +The following contributors merged PRs in this release: + +@ashfame @bgrgicak @sejas + +## [v1.0.35] (2025-05-08) + +## [v1.0.34] (2025-05-08) + +### Various + +- Document mounting OPFS storage _after_ the boot. ([#141](https://github.com/Automattic/wordpress-playground-private/pull/141)) + +### Contributors + +The following contributors merged PRs in this release: + +@ashfame + +## [v1.0.33] (2025-05-08) + +### Various + +- Add MySQL network calls to Asyncify tests. ([#108](https://github.com/Automattic/wordpress-playground-private/pull/108)) +- Format the plugin-proxy file. ([#127](https://github.com/Automattic/wordpress-playground-private/pull/127)) +- Plugin proxy: Allow all repos from WordPress, Automattic and Woocommerce organizations. ([#128](https://github.com/Automattic/wordpress-playground-private/pull/128)) +- QUERY_STRING should default to empty string. ([#139](https://github.com/Automattic/wordpress-playground-private/pull/139)) +- Remove null steps that are added. ([#135](https://github.com/Automattic/wordpress-playground-private/pull/135)) +- Remove unused dependencies. ([#116](https://github.com/Automattic/wordpress-playground-private/pull/116)) +- [CLI] Fix package entry point path. ([#136](https://github.com/Automattic/wordpress-playground-private/pull/136)) +- [PHP-wasm Node] Add support for resolving wasm paths in Windows. ([#129](https://github.com/Automattic/wordpress-playground-private/pull/129)) +- [PHP-wasm Node] Dynamically mount symlinks. ([#125](https://github.com/Automattic/wordpress-playground-private/pull/125)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ashfame @bgrgicak @ingeniumed @sejas + +## [v1.0.32] (2025-05-06) + +### Various + +- Add MySQL network calls to Asyncify tests. ([#108](https://github.com/Automattic/wordpress-playground-private/pull/108)) +- Format the plugin-proxy file. ([#127](https://github.com/Automattic/wordpress-playground-private/pull/127)) +- Plugin proxy: Allow all repos from WordPress, Automattic and Woocommerce organizations. ([#128](https://github.com/Automattic/wordpress-playground-private/pull/128)) +- Remove unused dependencies. ([#116](https://github.com/Automattic/wordpress-playground-private/pull/116)) +- [PHP-wasm Node] Add support for resolving wasm paths in Windows. ([#129](https://github.com/Automattic/wordpress-playground-private/pull/129)) +- [PHP-wasm Node] Dynamically mount symlinks. ([#125](https://github.com/Automattic/wordpress-playground-private/pull/125)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @ingeniumed + +## [v1.0.31] (2025-04-29) + +### Bug Fixes + +- Fix changelog version order. ([#100](https://github.com/Automattic/wordpress-playground-private/pull/100)) +- Fix openssl library paths in php-wasm build. ([#102](https://github.com/Automattic/wordpress-playground-private/pull/102)) + +### Various + +- Add private fork links to the changelog. ([#98](https://github.com/Automattic/wordpress-playground-private/pull/98)) +- Allow public access to A8C Playground instance. ([#119](https://github.com/Automattic/wordpress-playground-private/pull/119)) +- Make php-wasm and Playground CLI's fast to run with Node.js. ([#107](https://github.com/Automattic/wordpress-playground-private/pull/107)) +- Playground CLI: Add `skipSqliteSetup` flag for MySQL support. ([#97](https://github.com/Automattic/wordpress-playground-private/pull/97)) +- Prep the WP update workflows to be re-enabled. ([#110](https://github.com/Automattic/wordpress-playground-private/pull/110)) +- Support building for additional remote origins. ([#122](https://github.com/Automattic/wordpress-playground-private/pull/122)) +- Tweak Blueprint test string to match WP 6.8. ([#117](https://github.com/Automattic/wordpress-playground-private/pull/117)) +- Update Nx, Vite, and ESLint dependencies. ([#35](https://github.com/Automattic/wordpress-playground-private/pull/35)) +- Upgrade octokit to 3.1.2 to fix vulnerability. ([#106](https://github.com/Automattic/wordpress-playground-private/pull/106)) +- Use Node as the Vitest environment. ([#96](https://github.com/Automattic/wordpress-playground-private/pull/96)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak @brandonpayton @ivan-ottinger @wojtekn + +## [v1.0.30] (2025-04-07) + +### Bug Fixes + +- Fix changelog workflow and backfill changelog entries from recent versions. ([#83](https://github.com/Automattic/wordpress-playground-private/pull/83)) + +### Various + +- Consider unexpected undefined symbols to be errors. ([#86](https://github.com/Automattic/wordpress-playground-private/pull/86)) +- Ignore ca-bundle created by @php-wasm/cli. ([#88](https://github.com/Automattic/wordpress-playground-private/pull/88)) +- Support Node.js args to built-script executor. ([#92](https://github.com/Automattic/wordpress-playground-private/pull/92)) +- Support quickly testing php-wasm CLI changes with bun. ([#85](https://github.com/Automattic/wordpress-playground-private/pull/85)) +- Update Emscripten version to 4.0.5. ([#93](https://github.com/Automattic/wordpress-playground-private/pull/93)) +- Update Playground Node version to 20.9.0. ([#89](https://github.com/Automattic/wordpress-playground-private/pull/89)) +- Upgrade express to 4.21.2. ([#90](https://github.com/Automattic/wordpress-playground-private/pull/90)) +- [PHP-wasm] Use statfs from NODEFS in the Node version. ([#94](https://github.com/Automattic/wordpress-playground-private/pull/94)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak @brandonpayton @wojtekn + +## [v1.0.29] (2025-03-11) + +### Various + +- Blueprint bundles. ([#75](https://github.com/Automattic/wordpress-playground-private/pull/75)) +- CORS Proxy: fetch() with credentials: "include". ([#66](https://github.com/Automattic/wordpress-playground-private/pull/66)) +- Exif support for PHP-wasm. ([#72](https://github.com/Automattic/wordpress-playground-private/pull/72)) +- Remove Data Liberation PHP modules. ([#79](https://github.com/Automattic/wordpress-playground-private/pull/79)) +- Stop suppressing 64bit integer PHP warnings as 64bit longs are now suppoted. ([#76](https://github.com/Automattic/wordpress-playground-private/pull/76)) +- [Blueprints] setSiteLanguage fetch translation package URL from WP.org. ([#81](https://github.com/Automattic/wordpress-playground-private/pull/81)) +- [Website] Drop the static <link rel="manifest"> tag and generate one in JavaScript instead. ([#78](https://github.com/Automattic/wordpress-playground-private/pull/78)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v1.0.28] (2025-03-05) + +### Various + +- 64bit integer support, drop PHP 7.0 and 7.1 support. ([#74](https://github.com/Automattic/wordpress-playground-private/pull/74)) +- FS Journal: Handle renaming OPFS files via delete + create (instead of file.move()). ([#64](https://github.com/Automattic/wordpress-playground-private/pull/64)) +- GitHub: Cache node_modules per arch to avoid nx error. ([#70](https://github.com/Automattic/wordpress-playground-private/pull/70)) +- Merge from public Playground repo. ([#59](https://github.com/Automattic/wordpress-playground-private/pull/59)) +- OPFS site creation: Use the same "is this directory a site?" check as the site list. ([#65](https://github.com/Automattic/wordpress-playground-private/pull/65)) +- Stop adding source maps to offline assets list. ([#68](https://github.com/Automattic/wordpress-playground-private/pull/68)) +- Support mobile access to private Playground instance. ([#73](https://github.com/Automattic/wordpress-playground-private/pull/73)) +- TLS->HTTP Proxy: Support outbound request body. ([#61](https://github.com/Automattic/wordpress-playground-private/pull/61)) +- TLS: Only use the server_name extension during server hello. ([#62](https://github.com/Automattic/wordpress-playground-private/pull/62)) +- Website: Blueprints as PWAs with a dynamic manifest.json file. ([#67](https://github.com/Automattic/wordpress-playground-private/pull/67)) +- Website: Preserve the `mode` query arg when opening OPFS site. ([#63](https://github.com/Automattic/wordpress-playground-private/pull/63)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton + +## [v1.0.27] (2025-02-25) + +### Bug Fixes + +- Fix php-wasm build error for WITH_SOURCEMAPS=yes. ([#44](https://github.com/Automattic/wordpress-playground-private/pull/44)) +- Fix php-wasm source map base. ([#46](https://github.com/Automattic/wordpress-playground-private/pull/46)) +- Fix private website deployment workflow. ([#57](https://github.com/Automattic/wordpress-playground-private/pull/57)) +- Fix up private website deployment workflow after initial commit. ([#29](https://github.com/Automattic/wordpress-playground-private/pull/29)) + +### Various + +- Add WITH_DEBUG option for building php-wasm with DWARF debug info. ([#47](https://github.com/Automattic/wordpress-playground-private/pull/47)) +- Add `janjakes` to GitHub workflows actors. ([#33](https://github.com/Automattic/wordpress-playground-private/pull/33)) +- Add a dedicated workflow for deploying private playground. ([#28](https://github.com/Automattic/wordpress-playground-private/pull/28)) +- Add remote data blocks to the allowlist. ([#30](https://github.com/Automattic/wordpress-playground-private/pull/30)) +- Allow ashfame to run self-hosted package release workflow. ([#22](https://github.com/Automattic/wordpress-playground-private/pull/22)) +- Allow deploying custom supported domains for CORS proxy. ([#54](https://github.com/Automattic/wordpress-playground-private/pull/54)) +- CORS proxy: Make allowed origins configurable. ([#43](https://github.com/Automattic/wordpress-playground-private/pull/43)) +- Make further fixes for unreliable end-to-end tests. ([#9](https://github.com/Automattic/wordpress-playground-private/pull/9)) +- Move DNS polyfills to a PHP extension and add missing constants. ([#27](https://github.com/Automattic/wordpress-playground-private/pull/27)) +- New playground CLI function interface. ([#40](https://github.com/Automattic/wordpress-playground-private/pull/40)) +- Replace some hardcoded refs to playground.wordpress.net web app. ([#42](https://github.com/Automattic/wordpress-playground-private/pull/42)) +- Restore safety condition for CORS proxy deployment workflow. ([#55](https://github.com/Automattic/wordpress-playground-private/pull/55)) +- Revert "Add the launch browser flag to CLI". ([#24](https://github.com/Automattic/wordpress-playground-private/pull/24)) +- Revert "Support file URL resources in command line environment". ([#41](https://github.com/Automattic/wordpress-playground-private/pull/41)) +- Schedule private deployment and use private environment. ([#37](https://github.com/Automattic/wordpress-playground-private/pull/37)) +- Stop assuming CLI stdout is a TTY write stream. ([#51](https://github.com/Automattic/wordpress-playground-private/pull/51)) +- Store WordPress site cookies in the browser instead of a custom Cookie Store. ([#20](https://github.com/Automattic/wordpress-playground-private/pull/20)) +- Support file URL resources in command line environment. ([#34](https://github.com/Automattic/wordpress-playground-private/pull/34)) +- Switch to relative paths in app manifest. ([#36](https://github.com/Automattic/wordpress-playground-private/pull/36)) +- Switch to runner with more CPU and RAM. ([#45](https://github.com/Automattic/wordpress-playground-private/pull/45)) +- Treat zip files as zip files regardless of file name. ([#58](https://github.com/Automattic/wordpress-playground-private/pull/58)) +- Try more Playwright workers since we have a runner with more resources. ([#48](https://github.com/Automattic/wordpress-playground-private/pull/48)) +- Update private Playground instance to use dedicated CORS proxy. ([#56](https://github.com/Automattic/wordpress-playground-private/pull/56)) +- Use rsync instead of scp in website deploy workflow. ([#26](https://github.com/Automattic/wordpress-playground-private/pull/26)) +- Use specified SQLite version also for PHP < 7.4. ([#32](https://github.com/Automattic/wordpress-playground-private/pull/32)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @ingeniumed @JanJakes @zaerl + +## [v1.0.26] (2025-02-04) + +### Bug Fixes + +- Fix workflow for deploying self-hosted packages. ([#6](https://github.com/Automattic/wordpress-playground-private/pull/6)) + +### Various + +- Add the launch browser flag to CLI. ([#18](https://github.com/Automattic/wordpress-playground-private/pull/18)) +- [Fix] Zip spec compliance for exported backup file. ([#7](https://github.com/Automattic/wordpress-playground-private/pull/7)) + +### Contributors + +The following contributors merged PRs in this release: + +@ashfame @brandonpayton @zaerl + +## [v1.0.25] (2025-02-04) + +### Various + +- Add missing node external to Playground CLI. ([#19](https://github.com/Automattic/wordpress-playground-private/pull/19)) +- Add self-hosted package publishing. ([#5](https://github.com/Automattic/wordpress-playground-private/pull/5)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v1.0.24] (2025-02-03) + +## [v1.0.23] (2025-01-27) + +## [v1.0.22] (2025-01-20) + +## [v1.0.21] (2025-01-13) + +### Enhancements + +- [Data Liberation] Add EPub to Blocks converter. ([#2097](https://github.com/WordPress/wordpress-playground/pull/2097)) +- [Data Liberation] Block markup consumers and producers. ([#2121](https://github.com/WordPress/wordpress-playground/pull/2121)) +- [Data Liberation] Filesystem entity reader. ([#2125](https://github.com/WordPress/wordpress-playground/pull/2125)) +- [Data Liberation] Recognize self-closing blocks in WP_Block_Markup_Processor. ([#2120](https://github.com/WordPress/wordpress-playground/pull/2120)) +- [Data Liberation] Refactor Entity Readers class diagram. ([#2096](https://github.com/WordPress/wordpress-playground/pull/2096)) + +### PHP WebAssembly + +- PHP 8.4 support. ([#2038](https://github.com/WordPress/wordpress-playground/pull/2038)) +- Rewrote fileToUint8Array function to be also NodeJS/Deno compatible. ([#2117](https://github.com/WordPress/wordpress-playground/pull/2117)) +- [PHP] Restore /internal files and Filesystem mounts after hotswapPhpRuntime is called. ([#2119](https://github.com/WordPress/wordpress-playground/pull/2119)) + +### Bug Fixes + +- [CORS Proxy] Support chunked encoding when running in Apache/Nginx/etc. ([#2114](https://github.com/WordPress/wordpress-playground/pull/2114)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @mbuella + +## [v1.0.20] (2025-01-06) + +### Website + +- Avoid login issue in deployment end-to-end tests. ([#2065](https://github.com/WordPress/wordpress-playground/pull/2065)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v1.0.19] (2024-12-30) + +## [v1.0.18] (2024-12-23) + +### Enhancements + +- [Data Liberation] Add HTML to Blocks converter. ([#2095](https://github.com/WordPress/wordpress-playground/pull/2095)) +- [Data Liberation] Add Markdown parsing libraries. ([#2092](https://github.com/WordPress/wordpress-playground/pull/2092)) +- [Data Liberation] Build markdown importer as phar. ([#2094](https://github.com/WordPress/wordpress-playground/pull/2094)) +- [Data Liberation] Move Markdown importer to a separate package. ([#2093](https://github.com/WordPress/wordpress-playground/pull/2093)) + +### Blueprints + +- Prevent WSOD when autologin is enabled and a plugin logs a notice. ([#2079](https://github.com/WordPress/wordpress-playground/pull/2079)) + +### Tools + +#### GitHub integration + +- [Website] GitHub export modal: Correctly compute the root path when exporting the entire site. ([#2103](https://github.com/WordPress/wordpress-playground/pull/2103)) + +### Website + +- Enable separate source maps for all package builds. ([#2088](https://github.com/WordPress/wordpress-playground/pull/2088)) + +### Bug Fixes + +- Fix README.md typos. ([#2091](https://github.com/WordPress/wordpress-playground/pull/2091)) + +### Various + +- Add small comment about lazy init of WXR reader. ([#2102](https://github.com/WordPress/wordpress-playground/pull/2102)) +- [Blueprints] Prevent plugin activation error if plugin redirects during activation or produces an output. ([#2066](https://github.com/WordPress/wordpress-playground/pull/2066)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @zaerl + +## [v1.0.17] (2024-12-17) + +### Tools + +#### Blueprints Builder + +- Use transparent CORS proxy in Blueprint Builder. ([#2089](https://github.com/WordPress/wordpress-playground/pull/2089)) + +### PHP WebAssembly + +- Build `@php-wasm` packages as dual ESM + CJS. ([#2087](https://github.com/WordPress/wordpress-playground/pull/2087)) + +### + +- Add ESLint rule to avoid unintentional dependency on @wp-playgrounds/wordpress-builds. ([#2048](https://github.com/WordPress/wordpress-playground/pull/2048)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton + +## [v1.0.16] (2024-12-16) + +### Enhancements + +- Allow Authorization header pass-through with X-Cors-Proxy-Allowed-Request-Headers. ([#2007](https://github.com/WordPress/wordpress-playground/pull/2007)) +- [Cors Proxy] Support Transfer-Encoding: Chunked. ([#2077](https://github.com/WordPress/wordpress-playground/pull/2077)) +- [Website] Enable CORS proxy for all fetches. ([#2076](https://github.com/WordPress/wordpress-playground/pull/2076)) + +### Tools + +#### Blueprints + +- [Blueprints] Preserve the first char of all filenames sourced from GitDirectoryReference. ([#2070](https://github.com/WordPress/wordpress-playground/pull/2070)) + +#### Import/Export + +- [Blueprints] Support Data Liberation importer in the importWxr step. ([#2058](https://github.com/WordPress/wordpress-playground/pull/2058)) + +### PHP WebAssembly + +#### Website + +- [Webiste] Switch the CORS Proxy URL to wordpress-playground-cors-proxy.net. ([#2074](https://github.com/WordPress/wordpress-playground/pull/2074)) + +### Website + +- Bugfix: Delist data-liberation-core.phar from the preloaded offline mode assets. ([#2072](https://github.com/WordPress/wordpress-playground/pull/2072)) +- Don't show the error reporting modal on the initial load. ([#2068](https://github.com/WordPress/wordpress-playground/pull/2068)) +- Prevent the initial flash of "You have no Playgrounds" message. ([#2069](https://github.com/WordPress/wordpress-playground/pull/2069)) +- Remove old PR preview HTML files and add redirects to new preview modals. ([#2081](https://github.com/WordPress/wordpress-playground/pull/2081)) + +### Internal + +- [Meta] Remove GitHub Board Automation workflow. ([#2073](https://github.com/WordPress/wordpress-playground/pull/2073)) + +### Bug Fixes + +- Temporary: Skip more CI-only deployment test failures. ([#2071](https://github.com/WordPress/wordpress-playground/pull/2071)) + +### Various + +- Ensure that Site Editor templates are associated with the correct taxonomy. ([#1997](https://github.com/WordPress/wordpress-playground/pull/1997)) +- PR Preview: Document and simplify targetParams. ([#2052](https://github.com/WordPress/wordpress-playground/pull/2052)) +- Revert "Remove old PR preview HTML files and add redirects to new preview modals". ([#2082](https://github.com/WordPress/wordpress-playground/pull/2082)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ajotka @akirk @brandonpayton @maxschmeling + +## [v1.0.15] (2024-12-09) + +### Enhancements + +- Shorten and simplify path to CORS proxy. ([#2063](https://github.com/WordPress/wordpress-playground/pull/2063)) +- Support users choosing how to handle URLs for sites that do not exist. ([#2059](https://github.com/WordPress/wordpress-playground/pull/2059)) + +### Tools + +#### GitHub integration + +- Add zaerl to GitHub workflows actors. ([#2041](https://github.com/WordPress/wordpress-playground/pull/2041)) + +### PHP WebAssembly + +- [Networking] Decrypt TLS 1.2 alert messages. ([#2060](https://github.com/WordPress/wordpress-playground/pull/2060)) + +### Website + +- Fix CORS proxy deploy workflow. ([#2049](https://github.com/WordPress/wordpress-playground/pull/2049)) +- Nightly build bugfix – ship the actual nightly build, not the latest release. ([#2056](https://github.com/WordPress/wordpress-playground/pull/2056)) +- Remove duplicate "Saved Playgrounds" label. ([#2044](https://github.com/WordPress/wordpress-playground/pull/2044)) + +### Various + +- Add deploy workflow for standalone CORS proxy. ([#2022](https://github.com/WordPress/wordpress-playground/pull/2022)) +- Restore CORS support to CORS proxy. ([#2023](https://github.com/WordPress/wordpress-playground/pull/2023)) +- [Data Liberation] "Fetch from a different URL" button for failed media downloads, Interactivity API support. ([#2040](https://github.com/WordPress/wordpress-playground/pull/2040)) +- [Data Liberation] Sync WP_HTML API with WordPress 6.7.1 (and add a new test). ([#2062](https://github.com/WordPress/wordpress-playground/pull/2062)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @zaerl + +## [v1.0.14] (2024-12-02) + +### Blueprints + +- Resolve the latest WordPress version from the API instead of assuming it's the same as the last minified build. ([#2027](https://github.com/WordPress/wordpress-playground/pull/2027)) + +### Tools + +#### Blueprints Builder + +- Add installPlugin support for single plugin files. ([#2033](https://github.com/WordPress/wordpress-playground/pull/2033)) + +### PHP WebAssembly + +- Networking: Preserve the content-type header when fetch()-ing. ([#2028](https://github.com/WordPress/wordpress-playground/pull/2028)) + +### Website + +- [Web] Re-enable wp-cron. ([#2039](https://github.com/WordPress/wordpress-playground/pull/2039)) + +### Various + +- [Data Liberation] WP_Stream_Importer: User-driven incremental import. ([#2013](https://github.com/WordPress/wordpress-playground/pull/2013)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton + +## [v1.0.13] (2024-11-25) + +### Enhancements + +- E2E: Disable a flaky deployment test. ([#2016](https://github.com/WordPress/wordpress-playground/pull/2016)) +- [Data Liberation] Add WXR import CLI script. ([#2012](https://github.com/WordPress/wordpress-playground/pull/2012)) +- [Data Liberation] Re-entrant WP_Stream_Importer. ([#2004](https://github.com/WordPress/wordpress-playground/pull/2004)) +- [Data Liberation] wp-admin importer page. ([#2003](https://github.com/WordPress/wordpress-playground/pull/2003)) + +### Blueprints + +- SetSiteLanguage step – download the latest RC translations for Nightly and Beta builds of WordPress. ([#1987](https://github.com/WordPress/wordpress-playground/pull/1987)) +- Use the major WordPress version to download RC/beta translations. ([#2017](https://github.com/WordPress/wordpress-playground/pull/2017)) + +### Tools + +#### Pull Request Previewer + +- Fix path of PR preview URL in production. ([#2014](https://github.com/WordPress/wordpress-playground/pull/2014)) +- Support submitting PR preview modal with ENTER key. ([#2015](https://github.com/WordPress/wordpress-playground/pull/2015)) + +### Website + +- Move WordPress & Gutenberg PR Preview to Playground website. ([#1938](https://github.com/WordPress/wordpress-playground/pull/1938)) +- Restore basic element styles for modal dialog content. ([#2021](https://github.com/WordPress/wordpress-playground/pull/2021)) + +### Bug Fixes + +- Fix test.md link. ([#2005](https://github.com/WordPress/wordpress-playground/pull/2005)) + +### Various + +- [Data Liberation] WP_Stream_Importer with support for WXR and Markdown files. ([#1982](https://github.com/WordPress/wordpress-playground/pull/1982)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ajotka @bgrgicak @brandonpayton @StevenDufresne @zaerl + +## [v1.0.12] (2024-11-18) + +### Website + +- [Service Worker] Support redirects to relative URLs in Safari. ([#1978](https://github.com/WordPress/wordpress-playground/pull/1978)) + +#### Blueprints + +- [Query API] Use the exact redirect URL provided in the ?url= query param. ([#1945](https://github.com/WordPress/wordpress-playground/pull/1945)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v1.0.11] (2024-11-11) + +## [v1.0.10] (2024-11-08) + +### Enhancements + +- [CLI] Set debug constants during boot. ([#1983](https://github.com/WordPress/wordpress-playground/pull/1983)) + +### Bug Fixes + +- [CLI] Restore the "login" argument handler. ([#1985](https://github.com/WordPress/wordpress-playground/pull/1985)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak + +## [v1.0.9] (2024-11-04) + +### Enhancements + +- [Data Liberation] Fork humanmade/WordPress-Importer. ([#1968](https://github.com/WordPress/wordpress-playground/pull/1968)) +- [Data Liberation] Merge both XML processors into a single WP_XML_Processor. ([#1960](https://github.com/WordPress/wordpress-playground/pull/1960)) +- [Data liberation] Add blueprints-library as a submodule. ([#1967](https://github.com/WordPress/wordpress-playground/pull/1967)) + +### Tools + +#### Import/Export + +- [Data Liberation] WP_WXR_Reader. ([#1972](https://github.com/WordPress/wordpress-playground/pull/1972)) + +### Documentation + +- Rewrite clone examples to use HTTPS instead of SSH. ([#1963](https://github.com/WordPress/wordpress-playground/pull/1963)) + +### Website + +- Consistent width of settings, logs, and blueprint gallery sidebars. ([#1964](https://github.com/WordPress/wordpress-playground/pull/1964)) + +### Bug Fixes + +- Fix: Import & Export from Github causes reloading the playground even before accept this step. ([#1908](https://github.com/WordPress/wordpress-playground/pull/1908)) +- [WordPress build] Only build the latest patch version of WordPress. ([#1955](https://github.com/WordPress/wordpress-playground/pull/1955)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ajotka @bgrgicak + +## [v1.0.8] (2024-10-30) + +### Enhancements + +- [Data liberation] wp_rewrite_urls(). ([#1893](https://github.com/WordPress/wordpress-playground/pull/1893)) + +### PHP WebAssembly + +- [PHP.wasm for Node] Fix php.js import path in the published npm package. ([#1958](https://github.com/WordPress/wordpress-playground/pull/1958)) + +### Website + +- Restore .d.ts files missing from the published @wp-playground/remote npm package. ([#1949](https://github.com/WordPress/wordpress-playground/pull/1949)) + +### Various + +- [Data Liberation] Add XML API, Stream API, WXR URL Rewriter API. ([#1952](https://github.com/WordPress/wordpress-playground/pull/1952)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @psrpinto + +## [v1.0.7] (2024-10-28) + +## [v1.0.6] (2024-10-28) + +### Website + +- Query API: Preserve multiple ?plugin= query params. ([#1947](https://github.com/WordPress/wordpress-playground/pull/1947)) +- [Remote] Enable releasing @wp-playground/remote by making it public. ([#1948](https://github.com/WordPress/wordpress-playground/pull/1948)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v1.0.5] (2024-10-25) + +### Enhancements + +- [CORS Proxy] Rate-limits IPv6 requests based on /64 subnets, not specific addresses. ([#1923](https://github.com/WordPress/wordpress-playground/pull/1923)) + +### Blueprints + +- Reload after autologin to set login cookies during boot. ([#1914](https://github.com/WordPress/wordpress-playground/pull/1914)) +- Skip empty lines in the runSql step. ([#1939](https://github.com/WordPress/wordpress-playground/pull/1939)) + +### Documentation + +- Clarified wp beta to also include rc version. ([#1936](https://github.com/WordPress/wordpress-playground/pull/1936)) + +### PHP WebAssembly + +- Enable CURL in Playground Web. ([#1935](https://github.com/WordPress/wordpress-playground/pull/1935)) +- PHP: Implement TLS 1.2 to decrypt https:// and ssl:// traffic and translate it into fetch(). ([#1926](https://github.com/WordPress/wordpress-playground/pull/1926)) + +### Website + +- Hide Settings menu after clicking "Restore from .zip. ([#1904](https://github.com/WordPress/wordpress-playground/pull/1904)) +- Publish @wp-playground/remote (types only). ([#1924](https://github.com/WordPress/wordpress-playground/pull/1924)) + +### Bug Fixes + +- CORS Proxy: Index update_at column because it is used for lookup. ([#1931](https://github.com/WordPress/wordpress-playground/pull/1931)) +- CORS Proxy: Reject targeting self. ([#1932](https://github.com/WordPress/wordpress-playground/pull/1932)) +- Docs: Fix typo. ([#1934](https://github.com/WordPress/wordpress-playground/pull/1934)) +- Explicitly request no-cache to discourage WP Cloud from edge caching CORS proxy results. ([#1930](https://github.com/WordPress/wordpress-playground/pull/1930)) +- Remove test code added in #1914. ([#1928](https://github.com/WordPress/wordpress-playground/pull/1928)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ajotka @bgrgicak @bph @brandonpayton @ockham @psrpinto + +## [v1.0.4] (2024-10-21) + +### Enhancements + +- Support CORS proxy rate-limiting. ([#1879](https://github.com/WordPress/wordpress-playground/pull/1879)) + +### Blueprints + +- Allow multisites to load wp-admin pages with the landingPage attribute. ([#1913](https://github.com/WordPress/wordpress-playground/pull/1913)) + +### Tools + +#### GitHub integration + +- Blueprints: Use `?` instead of `/` to CORS Proxy URLs. ([#1899](https://github.com/WordPress/wordpress-playground/pull/1899)) + +#### Import/Export + +- Kickoff Data Liberation: Let's Build WordPress-first Data Migration Tools. ([#1888](https://github.com/WordPress/wordpress-playground/pull/1888)) + +### Experiments + +#### File Synchronization + +- [Remote] Preserve PHP constants when saving a temporary site. ([#1911](https://github.com/WordPress/wordpress-playground/pull/1911)) + +### Website + +- Do not display "You have no Playgrounds" message before loading the site. ([#1912](https://github.com/WordPress/wordpress-playground/pull/1912)) +- Fix build error that only appeared during deployment. ([#1896](https://github.com/WordPress/wordpress-playground/pull/1896)) +- Fix use of secrets on WP Cloud site. ([#1909](https://github.com/WordPress/wordpress-playground/pull/1909)) +- Maintain Query API parameters on temporary Playground settings update. ([#1910](https://github.com/WordPress/wordpress-playground/pull/1910)) +- Stop adding all CORS proxy files to website build. ([#1895](https://github.com/WordPress/wordpress-playground/pull/1895)) +- Stop responding with default MIME type. ([#1897](https://github.com/WordPress/wordpress-playground/pull/1897)) +- Stop short-circuiting web host PHP execution. ([#1898](https://github.com/WordPress/wordpress-playground/pull/1898)) +- Fix progress reporting during Playground load. ([#1915](https://github.com/WordPress/wordpress-playground/pull/1915)) +- Include CORS proxy with website builds. ([#1880](https://github.com/WordPress/wordpress-playground/pull/1880)) +- [Blueprints] Stop escaping landingPage URLs when loading WP Admin. ([#1891](https://github.com/WordPress/wordpress-playground/pull/1891)) + +### Bug Fixes + +#### Boot Flow + +- Prefer pretty permalinks like WP install does. ([#1832](https://github.com/WordPress/wordpress-playground/pull/1832)) + +### Various + +- Improve self-host documentation. ([#1884](https://github.com/WordPress/wordpress-playground/pull/1884)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ashfame @bgrgicak @brandonpayton + +## [v1.0.3] (2024-10-14) + +### Enhancements + +- Website: Remove unused React components. ([#1887](https://github.com/WordPress/wordpress-playground/pull/1887)) + +### Tools + +#### Blueprints Builder + +- Blueprints sidebar section for single-click Playground presets. ([#1759](https://github.com/WordPress/wordpress-playground/pull/1759)) + +### Website + +- Replace 100vh with 100dvh to fix an "unscrollable" state on mobile devices. ([#1883](https://github.com/WordPress/wordpress-playground/pull/1883)) +- Use modal for Site settings form on mobile – mobile Safari l…. ([#1885](https://github.com/WordPress/wordpress-playground/pull/1885)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v1.0.2] (2024-10-09) + +### PHP WebAssembly + +- PHP.wasm: Load correct php.wasm paths in the built Node.js packages. ([#1877](https://github.com/WordPress/wordpress-playground/pull/1877)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v1.0.1] (2024-10-09) + +## [v1.0.0] (2024-10-09) + +### Blueprints + +- Directory Resources. ([#1793](https://github.com/WordPress/wordpress-playground/pull/1793)) +- Login step – handle passwordless autologin via a PHP mu-plugin. ([#1856](https://github.com/WordPress/wordpress-playground/pull/1856)) + +### Tools + +#### Blueprints + +- GitDirectoryResource. ([#1858](https://github.com/WordPress/wordpress-playground/pull/1858)) +- GitDirectoryResource: Accept "/", "", "." as root paths. ([#1860](https://github.com/WordPress/wordpress-playground/pull/1860)) + +#### GitHub integration + +- Native git support: LsRefs(), sparseCheckout(), GitPathControl. ([#1764](https://github.com/WordPress/wordpress-playground/pull/1764)) + +#### Website + +- Add core-pr and gutenberg-pr Query API parameters. ([#1761](https://github.com/WordPress/wordpress-playground/pull/1761)) + +### PHP WebAssembly + +- Refreshless website deployments – load remote.html using the network-first strategy. ([#1849](https://github.com/WordPress/wordpress-playground/pull/1849)) +- JSPI: Pass all unit tests, remove stale PHP builds. ([#1876](https://github.com/WordPress/wordpress-playground/pull/1876)) +- [Remote] Remove the "light" PHP.wasm bundle and only ship the "kitchen-sink" build. ([#1861](https://github.com/WordPress/wordpress-playground/pull/1861)) + +### Website + +- Restore the single-click "Edit Settings" flow. ([#1854](https://github.com/WordPress/wordpress-playground/pull/1854)) +- Restrict CORS proxy to requests from Playground website origin. ([#1865](https://github.com/WordPress/wordpress-playground/pull/1865)) + +#### Documentation + +- Add /release redirect to WP beta/RC blueprint. ([#1866](https://github.com/WordPress/wordpress-playground/pull/1866)) + +### Internal + +- Make isomorphic-git submodule use https, not ssh. ([#1863](https://github.com/WordPress/wordpress-playground/pull/1863)) + +### Bug Fixes + +- [CLI] Fix `isWordPressInstalled()` in CLI by inlining the auto_login.php in index.ts instead of using import ?raw. ([#1869](https://github.com/WordPress/wordpress-playground/pull/1869)) + +### Various + +- Add documentation around the GPL license and implications for contribution. ([#1776](https://github.com/WordPress/wordpress-playground/pull/1776)) +- Allow installing Plugins/Themes into an arbitrary folder. ([#1803](https://github.com/WordPress/wordpress-playground/pull/1803)) +- Improve documentation. ([#1862](https://github.com/WordPress/wordpress-playground/pull/1862)) +- [Website] Fix "undefined" as className. ([#1870](https://github.com/WordPress/wordpress-playground/pull/1870)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @ajotka @bgrgicak @brandonpayton @dd32 @n8finch + +## [v0.9.46] (2024-10-07) + +### Enhancements + +- Webapp upgrade protocol: Disable HTTP caching and reload other browser tabs to prevent fatal errors after new deployments. ([#1822](https://github.com/WordPress/wordpress-playground/pull/1822)) + +### Documentation + +- Docs: Disable localeDropdown until more pages are translated. ([#1824](https://github.com/WordPress/wordpress-playground/pull/1824)) +- Docs: Review playground documentation translations page. ([#1826](https://github.com/WordPress/wordpress-playground/pull/1826)) +- Docs: Playground PR previews through GitHub actions. ([#1825](https://github.com/WordPress/wordpress-playground/pull/1825)) + +### Website + +- Use site slug as a stable scope. ([#1839](https://github.com/WordPress/wordpress-playground/pull/1839)) +- Close Playground Manager by default. ([#1831](https://github.com/WordPress/wordpress-playground/pull/1831)) +- Fix go-to-site menu items to reveal site view. ([#1833](https://github.com/WordPress/wordpress-playground/pull/1833)) + +### Various + +- Add Install instructions to the Playwright README. ([#1837](https://github.com/WordPress/wordpress-playground/pull/1837)) +- Resolve end-to-end failures. ([#1844](https://github.com/WordPress/wordpress-playground/pull/1844)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @akirk @brandonpayton @juanmaguitar + +## [v0.9.45] (2024-09-30) + +### Blueprints + +- Translate GitHub.com file URLs into CORS-accessible raw.githubusercontent.com. ([#1810](https://github.com/WordPress/wordpress-playground/pull/1810)) + +### Tools + +- [UX] Stored Playgrounds (no more data loss), multiple Playgrounds, UI WebApp Redesign. ([#1731](https://github.com/WordPress/wordpress-playground/pull/1731)) + +### Documentation + +- Docs: Translation i18n messages - JSON files. ([#1807](https://github.com/WordPress/wordpress-playground/pull/1807)) + +### Website + +- Prevent creation of two temporary sites. ([#1817](https://github.com/WordPress/wordpress-playground/pull/1817)) +- Stop address bar from adding trailing slash to query params. ([#1820](https://github.com/WordPress/wordpress-playground/pull/1820)) + +### Bug Fixes + +- Fix broken Playwright tests. ([#1819](https://github.com/WordPress/wordpress-playground/pull/1819)) + +### Various + +- Add Playwright tests for UI redesign changes. ([#1769](https://github.com/WordPress/wordpress-playground/pull/1769)) +- Docs: Contributions to translations. ([#1808](https://github.com/WordPress/wordpress-playground/pull/1808)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @juanmaguitar + +## [v0.9.44] (2024-09-24) + +### Bug Fixes + +- Docs: Fix links intro fr. ([#1795](https://github.com/WordPress/wordpress-playground/pull/1795)) + +### Various + +- Add missing functions required to succesfully connect with MySQL DB. ([#1752](https://github.com/WordPress/wordpress-playground/pull/1752)) + +### Contributors + +The following contributors merged PRs in this release: + +@jeroenpf @juanmaguitar + +## [v0.9.43] (2024-09-23) + +### Documentation + +- Docs: Better paths for links. ([#1765](https://github.com/WordPress/wordpress-playground/pull/1765)) +- Docs: I18n setup. ([#1766](https://github.com/WordPress/wordpress-playground/pull/1766)) +- Docs: Remove the outdated "data rependencies" page. ([#1785](https://github.com/WordPress/wordpress-playground/pull/1785)) + +### Website + +- Fix troubleshoot-and-debug link. ([#1782](https://github.com/WordPress/wordpress-playground/pull/1782)) + +### Various + +- Update link for contributor day. ([#1775](https://github.com/WordPress/wordpress-playground/pull/1775)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @juanmaguitar @n8finch + +## [v0.9.42] (2024-09-17) + +### PHP WebAssembly + +- FS: Use the correct rm/rmdir method when moving files between mounts. ([#1770](https://github.com/WordPress/wordpress-playground/pull/1770)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.41] (2024-09-16) + +## [v0.9.40] (2024-09-16) + +### Enhancements + +- Extend allowable resources available via WordPress/WordPress. ([#1721](https://github.com/WordPress/wordpress-playground/pull/1721)) + +### Tools + +- Update actions/upload-artifact version to 4. ([#1748](https://github.com/WordPress/wordpress-playground/pull/1748)) + +### Documentation + +- Docs/Blueprints resources: Grammar and typo fixes. ([#1741](https://github.com/WordPress/wordpress-playground/pull/1741)) + +### PHP WebAssembly + +- @php-wasm/universal : Add Phar support in php-wasm. ([#1716](https://github.com/WordPress/wordpress-playground/pull/1716)) + +### Website + +- Add the `components` package with PathMappingControl. ([#1608](https://github.com/WordPress/wordpress-playground/pull/1608)) + +### Bug Fixes + +- Fix CLI --skipWordPressSetup option. ([#1760](https://github.com/WordPress/wordpress-playground/pull/1760)) + +### Reliability + +- Improve Playground CLI logging and fix quiet mode. ([#1751](https://github.com/WordPress/wordpress-playground/pull/1751)) + +### Various + +- Docs/Guides: Guides introductions and some minor adjustments. ([#1754](https://github.com/WordPress/wordpress-playground/pull/1754)) +- Docs/Guides: Normalized and fixed guides links. ([#1756](https://github.com/WordPress/wordpress-playground/pull/1756)) +- Docs/Guides: Providing content for your demo. ([#1747](https://github.com/WordPress/wordpress-playground/pull/1747)) +- Docs/Guides: WordPress Playground for plugin developers. ([#1750](https://github.com/WordPress/wordpress-playground/pull/1750)) +- Docs/Guides: WordPress Playground for theme developers. ([#1732](https://github.com/WordPress/wordpress-playground/pull/1732)) +- Docs: Links redirections. ([#1758](https://github.com/WordPress/wordpress-playground/pull/1758)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @juanmaguitar @mho22 @peterwilsoncc + +## [v0.9.39] (2024-09-09) + +### Bug Fixes + +- Use the correct imports in the generated .d.ts files. ([#1742](https://github.com/WordPress/wordpress-playground/pull/1742)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.38] (2024-09-09) + +### Internal + +- Fix changelog updates for latest doc structure. ([#1734](https://github.com/WordPress/wordpress-playground/pull/1734)) + +### Various + +- Add support for handling symlinks in the request handler. ([#1724](https://github.com/WordPress/wordpress-playground/pull/1724)) +- Docs: Playground block in launch section. ([#1722](https://github.com/WordPress/wordpress-playground/pull/1722)) +- documentation - Blueprints - Resources: Highlight installPlugin and installTheme steps and most common resouces for them. ([#1733](https://github.com/WordPress/wordpress-playground/pull/1733)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton @jeroenpf @juanmaguitar + +## [v0.9.37] (2024-09-05) + +### PHP WebAssembly + +- Add more asyncify-listed PHP functions to fix Studio crash. ([#1729](https://github.com/WordPress/wordpress-playground/pull/1729)) + +### Website + +- Add initial site info view. ([#1701](https://github.com/WordPress/wordpress-playground/pull/1701)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.36] (2024-09-03) + +### Bug Fixes + +- Fix logger test for inconsistent short month. ([#1727](https://github.com/WordPress/wordpress-playground/pull/1727)) + +### Reliability + +- Avoid errors due to log message formatting. ([#1726](https://github.com/WordPress/wordpress-playground/pull/1726)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.35] (2024-08-29) + +### Enhancements + +- Allow specifying a WordPres/WordPress branch and pulling from GitHub. ([#1705](https://github.com/WordPress/wordpress-playground/pull/1705)) + +### PHP WebAssembly + +- Fix: Exit http server on php exit. ([#1714](https://github.com/WordPress/wordpress-playground/pull/1714)) + +### Various + +- Enable networking for WordPress and Gutenberg PR viewers. ([#1715](https://github.com/WordPress/wordpress-playground/pull/1715)) + +### Contributors + +The following contributors merged PRs in this release: + +@ironprogrammer @kozer @peterwilsoncc + +## [v0.9.34] (2024-08-28) + +### PHP WebAssembly + +- @php-wasm/node: Publish index.d.ts. ([#1713](https://github.com/WordPress/wordpress-playground/pull/1713)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.33] (2024-08-28) + +### Internal + +- @php-wasm/util: Publish TypeScript types. ([#1711](https://github.com/WordPress/wordpress-playground/pull/1711)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.32] (2024-08-26) + +### Website + +- Make the site switcher work again. ([#1698](https://github.com/WordPress/wordpress-playground/pull/1698)) +- WebApp Redesign: Interact with sites list via redux. ([#1679](https://github.com/WordPress/wordpress-playground/pull/1679)) +- deployment: Fix builder redirect. ([#1696](https://github.com/WordPress/wordpress-playground/pull/1696)) + +### Bug Fixes + +- Docs: Fix typo and replace en dash with hyphen for consistency. ([#1702](https://github.com/WordPress/wordpress-playground/pull/1702)) +- Fix broken documentation links. ([#1694](https://github.com/WordPress/wordpress-playground/pull/1694)) +- Remove Playground branding from site list. ([#1700](https://github.com/WordPress/wordpress-playground/pull/1700)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton @eliot-akira @mirka + +## [v0.9.31] (2024-08-20) + +### Enhancements + +#### Boot Flow + +- A boot() method to explicitly initialize the PHP worker. ([#1669](https://github.com/WordPress/wordpress-playground/pull/1669)) + +### Website + +- Fix builder redirect. ([#1693](https://github.com/WordPress/wordpress-playground/pull/1693)) + +### Internal + +- Avoid GH board automation permissions error. ([#1691](https://github.com/WordPress/wordpress-playground/pull/1691)) +- Refresh sqlite-database-integration from develop branch. ([#1692](https://github.com/WordPress/wordpress-playground/pull/1692)) + +### Bug Fixes + +#### Boot Flow + +- Fix sqlite-database-integration rename fatal. ([#1695](https://github.com/WordPress/wordpress-playground/pull/1695)) + +#### Documentation + +- Docs: Fix links to proper pages. ([#1690](https://github.com/WordPress/wordpress-playground/pull/1690)) + +### Various + +- Documentation structure overhaul. ([#1602](https://github.com/WordPress/wordpress-playground/pull/1602)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton @juanmaguitar + +## [v0.9.30] (2024-08-19) + +### Website + +- Ask users to report errors if Playground load fails. ([#1686](https://github.com/WordPress/wordpress-playground/pull/1686)) + +### Bug Fixes + +- Avoid Blueprint schema formatting changes by build. ([#1685](https://github.com/WordPress/wordpress-playground/pull/1685)) + +### Various + +- [Website] Improves the messaging around exporting a zip if needed, when connecting to GitHub. ([#1689](https://github.com/WordPress/wordpress-playground/pull/1689)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton @jonathanbossenger + +## [v0.9.29] (2024-08-12) + +### Tools + +- Add max-len rule. ([#1613](https://github.com/WordPress/wordpress-playground/pull/1613)) + +### Experiments + +#### GitHub integration + +- Add site manager view and sidebar. ([#1661](https://github.com/WordPress/wordpress-playground/pull/1661)) +- Add sites from the site manager. ([#1680](https://github.com/WordPress/wordpress-playground/pull/1680)) + +### PHP WebAssembly + +- Offline mode end-to-end tests. ([#1648](https://github.com/WordPress/wordpress-playground/pull/1648)) + +### Website + +- Add nice redirects for the new documentation site. ([#1681](https://github.com/WordPress/wordpress-playground/pull/1681)) +- Fix site manager button styles. ([#1676](https://github.com/WordPress/wordpress-playground/pull/1676)) + +### Bug Fixes + +- Revert "Offline mode end-to-end tests". ([#1673](https://github.com/WordPress/wordpress-playground/pull/1673)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v0.9.28] (2024-08-05) + +### Blueprints + +- Add support for loading wpCli without running blueprint steps. ([#1629](https://github.com/WordPress/wordpress-playground/pull/1629)) + +### Documentation + +- Blueprints: Add resetData step to documentation. ([#1658](https://github.com/WordPress/wordpress-playground/pull/1658)) +- Docs: Redirect from /docs to https://wordpress.github.io/wordpress-playground. ([#1671](https://github.com/WordPress/wordpress-playground/pull/1671)) + +### Website + +- Suppress unavoidable Deprecated notices - Networking. ([#1660](https://github.com/WordPress/wordpress-playground/pull/1660)) +- UI: Explain the Logs modal. ([#1666](https://github.com/WordPress/wordpress-playground/pull/1666)) + +#### Blueprints + +- Precompile Ajv Blueprint validator to avoid CSP issues. ([#1649](https://github.com/WordPress/wordpress-playground/pull/1649)) + +### Internal + +- Reinstantiate Changelog generation in GitHub CI. ([#1657](https://github.com/WordPress/wordpress-playground/pull/1657)) + +### Various + +- Rollback artifact creation to enable downloading a pre-built package …. ([#1624](https://github.com/WordPress/wordpress-playground/pull/1624)) +- Update WordPress packages. ([#1672](https://github.com/WordPress/wordpress-playground/pull/1672)) +- Update `ws` package version to fix DOS vulnerability. ([#1635](https://github.com/WordPress/wordpress-playground/pull/1635)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @PiotrPress + +## [v0.9.27] (2024-07-29) + +### Enhancements + +- Support offline mode after the first Playground page load. ([#1643](https://github.com/WordPress/wordpress-playground/pull/1643)) + +### Devrel + +- Remove puzzle app package. ([#1642](https://github.com/WordPress/wordpress-playground/pull/1642)) + +### PHP WebAssembly + +- Cache Playground assets to enable offline support. ([#1535](https://github.com/WordPress/wordpress-playground/pull/1535)) +- Rotate PHP runtime after runtime crash. ([#1628](https://github.com/WordPress/wordpress-playground/pull/1628)) +- Throw error when PHP run() receives no code to run. ([#1646](https://github.com/WordPress/wordpress-playground/pull/1646)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton + +## [v0.9.26] (2024-07-22) + +### Blueprints + +- Add missing blueprints library dep. ([#1640](https://github.com/WordPress/wordpress-playground/pull/1640)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.25] (2024-07-22) + +### Tools + +- Make sure NPM packages declare dependencies. ([#1639](https://github.com/WordPress/wordpress-playground/pull/1639)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.24] (2024-07-22) + +### Bug Fixes + +- Fix plugin-proxy response codes. ([#1636](https://github.com/WordPress/wordpress-playground/pull/1636)) +- Stop publishing @wp-playground/wordpress-builds package. ([#1637](https://github.com/WordPress/wordpress-playground/pull/1637)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak @brandonpayton + +## [v0.9.23] (2024-07-22) + +### PHP WebAssembly + +- Route requests more like a normal web server. ([#1539](https://github.com/WordPress/wordpress-playground/pull/1539)) + +### Website + +- Remove old, unused website deployment workflow. ([#1633](https://github.com/WordPress/wordpress-playground/pull/1633)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.22] (2024-07-19) + +### Bug Fixes + +- Remove WP 6.2 support after WP 6.6 release. ([#1632](https://github.com/WordPress/wordpress-playground/pull/1632)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.9.21] (2024-07-19) + +### Website + +- Fix manifest.json URLs. ([#1615](https://github.com/WordPress/wordpress-playground/pull/1615)) + +### Internal + +- Fix joinPaths root edge case. ([#1620](https://github.com/WordPress/wordpress-playground/pull/1620)) + +### Various + +- Disable PHP 7.0 and 7.1 version switcher end-to-end tests. ([#1626](https://github.com/WordPress/wordpress-playground/pull/1626)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak @brandonpayton + +## [v0.9.20] (2024-07-16) + +### Enhancements + +#### Boot Flow + +- Backfill the assets removed from minified WordPress bundles. ([#1604](https://github.com/WordPress/wordpress-playground/pull/1604)) +- Register service worker before spawning the worker thread. ([#1606](https://github.com/WordPress/wordpress-playground/pull/1606)) + +### Website + +- Disable website features that don't work while offline. ([#1607](https://github.com/WordPress/wordpress-playground/pull/1607)) +- Generate a list of assets to cache for offline support. ([#1573](https://github.com/WordPress/wordpress-playground/pull/1573)) + +### Internal + +- Build: Ship the default TypeScript .d.ts declaration files, not rollups. ([#1593](https://github.com/WordPress/wordpress-playground/pull/1593)) + +### Bug Fixes + +#### Boot Flow + +- Fix recursive calls to backfillStaticFilesRemovedFromMinifiedBuild. ([#1614](https://github.com/WordPress/wordpress-playground/pull/1614)) + +### Various + +- Add/allow import site gutenberg pr. ([#1610](https://github.com/WordPress/wordpress-playground/pull/1610)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @smithjw1 + +## [v0.9.19] (2024-07-15) + +### **Breaking Changes** + +- Set web worker startup options with messages instead of query strings. ([#1574](https://github.com/WordPress/wordpress-playground/pull/1574)) + +### Blueprints + +- Add an Import Theme Starter Content step. ([#1521](https://github.com/WordPress/wordpress-playground/pull/1521)) +- Add setSiteLanguage step to change the language. ([#1538](https://github.com/WordPress/wordpress-playground/pull/1538)) +- Mark shorthand properties as stable, not deprecated. ([#1594](https://github.com/WordPress/wordpress-playground/pull/1594)) + +### Documentation + +- Add Blueprint 101 to Documentation. ([#1556](https://github.com/WordPress/wordpress-playground/pull/1556)) + +### PHP WebAssembly + +#### Website + +- Download all WordPress assets on boot. ([#1532](https://github.com/WordPress/wordpress-playground/pull/1532)) + +### Website + +- PHP CORS Proxy. ([#1546](https://github.com/WordPress/wordpress-playground/pull/1546)) + +### Various + +- Revert "Set web worker startup options with messages instead of query strings". ([#1605](https://github.com/WordPress/wordpress-playground/pull/1605)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @bph @dd32 + +## [v0.9.18] (2024-07-09) + +### Website + +- Remove the unused isSupportedWordPressVersion export. ([#1592](https://github.com/WordPress/wordpress-playground/pull/1592)) + +### Internal + +- Build: Polyfill \_\_dirname in php-wam/node ESM via banner option. ([#1591](https://github.com/WordPress/wordpress-playground/pull/1591)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.16] (2024-07-09) + +### Internal + +- Build: Source external deps from package.json. ([#1590](https://github.com/WordPress/wordpress-playground/pull/1590)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.15] (2024-07-09) + +### Internal + +- Build: Use regular expressions to mark packages as external. ([#1589](https://github.com/WordPress/wordpress-playground/pull/1589)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.14] (2024-07-09) + +### Devrel + +- Remove Puzzle app from the Playground website. ([#1588](https://github.com/WordPress/wordpress-playground/pull/1588)) + +### Internal + +- Vite build: Mark all imported modules as external to avoid bundling them with released packages. ([#1586](https://github.com/WordPress/wordpress-playground/pull/1586)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v0.9.13] (2024-07-08) + +### PHP WebAssembly + +- php-wasm/node: Ship as ESM and CJS. ([#1585](https://github.com/WordPress/wordpress-playground/pull/1585)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.12] (2024-07-08) + +## [v0.9.11] (2024-07-08) + +### PHP WebAssembly + +- Build: Treat all dependencies of php-wasm/node as external. ([#1584](https://github.com/WordPress/wordpress-playground/pull/1584)) + +### Various + +- Autopublish npm packages every week. ([#1542](https://github.com/WordPress/wordpress-playground/pull/1542)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.10] (2024-07-08) + +### Internal + +- Revert "Use NPM for publishing packages instead of Lerna ". ([#1582](https://github.com/WordPress/wordpress-playground/pull/1582)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.9] (2024-07-08) + +### Internal + +- Use NPM for publishing packages instead of Lerna. ([#1581](https://github.com/WordPress/wordpress-playground/pull/1581)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.9.4] (2024-07-03) + +### Documentation + +- Update the Blueprint data format doc. ([#1510](https://github.com/WordPress/wordpress-playground/pull/1510)) + +### Contributors + +The following contributors merged PRs in this release: + +@ndiego + +## [v0.9.3] (2024-07-03) + +### Tools + +#### Blueprints + +- Importing regression fix – support old exported Playground ZIPs. ([#1569](https://github.com/WordPress/wordpress-playground/pull/1569)) + +### Documentation + +- Add GitHub development instructions. ([#1551](https://github.com/WordPress/wordpress-playground/pull/1551)) + +### Internal + +- Meta: GitHub Boards Automation. ([#1549](https://github.com/WordPress/wordpress-playground/pull/1549)) +- Meta: GitHub-sourced Mindmap. ([#1559](https://github.com/WordPress/wordpress-playground/pull/1559)) + +### + +- Add cache version number. ([#1541](https://github.com/WordPress/wordpress-playground/pull/1541)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak + +## [v0.9.1] (2024-06-26) + +### PHP WebAssembly + +- Networking access: Fix wp_http_supports() to work without the kitchen-sink extension bundle. ([#1504](https://github.com/WordPress/wordpress-playground/pull/1504)) +- Networking: Remove CORS workarounds for WordPress.org API. ([#1511](https://github.com/WordPress/wordpress-playground/pull/1511)) +- Backfill remote asset listing when needed. ([#1531](https://github.com/WordPress/wordpress-playground/pull/1531)) + +### Website + +- Remove "small window mode". ([#1540](https://github.com/WordPress/wordpress-playground/pull/1540)) +- Detect actual, loaded WP version. ([#1503](https://github.com/WordPress/wordpress-playground/pull/1503)) + +### Various + +- Remove deprecation note from shorthand steps. ([#1507](https://github.com/WordPress/wordpress-playground/pull/1507)) +- Remove trailing semicolon from example URL for loading playground with network access. ([#1520](https://github.com/WordPress/wordpress-playground/pull/1520)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bph @brandonpayton @dd32 @oskosk + +## [v0.7.20] (2024-05-21) + +### **Breaking Changes** + +- [Breaking] Refactor PHP.ini management, remove php.setPhpIniPath() and php.setPhpIniEntry(). ([#1423](https://github.com/WordPress/wordpress-playground/pull/1423)) + +### Enhancements + +- CLI: Distinguish between mount and mountBeforeInstall options. ([#1410](https://github.com/WordPress/wordpress-playground/pull/1410)) +- CLI: Support fetching WordPress zips from custom URLs. ([#1415](https://github.com/WordPress/wordpress-playground/pull/1415)) +- Introduce a new @wp-playground/common package to avoid circular depencies. ([#1387](https://github.com/WordPress/wordpress-playground/pull/1387)) +- Website: Ship the SQLite database integration plugin. ([#1418](https://github.com/WordPress/wordpress-playground/pull/1418)) + +#### Boot Flow + +- Playground CLI: Don't create /wordpress/wp-config.php on boot. ([#1407](https://github.com/WordPress/wordpress-playground/pull/1407)) + +### Blueprints + +- Define constants in auto_prepend_file, silence warnings related to redefining those constants. ([#1400](https://github.com/WordPress/wordpress-playground/pull/1400)) +- Detect silent failures when activating plugins and theme. ([#1436](https://github.com/WordPress/wordpress-playground/pull/1436)) +- Re-activate single-file plugins when enabling a multisite. ([#1435](https://github.com/WordPress/wordpress-playground/pull/1435)) +- Throw an error when activating a theme or plugin that doesn't exist. ([#1391](https://github.com/WordPress/wordpress-playground/pull/1391)) +- Write sunrise.php to /internal in enableMultisite step. ([#1401](https://github.com/WordPress/wordpress-playground/pull/1401)) + +### Tools + +- Add VSCode branch protection. ([#1408](https://github.com/WordPress/wordpress-playground/pull/1408)) +- Show error log if Playground fails to start. ([#1336](https://github.com/WordPress/wordpress-playground/pull/1336)) + +#### Blueprints + +- Unzip: Only delete a temporary zip file after unzipping, do not delete the original zip. ([#1412](https://github.com/WordPress/wordpress-playground/pull/1412)) + +#### GitHub integration + +- GitHub export: Create new commits in your fork when writing to the upstream repo isn't allowed. ([#1392](https://github.com/WordPress/wordpress-playground/pull/1392)) + +#### Import/Export + +- Support wp_crop_image in import wxr. ([#1357](https://github.com/WordPress/wordpress-playground/pull/1357)) + +### Devrel + +- Add puzzle API. ([#1372](https://github.com/WordPress/wordpress-playground/pull/1372)) + +### Documentation + +- Docs: Use step function names instead of TypeScript type names. ([#1373](https://github.com/WordPress/wordpress-playground/pull/1373)) +- Updated the GitHub issue link to open in a new tab. ([#1353](https://github.com/WordPress/wordpress-playground/pull/1353)) +- Use step id name. ([#1377](https://github.com/WordPress/wordpress-playground/pull/1377)) + +### Experiments + +- Explore: Setup SQLite database integration without creating wp-content/db.php. ([#1382](https://github.com/WordPress/wordpress-playground/pull/1382)) + +### PHP WebAssembly + +- Add shareable extension-to-MIME-type mapping. ([#1355](https://github.com/WordPress/wordpress-playground/pull/1355)) +- Document php ini functions. ([#1430](https://github.com/WordPress/wordpress-playground/pull/1430)) +- JSPI: Enable the origin trial on Chrome. ([#1346](https://github.com/WordPress/wordpress-playground/pull/1346)) +- PHP: Add libjpeg and libwebp support. ([#1393](https://github.com/WordPress/wordpress-playground/pull/1393)) +- PHP: Always set the auto_prepend_file php.ini entry, even when the auto_prepend_file.php file exists. ([#1388](https://github.com/WordPress/wordpress-playground/pull/1388)) +- PHP: Move internal shared directories to /internal/shared. ([#1386](https://github.com/WordPress/wordpress-playground/pull/1386)) +- PHP: Remove mentions of a custom PHP extension. ([#1422](https://github.com/WordPress/wordpress-playground/pull/1422)) +- PHP: Remove the MODE_EVAL_CODE execution mode. ([#1433](https://github.com/WordPress/wordpress-playground/pull/1433)) +- PHP: Support php.mv() between devices via recursive copy. ([#1411](https://github.com/WordPress/wordpress-playground/pull/1411)) +- PHP: Use /internal/shared/php.ini by default. ([#1419](https://github.com/WordPress/wordpress-playground/pull/1419)) +- PHP: Use auto_prepend_file to preload mu-plugins (instead of creating them in wp-content/mu-plugins). ([#1366](https://github.com/WordPress/wordpress-playground/pull/1366)) + +### Website + +- Improve log modal styles, a11y, error message wording. ([#1369](https://github.com/WordPress/wordpress-playground/pull/1369)) +- Move puzzle app to a Playground package. ([#1385](https://github.com/WordPress/wordpress-playground/pull/1385)) +- Add secrets on-demand for more endpoints. ([#1362](https://github.com/WordPress/wordpress-playground/pull/1362)) +- Boot: Move WordPress zip extraction logic to a common unzipWordPress() utility. ([#1427](https://github.com/WordPress/wordpress-playground/pull/1427)) +- Derive MIME types for PHP served files from shared JSON. ([#1360](https://github.com/WordPress/wordpress-playground/pull/1360)) +- Fix constant names for GH export oauth. ([#1378](https://github.com/WordPress/wordpress-playground/pull/1378)) +- Playground Boot: Align the boot process between remote.html and CLI. ([#1389](https://github.com/WordPress/wordpress-playground/pull/1389)) +- Remote.html: Install WordPress if it isn't installed yet. ([#1425](https://github.com/WordPress/wordpress-playground/pull/1425)) +- Remote.html: Preload the SQLite database plugin, but only execute it if there's no custom db.php inside wp-content. ([#1424](https://github.com/WordPress/wordpress-playground/pull/1424)) +- Simplify website deployment workflows. ([#1404](https://github.com/WordPress/wordpress-playground/pull/1404)) +- Update rsync command to clean up more completely. ([#1361](https://github.com/WordPress/wordpress-playground/pull/1361)) + +#### Blueprints + +- Provide non-gzipped wp-cli.phar file with website build. ([#1406](https://github.com/WordPress/wordpress-playground/pull/1406)) +- Simplify runPhpWithZipFunctions() setup. ([#1434](https://github.com/WordPress/wordpress-playground/pull/1434)) + +### Internal + +- Fix changelog automation. ([#1413](https://github.com/WordPress/wordpress-playground/pull/1413)) + +### Bug Fixes + +- Add name to Puzzle package. ([#1443](https://github.com/WordPress/wordpress-playground/pull/1443)) +- Fixed images not loading on the page. ([#1352](https://github.com/WordPress/wordpress-playground/pull/1352)) +- Restore nightly wordpress build. ([#1437](https://github.com/WordPress/wordpress-playground/pull/1437)) + +### Reliability + +- Disable console logging when running tests. ([#1368](https://github.com/WordPress/wordpress-playground/pull/1368)) + +### + +- Lint: Disable console warnings for paths where they're not useful. ([#1421](https://github.com/WordPress/wordpress-playground/pull/1421)) + +### Various + +- Add links to kitchen sink (PHP extensions), networking. ([#1363](https://github.com/WordPress/wordpress-playground/pull/1363)) +- Reorganize and update documentation. ([#1354](https://github.com/WordPress/wordpress-playground/pull/1354)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @flexseth @ironnysh @josevarghese + +## [v0.7.15] (2024-04-30) + +### Website + +- Avoid edge-caching conditionally redirected resources. ([#1351](https://github.com/WordPress/wordpress-playground/pull/1351)) +- Fix deploy-time check for file with PHP-handled redirect. ([#1350](https://github.com/WordPress/wordpress-playground/pull/1350)) + +### Contributors + +The following contributors merged PRs in this release: + +@brandonpayton + +## [v0.7.10] (2024-04-30) + +### PHP WebAssembly + +- PHP.wasm Node: Revert a part of #1289, do not import a .wasm file. ([#1348](https://github.com/WordPress/wordpress-playground/pull/1348)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.7.5] (2024-04-30) + +### Internal + +- Meta: Move the minified WordPress to the new `@wp-playground/wordpress-builds` package. ([#1343](https://github.com/WordPress/wordpress-playground/pull/1343)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.7.3] (2024-04-29) + +### PHP WebAssembly + +- Playground CLI. ([#1289](https://github.com/WordPress/wordpress-playground/pull/1289)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.7.2] (2024-04-29) + +### **Breaking Changes** + +- PHP: Remove setSapiName, setPhpIniEntry, setPhpIniPath methods from the remote PHP API client. ([#1321](https://github.com/WordPress/wordpress-playground/pull/1321)) +- Remove the wp-playground/node package. ([#1323](https://github.com/WordPress/wordpress-playground/pull/1323)) + +#### PHP WebAssembly + +- Breaking: Loopback Request Support. ([#1287](https://github.com/WordPress/wordpress-playground/pull/1287)) + +### Tools + +- Centralize log storage. ([#1315](https://github.com/WordPress/wordpress-playground/pull/1315)) + +### Documentation + +- Link to Installing Nx Globally in the README. ([#1325](https://github.com/WordPress/wordpress-playground/pull/1325)) + +### PHP WebAssembly + +- Add PHPResponse.forHttpCode() shorthand. ([#1322](https://github.com/WordPress/wordpress-playground/pull/1322)) +- Asyncify: List ZEND_FETCH_OBJ_R_SPEC_CV_CV_HANDLER. ([#1342](https://github.com/WordPress/wordpress-playground/pull/1342)) +- Curl extension for the Node.js build of PHP.wasm. ([#1273](https://github.com/WordPress/wordpress-playground/pull/1273)) +- Explore curl support. ([#1133](https://github.com/WordPress/wordpress-playground/pull/1133)) +- PHP Process Manager. ([#1301](https://github.com/WordPress/wordpress-playground/pull/1301)) +- PHPProcessManager: Clear nextInstance when the concurrency limit is exhausted. ([#1324](https://github.com/WordPress/wordpress-playground/pull/1324)) +- Spawn handler: Wrap the program call with try/catch, exit gracefully on error. ([#1320](https://github.com/WordPress/wordpress-playground/pull/1320)) + +### Website + +- Add initial workflow for deploying the website to WP Cloud. ([#1293](https://github.com/WordPress/wordpress-playground/pull/1293)) +- Eliminate 404s due to nested files-to-serve-via-php dir. ([#1333](https://github.com/WordPress/wordpress-playground/pull/1333)) +- Stop WP rewrite rules from matching files like wp-admin.css. ([#1317](https://github.com/WordPress/wordpress-playground/pull/1317)) +- Stop using PHP to serve most static files on WP Cloud. ([#1331](https://github.com/WordPress/wordpress-playground/pull/1331)) +- WP Cloud: Relay secrets for error logger. ([#1337](https://github.com/WordPress/wordpress-playground/pull/1337)) + +#### Documentation + +- Document WP Cloud website setup. ([#1338](https://github.com/WordPress/wordpress-playground/pull/1338)) + +### Reliability + +- Add log methods, log handlers, and separate log collection. ([#1264](https://github.com/WordPress/wordpress-playground/pull/1264)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @juanmaguitar @mho22 + +## [v0.7.1] (2024-04-24) + +## [v0.7.0] (2024-04-24) + +### **Breaking Changes** + +#### PHP WebAssembly + +- Breaking: Remove PHPBrowser. ([#1302](https://github.com/WordPress/wordpress-playground/pull/1302)) + +### Enhancements + +- Bump TypeScript to 5.4.5. ([#1299](https://github.com/WordPress/wordpress-playground/pull/1299)) +- Semaphore: Add timeout option. ([#1300](https://github.com/WordPress/wordpress-playground/pull/1300)) + +### Blueprints + +- Builder: Fix stuck loader bar. ([#1284](https://github.com/WordPress/wordpress-playground/pull/1284)) +- Remove setPhpIniEntry step. ([#1288](https://github.com/WordPress/wordpress-playground/pull/1288)) + +### Tools + +#### GitHub integration + +- GitHub: Don't delete all the files when exporting a theme. ([#1308](https://github.com/WordPress/wordpress-playground/pull/1308)) +- Urlencode branch name. ([#1275](https://github.com/WordPress/wordpress-playground/pull/1275)) + +#### Blueprints + +- Blueprints builder: Support ?blueprint-url. ([#1309](https://github.com/WordPress/wordpress-playground/pull/1309)) + +### Documentation + +- Use new learning resources in Playground documentation. ([#1276](https://github.com/WordPress/wordpress-playground/pull/1276)) + +### PHP WebAssembly + +- Browser: Remove setSpawnHandler function from the public API. ([#1303](https://github.com/WordPress/wordpress-playground/pull/1303)) +- PHP: Add a cwd argument to hotSwapPHPRuntime(). ([#1304](https://github.com/WordPress/wordpress-playground/pull/1304)) +- PHP: Remove addServerGlobalEntry() method, accept $\_SERVER as php.run() property. ([#1286](https://github.com/WordPress/wordpress-playground/pull/1286)) +- PHPRequestHandler: Add a generic PHP argument. ([#1310](https://github.com/WordPress/wordpress-playground/pull/1310)) +- nit: Clean up after node PHP popen() test. ([#1280](https://github.com/WordPress/wordpress-playground/pull/1280)) + +### Website + +- Add more info to crash reports. ([#1253](https://github.com/WordPress/wordpress-playground/pull/1253)) +- Memoize fetch() responses when requesting php.wasm. ([#1306](https://github.com/WordPress/wordpress-playground/pull/1306)) +- Progress monitoring: Use a custom instantiateWasm handler to avoid monkey-patching WebAssembly.instantiateStreaming. ([#1305](https://github.com/WordPress/wordpress-playground/pull/1305)) +- Remove sandbox attribute from iframe. ([#1313](https://github.com/WordPress/wordpress-playground/pull/1313)) +- Service Worker: Fetch credentialless to play more nicely with server caches (#1311). ([#1311](https://github.com/WordPress/wordpress-playground/pull/1311)) + +### Internal + +- Automate Changelog generation after each npm release. ([#1312](https://github.com/WordPress/wordpress-playground/pull/1312)) +- CI: Fix intermittent documentation build failures. ([#1307](https://github.com/WordPress/wordpress-playground/pull/1307)) + +### Bug Fixes + +- Add styles to ensure `iframes` are responsive. ([#1267](https://github.com/WordPress/wordpress-playground/pull/1267)) +- Docs: Fix the Blueprint example of the Gutenberg PR preview. ([#1268](https://github.com/WordPress/wordpress-playground/pull/1268)) +- Docs: Move Steps Shorthands to a separate page to fix Steps TOC. ([#1265](https://github.com/WordPress/wordpress-playground/pull/1265)) + +### Reliability + +- Add network error message. ([#1281](https://github.com/WordPress/wordpress-playground/pull/1281)) +- Explore logging to a file. ([#1292](https://github.com/WordPress/wordpress-playground/pull/1292)) + +### Various + +- Add PDF to infer mime type list. ([#1298](https://github.com/WordPress/wordpress-playground/pull/1298)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @ironnysh @peeranat-dan + +## [v0.6.16] (2024-04-17) + +### Blueprints + +- Replace set_current_user call with wp_set_current_user to fix a PHP notice. ([#1262](https://github.com/WordPress/playground/pull/1262)) + +### Tools + +- Install themes and plugins using the ReadableStream API. ([#919](https://github.com/WordPress/playground/pull/919)) + +### Documentation + +- Docs: Update WordPress versions used in the documentation, document using older releases. ([#1235](https://github.com/WordPress/playground/pull/1235)) + +### PHP WebAssembly + +- Filter Requests library to use the Fetch handler. ([#1048](https://github.com/WordPress/playground/pull/1048)) + +- PHP: Handle request errors in PHPRequestHandler, return response code 500. ([#1249](https://github.com/WordPress/playground/pull/1249)) +- PHP: Reset exit code before dispatching a request. ([#1251](https://github.com/WordPress/playground/pull/1251)) + +### Various + +- Add documentation for `shorthand` alternatives of Blueprint steps. ([#1261](https://github.com/WordPress/playground/pull/1261)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @dd32 @ironnysh @kozer + +## [v0.6.15] (2024-04-16) + +### Blueprints + +- Add ifAlreadyInstalled to installPlugin and installTheme steps. ([#1244](https://github.com/WordPress/playground/pull/1244)) +- Support a landingPage value without the initial slash. ([#1227](https://github.com/WordPress/playground/pull/1227)) + +### PHP WebAssembly + +- Investigate OOB: Run unit tests with instrumented PHP 8.0 code. ([#1220](https://github.com/WordPress/playground/pull/1220)) +- Unit tests: Restore site-data.spec.ts. ([#1194](https://github.com/WordPress/playground/pull/1194)) +- Web PHP: Increase memory limit to 256 M. ([#1232](https://github.com/WordPress/playground/pull/1232)) + +### Website + +- Browser: Display PHP output when Fatal Error is trigerred. ([#1234](https://github.com/WordPress/playground/pull/1234)) +- Fix accessibility issues found by Axe. ([#1246](https://github.com/WordPress/playground/pull/1246)) +- Request Handler: Urldecode the requested path. ([#1228](https://github.com/WordPress/playground/pull/1228)) + +### Bug Fixes + +- fix: Set required engine version to 18.18.0. ([#1214](https://github.com/WordPress/playground/pull/1214)) + +### Various + +- Blueprints/json example. ([#1188](https://github.com/WordPress/playground/pull/1188)) +- Doc: Update 01-index.md. ([#1216](https://github.com/WordPress/playground/pull/1216)) +- Move DefineSiteUrlStep doc warning so it displays in documentation. ([#1245](https://github.com/WordPress/playground/pull/1245)) +- Updated link to native WordPress importer. ([#1243](https://github.com/WordPress/playground/pull/1243)) +- documentation update proposal: Provide more info on features, extensions?. ([#1208](https://github.com/WordPress/playground/pull/1208)) +- php-wasm/node: Update express to newest version, and move it to devDependencies. ([#1218](https://github.com/WordPress/playground/pull/1218)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @artpi @bph @brandonpayton @eliot-akira @flexseth @ironnysh @kirjavascript + +## [v0.6.14] (2024-04-11) + +### Bug Fixes + +- Revert changes to the documentation build. ([#1226](https://github.com/WordPress/playground/pull/1226)) + +### Reliability + +- Update error modal description label. ([#1224](https://github.com/WordPress/playground/pull/1224)) + +### Various + +- Try memory leak workaround with zeroed mem. ([#1229](https://github.com/WordPress/playground/pull/1229)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton + +## [v0.6.13] (2024-04-10) + +### PHP WebAssembly + +- Try to repro memory out of bounds errors in CI. ([#1199](https://github.com/WordPress/playground/pull/1199)) + +### Bug Fixes + +- Fix docs-site build. ([#1222](https://github.com/WordPress/playground/pull/1222)) + +### Contributors + +The following contributors merged PRs in this release: + +@bgrgicak @brandonpayton + +## [v0.6.11] (2024-04-09) + +### Tools + +- Avoid Service Worker update issues on localhost. ([#1209](https://github.com/WordPress/playground/pull/1209)) + +#### Import/Export + +- importWxr: Preserve backslashes in the imported content. ([#1213](https://github.com/WordPress/playground/pull/1213)) + +### PHP WebAssembly + +- Catch DNS errors to avoid unhandled exceptions. ([#1215](https://github.com/WordPress/playground/pull/1215)) + +- Revert "Avoid partial munmap memory leak". ([#1195](https://github.com/WordPress/playground/pull/1195)) +- Try to repro memory out of bounds errors in CI. ([#1198](https://github.com/WordPress/playground/pull/1198)) + +### Various + +- Adjust link to LICENSE file. ([#1210](https://github.com/WordPress/playground/pull/1210)) +- Try to reproduce the memory access error with files from 096a017. ([#1212](https://github.com/WordPress/playground/pull/1212)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton @emmanuel-ferdman @fluiddot + +## [v0.6.10] (2024-04-04) + +### Blueprints + +- Rename importFile to importWxr, switch to humanmade/WordPress importer. ([#1192](https://github.com/WordPress/playground/pull/1192)) + +### Tools + +#### Blueprints + +- Explorations: Stream API. ([#851](https://github.com/WordPress/playground/pull/851)) + +### PHP WebAssembly + +- Avoid partial munmap memory leak. ([#1189](https://github.com/WordPress/playground/pull/1189)) + +### Website + +- Make kitchen sink extension bundle the default. ([#1191](https://github.com/WordPress/playground/pull/1191)) + +### Bug Fixes + +- Fix cross-device mv by switching to copy. ([#846](https://github.com/WordPress/playground/pull/846)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @brandonpayton @seanmorris + +## [v0.6.9] (2024-04-03) + +### Tools + +- Devex: Expose window.playground for quick testing and debugging. ([#1125](https://github.com/WordPress/playground/pull/1125)) + +#### GitHub integration + +- Website: Query API options to preconfigure the GitHub export form. ([#1174](https://github.com/WordPress/playground/pull/1174)) + +### Documentation + +- Update the wp-cli step code example. ([#1140](https://github.com/WordPress/playground/pull/1140)) + +### PHP WebAssembly + +- Add PHP iterator and yield support. ([#1181](https://github.com/WordPress/playground/pull/1181)) +- Fix fileinfo support. ([#1179](https://github.com/WordPress/playground/pull/1179)) +- Fix mbregex support. ([#1155](https://github.com/WordPress/playground/pull/1155)) +- PHP.run(): Throw JS exception on runtime error, remove throwOnError flag. ([#1137](https://github.com/WordPress/playground/pull/1137)) + +### Website + +- Add error report modal. ([#1102](https://github.com/WordPress/playground/pull/1102)) +- Ensure PromiseRejectionEvent has reason before logging it. ([#1150](https://github.com/WordPress/playground/pull/1150)) +- Request handler: Remove everything after # from the URL. ([#1126](https://github.com/WordPress/playground/pull/1126)) +- Web: Make the "Apply changes" button work in Playground settings form. ([#1122](https://github.com/WordPress/playground/pull/1122)) + +#### Plugin proxy + +- Allow requests to WordPress.org. ([#1154](https://github.com/WordPress/playground/pull/1154)) + +### Internal + +- Refresh WordPress with the latest SQLite integration plugin. ([#1151](https://github.com/WordPress/playground/pull/1151)) + +### Bug Fixes + +- Fix typo in blueprints/public/schema-readme.md. ([#1134](https://github.com/WordPress/playground/pull/1134)) +- Priority: Fix broken link to VS Code extension. ([#1141](https://github.com/WordPress/playground/pull/1141)) + +### Various + +- Docs/update - Add implied step. ([#1144](https://github.com/WordPress/playground/pull/1144)) +- Give brandonpayton permission to run Playground GH workflows. ([#1139](https://github.com/WordPress/playground/pull/1139)) +- Logger API: Add rate limiting. ([#1142](https://github.com/WordPress/playground/pull/1142)) +- Remove `--disable-all` configuration option in PHP compile process. ([#1132](https://github.com/WordPress/playground/pull/1132)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @brandonpayton @flexseth @jblz @mho22 + +## [v0.6.8] (2024-03-21) + +### Blueprints + +- Allow optional metadata. ([#1103](https://github.com/WordPress/playground/pull/1103)) + +### Tools + +- Add VSCode Chrome debugging support. ([#1088](https://github.com/WordPress/playground/pull/1088)) +- Website: Support Base64-encoding Blueprints passed in the URL. ([#1091](https://github.com/WordPress/playground/pull/1091)) + +### Documentation + +- Docs: Expand Details section. ([#1109](https://github.com/WordPress/playground/pull/1109)) +- Update activate-theme.ts to use `themeFolderName`. ([#1119](https://github.com/WordPress/playground/pull/1119)) + +### PHP WebAssembly + +- Blueprints: Explore switching to the PHP implementation. ([#1051](https://github.com/WordPress/playground/pull/1051)) +- Explore weird register_shutdown_function behavior. ([#1099](https://github.com/WordPress/playground/pull/1099)) +- Fix post_message_to_js memory out of bounds. ([#1114](https://github.com/WordPress/playground/pull/1114)) +- Fix shutdown errors. ([#1104](https://github.com/WordPress/playground/pull/1104)) +- Fixing build regression [BISON COMPILE]. ([#871](https://github.com/WordPress/playground/pull/871)) +- PHP : Set appropriate SCRIPT variables in $\_SERVER superglobal. ([#1092](https://github.com/WordPress/playground/pull/1092)) + +### Website + +- Add logger API. ([#1113](https://github.com/WordPress/playground/pull/1113)) +- Add multisite rewrite rules. ([#1083](https://github.com/WordPress/playground/pull/1083)) +- Service worker: Improve error reporting in non-secure contexts. ([#1098](https://github.com/WordPress/playground/pull/1098)) + +### Bug Fixes + +- Fix experimental notice in FF ESR. ([#1117](https://github.com/WordPress/playground/pull/1117)) +- Fix php bison dep for building on non-arm64 architectures. ([#1115](https://github.com/WordPress/playground/pull/1115)) + +### Reliability + +- Add fatal errror listener. ([#1095](https://github.com/WordPress/playground/pull/1095)) + +### Various + +- Update examples and demos in the documentation. ([#1107](https://github.com/WordPress/playground/pull/1107)) + +### Contributors + +The following contributors merged PRs in this release: + +@0aveRyan @adamziel @bgrgicak @brandonpayton @ironnysh @mho22 @seanmorris @StevenDufresne + +## [v0.6.7] (2024-03-06) + +### Website + +- Node polyfills: Only apply them in Node.js, not in web browsers. ([#1089](https://github.com/WordPress/playground/pull/1089)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.6.6] (2024-03-06) + +### Website + +- Comlink API: Pass the context argument to windowEndpoint, not wrap. ([#1087](https://github.com/WordPress/playground/pull/1087)) +- Fix: Playground not starting due to a race condition. ([#1084](https://github.com/WordPress/playground/pull/1084)) +- Hide the "This is experimental WordPress" notice on click. ([#1082](https://github.com/WordPress/playground/pull/1082)) +- Set the API context when using Comlink.wrap(). ([#1085](https://github.com/WordPress/playground/pull/1085)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel + +## [v0.6.5] (2024-03-05) + +### Tools + +#### Plugin proxy + +- Add Sensei to the allowed repositories for plugin proxy. ([#1079](https://github.com/WordPress/playground/pull/1079)) + +#### Blueprints + +- Snapshot Import Protocol v1. ([#1007](https://github.com/WordPress/playground/pull/1007)) + +### Internal + +- Build the php-wasm/util package as both ESM and CJS. ([#1081](https://github.com/WordPress/playground/pull/1081)) + +### Reliability + +#### Blueprints + +- Add unit tests to the mkdir step. ([#1029](https://github.com/WordPress/playground/pull/1029)) + +### Various + +- Website query API: Continue plugin installs on error. ([#605](https://github.com/WordPress/playground/pull/605)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @eliot-akira @reimic @renatho + +## [v0.6.4] (2024-03-04) + +### Enhancements + +- Add logging support to Playground. ([#1035](https://github.com/WordPress/playground/pull/1035)) + +### Blueprints + +- PHP Blueprints: Display progress. ([#1077](https://github.com/WordPress/playground/pull/1077)) +- Set progress caption and communicate failures in the import file step. ([#1034](https://github.com/WordPress/playground/pull/1034)) + +### Tools + +#### Blueprints + +- PHP Blueprints demo page. ([#1070](https://github.com/WordPress/playground/pull/1070)) +- PHP: Do not prepend a whitespace when encoding body as multipart form data. ([#1033](https://github.com/WordPress/playground/pull/1033)) + +### PHP WebAssembly + +- Fix response header escaping. ([#1050](https://github.com/WordPress/playground/pull/1050)) +- Fix: Networking broken when extra PHP extensions are enabled. ([#1045](https://github.com/WordPress/playground/pull/1045)) +- PHP.wasm: Yield 0 bytes read on fd_read failure to improve PHP's fread() and feof() behavior. ([#1053](https://github.com/WordPress/playground/pull/1053)) +- PHP: Support $env and $cwd proc_open arguments. ([#1064](https://github.com/WordPress/playground/pull/1064)) +- Parse shell commands in createSpawnHandler. ([#1065](https://github.com/WordPress/playground/pull/1065)) +- Prototype: Spawning PHP sub-processes in Web Workers. ([#1031](https://github.com/WordPress/playground/pull/1031)) +- Spawning PHP sub-processes in Web Workers. ([#1069](https://github.com/WordPress/playground/pull/1069)) + +### Website + +- Add Google Analytics events to Playground. ([#1040](https://github.com/WordPress/playground/pull/1040)) +- Fix error on reload site click. ([#1041](https://github.com/WordPress/playground/pull/1041)) + +### Internal + +- Rebuild WordPress every 20 minutes, short-circuit if no new version is found. ([#1061](https://github.com/WordPress/playground/pull/1061)) +- Rebuild WordPress within an hour of a beta release. ([#1059](https://github.com/WordPress/playground/pull/1059)) + +### Bug Fixes + +- Fix the login message so it doesn't override another. ([#1044](https://github.com/WordPress/playground/pull/1044)) + +### Various + +- Add arguments to default node spawn method. ([#1037](https://github.com/WordPress/playground/pull/1037)) +- Add bgrgicak to deployment allowlists. ([#1057](https://github.com/WordPress/playground/pull/1057)) +- Allow for CORS requests to api.wordpress.org to pass. ([#1009](https://github.com/WordPress/playground/pull/1009)) +- Default URL rewrites to /index.php. ([#1072](https://github.com/WordPress/playground/pull/1072)) +- Remove repository specific Code of Conduct. ([#1038](https://github.com/WordPress/playground/pull/1038)) +- Ship WordPress 6.5 beta 1. ([#1036](https://github.com/WordPress/playground/pull/1036)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @dd32 @desrosj @johnbillion @mho22 + +## [v0.6.3] (2024-02-12) + +### Blueprints + +- Wp-cli step. ([#1017](https://github.com/WordPress/playground/pull/1017)) + +### PHP WebAssembly + +- Calls proc_open two times in a row. ([#1012](https://github.com/WordPress/playground/pull/1012)) +- Experiment: Build PHP with OPFS support. ([#1030](https://github.com/WordPress/playground/pull/1030)) +- PHP: Pass request body as UInt8Array. ([#1018](https://github.com/WordPress/playground/pull/1018)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @mho22 + +## [v0.6.2] (2024-02-08) + +### PHP WebAssembly + +- Networking: Swap Requests transports using the http_api_transports instead of patching the Requests library. ([#1004](https://github.com/WordPress/playground/pull/1004)) +- Remove `crypto.randomUUID` dependency in favor of a custom function. ([#1016](https://github.com/WordPress/playground/pull/1016)) +- Remove x-request-issuer header on cross-origin requests. ([#1010](https://github.com/WordPress/playground/pull/1010)) +- Update wp_http_fetch.php. ([#1002](https://github.com/WordPress/playground/pull/1002)) + +### Website + +- Remote.html: Always install the playground mu-plugin. ([#1005](https://github.com/WordPress/playground/pull/1005)) + +### Various + +- 32bit integer workaround. ([#1014](https://github.com/WordPress/playground/pull/1014)) +- Test/hello world blueprint. ([#908](https://github.com/WordPress/playground/pull/908)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bgrgicak @jdevalk @sejas @stoph + +## [v0.6.1] (2024-02-05) + +### Website + +#### Blueprints + +- Remove the applyWordPressPatches step, enable the Site Health Plugin. ([#1001](https://github.com/WordPress/playground/pull/1001)) + +### Various + +- Add `crypto` to Polyfills improving Blueprint compatibility for Node. ([#1000](https://github.com/WordPress/playground/pull/1000)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @sejas + +## [v0.6.0] (2024-02-05) + +### Enhancements + +- Add wp-cli and code editor examples to the demos page. ([#965](https://github.com/WordPress/playground/pull/965)) +- WordPress: Preserve PHP attributes and wp-config.php whitespace. ([#964](https://github.com/WordPress/playground/pull/964)) + +### Blueprints + +- Add enableMultisite step. ([#888](https://github.com/WordPress/playground/pull/888)) +- Set_current_user to admin before activating plugins and themes. ([#984](https://github.com/WordPress/playground/pull/984)) + +### Tools + +- Use .zip files instead of .data files for loading WordPress. ([#978](https://github.com/WordPress/playground/pull/978)) + +#### Blueprints + +- Throw on failure. ([#982](https://github.com/WordPress/playground/pull/982)) + +#### PHP WebAssembly + +- Support wp-cli in the browser. ([#957](https://github.com/WordPress/playground/pull/957)) + +### PHP WebAssembly + +- Correcting OOB & Prevent Crash on Saving Large Post. ([#870](https://github.com/WordPress/playground/pull/870)) +- Memory leak: Add rotatedPHP to kill and recreate PHP instances after a certain number of requests. ([#990](https://github.com/WordPress/playground/pull/990)) +- PHP : Add args and descriptors dynamic arrays in proc open function. ([#969](https://github.com/WordPress/playground/pull/969)) +- PHP.wasm: Fix stack overflow in wasm_set_request_body. ([#993](https://github.com/WordPress/playground/pull/993)) + +### Website + +- Add .htaccess file to prevent caching of index.html and enable importing the client.js library. ([#989](https://github.com/WordPress/playground/pull/989)) +- Add og meta tags and meta description. ([#980](https://github.com/WordPress/playground/pull/980)) +- CORS headers for client/index.js. ([#893](https://github.com/WordPress/playground/pull/893)) +- wp-cli: Respect quotes when parsing shell commands. ([#966](https://github.com/WordPress/playground/pull/966)) + +### Internal + +- Remove the interactive block playground. ([#988](https://github.com/WordPress/playground/pull/988)) + +### Bug Fixes + +- Fix "WP-CLI" typos. ([#971](https://github.com/WordPress/playground/pull/971)) +- Fix footer styling issue in the "Code is Poetry" in wordpress.github.io/wordpress-playground. ([#959](https://github.com/WordPress/playground/pull/959)) +- WordPress build: Add newlines after PHP annotations. ([#986](https://github.com/WordPress/playground/pull/986)) + +### Various + +- Add a blueprint example. ([#946](https://github.com/WordPress/playground/pull/946)) +- Add terminal to playground site. ([#161](https://github.com/WordPress/playground/pull/161)) +- Match the .nvmrc node version to the changes made in commit ec2605b. ([#972](https://github.com/WordPress/playground/pull/972)) +- PHP : Dispatch available descriptor specs in js_open_process function. ([#963](https://github.com/WordPress/playground/pull/963)) +- PHP : Give access to command arguments if array type is given in php ^7.4 proc_open function. ([#944](https://github.com/WordPress/playground/pull/944)) +- Rebuild WordPress. ([#987](https://github.com/WordPress/playground/pull/987)) +- Update the networking disabled error messages in wp-admin for plugins and themes. ([#936](https://github.com/WordPress/playground/pull/936)) + +### Contributors + +The following contributors merged PRs in this release: + +@adamziel @bph @ironnysh @marcarmengou @mho22 @rowasc @seanmorris @swissspidy @tyrann0us + +## [v0.5.9] - 2021-09-29 + +### Changed + +– **Breaking:** Remoddsaved the PHPBrowser class ([##1302](https://github.com/WordPress/wordpress-playground/pull/1302)) + +### Added + +– Added CHANGELOG.md to keep track of notable changes ([##1302](https://github.com/WordPress/wordpress-playground/pull/1302)) diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/_category_.json b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/_category_.json new file mode 100644 index 0000000000..c5937b5255 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/_category_.json @@ -0,0 +1,3 @@ +{ + "label": "Contributing" +} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/code.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/code.md new file mode 100644 index 0000000000..5a8a9b5cd6 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/code.md @@ -0,0 +1,79 @@ +--- +slug: /contributing/code +--- + +# Mga Kontribusyon sa Code + +Tulad ng lahat ng WordPress projects, ginagamit ng Playground ang GitHub para pamahalaan ang code at subaybayan ang mga isyu. Ang pangunahing repositorya ay matatagpuan sa [https://github.com/WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) at ang Playground Tools repositorya ay nasa [https://github.com/WordPress/playground-tools/](https://github.com/WordPress/playground-tools/). + +:::info Mag-ambag sa Playground Tools + +Kasama sa gabay na ito ang mga link sa pangunahing repositorya, ngunit ang lahat ng hakbang at opsyon ay magagamit din para sa Playground Tools. Kung interesado ka sa mga plugin o lokal na development tools—simulan mo doon. + +::: + +I-browse ang [listahan ng mga bukas na isyu](https://github.com/wordpress/wordpress-playground/issues) upang makita kung saan ka maaaring magtrabaho. Ang label na [`Good First Issue`](https://github.com/wordpress/wordpress-playground/issues?q=is%3Aopen+is%3Aissue+label%3A%22Good+First+Issue%22) ay inirerekomendang panimulang punto para sa mga unang beses na kontribyutor. + +Siguraduhing suriin ang mga sumusunod na resources bago ka magsimula: + +- [Mga prinsipyo sa Coding](/contributing/coding-standards) +- [Arkitektura](/developers/architecture) +- [Bisyon at Pilosopiya](https://github.com/WordPress/wordpress-playground/issues/472) +- [Roadmap ng WordPress Playground](https://github.com/WordPress/wordpress-playground/issues/525) + +## Mag-ambag ng Pull Request + +[I-fork ang Playground repository](https://github.com/WordPress/wordpress-playground/fork) at i-clone ito sa iyong local machine. Upang gawin ito, kopyahin at i-paste ang mga utos na ito sa iyong terminal: + +```bash +git clone -b trunk --single-branch --depth 1 --recurse-submodules git@github.com:YOUR-GITHUB-USERNAME/wordpress-playground.git +cd wordpress-playground +npm install +``` + +Gumawa ng bagong branch, gumawa ng mga pagbabago, at i-test ito nang lokal sa pamamagitan ng pag-run ng sumusunod: + +```bash +npm run dev +``` + +Magbubukas ang Playground sa bagong browser tab at awtomatikong magre-refresh sa bawat pagbabago. + +Kapag handa ka na, i-commit ang mga pagbabago at mag-submit ng Pull Request. + +:::info Pag-format + +Awtomatikong hinahandle ang code formatting at linting. Mag-relax ka lang, mag-type lang, at hayaan ang makina ang gumalaw. + +::: + +### Pagpapatakbo ng lokal na Multisite + +May ilang [restriksyon kapag nagpapatakbo ng Multisite nang lokal](https://developer.wordpress.org/advanced-administration/multisite/prepare-network/#restrictions). Kung balak mong i-test ang Multisite network gamit ang `enableMultisite` step ng Playground, siguraduhing babaguhin mo ang default na port ng `wp-now` o mag-set ng lokal na test domain na tumatakbo sa HTTPS. + +Upang baguhin ang default na port ng `wp-now` sa suportadong port ng WordPress Multisite, patakbuhin ito gamit ang flag na `--port=80`: + +```bash +npx @wp-now/wp-now start --port=80 +``` + +May ilang paraan upang mag-set up ng lokal na test domain, kabilang ang pag-edit ng iyong `hosts` file. Kung hindi ka sigurado kung paano gawin iyon, inirerekomenda naming i-install ang [Laravel Valet](https://laravel.com/docs/11.x/valet) at patakbuhin ang sumusunod: + +```bash +valet proxy playground.test http://127.0.0.1:5400 --secure +``` + +Ngayon ay maa-access ang iyong dev server sa https://playground.test. + +## Debugging + +### Paggamit ng VS Code at Chrome + +Kung gumagamit ka ng VS Code at naka-install ang Chrome, maaari mong i-debug ang Playground sa code editor: + +- Buksan ang project folder sa VS Code. +- Piliin ang Run > Start Debugging mula sa main menu o pindutin ang `F5`/`fn`+`F5`. + +### Debugging PHP + +Ina-log ng Playground ang PHP errors sa browser console pagkatapos ng bawat PHP request. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/coding-standards.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/coding-standards.md new file mode 100644 index 0000000000..c3be5ef4ba --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/coding-standards.md @@ -0,0 +1,49 @@ +--- +slug: /contributing/coding-standards +--- + +# Mga Prinsipyo sa Pag-coding + +## Mga Mensahe ng Error + +Ang isang mahusay na mensahe ng error ay nagsasabi sa user kung ano ang susunod na gagawin. Anumang kalabuan sa mga error na ibinabato ng mga public API ng Playground ay mag-uudyok sa mga developer na magbukas ng isyu. + +Isaalang-alang ang isang network error halimbawa—maaari ba nating matukoy ang uri ng error at ipakita ang kaugnay na mensahe na nagbubuod ng mga susunod na hakbang? + +- **Network error**: "Nagalaw ang iyong koneksyon sa internet. Subukan i-reload ang pahina." +- **404**: "Hindi mahanap ang file." +- **403**: "Hinadlangan ng server ang access sa file." +- **CORS**: ipaliwanag na ito ay isang browser security feature at magdagdag ng link sa detalyadong paliwanag (sa MDN o sa ibang maaasahang source). Iminungkahi na ilagay ng user ang kanilang file sa ibang lugar, tulad ng raw.githubusercontent.com, at mag-link sa resource na nagpapaliwanag kung paano mag-set up ng CORS headers sa kanilang server. + +Awtomatikong hinahandle namin ang code formatting at linting. Mag-relax lang, mag-type, at hayaan ang mga makina ang gumawa ng trabaho. + +## Public API + +Layunin ng Playground na panatilihin ang pinakamakitid na saklaw ng API hangga’t maaari. + +Ang mga Public API ay madaling idagdag at mahirap alisin. Kailangan lang ng isang PR upang magpakilala ng bagong API, ngunit maaaring kailanganin ng isang libo upang ito’y matanggal, lalo na kung nagamit na ito ng ibang proyekto. + +- Huwag i-expose ang hindi kailangang function, class, constant, o ibang bahagi. + +## Blueprints + +Ang Blueprints ang pangunahing paraan para makipag-ugnayan sa Playground. Ang mga JSON file na ito ay naglalarawan ng serye ng mga hakbang na isinasagawa ng Playground nang sunud-sunod. + +### Mga Patnubay + +Ang mga blueprint step ay dapat **concise at focused**. Dapat itong gawin ang isang bagay at gawin ito nang mahusay. + +- Kung kailangan mong gumawa ng bagong step, subukang i-refactor muna ang umiiral na step. +- Kung hindi sapat iyon, tiyaking nagdadala ang bagong step ng bagong kakayahan. Huwag ulitin ang functionality ng umiiral na mga step. +- I-assume na tatawagin ang step nang higit sa isang beses. +- I-assume na ito’y tatakbo nang partikular na pagkakasunod-sunod. +- Magdagdag ng unit tests upang tiyaking gumagana ito nang tama. + +Ang mga Blueprints ay dapat **intuitive at straightforward**. + +- Huwag mag-require ng arguments na maaaring optional. +- Gumamit ng simpleng argument, halimbawa `slug` sa halip na `path`. +- Mag-define ng constants sa virtual JSON files—huwag baguhin ang PHP files. +- Mag-define ng TypeScript type para sa Blueprint. Ganoon gumagawa ang Playground ng JSON schema nito. +- Sumulat ng function para hawakan ang isang Blueprint step. Tanggapin ang argumentong nasa type na iyong dinefine. +- Magbigay ng usage example sa doc string. Awtomatikong naipapakita iyon sa docs. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/contributor-day.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/contributor-day.md new file mode 100644 index 0000000000..da559f6c7f --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/contributor-day.md @@ -0,0 +1,111 @@ +--- +slug: /contributing/contributor-day +--- + +# WordCamp Contributor Day + +Ang [WordPress Playground VS Code extension](https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground) at ang [wp-now](https://www.npmjs.com/package/@wp-now/wp-now) ay nagpapadali sa proseso ng pag-set up ng lokal na WordPress environment. Pinapagana ng WordPress Playground pareho—hindi kailangan ng Docker, MySQL, o Apache. + +Patuloy na basahin upang matutunan kung paano gamitin ang mga tool na ito para sa [local development](/developers/local-development/wp-now) kapag nag-aambag sa WordPress. Pansinin na ang extension at ang NPM package ay nasa development pa, at hindi pa fully supported ang lahat ng [Make WordPress teams](https://make.wordpress.org/). + +## Pagsisimula + +Para sa visual na nag-aaral, narito ang step-by-step na video tutorial. Kung mas gusto mong magbasa sa sarili mong bilis, lumaktaw sa nakasulat na gabay sa ibaba. + + + +### VS Code Playground extension + +Ang [Visual Studio Code Playground extension](https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground) ay isang friendly na zero-setup development environment. + +1. Buksan ang VS Code at pumunta sa tab na **Extensions** (**View > Extensions**). +2. Sa search bar, i-type ang _WordPress Playground_ at i-click ang **Install**. +3. Para makipag-ugnayan sa Playground, i-click ang bagong icon sa **Activity Bar** at pindutin ang button na **Start WordPress Server**. +4. Magbubukas ang isang bagong tab sa iyong browser sa loob ng ilang segundo. + +### wp-now NPM package + +Ang `@wp-now/wp-now` ay isang CLI tool na nagpapahintulot sa iyo na mag-spin up ng WordPress site gamit ang isang utos lamang. Hindi kailangan ang Docker, MySQL, o Apache. + +#### Mga Kinakailangan + +Nangangailangan ang `wp-now` ng Node.js at NPM. Kung hindi mo pa nai-install, [i-download at i-install](https://nodejs.org/en/download) muna pareho bago magsimula. + +Depende sa Make WordPress team na iyong inaambagan, maaaring kailanganin mong gumamit ng ibang bersyon ng Node.js kaysa sa naka-install mo. Maaari mong gamitin ang Node Version Manager (NVM) upang magpalit ng bersyon. [Sundin ang installation guide dito](https://github.com/nvm-sh/nvm#installing-and-updating). + +#### Patakbuhin ang wp-now + +Hindi mo kailangang i-install ang `wp-now` globally para magamit ito. Pumunta sa direktoryo ng iyong plugin o theme at patakbuhin ang `wp-now` gamit ang mga sumusunod na utos: + +```bash +cd my-plugin-or-theme-directory +npx @wp-now/wp-now start +``` + +## Mga Ideya para sa mga Kontribyutor + +### Gumawa ng Gutenberg Pull Request (PR) + +1. I-fork ang [Gutenberg repository](https://github.com/WordPress/gutenberg) sa iyong GitHub account. +2. I-clone ang forked repository para ma-download ang mga file. +3. I-install ang mga kinakailangang dependencies at i-build ang code sa development mode. + +```bash +git clone git@github.com:WordPress/gutenberg.git +cd gutenberg +npm install +npm run dev +``` + +:::info + +Kung hindi ka sigurado sa mga hakbang sa itaas, bisitahin ang opisyal na [Gutenberg Project Contributor Guide](https://developer.wordpress.org/block-editor/contributors/). Tandaan na sa pagkakataong ito, papalitan ng `wp-now` ang `wp-env`. + +::: + +Magbukas ng bagong terminal tab, pumunta sa Gutenberg directory, at simulan ang WordPress gamit ang `wp-now`: + +```bash +cd gutenberg +npx @wp-now/wp-now start +``` + +Kapag handa ka na, i-commit at i-push ang iyong mga pagbabago sa iyong forked repository sa GitHub at magbukas ng Pull Request sa Gutenberg repository. + +### Subukan ang isang Gutenberg PR + +1. Para subukan ang ibang Gutenberg PR, i-checkout ang branch na kaugnay nito. +2. I-pull ang pinakabagong mga pagbabago upang siguraduhing up to date ang lokal mong kopya. +3. Susunod, i-install ang mga kinakailangang dependencies, siguraduhing tugma ang testing environment sa pinakabagong mga pagbabago. +4. Sa wakas, i-build ang code sa development mode. + +```bash +# kopyahin ang branch-name mula sa GitHub # +git checkout branch-name +git pull +npm install +npm run dev + +# Sa ibang terminal sa loob ng Gutenberg directory * +npx @wp-now/wp-now start +``` + +#### Subukan ang isang Gutenberg PR gamit ang Playground sa browser + +Hindi mo kailangan ng lokal na development environment para subukan ang mga Gutenberg PR—gamitin ang Playground para gawin ito nang direkta sa browser. + +1. Kopyahin ang ID ng PR na nais mong subukan (pumili mula sa [listahan ng open Pull Requests](https://github.com/WordPress/gutenberg/pulls)). +2. Buksan ang [Gutenberg PR Previewer](https://playground.wordpress.net/gutenberg.html) ng Playground at i-paste ang kinopyang ID. +3. Kapag na-click mo ang **Go**, susuriin ng Playground kung valid ang PR at magbubukas ng bagong tab na may kaugnay na PR, na nagpapahintulot sa iyong i-review ang mga iminungkahing pagbabago. + +## Isalin ang mga WordPress Plugin gamit ang Playground sa browser + +Maaari mong isalin ang suportadong mga WordPress Plugin sa pamamagitan ng pag-load ng plugin na nais mong isalin at paggamit ng Inline Translation. Kung idinagdag ng mga developer ng plugin ang opsyon, makikita mo ang **Translate Live** link sa itaas na kanang toolbar ng view ng pagsasalin. Maaari mong basahin ang tungkol sa kapanapanabik na bagong opsyon na ito sa [Polyglots blog post na ito](https://make.wordpress.org/polyglots/2023/05/08/translate-live-updates-to-the-translation-playground/). + +## Humingi ng Tulong at Mag-ambag sa WordPress Playground + +May tanong o ideya para sa bagong feature? Nakakita ng bug? May hindi gumana ayon sa inaasahan? Narito kami upang tumulong: + +- Sa Contributor Day, maaari mo kaming maabot sa **Playground table**. +- Magbukas ng isyu sa [WordPress Playground GitHub repository](https://github.com/WordPress/wordpress-playground/issues/new). Kung naka-focus ka sa VS Code extension, NPM package, o mga plugin, magbukas ng isyu sa [Playground Tools repository](https://github.com/WordPress/playground-tools/issues/new). +- Ibahagi ang iyong feedback sa [**#meta-playground** Slack channel](https://wordpress.slack.com/archives/C04EWKGDJ0K). diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/documentation.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/documentation.md new file mode 100644 index 0000000000..86419d38ad --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/documentation.md @@ -0,0 +1,52 @@ +--- +slug: /contributing/documentation +--- + +# Mga Kontribusyon sa Dokumentasyon + +Ang [dokumentasyon ng WordPress Playground](/) ay pinamamahalaan ng mga volunteer tulad mo, na sabik tumulong. + +Lahat ng isyu na may kinalaman sa dokumentasyon ay nalabelan bilang [`[Type] Documentation`](https://github.com/WordPress/wordpress-playground/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22%5BType%5D%20Documentation%22) o [`[Type] Developer Documentation`](https://github.com/WordPress/wordpress-playground/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22%5BType%5D%20Developer%20Documentation%22) sa repositoryang [WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground). I-browse ang listahan ng mga bukas na isyu upang makita kung alin ang nais mong trabahuhin. Kung sa tingin mo ay may nawawala sa kasalukuyang dokumentasyon, magbukas ng isyu upang talakayin ang iyong mungkahi. + +## Paano Ako Makakatulong? + +Maaari kang mag-ambag sa pamamagitan ng [pagbubukas ng isyu sa repositoryo ng proyekto](https://github.com/WordPress/wordpress-playground/issues/new) at ilarawan kung ano ang nais mong idagdag o baguhin. + +Kung kaya mo, isulat na ang content sa paglalarawan ng isyu, at ang mga kontribyutor ng proyekto ang bahala sa susunod na hakbang. + +### Pag-fork, pag-edit nang lokal, at pagbubukas ng Pull Request + +Kung pamilyar ka sa markdown, maaari mong [i-fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) ang `wordpress-playground` repo at magmungkahi ng mga pagbabago o bagong pahina ng dokumentasyon sa pamamagitan ng pagsusumite ng Pull Request. + +Ang proseso ng paglikha ng branch upang magbukas ng bagong PR na may translated na mga pahina sa repositoryong [WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) ay katulad ng sa ibang WordPress repositories tulad ng Gutenberg: +https://developer.wordpress.org/block-editor/contributors/code/git-workflow/ + +Ang mga file ng dokumentasyon (`.md` files) ay nakaimbak sa GitHub repository ng Playground, [sa ilalim ng `/packages/docs/site/docs`](https://github.com/WordPress/wordpress-playground/tree/trunk/packages/docs/site/docs). + +### Pag-edit sa browser + +Kung naka-log in ka sa GitHub, maaari mo ring i-edit ang umiiral na mga file (o magdagdag ng bago) at magsumite ng PR nang direkta mula sa GitHub UI: + +1. Hanapin ang pahinang nais mong i-edit o ang direktoryo ng kabanatang gusto mong idagdagan ng bagong pahina. +2. I-click ang button na **Add Files** para magdagdag ng bagong file, o i-click ang umiiral na file at pagkatapos ay i-click ang pencil icon upang i-edit ito. +3. Hihilingin sa iyo ng GitHub na i-fork ang repositoryo at lumikha ng bagong branch na may iyong mga pagbabago. +4. Buksan ang editor kung saan maaari mong gawin ang pagbabago. +5. Kapag tapos ka na, i-click ang button na **Commit Changes** at magsumite ng Pull Request. + +Ayan na! Nakapag-ambag ka na sa dokumentasyon ng WordPress Playground. + +Ang pamamaraang ito ay nangangahulugang hindi mo kailangang i-clone ang repositoryo, mag-set up ng lokal na development environment, o magpatakbo ng anumang utos. + +May downside lang—hindi mo mare-preview ang iyong mga pagbabago. Basahin pa upang malaman kung paano suriin ang iyong mga pagbabago bago magsumite ng Pull Request. + +### Lokal na preview + +I-clone ang repositoryo at pumunta sa direktoryo sa iyong device. Patakbuhin ang mga sumusunod na utos: + +```bash +npm install +npm run build:docs +npm run dev:docs +``` + +Magbubukas ang site ng dokumentasyon sa bagong browser tab at awtomatikong magre-refresh sa bawat pagbabago. Ipagpatuloy ang pag-edit ng kaukulang file sa iyong code editor at i-test ang pagbabago nang real-time. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/index.md new file mode 100644 index 0000000000..d73bb844ac --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/index.md @@ -0,0 +1,46 @@ +--- +title: Panimula +slug: /contributing +id: introduction +--- + +# Pag-aambag sa Proyektong WP Playground + +Ang WordPress Playground ay isang open-source na proyekto na malugod na tinatanggap ang lahat ng kontribyutor—mula sa code, disenyo, dokumentasyon, hanggang triage. + +## Paano Ako Makakatulong? + +- Code? Tingnan ang [developer section](/contributing/code). +- Dokumentasyon? Tingnan ang [documentation section](/contributing/documentation). +- Pag-uulat ng bug? Magbukas ng [bagong isyu](https://github.com/WordPress/wordpress-playground/issues/new) sa pangunahing GitHub repository, o sa [Playground Tools](https://github.com/WordPress/playground-tools/issues/new). +- Mga ideya, disenyo, o iba pa? Magbukas ng [GitHub discussion](https://github.com/WordPress/wordpress-playground/discussions), at mag-usap tayo! + +## Mga Patnubay + +- Tulad ng sa lahat ng WordPress projects, nais naming matiyak ang isang maanyayang at magalang na kapaligiran para sa lahat. Mangyaring basahin ang [Code of Conduct](https://make.wordpress.org/handbook/community-code-of-conduct/) ng aming komunidad para sa karagdagang impormasyon. +- Ang mga nag-aambag ng code ay dapat suriin ang [mga prinsipyo sa pag-coding](/contributing/coding-standards). +- Nananatili ang copyright sa iyo para sa anumang kontribusyong iyong ginawa. Sa pamamagitan ng pagsusumite ng Pull Request, sumasang-ayon kang i-release ang code sa ilalim ng [WordPress Playground License](https://github.com/WordPress/wordpress-playground?tab=GPL-2.0-1-ov-file#readme). + +## Triaging ng mga Isyu + +Gustong tumulong sa pagsala ng mga bukas na isyu at paglutas ng mga potensyal na bug? Ganito: + +1. Suriin ang [listahan ng mga bukas na isyu](https://github.com/WordPress/wordpress-playground/issues?q=is%3Aopen+is%3Aissue) at hanapin ang mga kaya mong tulungan. Ganoon din sa [Playground Tools repository](https://github.com/WordPress/playground-tools/issues?q=is%3Aopen+is%3Aissue). +2. Basahin ang paglalarawan at mga komento. +3. Kung ito ay bug na kaya mong ulitin, magdagdag ng maliwanag na komento o posibleng solusyon. +4. Kung hindi, magdagdag ng komento ng anumang karagdagang impormasyon na maaaring makatulong. + +## Tungkol sa Pag-aambag at Lisensyang GPL + +Ang WordPress Playground at ang proyektong WordPress ay nakaugat sa free at open source software. Partikular, naka-licensiya ang WordPress Playground sa ilalim ng GPLv2 (o mas bago) mula sa [Free Software Foundation](https://www.fsf.org/). Maaari mong [basahin ang teksto ng lisensya dito](https://github.com/WordPress/wordpress-playground/blob/trunk/LICENSE) at kung ito’y nakakalito, may [friendly GPL Primer](https://make.wordpress.org/community/handbook/wordcamp-organizer/planning-details/gpl-primer/) ang WordPress.org. + +Samakatuwid, mangyaring maging alam sa mga implikasyong sumasaklaw sa iyong mga kontribusyon: + +- Kapag nag-ambag ka, sumasang-ayon kang i-license ang iyong kontribusyon sa ilalim ng GPLv2 (o mas bago). +- May malakas na copyleft provisions ang GPL na tinitiyak ang lahat ng derivative works ay nananatiling open-source at nasa ilalim ng parehong mga tuntunin ng lisensya, na nagpo-promote ng kolaboratibong kapaligiran sa pag-develop. +- Hinikayat ng GPL license ang pagbabalik ng anumang pagbabago, pag-aayos ng bug, o bagong feature sa orihinal na codebase. +- Tinitiyak ng GPL license na mananatiling libre at open-source ang proyekto, hindi lang sa presyo kundi pati na rin sa kalayaang gamitin, baguhin, at ipamahagi ang software. + +Kung mayroon kang anumang tanong tungkol sa kung paano maaapektuhan ng nabanggit ang iyong kontribusyon, huwag mag-atubiling makipag-ugnayan sa WP Slack at sa [`meta-playground` channel](https://wordpress.slack.com/archives/C04EWKGDJ0K). + +Salamat muli sa iyong mga kontribusyon! 🎉 diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/translations.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/translations.md new file mode 100644 index 0000000000..da9a136921 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/contributing/translations.md @@ -0,0 +1,138 @@ +--- +slug: /contributing/translations +--- + +# Mga Kontribusyon sa Mga Pagsasalin + +Maaari kang tumulong sa pagsasalin ng dokumentasyon ng Playground sa anumang wika. Nagbibigay ang pahinang ito ng komprehensibong gabay kung paano mag-ambag sa pagsasalin ng mga Playground docs. + +## Paano Ako Makakatulong sa Pagsasalin? + +Gamitin ang parehong workflow tulad ng pag-aambag sa alinmang ibang pahina ng docs. Maaari kang mag-fork ng [WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground) at gumawa ng PRs sa iyong mga pagbabago, o mag-edit ng mga pahina nang direkta gamit ang GitHub UI. + +:::info +Tingnan ang [Paano Ako Makakatulong?](/contributing/documentation#how-can-i-contribute) para matuto nang higit pa kung paano mag-ambag sa Playground Docs +::: + +## Mga Detalye sa Implementasyon ng Mga Pagsasalin + +:::info +Tingnan ang [Internationalization section](https://docusaurus.io/docs/i18n/introduction) ng Docusaurus Docs para malaman ang tungkol sa pamamahala ng mga pagsasalin sa isang Docusaurus site (ang engine sa likod ng Playground Docs). +::: + +Ang mga wikang available para sa site ng Docs ay tinutukoy sa `docusaurus.config.js`. Halimbawa: + +``` +i18n: { + defaultLocale: 'en', + path: 'i18n', + locales: ['en', 'fr'], + localeConfigs: { + en: { + label: 'English', + path: 'en', + }, + fr: { + label: 'French', + path: 'fr', + }, + }, +} +``` + +Ang mga isinaling pahina ng docs ay matatagpuan sa repositoryong [WordPress/wordpress-playground](https://github.com/WordPress/wordpress-playground). + +Sa ilalim ng `packages/docs/site/i18n/` ay may folder para sa bawat wika. +Halimbawa, para sa `es` (Espanyol) ay may `packages/docs/site/i18n/es` folder. + +Sa loob ng bawat folder ng wika ay dapat may `docusaurus-plugin-content-docs/current` folder. +Halimbawa, para sa `es` (Espanyol) ay may `packages/docs/site/i18n/es/docusaurus-plugin-content-docs/current` folder. + +Sa loob ng `docusaurus-plugin-content-docs/current` ay dapat tularan ang parehong istruktura ng mga file ng orihinal na docs (kapareho ng istruktura sa ilalim ng `packages/docs/site/docs`). + +Halimbawa, para sa `es` (Espanyol) ang sumusunod na isinaling file ay umiiral: +`packages/docs/site/i18n/es/docusaurus-plugin-content-docs/current/main/intro.md` + +Kung ang isang file ay hindi available sa folder ng isang wika, gagamitin ang orihinal na file sa default na wika. + +Kapag nadagdag ang bagong wika (tingnan ang PR [#1807](https://github.com/WordPress/wordpress-playground/pull/1807)), maaari mong patakbuhin ang `npm run write-translations -- --locale <%LANGUAGE%>` mula sa `packages/docs/site` upang makabuo ng JSON files na may mga mensaheng maaaring isalin para sa partikular na wika. + +Sa tamang i18n na configuration sa `docusaurus.config.js` at mga files sa ilalim ng `i18n`, kapag pinatakbo ang `npm run build:docs` mula sa root ng proyekto ay malilikha ang mga partikular na folder sa `dist` para sa bawat wika. + +## Paano Subukan nang Lokal ang Isang Wika + +Upang subukan nang lokal ang umiiral na wika, maaari mong gawin ang mga sumusunod: + +- I-modify (isalin) ang anumang file sa ilalim ng isa sa mga available na wika: + `packages/docs/site/i18n/{%LANGUAGE%}/docusaurus-plugin-content-docs/current` +- Mula sa `/packages/docs/site` patakbuhin ang bersyon para sa wikang nais mong subukan. Halimbawa, para subukan ang `es`: + +``` +npm run dev -- --locale es +``` + +## Language Switcher - UI element para Palitan ang Wika + +Ang "Language Switcher" ay isang UI element na ibinibigay ng docusaurus (ang engine sa likod ng Playground Docs) na nagpapahintulot sa user na palitan ang wika ng isang pahina. + +Upang bigyan ng mas magandang visibility ang isang isinaling bersyon, maaaring ipakita ang language switcher sa pamamagitan ng pagdagdag ng sumusunod sa `docusaurus.config.js`: + +``` +{ + type: 'localeDropdown', + position: 'right', +}, +``` + +Magbibigay ito ng dropdown sa header para direktang ma-access ang bersyon ng bawat file sa nais na wika. + +Mahigpit na inirerekomenda na ang isang wika ay i-activate lamang sa Dropdown kapag may sapat na dami ng mga pahina na naisalin. Kung i-aactivate ito nang kakaunti pa lamang ang naisalin na pahina, ang karanasan ng user ay hindi kapani-paniwala dahil kapag nagpalit sa wika ay walang pahina ang naisalin. + +### Pagpapagana ng Isang Wika sa Language Switcher + +Lahat ng wika ay available kapag tapos na ang i18n setup para sa wika at naroroon ang tamang istruktura ng mga file sa ilalim ng `i18n`. + +- https://wordpress.github.io/wordpress-playground/ +- https://wordpress.github.io/wordpress-playground/es/ +- https://wordpress.github.io/wordpress-playground/fr/ + +Dapat itago muna sa language switcher ang mga bersyon ng wika na may kulang pang pagsasalin. Upang maging mas tumpak, ang rekomendasyon ay ipakita lamang ang isang wika sa Language Switcher kapag nakumpleto na ang [Documentation](https://wordpress.github.io/wordpress-playground/) section para sa partikular na wika kabilang ang mga sumusunod na seksyon: + +- [Quick Start Guide](https://wordpress.github.io/wordpress-playground/quick-start-guide) +- [Playground web instance](https://wordpress.github.io/wordpress-playground/web-instance) +- [About Playground](https://wordpress.github.io/wordpress-playground/about) +- [Guides](https://wordpress.github.io/wordpress-playground/guides) +- [Contributing](https://wordpress.github.io/wordpress-playground/contributing) +- [Links and Resources](https://wordpress.github.io/wordpress-playground/resources) + +Kahit hindi nakikita sa language switcher ang isang wika, maaari pa ring magpatuloy ang trabaho sa pagdagdag ng naisaling pahina, dahil magiging available ang mga isinaling pahina kapag na-merge na ang mga PR na naglalaman ng mga naisaling file. + +### Pagsubok sa Language Switcher nang Lokal + +Tungkol sa pagsubok ng `localeDropdown` nang lokal, napansin ko na kahit naipapakita ito nang lokal ay hindi ito gumagana nang maayos dahil hindi nakikita ang mga naisaling pahina. Ngunit maayos naman itong gumagana sa production. + +Maaari mong subukan ang `localeDropdown` mula sa anumang fork sa pamamagitan ng: + +``` +npm run build:docs +npm run deploy:docs +``` + +Gagawa ito ng tatlong bersyon ng docs sa GitHub Pages ng iyong fork: + +``` +https://<%GH-USER-WITH-FORK%>.github.io/wordpress-playground/ +https://<%GH-USER-WITH-FORK%>.github.io/wordpress-playground/es/ +https://<%GH-USER-WITH-FORK%>.github.io/wordpress-playground/fr/ +``` + +Kaya, isang posibleng paraan para subukan ang `localeDropdown` feature ay sa pamamagitan ng pag-deploy nito sa GitHub Pages ng isang forked repository. + +## Proseso para Isalin ang Isang Pahina sa Isang Wika + +Ang inirerekomendang proseso ay kopyahin at i-paste ang `.md` file mula sa orihinal na path (`packages/docs/site/docs`) papunta sa nais na language path (`packages/docs/site/i18n/{%LANGUAGE%}/docusaurus-plugin-content-docs/current`). Mahalaga na gayahin ang istruktura ng mga file sa `packages/docs/site/docs`. + +Ang file sa ilalim ng `packages/docs/site/i18n/{%LANGUAGE%}/docusaurus-plugin-content-docs/current` ay maaari nang isalin at isang PR ang maaaring likhain sa mga bagong pagbabago. + +Kapag na-merge ang PR, dapat lumabas ang naisaling bersyon ng pahina sa +https://wordpress.github.io/wordpress-playground/{%LANGUAGE%} diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-plugin-developers.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-plugin-developers.md new file mode 100644 index 0000000000..1ef1bb584d --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-plugin-developers.md @@ -0,0 +1,167 @@ +--- +title: Playground para sa Mga Plugin Developer +slug: /guides/for-plugin-developers +description: WordPress Playground para sa Mga Plugin Developer +--- + +Ang WordPress Playground ay isang makabagong tool na nagpapahintulot sa mga plugin developer na magtayo, mag-test, at magpakita ng kanilang mga plugin nang direkta sa browser. + +Ang gabay na ito ay magpapakita kung paano gamitin ang WordPress Playground upang pagandahin ang iyong workflow sa pag-develop ng plugin, lumikha ng live na demo para ipakita ang iyong plugin, at pasimplehin ang iyong plugin testing at review. + +:::info + +Tuklasin kung paano [Mag-build](/about/build), [Mag-test](/about/test), at [Mag-launch](/about/launch) ng iyong mga produkto gamit ang WordPress Playground sa [About Playground](/about) na seksyon. + +::: + +## Paglunsad ng isang Playground instance gamit ang plugin + +### Plugin sa WordPress Themes Directory + +Sa WordPress Playground, maaari kang mabilis maglunsad ng WordPress installation na may halos anumang plugin mula sa [WordPress Plugins Directory](https://wordpress.org/plugins/) na naka-install at naka-activate. Kailangan mo lamang idagdag ang `plugin` na [query parameter](/developers/apis/query-api) sa [Playground URL](https://playground.wordpress.net) at gamitin ang slug ng plugin mula sa WordPress directory bilang halaga. Halimbawa: https://playground.wordpress.net/?plugin=create-block-theme + +:::tip +Maaari kang mag-install at mag-activate ng maraming plugin sa pamamagitan ng pag-uulit ng `plugin` parameter para sa bawat plugin na nais mong i-install at i-activate sa Playground instance. Halimbawa: https://playground.wordpress.net/?plugin=gutenberg&plugin=akismet&plugin=wordpress-seo +::: + +Maaari mo ring i-load ang anumang plugin mula sa WordPress plugins directory sa pamamagitan ng pag-set ng [`installPlugin` step](/blueprints/steps#InstallPluginStep) ng isang [Blueprint](/blueprints/getting-started) na ipapasa sa Playground instance. + +```json +{ + "landingPage": "/wp-admin/plugins.php", + "login": true, + "steps": [ + { + "step": "installPlugin", + "pluginData": { + "resource": "wordpress.org/plugins", + "slug": "gutenberg" + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{"landingPage":"/wp-admin/plugins.php","login":true,"steps":[{"step":"installPlugin","pluginData":{"resource":"wordpress.org/plugins","slug":"gutenberg"}}]}) + +Ang mga Blueprint ay maaaring ipasa sa isang Playground instance [sa iba't ibang paraan](/blueprints/using-blueprints). + +### Plugin mula sa GitHub Repository + + + +Ang plugin na naka-imbak sa isang GitHub repository ay maaari ring i-load sa isang Playground instance gamit ang Blueprints. + +Sa pamamagitan ng `pluginData` property ng [`installPlugin` blueprint step](/blueprints/steps#InstallPluginStep), maaari mong tukuyin ang [`url` resource](/blueprints/steps/resources#urlreference) na tumuturo sa lokasyon ng `.zip` file na naglalaman ng plugin na nais mong i-load sa Playground instance. + +Upang maiwasan ang mga isyu sa CORS, nag-aalok ang proyekto ng [GitHub proxy](https://playground.wordpress.net/proxy) na nagpapahintulot sa iyo na bumuo ng `.zip` mula sa isang repository (o kahit isang folder sa loob nito) na naglalaman ng iyong plugin. + +:::info +Ang [GitHub proxy](https://playground.wordpress.net/proxy) ay isang napaka-kapaki-pakinabang na tool upang mag-load ng mga plugin mula sa mga GitHub repository dahil pinapayagan kang mag-load ng plugin mula sa isang partikular na branch, direktoryo, commit, o PR. +::: + +Halimbawa, ang sumusunod na `blueprint.json` ay nag-i-install ng plugin mula sa isang GitHub repository gamit ang https://github-proxy.com tool: + +```json +{ + "landingPage": "/wp-admin/admin.php?page=add-media-from-third-party-service", + "login": true, + "steps": [ + { + "step": "installPlugin", + "pluginData": { + "resource": "url", + "url": "https://github-proxy.com/proxy/?repo=wptrainingteam/devblog-dataviews-plugin" + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{"landingPage":"/wp-admin/admin.php?page=add-media-from-third-party-service","login":true,"steps":[{"step":"installPlugin","pluginData":{"resource":"url","url":"https://github-proxy.com/proxy/?repo=wptrainingteam/devblog-dataviews-plugin"}}]}) + +### Plugin mula sa Code sa File o Gist sa GitHub + +Sa pamamagitan ng kombinasyon ng [`writeFile`](/blueprints/steps#WriteFileStep) at [`activatePlugin`](/blueprints/steps#activatePlugin) na mga step, maaari ka ring maglunsad ng WP Playground instance na may plugin na binuo sa real-time mula sa code na naka-imbak sa isang gist o [file sa GitHub](https://raw.githubusercontent.com/WordPress/blueprints/trunk/blueprints/custom-post/books.php): + +```json +{ + "landingPage": "/wp-admin/plugins.php", + "login": true, + "steps": [ + { + "step": "login" + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/plugins/cpt-books.php", + "data": { + "resource": "url", + "url": "https://raw.githubusercontent.com/WordPress/blueprints/trunk/blueprints/custom-post/books.php" + } + }, + { + "step": "activatePlugin", + "pluginPath": "cpt-books.php" + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{%22landingPage%22:%22/wp-admin/plugins.php%22,%22login%22:true,%22steps%22:[{%22step%22:%22login%22},{%22step%22:%22writeFile%22,%22path%22:%22/wordpress/wp-content/plugins/cpt-books.php%22,%22data%22:{%22resource%22:%22url%22,%22url%22:%22https://raw.githubusercontent.com/WordPress/blueprints/trunk/blueprints/custom-post/books.php%22}},{%22step%22:%22activatePlugin%22,%22pluginPath%22:%22cpt-books.php%22}]}) + +:::info + +Ang [Install plugin from a gist](https://playground.wordpress.net/builder/builder.html?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-plugin-from-gist/blueprint.json#{%22meta%22:{%22title%22:%22Install%20plugin%20from%20a%20gist%22,%22author%22:%22zieladam%22,%22description%22:%22Install%20and%20activate%20a%20WordPress%20plugin%20from%20a%20.php%20file%20stored%20in%20a%20gist.%22,%22categories%22:[%22plugins%22]},%22landingPage%22:%22/wp-admin/plugins.php%22,%22preferredVersions%22:{%22wp%22:%22beta%22,%22php%22:%228.0%22},%22steps%22:[{%22step%22:%22login%22},{%22step%22:%22writeFile%22,%22path%22:%22/wordpress/wp-content/plugins/0-plugin.php%22,%22data%22:{%22resource%22:%22url%22,%22url%22:%22https://gist.githubusercontent.com/ndiego/456b74b243d86c97cda89264c68cbdee/raw/ff00cf25e6eebe4f5a4eaecff10286f71e65340b/block-hooks-demo.php%22}},{%22step%22:%22activatePlugin%22,%22pluginName%22:%22Block%20Hooks%20Demo%22,%22pluginPath%22:%220-plugin.php%22}]}) example sa [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) ay nagpapakita kung paano mag-load ng plugin mula sa code sa isang gist + +::: + +## Pagse-set up ng demo para sa iyong plugin gamit ang Blueprints + +Kapag nagbibigay ng link sa isang WordPress Playground instance na may ilang mga plugin na naka-activate, maaari mo ring i-customize ang paunang setup para sa Playground instance na iyon gamit ang mga plugin na iyon. Sa pamamagitan ng [Blueprints](/blueprints/getting-started) ng Playground, maaari mong i-load/activate ang mga plugin at i-configure ang Playground instance. + +:::tip + +Here are some useful tools and resources provided by the Playground project to work with blueprints: + +- Check the [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) to explore real-world code examples of using WordPress Playground to launch a WordPress site with a variety of setups. +- The [WordPress Playground Step Library](https://akirk.github.io/playground-step-library/#) tool provides a visual interface to drag or click the steps to create a blueprint for WordPress Playground. You can also create your own steps! +- The [Blueprints builder](https://playground.wordpress.net/builder/builder.html) tool allows you edit your blueprint online and run it directly in a Playground instance. + +::: + +Sa pamamagitan ng mga katangian at [`steps`](/blueprints/steps) sa Blueprint, maaari mong i-configure ang paunang setup ng Playground instance, ibibigay ang iyong mga plugin ng kinakailangang content at configuration upang maipakita ang mga kapana-panabik na feature at functionality ng iyong plugin. + +:::info + +Isang mahusay na demo gamit ang WordPress Playground ay maaaring mangailangan na mag-load ka ng default na content para sa iyong plugin at theme, kabilang ang mga larawan at iba pang asset. Tingnan ang [Pagbibigay ng nilalaman para sa iyong demo](/guides/providing-content-for-your-demo) na gabay para matuto nang higit pa tungkol dito. + +::: + +### `plugins` + +Kung ang iyong plugin ay may dependencies sa ibang mga plugin, maaari mong gamitin ang shorthand na `plugins` upang i-install ang mga iyon kasama ang iyong plugin. + +```json +{ + "landingPage": "/wp-admin/plugins.php", + "plugins": ["gutenberg", "sql-buddy", "create-block-theme"], + "login": true +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{"landingPage":"/wp-admin/plugins.php","plugins":["gutenberg","sql-buddy","create-block-theme"],"login":true}) + +### `landingPage` + +If your plugin has a settings view or onboarding wizard, you can use the `landingPage` shortcut to automatically redirect to any page in the Playground instance upon loading. + +```json +{ + "landingPage": "/wp-admin/admin.php?page=my-custom-gutenberg-app", + "login": true, + "plugins": ["https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/data-basics-59c8f8.zip"] +} +``` diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-theme-developers.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-theme-developers.md new file mode 100644 index 0000000000..b815db4917 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/for-theme-developers.md @@ -0,0 +1,275 @@ +--- +title: Playground para sa Mga Theme Developer +slug: /guides/for-theme-developers +description: WordPress Playground para sa Mga Theme Developer +--- + +Ang WordPress Playground ay isang makabagong tool na nagpapahintulot sa mga theme developer na magtayo, mag-test, at magpakita ng kanilang mga theme nang direkta sa browser. + + + +Ang gabay na ito ay magpapakita kung paano gamitin ang WordPress Playground upang pagandahin ang iyong workflow sa pag-develop ng theme, lumikha ng live na demo para ipakita ang iyong theme, at pasimplehin ang proseso ng review ng theme. + + + +:::info + +Tuklasin kung paano [Mag-build](/about/build), [Mag-test](/about/test), at [Mag-launch](/about/launch) ng iyong mga produkto gamit ang WordPress Playground sa seksyon ng [About Playground](/about). + +::: + +## Paglunsad ng Playground instance gamit ang theme + + + +### Theme sa WordPress Themes Directory + + + +Sa WordPress Playground, maaari kang mabilis maglunsad ng WordPress installation gamit ang anumang theme mula sa [WordPress Themes Directory](https://wordpress.org/themes/). Idagdag lamang ang `theme` [query parameter](/developers/apis/query-api) sa [Playground URL](https://playground.wordpress.net) tulad nito: https://playground.wordpress.net/?theme=disco. + +Maaari mo ring i-load ang anumang theme mula sa WordPress themes directory sa pamamagitan ng pag-set ng [`installTheme` step](/blueprints/steps#InstallThemeStep) ng isang [Blueprint](/blueprints/getting-started) na ipapasa sa Playground instance. + +```json +{ + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "twentytwenty" + }, + "options": { + "activate": true, + "importStarterContent": true + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{%22steps%22:[{%22step%22:%22installTheme%22,%22themeData%22:{%22resource%22:%22wordpress.org/themes%22,%22slug%22:%22twentytwenty%22},%22options%22:{%22activate%22:true,%22importStarterContent%22:true}}]}) + +### Theme mula sa GitHub Repository + + + +Ang theme na naka-imbak sa isang GitHub repository ay maaari ring i-load sa isang Playground instance gamit ang Blueprints. + +Sa `themeData` property ng [`installTheme` blueprint step](/blueprints/steps#InstallThemeStep), maaari mong tukuyin ang [`url` resource](/blueprints/steps/resources#urlreference) na tumuturo sa lokasyon ng `.zip` file na naglalaman ng theme na nais mong i-load sa Playground instance. + +Upang maiwasan ang mga isyu sa CORS, nag-aalok ang proyekto ng [GitHub proxy](https://playground.wordpress.net/proxy) na maaari kang gumamit upang bumuo ng `.zip` mula sa isang repository (o kahit isang folder sa loob nito) na naglalaman ng theme. + +:::tip +Ang [GitHub proxy](https://playground.wordpress.net/proxy) ay napaka-kapaki-pakinabang na tool upang mag-load ng themes mula sa mga GitHub repository dahil pinapayagan kang mag-load mula sa isang partikular na branch, direktoryo, commit, o PR. +::: + +Halimbawa, ang sumusunod na `blueprint.json` ay nag-i-install ng theme mula sa isang GitHub repository gamit ang https://github-proxy.com tool: + +```json +{ + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "url", + "url": "https://github-proxy.com/proxy/?repo=Automattic/themes&branch=trunk&directory=assembler" + }, + "options": { + "activate": true + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#{%22steps%22:[{%22step%22:%22installTheme%22,%22themeData%22:{%22resource%22:%22url%22,%22url%22:%22https://github-proxy.com/proxy/?repo=Automattic/themes&branch=trunk&directory=assembler%22},%22options%22:{%22activate%22:true}}]}) + +Ang isang blueprint ay maaaring ipasa sa isang Playground instance [sa iba't ibang paraan](/blueprints/using-blueprints). + +## Pag-set up ng demo theme gamit ang Blueprints + + + +Kapag nagbibigay ng link sa isang WordPress Playground instance na may naka-activate na tema, maaaring gusto mo ring i-customize ang paunang setup ng iyon theme. Sa pamamagitan ng [Blueprints](/blueprints/getting-started), maaari mong i-load, i-activate, at i-configure ang theme. + +:::tip + +Ilang kapaki-pakinabang na tool at resources mula sa proyekto ng Playground para magtrabaho sa blueprints: + +- Suriin ang [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) upang tuklasin ang mga totoong halimbawa ng kodigo ng paggamit ng WordPress Playground upang maglunsad ng WordPress site na may iba't ibang setup. +- Ang [WordPress Playground Step Library](https://akirk.github.io/playground-step-library/#) ay nagbibigay ng visual na interface upang i-drag o i-click ang mga step upang lumikha ng blueprint. Maaari ka ring gumawa ng sarili mong step! +- Ang [Blueprints builder](https://playground.wordpress.net/builder/builder.html) tool ay nagpapahintulot sa iyo na i-edit ang iyong blueprint online at patakbuhin ito nang direkta sa isang Playground instance. + +::: + +Sa pamamagitan ng properties at [`steps`](/blueprints/steps) sa blueprint, maaari mong i-configure ang paunang setup ng iyong theme sa Playground instance. + +:::info + +Upang magbigay ng mahusay na demo ng iyong theme gamit ang Playground, maaaring gusto mong i-load ito kasama ang default na content na nagpapakita ng mga feature ng iyong theme. Tingnan ang [Pagbibigay ng Nilalaman para sa Iyong Demo](/guides/providing-content-for-your-demo) na gabay para matuto pa. +::: + +### `resetData` + + + +Gamit ang [`resetData`](/blueprints/steps#resetData) step, maaari mong alisin ang default na content ng isang WordPress installation upang mag-import ng sarili mong content. + +```json +"steps": [ + { + "step": "resetData" + } +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +### `writeFile` + + + +Gamit ang [`writeFile`](/blueprints/steps#writeFile) step, maaari kang magsulat ng data sa isang file sa tinukoy na path. Maaari mong gamitin ito upang magsulat ng custom PHP code sa isang PHP file sa loob ng `mu-plugins` folder ng Playground WordPress instance, kaya ang code ay awtomatikong na-eexecute kapag na-load ang WordPress instance. + +```json +"steps": [ + { + "step": "writeFile", + "path": "/wordpress/wp-content/mu-plugins/rewrite.php", + "data": "set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );" + } +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +### `updateUserMeta` + + + +Gamit ang [`updateUserMeta`](/blueprints/steps#updateUserMeta) step, maaari mong i-update ang anumang user metadata. Halimbawa, maaari mong i-update ang metadata ng default na `admin` user ng anumang WordPress installation: + +```json +"steps": [ + { + "step": "updateUserMeta", + "meta": { + "first_name": "John", + "last_name": "Doe", + "admin_color": "modern" + }, + "userId": 1 + } +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +### `setSiteOptions` + + + +Gamit ang [`setSiteOptions`](/blueprints/steps#setSiteOptions) step, maaari mong itakda ang [site options](https://developer.wordpress.org/apis/options/#available-options-by-category) gaya ng site name, description, o page na gamitin para sa posts. + +```json +"steps": [ + { + "step": "setSiteOptions", + "options": { + "blogname": "Rich Tabor", + "blogdescription": "Multidisciplinary maker specializing in the intersection of product, design and engineering. Making WordPress.", + "show_on_front": "page", + "page_on_front": 6, + "page_for_posts": 2 + } + } +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +### `plugins` + + + +Gamit ang shorthand na [`plugins`](/blueprints/steps/shorthands#plugins), maaari mong itakda ang listahan ng mga plugin na nais mong i-install at i-activate kasama ng iyong theme sa Playground instance. + +```json +"plugins": ["todo-list-block", "markdown-comment-block"] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +### `login` + + + +Gamit ang shorthand na [`login`](/blueprints/steps/shorthands#login), maaari mong ilunsad ang iyong Playground instance na naka-log in na sa admin user. + +```json +"login": true +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json) + +Maaari mo ring gamitin ang [`login`](/blueprints/steps#login) step upang ilunsad ang iyong Playground instance na naka-log in sa anumang partikular na user. + +:::tip + +Ang ["Stylish Press"](https://github.com/WordPress/blueprints/tree/trunk/blueprints/stylish-press) at ["Loading, activating, and configuring a theme from a GitHub repository"](https://github.com/WordPress/blueprints/tree/trunk/blueprints/install-activate-setup-theme-from-gh-repo) na halimbawa mula sa [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) ay mahusay na sanggunian para sa pag-load, pag-activate, pag-import ng content, at pag-configure ng block theme sa isang Playground instance. +::: + +## Pag-develop ng Theme + +### Lokal na pag-develop at testing ng theme gamit ang Playground + +Mula sa root folder ng code ng isang block theme, maaari mong mabilis i-load sa lokal ang isang Playground instance na may theme na iyon na naka-load at naka-activate. Gawin ito sa pamamagitan ng paglulunsad, sa loob ng theme directory, ng [`wp-now` command](/developers/local-development/wp-now) mula sa iyong paboritong command line program o ang [Visual Studio Code extension](/developers/local-development/vscode-extension) mula sa IDE na [Visual Studio Code](https://code.visualstudio.com/). + +Halimbawa: + +``` +git clone git@github.com:WordPress/community-themes.git +cd community-themes/blue-note +npx @wp-now/wp-now start +``` + +### Idisenyo ang iyong theme gamit ang WordPress UI at i-save ang iyong mga pagbabago bilang Pull Requests + +Maaari mong ikonekta ang iyong Playground instance sa isang GitHub repository at gumawa ng Pull Request na naglalaman ng mga pagbabagong ginawa mo sa pamamagitan ng WordPress UI sa Playground instance, gamit ang plugin na [Create Block Theme](https://wordpress.org/plugins/create-block-theme/). Maaari ka ring gumawa ng mga pagbabago sa theme na iyon at i-export bilang zip. + +Tandaan na kakailanganin mong may naka-install at naka-activate na plugin na [Create Block Theme](https://wordpress.org/plugins/create-block-theme/) sa Playground instance upang magamit ang workflow na ito. + + + +

+ +:::tip + +Check [About Playground > Build > Save changes done on a Block Theme and create GitHub Pull Requests](/about/build#save-changes-done-on-a-block-theme-and-create-github-pull-requests) for more info. + +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/index.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/index.md new file mode 100644 index 0000000000..945613c76b --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/index.md @@ -0,0 +1,26 @@ +--- +title: 📖 Mga Gabay +slug: /guides +description: Mga Gabay sa WordPress Playground +sidebar_class_name: navbar-build-item +--- + +# Mga Gabay + +Sa seksyon na ito, ipinapakita namin ang iba't ibang gabay na tutulong sa iyo maunawaan ang iba’t ibang paksa na may kaugnayan sa WordPress Playground. + +## [Paano magpadala ng totoong WordPress site sa isang native iOS app gamit ang Playground?](/guides/wordpress-native-ios-app) + +Tuklasin ang “Blocknotes,” ang unang app na nagpatakbo ng WordPress nang native sa iOS, gamit ang WebAssembly at ang WordPress block editor. + +## [Pagbibigay ng Nilalaman para sa Iyong Demo gamit ang WordPress Playground](/guides/providing-content-for-your-demo) + +Para makagawa ng mahusay na demo ng iyong theme o plugin sa pamamagitan ng Playground, mag-load ng paunang nilalaman para mai-highlight ang mga feature ng iyong produkto. Tingnan ang gabay na ito para malaman kung paano gawin ito. + +## [WordPress Playground para sa Mga Theme Developer](/guides/for-theme-developers) + +Ipapakita ng gabay na ito ang mga pangunahing setting upang makapagtayo nang buo ng isang theme gamit ang Playground at kung paano mo ito maaaring gamitin sa yugto ng pagbuo. + +## [WordPress Playground para sa Mga Plugin Developer](/guides/for-plugin-developers) + +Ipapakita ng gabay na ito ang mga pangunahing setting para i-demo ang iyong plugin sa WordPress Playground at kung paano mo ito gamitin habang dine-develop ang iyong plugin. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/providing-content-for-your-demo.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/providing-content-for-your-demo.md new file mode 100644 index 0000000000..aabc901e51 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/providing-content-for-your-demo.md @@ -0,0 +1,179 @@ +--- +title: Pagbibigay ng Nilalaman para sa Iyong Demo gamit ang Playground +slug: /guides/providing-content-for-your-demo +description: Pagbibigay ng nilalaman para sa iyong demo gamit ang WordPress Playground +--- + +Isa sa mga bagay na maaaring gusto mong gawin para makagawa ng mahusay na demo gamit ang WordPress Playground ay ang pag-load ng paunang nilalaman upang higit na maipakita ang mga feature ng iyong plugin o theme. Maaaring kabilang dito ang mga larawan o iba pang asset. + +May ilang [blueprint steps](/blueprints/steps) at estratehiya na maaari mong gamitin upang i-import (o bumuo) ng content sa Playground instance: + +## `importWxr` + +Gamit ang [`importWxr`](/blueprints/steps#importWxr) step, maaari mong i-import ang iyong sariling content sa pamamagitan ng isang `.xml` file na [na-export mula sa umiiral na WordPress installation](https://wordpress.org/documentation/article/tools-export-screen/): + +```json +"steps": [ + ..., + { + "step": "importWxr", + "file": { + "resource": "url", + "url": "https://raw.githubusercontent.com/WordPress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint-content.xml" + } + }, + ... +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json)   [   Tignan ang blueprint.json   ](https://github.com/WordPress/blueprints/blob/eb6da7dfa295a095eea2e424c0ae83a219803a8d/blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json#L43) + +:::info +Upang isama ang mga larawan sa iyong imported content, magandang paraan ang i-upload ang mga larawan sa iyong GitHub repo at gamitin ang path na `https://raw.githubusercontent.com/{repo}/{branch}/{image_path}` sa exported `.xml` file. + +```html + +
+ +
+ +``` + +::: + +Inirerekomenda na i-upload mo ang iyong na-export na `.xml` file at anumang naka-referensyang asset (tulad ng mga larawan) sa parehong directory kung saan naroon ang iyong `blueprint.json` sa iyong GitHub repository. + +## `importWordPressFiles` + +Gamit ang [`importWordPressFiles`](/blueprints/steps#importWordPressFiles) step, maaari mong i-import ang iyong sariling top-level WordPress files mula sa isang `.zip` file tungo sa root folder ng instance. Halimbawa, kung naglalaman ang `.zip` file ng `wp-content` at `wp-includes` directories, papalitan nito ang katumbas na directories sa root folder ng Playground. + +Maaaring malikha ang `.zip` file mula sa anumang Playground instance gamit ang option na "Download as zip" sa [Playground Options Menu](/web-instance#playground-options-menu). + +Maaari mong ihanda ang demo para sa iyong WordPress theme o plugin (kasama ang mga larawan at iba pang asset) sa isang Playground instance at pagkatapos ay i-export ito bilang snapshot sa `.zip` file. Maaari itong i-import muli gamit ang `importWordPressFiles` step. + +```json +{ + "landingPage": "/", + "login": true, + "steps": [ + { + "step": "importWordPressFiles", + "wordPressFilesZip": { + "resource": "url", + "url": "https://raw.githubusercontent.com/adamziel/playground-sites/main/playground-for-site-builders/playground.zip" + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#%7B%22landingPage%22%3A%22/%22%2C%22login%22%3Atrue%2C%22steps%22%3A%5B%7B%22step%22%3A%22importWordPressFiles%22%2C%22wordPressFilesZip%22%3A%7B%22resource%22%3A%22url%22%2C%22url%22%3A%22https://raw.githubusercontent.com/adamziel/playground-sites/main/playground-for-site-builders/playground.zip%22%7D%7D%5D%7D) + +## `importThemeStarterContent` + +[Ilang tema ay may starter content](https://make.wordpress.org/core/2016/11/30/starter-content-for-themes-in-4-7/) na maaaring i-publish upang ipakita ang feature ng isang theme. + +Gamit ang [`importThemeStarterContent` step](/blueprints/steps#importThemeStarterContent) maaari mong i-publish ang starter content ng anumang theme kahit hindi ito ang naka-activate sa Playground instance. + +```json +"steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "twentytwenty" + } + }, + { + "step": "importThemeStarterContent", + "themeSlug": "twentytwenty" + } +] +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#%7B%22steps%22%3A%5B%7B%22step%22%3A%22installTheme%22%2C%22themeData%22%3A%7B%22resource%22%3A%22wordpress.org/themes%22%2C%22slug%22%3A%22twentytwenty%22%7D%7D%2C%7B%22step%22%3A%22importThemeStarterContent%22%2C%22themeSlug%22%3A%22twentytwenty%22%7D%5D%7D) + +Maaari mo ring i-publish ang starter content ng isang theme kapag ini-install ito gamit ang [`installTheme` step](/blueprints/steps#installTheme) sa pamamagitan ng pagtatakda sa `options.importStarterContent` bilang `true`: + +```json +{ + "steps": [ + { + "step": "installTheme", + "themeData": { + "resource": "wordpress.org/themes", + "slug": "twentytwenty" + }, + "options": { + "activate": true, + "importStarterContent": true + } + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#%7B%22steps%22%3A%5B%7B%22step%22%3A%22installTheme%22%2C%22themeData%22%3A%7B%22resource%22%3A%22wordpress.org/themes%22%2C%22slug%22%3A%22twentytwenty%22%7D%2C%22options%22%3A%7B%22activate%22%3Atrue%2C%22importStarterContent%22%3Atrue%7D%7D%5D%7D) + +## `wp-cli` + +Isa pang paraan ng pag-generate ng content para sa iyong theme o plugin ay sa pamamagitan ng `wp-cli` step na nagpapahintulot sa'yo na patakbuhin ang mga [WP-CLI commands](https://developer.wordpress.org/cli/commands/) gaya ng [`wp post generate`](https://developer.wordpress.org/cli/commands/post/generate/): + +```json +{ + "landingPage": "/wp-admin/edit.php", + "login": true, + "steps": [ + { + "step": "wp-cli", + "command": "wp post generate --count=20 --post_type=post --post_date=1999-01-04" + } + ] +} +``` + +[   Patakbuhin ang Blueprint   ](https://playground.wordpress.net/builder/builder.html#%7B%22landingPage%22%3A%22%2Fwp-admin%2Fedit.php%22%2C%22login%22%3Atrue%2C%22steps%22%3A%5B%7B%22step%22%3A%22wp-cli%22%2C%22command%22%3A%22wp%20post%20generate%20--count%3D20%20--post_type%3Dpost%20--post_date%3D1999-01-04%22%7D%5D%7D) + +Maaari mo ring gamitin ang `wp-cli` step kasama ang `writeFile` step upang lumikha ng mga post mula sa umiiral na content at mag-import ng mga larawan sa Playground instance: + +```json +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "landingPage": "/?p=4", + "login": true, + "steps": [ + { + "step": "writeFile", + "path": "/wordpress/wp-content/postcontent.md", + "data": { + "resource": "url", + "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/wpcli-post-with-image/postcontent.md" + } + }, + { + "step": "wp-cli", + "command": "wp post create --post_title='Welcome to Playground' --post_status='published' /wordpress/wp-content/postcontent.md" + }, + { + "step": "writeFile", + "path": "/wordpress/wp-content/Select-storage-method.png", + "data": { + "resource": "url", + "url": "https://raw.githubusercontent.com/wordpress/blueprints/trunk/blueprints/wpcli-post-with-image/Select-storage-method.png" + } + }, + { + "step": "wp-cli", + "command": "wp media import wordpress/wp-content/Select-storage-method.png --post_id=4 --title='Select your storage method' --featured_image" + } + ] +} +``` + +[    Patakbuhin ang Blueprint    ]() + +:::tip + +Tingnan ang halimbawa na ["Use wp-cli to add a post with image"](https://github.com/WordPress/blueprints/tree/trunk/blueprints/wpcli-post-with-image) mula sa [Blueprints Gallery](https://github.com/WordPress/blueprints/blob/trunk/GALLERY.md) upang makita ang buong halimbawa na nagpapakita ng ugnayan sa pagitan ng content at featured image. + +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/wordpress-native-ios-app.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/wordpress-native-ios-app.md new file mode 100644 index 0000000000..9ccbc4c4e3 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/guides/wordpress-native-ios-app.md @@ -0,0 +1,46 @@ +--- +title: Playground sa Native na iOS Apps +slug: /guides/wordpress-native-ios-app +description: WordPress Playground sa mga Native na iOS Apps +--- + +## Paano Mag-ship ng Tunay na WordPress Site sa Native na iOS App gamit ang Playground? + +Ang Blocknotes ang kauna-unahang iOS application na nagpapatakbo ng WordPress nang native sa mga iOS device sa pamamagitan ng paggamit ng WordPress Playground. Binuo ni [Ella van Durpe](https://profiles.wordpress.org/ellatrix/), isang core committer para sa WordPress, ang Blocknotes ay isang malaking hakbang sa kakayahan ng mga mobile application sa pamamagitan ng paggamit ng WebAssembly upang patakbuhin ang WordPress nang hindi kailangan ng tradisyonal na PHP server. + +Tinutuklas ng case study na ito ang mga feature, teknikal na implementasyon, at potensyal na implikasyon ng Blocknotes para sa hinaharap ng mobile at web development. + +**Mahalaga!** Ang kasalukuyang bersyon ng Blocknotes ay hindi na gumagamit ng WordPress Playground. Mula nang unang ilunsad, muling isinulat ang app upang gamitin lamang ang WordPress block editor nang walang iba pang bahagi ng WordPress. Sinasaklaw ng case study na ito ang mga unang bersyon ng Blocknotes na nagbukas ng bagong mundo ng mga posibilidad para sa WordPress. + +## Mga Tampok ng Blocknotes + +Pinapayagan ng Blocknotes ang mga user na lumikha at mag-edit ng mga tala gamit ang WordPress block editor. Awtomatikong nai-save ang mga tala bilang mga HTML file sa iCloud Drive ng user at kusang naka-synchronize sa iba't ibang device. + +## Teknikal na Implementasyon + +Ang Blocknotes ay nagpapatakbo bilang isang WebView na nagpapatupad ng isang HTML page kung saan ang isang WebAssembly na bersyon ng PHP ay nagpapatakbo ng WordPress. Ang HTML page na iyon ay naka-package bilang isang native na iOS app gamit ang [Capacitor](https://capacitorjs.com/). Pinayagan ng setup na ito ang WordPress na gumana sa mga environment na tradisyonal na hindi suportado. + +Sa [Blocknotes GitHub repository](https://github.com/blocknotes-org/blocknotes/tree/e08535883332be9a45a0c75b750c54a4e17f6748) maaari mong suriin ang huling release na nakabase sa Playground. Narito ang mga pinakamahalagang bahagi: + +- [Isang WordPress build](https://github.com/blocknotes-org/blocknotes/blob/e08535883332be9a45a0c75b750c54a4e17f6748/src/js/wp-6.2.data) (nai-package bilang isang `.data` file). +- [Static na WordPress assets](https://github.com/blocknotes-org/blocknotes/tree/e08535883332be9a45a0c75b750c54a4e17f6748/public). +- [Isang WebAssembly build ng PHP](https://github.com/blocknotes-org/blocknotes/tree/e08535883332be9a45a0c75b750c54a4e17f6748/node_modules/@php-wasm/web) (sa pamamagitan ng [@php-wasm/web](https://npmjs.com/package/@php-wasm/web)). +- [Isang web worker na nagpapatakbo ng PHP at WordPress](https://github.com/blocknotes-org/blocknotes/blob/e08535883332be9a45a0c75b750c54a4e17f6748/src/js/worker.js). +- [Hypernotes](https://wordpress.com/plugins/hypernotes) plugin ng WordPress ([ini-install dito](https://github.com/blocknotes-org/blocknotes/blob/e08535883332be9a45a0c75b750c54a4e17f6748/src/js/index.js#L160)) para gawing note-taking app ang wp-admin. +- Isang layer para sa [pag-load ng WordPress posts mula sa mga iOS files](https://github.com/blocknotes-org/blocknotes/blob/e08535883332be9a45a0c75b750c54a4e17f6748/src/js/index.js#L39) at [pag-save ng mga pagbabago bilang iOS files](https://github.com/blocknotes-org/blocknotes/blob/e08535883332be9a45a0c75b750c54a4e17f6748/src/js/save-data.js). + +## Paggawa ng Sariling iOS App gamit ang WordPress Playground + +Bagaman napatunayan ng Blocknotes na posible ang pagpapalabas ng iOS app na nakabase sa WordPress, napaka-eksploratoryo pa rin nitong larangan. Wala pang establisadong workflow, library, o knowledge base. + +Ang pinakamahusay na dokumentasyon na mayroon tayo ay ang Blocknotes repository. Gamitin ito bilang sanggunian at panimulang punto para sa paggalugad ng iyong bagong app. Suriin ang mga pangunahing bahagi tulad ng WebAssembly build ng PHP, ang integrasyon ng WordPress block editor, at kung paano ginagamit ang web workers upang patakbuhin nang mahusay ang WordPress. Sa pamamagitan ng pagbubuo ng mga elementong ito, makakakuha ka ng mga insight sa paggawa ng iyong sariling iOS app gamit ang WordPress Playground, na itinutulak ang mga hangganan ng kung ano ang posible sa mga mobile web application. + +Habang naglalakbay ka sa makabagong espasyong ito, ibahagi ang iyong mga natuklasan at hamon sa Playground team at mas malawak na komunidad ng WordPress. Ang pag-publish ng iyong mga natutunan ay hindi lamang makakatulong sa iyong development kundi pati sa kolektibong knowledge base, na nagtutulak sa hinaharap ng WordPress sa mobile. + +## Potensyal at Hinaharap + +Ang Blocknotes ang nagbukas ng daan para sa bagong henerasyon ng mga application na mas accessible, flexible, at powerful. + +Kapag matured na ang workflows sa paggawa ng app, maaari nating makita ang automated pipeline para sa pag-package ng mga Playground site bilang iOS apps. Maging napakadali nitong patakbuhin ang parehong codebase sa server, sa browser, at bilang mobile app. + +Sa pamamagitan ng pagtutulungan at pagbabahagi ng ating mga natuklasan, mapupulpush natin ang mga hangganan ng kung ano ang posible gamit ang WordPress at mobile app development. diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/intro.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/intro.md new file mode 100644 index 0000000000..0675834c2c --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/intro.md @@ -0,0 +1,71 @@ +--- +title: Panimula +slug: / +id: introduction +--- + +# Dokumentasyon ng WordPress Playground + +:::info **Naghahanap ng opisyal na Playground na website?** + +Ang WordPress Playground na website ay inilipat sa [wordpress.org/playground/](https://wordpress.org/playground/). Ang site na ito ay nagho-host ng dokumentasyon. + +::: + +👋 Kamusta! Maligayang pagdating sa dokumentasyon ng WordPress Playground. + +Ang Playground ay isang online na tool para subukan at pag-aralan ang WordPress. Dito sa site na ito (Dokumentasyon) makikita mo ang lahat ng impormasyong kailangan mo upang makapagsimula sa paggamit ng Playground. + +

Ang dokumentasyon ng WordPress Playground ay hinati sa apat na magkakahiwalay na hub (subsite):

+ +- 👉 [**Dokumentasyon**](/wordpress-playground/) (nandoon ka ngayon) – Panimula sa WP Playground, mga gabay para sa panimula, at iyong pasukan sa Dokumentasyon ng WP Playground. +- [**Blueprints**](/wordpress-playground/blueprints) – Ang Blueprints ay mga JSON file para i-setup ang iyong WordPress Playground instance. Alamin ang mga ito sa Blueprint docs hub. +- [**Para sa Developer**](/wordpress-playground/developers) – Ang WordPress Playground ay ginawa bilang isang programmable na tool. Tuklasin ang lahat ng magagawa mo gamit ang code sa Developer docs hub. +- [**API Reference**](/wordpress-playground/api) – Lahat ng API na iniaalok ng WordPress Playground. + +## Pag-navigate sa hub na ito ng dokumentasyon + +Ang hub na ito ay nakatuon sa pagsisimula sa WordPress Playground at hinati sa mga pangunahing seksyon: + +- **[Gabay sa Mabilis na Pagsisimula](/quick-start-guide)**: Para sa mga nagsisimula pa lang sa WordPress Playground—dito ka magsisimula para magpatakbo ng bagong site, subukan ang block/theme/plugin, o mag-test ng partikular na bersyon ng WordPress/PHP. +- **[Playground web instance](/web-instance)**: Alamin ang tungkol sa Playground instance sa https://playground.wordpress.net/ +- **[Tungkol sa Playground](/about)**: Malaman kung ano ang WordPress Playground, gaano ito kaligtasan, at ang mga kasalukuyang limitasyon nito. Tuklasin kung paano gamitin ang Playground para [Build](/about/build), [Test](/about/test), at [Launch](/about/launch). +- **[Mga Gabay](/guides)**: Komprehensibong gabay para matuto ng bagong kasanayan, makakuha ng step-by-step na instruksyon, at mahatak ang mahahalagang kaalaman. +- **[Pag-aambag](/contributing)**: Maligayang pagdating sa lahat ng kontribyutor—mula sa code, disenyo, dokumentasyon, hanggang triage. +- **[Mga Link at Recursos](/resources)**: Koleksyon ng mga kapaki-pakinabang na link at resources tungkol sa WordPress Playground. + +## Mga Unang Hakbang + +Kung ikaw ay developer, non-technical na user, o kontribyutor, gagabay sa iyo ang dokumentasyong ito: + +- [Magsimula gamit ang WordPress Playground sa loob ng 5 minuto](/quick-start-guide) (at bisitahin ang [demo site](https://playground.wordpress.net/)) +- [Magsimula sa pag-develop](/developers/build-your-first-app) gamit ang WordPress Playground +- Gamitin ang Playground bilang zero-setup na [local development environment](/developers/local-development/) +- Basahin ang tungkol sa mga [limitasyon](/developers/limitations) +- [WordCamp Contributor Day](/contributing/contributor-day) + +:::tip +Basahin ang [**Introduction to Playground: running WordPress in the browser**](https://developer.wordpress.org/news/2024/04/05/introduction-to-playground-running-wordpress-in-the-browser/) sa [WordPress Developer Blog](https://developer.wordpress.org/news) para sa mahusay na panimula sa WordPress Playground. +::: + +## Mas Malalim na Pagsusuri + +Kung ikaw ay developer o tech user, maaari mong direktang tingnan ang mga API: + +import APIList from '@site/docs/\_fragments/\_api_list.mdx'; + +- Basahin ang tungkol sa [Playground APIs](/developers/apis/) at mga pangunahing konsepto +- Suriin ang [mga link at resources](/resources) +- Piliin ang tamang API para sa iyong app +- Tuklasin ang [arkitektura](/developers/architecture) at alamin kung paano ito gumagana + +## Maki-ambag + +Ang WordPress Playground ay open-source at malugod na tinatanggap ang lahat ng kontribyutor mula sa code, disenyo, dokumentasyon, hanggang triage. Huwag mag-alala, _hindi mo kailangang malaman ang WebAssembly_ para makapag-ambag! + +- Tingnan ang [Contributors Handbook](/contributing) para sa detalye kung paano ka makakatulong. +- Sumali sa `#meta-playground` channel sa Slack (tingnan ang [WordPress Slack page](https://make.wordpress.org/chat/) para sa impormasyon sa pag-signup) + +:::tip +Tingnan ang aming [Code of Conduct](https://make.wordpress.org/handbook/community-code-of-conduct/) upang matiyak ang magiliw na kapaligiran para sa lahat. +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/quick-start-guide.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/quick-start-guide.md new file mode 100644 index 0000000000..ecaa577cc8 --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/quick-start-guide.md @@ -0,0 +1,98 @@ +--- +title: Gabay sa Mabilis na Pagsisimula +slug: /quick-start-guide +--- + +import ThisIsQueryApi from '@site/docs/\_fragments/\_this_is_query_api.md'; + +# Magsimula gamit ang WordPress Playground sa loob ng 5 minuto + +Maaaring makatulong sa iyo ang WordPress Playground sa alinman sa mga sumusunod: + +import TOCInline from '@theme/TOCInline'; + + + +Ang pahinang ito ang gagabay sa bawat hakbang. At para sa mga visual na nag-aaral—narito ang isang video: + + + +## Magsimula ng bagong WordPress site + +Sa tuwing bibisita ka sa [opisyal na demo sa playground.wordpress.net](https://playground.wordpress.net/), makakakuha ka ng bagong WordPress site. + +Mula doon, maaari kang gumawa ng mga pahina, mag-upload ng plugin o theme, mag-import ng sariling site, at gawin ang karamihang ginagawa mo sa regular na WordPress. + +Napakadaling magsimula! + +Ang buong site ay nasa browser mo at matatanggal kapag isinara mo ang tab. Gusto mong magsimula muli? I-refresh lang ang pahina! + +:::info WordPress Playground ay Pribado + +Lahat ng iyong ginawa ay nananatili sa browser at **hindi** ipinapadala kahit saan. Pagkatapos, maaari mong i-export ang iyong site bilang zip file. O i-refresh lang upang magsimula muli! + +::: + +## Subukan ang isang block, theme, o plugin + +Maaari kang mag-upload ng anumang plugin o theme sa [/wp-admin/](https://playground.wordpress.net/?url=/wp-admin/). + +Para mas mapabilis, maaari kang mag-preinstall ng plugin o theme mula sa WordPress directory gamit ang `plugin` o `theme` parameter sa URL. Halimbawa, para sa coblocks plugin: + +https://playground.wordpress.net/?plugin=coblocks + +O para sa `pendant` theme: + +https://playground.wordpress.net/?theme=pendant + +Maaari ka ring maghalo ng mga parameter at magdagdag ng maraming plugin: + +https://playground.wordpress.net/?plugin=coblocks&plugin=friends&theme=pendant + + + +## I-save ang iyong site + +Para hindi mawala ang iyong site pagkatapos ng single browser session, i-export ito bilang `.zip` file. + +1. Buksan ang Site Manager panel: + +![Site Manager](@site/static/img/open-site-manager.webp) + +2. Gamitin ang button na "Download as .zip" sa additional actions menu: + +![Export button](@site/static/img/site-manager-menu.webp) + +Ang na-export na file ay naglalaman ng buong site na iyong binuo, kasama ang database (`wp-content/database/.ht.sqlite`). Tandaan na ang mga nak начин ng tuldok ay nakatago, kaya maaaring kailangan mong i-enable ang "Show hidden files." + +## I-restore ang na-save na site + +Maaari mong i-restore ang na-save na site gamit ang "Import from .zip" button sa site management panel: + +![Import from .zip button](@site/static/img/site-manager-import-actions-menu.webp) + +## Gamitin ang tiyak na bersyon ng WordPress o PHP + +Ang pinakamabilis na paraan para baguhin ang bersyon ng WordPress o PHP ay sa settings panel sa [opisyal na demo site](https://playground.wordpress.net/): + +![WordPress Playground Settings menu](@site/static/img/playground-settings-menu.webp) + +:::info Subukan ang iyong plugin o theme + +Ang compatibility testing sa maraming bersyon ng WordPress at PHP ay palaging mahirap. Ginagawang madali ito ng WordPress Playground—gamitin ito! + +::: + +Maaari mo ring gamitin ang `wp` at `php` query parameters para buksan ang Playground na may tamang bersyon na naka-load: + +- https://playground.wordpress.net/?wp=6.5 +- https://playground.wordpress.net/?php=7.4 +- https://playground.wordpress.net/?php=8.2&wp=6.2 + + + +:::info Major versions only + +Maaari kang mag-specify ng major versions tulad ng `wp=6.2` o `php=8.1` at makukuha ang pinakabagong release sa linya na iyon. Hindi ka maaaring humiling ng mas lumang minor versions, kaya `wp=6.1.2` o `php=7.4.9` ay hindi gagana. + +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/resources.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/resources.md new file mode 100644 index 0000000000..1c28602e7e --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/resources.md @@ -0,0 +1,62 @@ +--- +title: Mga Link at Resources +slug: /resources +--- + +# Mga Link at Resources + +:::tip + +May mga redirect para mas madaling ma-access ang ilang tool na may kinalaman sa Playground: + + +::: + +## Madalas Hanapin na Link + +- [Demo](https://playground.wordpress.net/) +- [GitHub Repository](https://github.com/WordPress/wordpress-playground) +- [Dokumentasyon](https://wordpress.github.io/wordpress-playground/) +- [Playground tools Repository](https://github.com/WordPress/playground-tools) + +## Mga App na Ginawa Gamit ang WordPress Playground + +- [Opisyal na demo](https://playground.wordpress.net/) at ang [showcase](https://developer.wordpress.org/playground) app – mag-install ng theme, subukan ang plugin, gumawa ng pahina, at i-export ang ginawa mo +- [wp-now](https://www.npmjs.com/package/@wp-now/wp-now) – CLI tool para sa instant na WordPress dev envs +- [WordPress Playground para sa VS Code](https://marketplace.visualstudio.com/items?itemName=WordPressPlayground.wordpress-playground) +- Live Translations: [App](https://translate.wordpress.org/projects/wp-plugins/friends/dev/pl/default/playground/), [announcement](https://make.wordpress.org/polyglots/2023/04/19/wp-translation-playground/), [detalye](https://make.wordpress.org/polyglots/2023/05/08/translate-live-updates-to-the-translation-playground/) +- [Interactive code block](https://wordpress.org/plugins/interactive-code-block/) na nagpapatakbo ng [HTML Tag Processor tutorial](https://adamadam.blog/2023/02/16/how-to-modify-html-in-a-php-wordpress-plugin-using-the-new-tag-processor-api/) at [Playground JS API tutorial](https://adamadam.blog/2023/04/12/interactive-intro-to-wordpress-playground-public-api/) +- [Gutenberg Pull Request previewer](https://playground.wordpress.net/gutenberg.html) +- [Notifications plugin live demo](https://johnhooks.io/playground-experiment/) +- [GraphQL REPL](https://www.wpgraphql.com/2023/06/15/announcing-the-wpgraphql-repl) +- [Blocknotes](https://twitter.com/adamzielin/status/1669478239771799552) – ang kauna-unahang iOS app na nagpapatakbo ng WordPress sa iyong telepono +- [Playground embedder](https://joost.blog/embedded-playground/) para mag-embed ng mga Playground example sa WordPress.org documentation gamit ang shortcodes +- [Plugin demos sa wp.org](https://gist.github.com/adamziel/0fe3ffc1fb5202a907a87d055ee37135) – userscript na nagdaragdag ng "demo" tab sa mga pahina ng plugin sa WordPress.org +- [WordPress Pull Request previewer](https://playground.wordpress.net/wordpress.html) +- [Synchronization sa pagitan ng dalawang Playground](https://playground.wordpress.net/demos/sync.html) +- [Time Travel](https://playground.wordpress.net/demos/time-traveling.html) +- [WP-CLI](https://playground.wordpress.net/demos/wp-cli.html) +- [PHP implementation ng Blueprints](https://playground.wordpress.net/demos/php-blueprints.html) + +## Mga Babasang Materyal + +- [Build in-browser WordPress experiences with WordPress Playground and WebAssembly](https://web.dev/wordpress-playground/) +- [WordPress Playground sa developer.wordpress.org](https://developer.wordpress.org/playground) +- [In-Browser WordPress Tech Demos: WordPress Development with WordPress Playground](https://make.wordpress.org/core/2023/04/13/in-browser-wordpress-tech-demos-wordpress-development-with-wordpress-playground/) +- [Initial announcement on make.wordpress.org](https://make.wordpress.org/core/2022/09/23/client-side-webassembly-wordpress-with-no-server/) +- [Diskusyon sa Hackernews](https://news.ycombinator.com/item?id=32960560) + +## Video + +- Mga Developer Hours Videos: [Americas Region (May 23,2023)](https://wordpress.tv/2023/05/23/developer-hours-wordpress-playground-americas/), [APAC/EMEA Region (May 24,2023)](https://wordpress.tv/2023/05/24/developer-hours-wordpress-playground-apac-emea/) +- [Playground sa State of the Word](https://youtu.be/VeigCZuxnfY?t=2912) +- [Playground sa WCEU 2023](https://www.youtube.com/watch?v=e-CwouzTGp4&t=26946s) +- [Playground sa WordCamp Gliwice (in Polish)](https://www.youtube.com/watch?v=AUHklF9GdL8&list=PLiCne9CeL82_hGuJOAJlsc84WxVDSH-c9&index=4) +- [Panoorin ang "WordPress Playground: the ultimate learning, testing, & teaching tool for WordPress"](https://www.youtube.com/watch?v=dN_LaenY8bI) by Anne McCarthy diff --git a/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/web-instance.md b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/web-instance.md new file mode 100644 index 0000000000..0c706167ab --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-plugin-content-docs/current/main/web-instance.md @@ -0,0 +1,58 @@ +--- +title: Playground web instance +slug: /web-instance +--- + +# Playground web instance ng WordPress + +[https://playground.wordpress.net/](https://playground.wordpress.net/) ay isang versatile na web tool na nagpapahintulot sa mga developer na patakbuhin ang WordPress sa browser nang hindi nangangailangan ng server. Napakagamitin ito para sa mabilisang pagsusuri ng plugins, themes, at iba pang feature ng WordPress. + +## Mga Pangunahing Tampok: + +- **Browser-based**: Hindi kailangan ng lokal na server setup. +- **Instant Setup**: Patakbuhin ang WordPress nang isang click lang. +- **Testing Environment**: Perpekto para sa pagsusuri ng plugins at themes. + +Sa pamamagitan ng [Query Params](/developers/apis/query-api/) maaari mong direktang i-load sa Playground instance ang partikular na bersyon ng WordPress, theme, plugin, o mas kumplikadong setup gamit ang blueprints (tingnan ang [mga halimbawa](/quick-start-guide#try-a-block-a-theme-or-a-plugin)). + +Mula sa Playground website, may ilang toolbars na nagagamit upang i-customize ang iyong Playground instance at magbigay ng mabilis na access sa ilang resources at utilities. + +![Playground Toolbar Snapshot](./_assets/toolbar.png) + +## I-customize ang Playground + +![snapshot of customize playground window at playground instance](./_assets/customize-playground.png) + +Ang mga pagpipilian sa "Customize Playground" window ay tumutugma sa mga sumusunod na [Query API options](/developers/apis/query-api#available-options): + +- `php` +- `php-extension-bundle` +- `networking` +- `wp` + +:::tip + +Kailangan mong i-activate ang "Network access" upang makapag-browse para sa [plugins](https://w.org/plugins) at [themes](https://w.org/themes) mula sa iyong WordPress instance. +::: + +## Menu ng Playground Options + +![options menu at playground instance snapshot](./_assets/options.png) + +Ang menu na ito ay naglalaman ng mga link sa ilang resources at tools ng Playground: + +- **Reset Site**: Buburahin nito ang lahat ng data at ire-reload ang page na may bagong site. +- **Report error**: Kung may isyu ka sa WP Playground, maaari mo itong i-report gamit ang form na makikita sa opsyong ito. Makakatulong kang lutasin ang mga problema sa pamamagitan ng pagbabahagi ng detalye ng error sa development team. +- **Download as zip**: Gumagawa ito ng `.zip` ng setup ng Playground instance kasama ang anumang themes o plugins na naka-install. Hindi kasama sa `.zip` ang content at database changes. +- **Restore from zip**: Pinapayagan kang muling likhain ang Playground instance gamit ang anumang `.zip` na ginawa sa pamamagitan ng "Download as zip". +- **Import from GitHub**: Pinapayagan ka nitong mag-import ng plugins, themes, at wp-content directories direkta mula sa iyong public GitHub repositories. Upang magamit ito, ikonekta ang iyong GitHub account sa WordPress Playground. +- **Export Pull Request to GitHub**: Pinapayagan ka nitong i-export ang WordPress plugins, themes, at buong wp-content directories bilang pull requests sa anumang public GitHub repository. Tingnan ang demo rito: https://www.youtube.com/watch?v=gKrij8V3nK0&t=2488s +- **View Logs**: Dadalhin ka nito sa modal na nagpapakita ng anumang error logs para sa Playground, WordPress, at PHP. +- **Edit the blueprint**: Bubuksan nito ang kasalukuyang blueprint na ginagamit ng Playground instance sa [Blueprints Builder tool](https://playground.wordpress.net/builder/builder.html). Mula rito, maaari mong i-edit ang blueprint online at patakbuhin muli ang Playground instance gamit ang iyong binagong blueprint. + +:::caution + +Ang site sa https://playground.wordpress.net ay para suportahan ang komunidad, ngunit walang garantiya na patuloy itong gagana kung lalobo ang traffic. + +Kung kailangan mo ng tiyak na availability, dapat mong [i-host ang sarili mong WordPress Playground](/developers/architecture/host-your-own-playground). +::: diff --git a/packages/docs/site/i18n/tl/docusaurus-theme-classic/footer.json b/packages/docs/site/i18n/tl/docusaurus-theme-classic/footer.json new file mode 100644 index 0000000000..189828351d --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-theme-classic/footer.json @@ -0,0 +1,42 @@ +{ + "link.title.Docs": { + "message": "Docs", + "description": "The title of the footer links column with title=Docs in the footer" + }, + "link.title.Community": { + "message": "Komunidad", + "description": "The title of the footer links column with title=Community in the footer" + }, + "link.item.label.Documentation": { + "message": "Dokumentasyon", + "description": "The label of footer link with label=Documentation linking to /" + }, + "link.item.label.Blueprints": { + "message": "Blueprints", + "description": "The label of footer link with label=Blueprints linking to /blueprints" + }, + "link.item.label.Developers": { + "message": "Developers", + "description": "The label of footer link with label=Developers linking to /developers" + }, + "link.item.label.API Reference": { + "message": "API Reference", + "description": "The label of footer link with label=API Reference linking to /api" + }, + "link.item.label.GitHub": { + "message": "GitHub", + "description": "The label of footer link with label=GitHub linking to https://github.com/WordPress/wordpress-playground" + }, + "link.item.label.#meta-playground on Slack": { + "message": "#meta-playground on Slack", + "description": "The label of footer link with label=#meta-playground on Slack linking to https://make.wordpress.org/chat" + }, + "copyright": { + "message": "Copyright © 2025 WordPress Playground, Inc. Built with Docusaurus.", + "description": "The footer copyright" + }, + "logo.alt": { + "message": "Code Is Poetry", + "description": "The alt text of footer logo" + } +} diff --git a/packages/docs/site/i18n/tl/docusaurus-theme-classic/navbar.json b/packages/docs/site/i18n/tl/docusaurus-theme-classic/navbar.json new file mode 100644 index 0000000000..c54878ddfd --- /dev/null +++ b/packages/docs/site/i18n/tl/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "title": { + "message": "WordPress Playground", + "description": "The title in the navbar" + }, + "logo.alt": { + "message": "WordPress Playground", + "description": "The alt text of navbar logo" + }, + "item.label.Documentation": { + "message": "Dokumentasyon", + "description": "Navbar item with label Documentation" + }, + "item.label.Blueprints": { + "message": "Blueprints", + "description": "Navbar item with label Blueprints" + }, + "item.label.Developers": { + "message": "Developers", + "description": "Navbar item with label Developers" + }, + "item.label.API Reference": { + "message": "API Reference", + "description": "Navbar item with label API Reference" + } +}