Skip to content

Commit

Permalink
table and examples updated
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmaguitar committed Aug 29, 2024
1 parent ce1ed34 commit d42a2b4
Show file tree
Hide file tree
Showing 11 changed files with 289 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions plugins/dynamic-block-b0bce7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The goal of this example is to ...

<!-- Please, do not remove these @TABLE EXAMPLES BEGIN and @TABLE EXAMPLES END comments or modify the table inside. This table is automatically generated from the data at _data/examples.json and _data/tags.json -->
<!-- @TABLE EXAMPLES BEGIN -->
| Folder | <span style="display: inline-block; width:250px">Short description</span> | Tags | ID ([❓](https://github.com/WordPress/block-development-examples/wiki/04-Why-an-ID-for-every-example%3F "Why an ID for every example?")) | Download .zip | Live Demo |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [📁](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/dynamic-block-b0bce7) | Dynamic Block | <small><code><a href="https://github.com/WordPress/block-development-examples/wiki/03-Tags#dynamic-rendering">DYNAMIC RENDERING</a></code></small> | `b0bce7` | [📦](https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/dynamic-block-b0bce7.zip "Install the plugin using this zip and activate it. Then use the ID of the block (b0bce7) to find it and add it to a post to see it in action") | [![](https://raw.githubusercontent.com/WordPress/block-development-examples/trunk/_assets/icon-wp.svg)](https://playground.wordpress.net/#%7B%22landingPage%22:%22/wp-admin/plugins.php%22,%22steps%22:%5B%7B%22step%22:%22login%22,%22username%22:%22admin%22,%22password%22:%22password%22%7D,%7B%22step%22:%22mkdir%22,%22path%22:%22/downloads%22%7D,%7B%22step%22:%22writeFile%22,%22path%22:%22/downloads/plugin.zip%22,%22data%22:%7B%22resource%22:%22url%22,%22url%22:%22https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/dynamic-block-b0bce7.zip%22,%22caption%22:%22Downloading%20plugin...%22%7D%7D,%7B%22step%22:%22installPlugin%22,%22pluginZipFile%22:%7B%22resource%22:%22vfs%22,%22path%22:%22/downloads/plugin.zip%22%7D%7D%5D%7D "Use the ID of the block (b0bce7) to find it and add it to a post to see it in action") |
| Folder | <span style="display: inline-block; width:250px">Short description</span> | Tags | ID ([❓](https://github.com/WordPress/block-development-examples/wiki/04-Why-an-ID-for-every-example%3F "Why an ID for every example?")) | Download .zip | Live Demo |
| ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [📁](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/dynamic-block-b0bce7) | Dynamic Block | <small><code><a href="https://github.com/WordPress/block-development-examples/wiki/03-Tags#dynamic-rendering">DYNAMIC RENDERING</a></code></small> | `b0bce7` | [📦](https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/dynamic-block-b0bce7.zip "Install the plugin using this zip and activate it. Then use the ID of the block (b0bce7) to find it and add it to a post to see it in action") | [![](https://raw.githubusercontent.com/WordPress/block-development-examples/trunk/_assets/icon-wp.svg)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/WordPress/block-development-examples/trunk/plugins/dynamic-block-b0bce7/_playground/blueprint.json "Use the ID of the block (b0bce7) to find it and add it to a post to see it in action") |
<!-- @TABLE EXAMPLES END -->

## Understanding the Example Code
Expand Down
19 changes: 19 additions & 0 deletions plugins/dynamic-block-b0bce7/_playground/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"landingPage": "/wp-admin/post.php?post=10&action=edit",
"login": true,
"plugins": [
"https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/dynamic-block-b0bce7.zip"
],
"steps": [
{
"step": "resetData"
},
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://raw.githubusercontent.com/WordPress/block-development-examples/trunk/plugins/dynamic-block-b0bce7/_playground/export.xml"
}
}
]
}
121 changes: 121 additions & 0 deletions plugins/dynamic-block-b0bce7/_playground/export.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?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.1" created="2023-11-22 12:40" -->
<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/scope:0.3866593653389305</link>
<description></description>
<pubDate>Wed, 22 Nov 2023 12:40:46 +0000</pubDate>
<language>en-US</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>https://playground.wordpress.net/scope:0.3866593653389305</wp:base_site_url>
<wp:base_blog_url>https://playground.wordpress.net/scope:0.3866593653389305</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.1</generator>

<item>
<title><![CDATA[Hello world!]]></title>
<link>https://playground.wordpress.net/scope:0.3866593653389305/?p=1</link>
<pubDate>Wed, 22 Nov 2023 08:09:20 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">http://127.0.0.1:8000/?p=1</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:paragraph -->
<p>Welcome to WordPress. This is your first post. Edit or delete it, then start writing!</p>
<!-- /wp:paragraph -->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>1</wp:post_id>
<wp:post_date><![CDATA[2023-11-22 08:09:20]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2023-11-22 08:09:20]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2023-11-22 08:09:20]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2023-11-22 08:09:20]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[open]]></wp:comment_status>
<wp:ping_status><![CDATA[open]]></wp:ping_status>
<wp:post_name><![CDATA[hello-world]]></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:comment>
<wp:comment_id>1</wp:comment_id>
<wp:comment_author><![CDATA[A WordPress Commenter]]></wp:comment_author>
<wp:comment_author_email><![CDATA[[email protected]]]></wp:comment_author_email>
<wp:comment_author_url>https://wordpress.org/</wp:comment_author_url>
<wp:comment_author_IP><![CDATA[]]></wp:comment_author_IP>
<wp:comment_date><![CDATA[2023-11-22 08:09:20]]></wp:comment_date>
<wp:comment_date_gmt><![CDATA[2023-11-22 08:09:20]]></wp:comment_date_gmt>
<wp:comment_content><![CDATA[Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from <a href="https://en.gravatar.com/">Gravatar</a>.]]></wp:comment_content>
<wp:comment_approved><![CDATA[1]]></wp:comment_approved>
<wp:comment_type><![CDATA[comment]]></wp:comment_type>
<wp:comment_parent>0</wp:comment_parent>
<wp:comment_user_id>0</wp:comment_user_id>
</wp:comment>
</item>
<item>
<title><![CDATA[Block Dynamic Block Demo]]></title>
<link>https://playground.wordpress.net/scope:0.3866593653389305/?p=4</link>
<pubDate>Wed, 22 Nov 2023 12:34:13 +0000</pubDate>
<dc:creator><![CDATA[admin]]></dc:creator>
<guid isPermaLink="false">https://playground.wordpress.net/scope:0.3866593653389305/?p=4</guid>
<description></description>
<content:encoded><![CDATA[<!-- wp:block-development-examples/dynamic-block-b0bce7 /-->]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>10</wp:post_id>
<wp:post_date><![CDATA[2023-11-22 12:34:13]]></wp:post_date>
<wp:post_date_gmt><![CDATA[2023-11-22 12:34:13]]></wp:post_date_gmt>
<wp:post_modified><![CDATA[2023-11-22 12:40:18]]></wp:post_modified>
<wp:post_modified_gmt><![CDATA[2023-11-22 12:40:18]]></wp:post_modified_gmt>
<wp:comment_status><![CDATA[open]]></wp:comment_status>
<wp:ping_status><![CDATA[open]]></wp:ping_status>
<wp:post_name><![CDATA[block-dynamic-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>

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d42a2b4

Please sign in to comment.