Skip to content

Commit

Permalink
Merge pull request #196 from 10up/feature/plugin-preview
Browse files Browse the repository at this point in the history
Add support for the WordPress.org plugin preview
  • Loading branch information
dkotter authored Jan 2, 2024
2 parents 41d3ee8 + 7e20819 commit e6596fe
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/update-asset-readme-on-wordpress-org.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: Update asset/readme on WordPress.org

on:
push:
branches:
- trunk

jobs:
trunk:
name: Push to trunk
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Checkout code
uses: actions/checkout@v4

- name: Build
run: |
npm install
npm run build
composer install --no-dev
- name: WordPress.org plugin asset/readme update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
Expand Down
33 changes: 33 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "\/wp-admin\/post.php?post=6&action=edit",
"preferredVersions": {
"php": "7.4",
"wp": "latest"
},
"phpExtensionBundles": ["kitchen-sink"],
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org\/plugins",
"slug": "maps-block-apple"
},
"options": {
"activate": true
}
},
{
"step": "importFile",
"file": {
"resource": "url",
"url": "https:\/\/raw.githubusercontent.com\/10up\/maps-block-apple\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml"
}
}
]
}
82 changes: 82 additions & 0 deletions .wordpress-org/blueprints/demo-data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->

<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!-- on the site. For each author, you may choose to map to an -->
<!-- existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!-- contained in this file into your site. -->

<!-- generator="WordPress/6.4.2" created="2023-12-18 22:55" -->
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>

<channel>
<title>My WordPress Website</title>
<link>https://playground.wordpress.net/</link>
<description></description>
<pubDate>Mon, 18 Dec 2023 22:55:30 +0000</pubDate>
<language>en-US</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>https://playground.wordpress.net/</wp:base_site_url>
<wp:base_blog_url>https://playground.wordpress.net/</wp:base_blog_url>

<wp:author><wp:author_id>1</wp:author_id><wp:author_login><![CDATA[admin]]></wp:author_login><wp:author_email><![CDATA[[email protected]]]></wp:author_email><wp:author_display_name><![CDATA[admin]]></wp:author_display_name><wp:author_first_name><![CDATA[]]></wp:author_first_name><wp:author_last_name><![CDATA[]]></wp:author_last_name></wp:author>


<generator>https://wordpress.org/?v=6.4.2</generator>
<item>
<title><![CDATA[Apple Maps Block Demo]]></title>
<link>https://playground.wordpress.net/?p=6</link>
<pubDate>Mon, 18 Dec 2023 22:55:23 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">https://playground.wordpress.net/?p=6</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>This is a demo of the Apple Maps block. You'll need to enter valid credentials in the block below in order to test.</p>
<!-- /wp:paragraph -->
<!-- wp:tenup/maps-block-apple -->
<div style="height:450px" class="wp-block-tenup-maps-block-apple" data-map-type="standard" data-latitude="51.48762585296625" data-longitude="-0.1326724377053381" data-rotation="0" data-zoom="15" data-shows-map-type-control="true" data-is-rotation-enabled="true" data-shows-compass="adaptive" data-is-zoom-enabled="true" data-shows-zoom-control="true" data-is-scroll-enabled="true" data-shows-scale="adaptive"></div>
<!-- /wp:tenup/maps-block-apple -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>6</wp:post_id>
<wp:post_date><![CDATA[2023-12-18 22:55:23]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2023-12-18 22:55:23]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2023-12-18 22:55:23]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2023-12-18 22:55:23]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[open]]></wp:comment_status>
<wp:ping_status><![CDATA[open]]></wp:ping_status>
<wp:post_name><![CDATA[apple-maps-block-demo]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[post]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
<wp:postmeta>
<wp:meta_key><![CDATA[_pingme]]></wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
<wp:postmeta>
<wp:meta_key><![CDATA[_encloseme]]></wp:meta_key>
<wp:meta_value><![CDATA[1]]></wp:meta_value>
</wp:postmeta>
</item>
</channel>
</rss>

0 comments on commit e6596fe

Please sign in to comment.