Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuzurus/post-to-wp
This PHP library can easily post articles to wordpress with its thumbnail
https://github.com/yuzurus/post-to-wp
Last synced: about 15 hours ago
JSON representation
This PHP library can easily post articles to wordpress with its thumbnail
- Host: GitHub
- URL: https://github.com/yuzurus/post-to-wp
- Owner: YuzuruS
- License: other
- Created: 2016-11-22T17:20:18.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-24T06:19:24.000Z (almost 8 years ago)
- Last Synced: 2024-11-10T09:49:10.535Z (5 days ago)
- Language: PHP
- Homepage: https://packagist.org/packages/yuzuru-s/post-to-wp
- Size: 45.9 KB
- Stars: 10
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
This PHP library can easily post articles to wordpress with its thumbnail
=============================[![Coverage Status](https://coveralls.io/repos/github/YuzuruS/post-to-wp/badge.svg?branch=master)](https://coveralls.io/github/YuzuruS/post-to-wp?branch=master)
[![Build Status](https://travis-ci.org/YuzuruS/post-to-wp.png?branch=master)](https://travis-ci.org/YuzuruS/post-to-wp)
[![Stable Version](https://poser.pugx.org/yuzuru-s/post-to-wp/v/stable)](https://packagist.org/packages/yuzuru-s/post-to-wp)
[![Download Count](https://poser.pugx.org/yuzuru-s/post-to-wp/downloads.png)](https://packagist.org/packages/yuzuru-s/post-to-wp)
[![License](https://poser.pugx.org/yuzuru-s/post-to-wp/license)](https://packagist.org/packages/yuzuru-s/post-to-wp)Requirements
-----------------------------
- PHP
- >=5.5 >=5.6, >=7.0
- ext-xmlrpc
- ComposerInstallation
----------------------------* Using composer
```
{
"require": {
"yuzuru-s/post-to-wp": "1.0.*"
}
}
``````
$ php composer.phar update yuzuru-s/post-to-wp --dev
```How to use
----------------------------
Please check [sample code](https://github.com/YuzuruS/post-to-wp/blob/master/sample/usecase.php)```php
makeCategories([
['name' => 'かて1', 'slug' => 'cate1'],
['name' => 'かて2', 'slug' => 'cate2'],
]);$wp
->setTitle('たいとる')
->setDescription('本文')
->setKeywords(['key1','key2'])
->setCategories(['かて1','かて2'])
->setDate('2016-11-11')
->setWpSlug('entry')
->setThumbnail('https://www.pakutaso.com/shared/img/thumb/SAYA160312500I9A3721_TP_V.jpg')
->post();```
How to run unit test
----------------------------Run with default setting.
```
% vendor/bin/phpunit -c phpunit.xml.dist
```Currently tested with PHP 7.0.0
History
----------------------------License
----------------------------
Copyright (c) 2016 YUZURU SUZUKI. See MIT-LICENSE for further details.Copyright
-----------------------------
- Yuzuru Suzuki
- http://yuzurus.hatenablog.jp/