blueprints/apps/rss-reader.json
Alex Kirk caa7ea840c
Blueprint and Apps for your Personal Playground (#166)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-01-27 13:49:42 +01:00

29 lines
1.2 KiB
JSON

{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "RSS Reader",
"description": "Follow friends and consume their content in your WordPress",
"author": "Alex Kirk",
"categories": ["Apps", "Social"]
},
"landingPage": "/friends/?refresh&welcome",
"steps": [
{
"step": "installPlugin",
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "friends"
},
"options": {
"activate": true
}
},
{
"step": "runPHP",
"code": "<?php require_once '/wordpress/wp-load.php';if(class_exists('Friends\\Import')){$feeds=array(array('https://alex.kirk.at','Alex Kirk'),array('https://adamadam.blog','Adam Zieliński'));$x=new SimpleXMLElement('<opml/>');$a='addAttribute';$c='addChild';$x->$a('version','2.0');$h=$x->$c('head');$h->$c('title','Subscriptions');$b=$x->$c('body');$s=$b->$c('outline');$s->$a('text','Subscriptions');$s->$a('title','Subscriptions');foreach($feeds as $f){list($u,$t)=$f;$o=$s->$c('outline');$o->$a('type','rss');$o->$a('text',$t);$o->$a('title',$t);$o->$a('xmlUrl',$u);$o->$a('htmlUrl',$u);}Friends\\Import::opml($x->asXML());}",
"progress": {
"caption": "Importing feeds to Friends plugin"
}
}
]
}