2017 © Pedro Peláez
 

library post-to-wp

This PHP library can easily post articles to wordpress with its thumbnail

image

yuzuru-s/post-to-wp

This PHP library can easily post articles to wordpress with its thumbnail

  • Thursday, November 24, 2016
  • by s1130125
  • Repository
  • 1 Watchers
  • 9 Stars
  • 311 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

This PHP library can easily post articles to wordpress with its thumbnail

Coverage Status Build Status Stable Version Download Count License, (*1)

Requirements

  • PHP
    • >=5.5 >=5.6, >=7.0
  • ext-xmlrpc
  • Composer

Installation

  • 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, (*2)

<?php
require __DIR__ . '/../vendor/autoload.php';
use YuzuruS\Wordpress\Post;

// endpoint → example.com
$wp = new Post(getenv(WP_USERNAME), getenv(WP_PASSWD), getenv(WP_ENDPOINT));

$res = $wp->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., (*3)

% vendor/bin/phpunit -c phpunit.xml.dist

Currently tested with PHP 7.0.0, (*4)

History

License

Copyright (c) 2016 YUZURU SUZUKI. See MIT-LICENSE for further details., (*5)

  • Yuzuru Suzuki
    • http://yuzurus.hatenablog.jp/

The Versions

24/11 2016

dev-master

9999999-dev https://github.com/YuzuruS/post-to-wp

This PHP library can easily post articles to wordpress with its thumbnail

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress image post

24/11 2016

1.0.4

1.0.4.0 https://github.com/YuzuruS/post-to-wp

This PHP library can easily post articles to wordpress with its thumbnail

  Sources   Download

MIT

The Requires

 

The Development Requires

wordpress image post

23/11 2016

1.0.3

1.0.3.0 https://github.com/YuzuruS/post-to-wp

This PHP library can easily post articles to wordpress with its thumbnail

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • ext-xmlrpc *
  • pear-pear.php.net/xml_rpc 1.5.*

 

The Development Requires

wordpress image post

23/11 2016

1.0.1

1.0.1.0 https://github.com/YuzuruS/post-to-wp

Wrapping Redis's sorted set APIs for specializing recommending operations.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • ext-xmlrpc *
  • pear-pear.php.net/xml_rpc 1.*

 

The Development Requires

wordpress image post

22/11 2016

1.0.0

1.0.0.0 https://github.com/YuzuruS/post-to-wp

Wrapping Redis's sorted set APIs for specializing recommending operations.

  Sources   Download

MIT

The Requires

  • php >=5.5.0
  • ext-xmlrpc *
  • pear-pear.php.net/xml_rpc *

 

The Development Requires

wordpress image post