29 lines
1.2 KiB
JSON
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"
|
|
}
|
|
}
|
|
]
|
|
}
|