開発者向けクイックスタートガイド
WordPress Playground はプログラミング可能なツールとして開発されました。以下に、このツールで何ができるかの例をいくつかご紹介します。ここで取り上げた各 API については、API セクション で詳しく説明しています。
ウェブサイトに WordPress を埋め込む
Playground は、次のように HTML <iframe>
タグを使用して Web サイトに埋め込むことができます。
<iframe src="https://playground.wordpress.net/"></iframe>
訪問者全員にプライベート WordPress インスタンスが無料で提供されます。その後、Playground APIのいずれかを使用してカスタマイズできます。
The site at https://playground.wordpress.net is there to support the community, but there are no guarantees it will continue to work if the traffic grows significantly.
If you need certain availability, you should host your own WordPress Playground.
埋め込まれたウェブサイトを制御する
WordPress Playground は、iframe ウェブサイトの制御に使用できる 3 つの API を提供しています。このセクションのすべての例は、これらのいずれかを使用して構築されています。
- Query API enable basic operations using only query parameters
- Blueprints API give you a great degree of control with a simple JSON file
- JavaScript API give you full control via a JavaScript client from an npm package
これらの各 API の詳細については、API の概要セクション をご覧ください。
WordPress ディレクトリからプラグインやテーマを紹介する
WordPress ディレクトリから URL パラメータのみでプラグインとテーマをインストールできます。例えば、 この iframe にはcoblocks
プラグインとfriends
プラグイン、そしてpendant
テーマがプリインストールされています。
This is called Query API and you can learn more about it here.
<iframe src="https://playground.wordpress.net/?plugin=coblocks"></iframe>