2017 © Pedro Peláez
 

wordpress-muplugin wp-cargo

Cargo will push content to other services

image

isotopsweden/wp-cargo

Cargo will push content to other services

  • Thursday, September 28, 2017
  • by fredrikforsmo
  • Repository
  • 3 Watchers
  • 2 Stars
  • 332 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Cargo Build Status codecov Maintainability Test Coverage

Requires PHP 7.1 and WordPress 4.6, (*1)

Cargo will push content to other services. If the push failes the content JSON will be saved in the database for the queue., (*2)

Installation

composer require isotopsweden/wp-cargo

Usage

Example configuration:, (*3)

cargo()->set_config( [
  'content' => [
    'options' => ['siteurl', 'home']
  ],
  'database' => [
    'driver' => 'mysql',
    'mysql'  => [
      'table' => 'wp_cargo'
    ]
  ],
  'preview' => [
    'fields' => ['post_id' => 'ID', 'post_type'],
    'url'    => 'http://example.com/_preview'
  ],
  'pusher'   => [
    'driver' => 'http',
    'http'   => [
      'url' => 'http://localhost:9988'
    ]
  ]
] );

Prepare meta fields, so you can hook into a custom fields plugin or something else:, (*4)

add_filter( 'cargo_prepare_meta_value', function ( $object_id, $slug, $value, $type ) {
  return $value;
}, 10, 4 );

Modify content data before push:, (*5)

add_filter( 'cargo_modify_content_data', function ( $data, $type ) {
  return $data;
}, 10, 2 );

Run queue with WP-CLI:, (*6)

wp cargo run

Push all content with WP-CLI:, (*7)

wp cargo run --all

License

MIT © Isotop, (*8)

The Versions

28/09 2017

dev-master

9999999-dev https://github.com/isotopsweden/wp-cargo

Cargo will push content to other services

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress services data push cargo

28/09 2017

v1.0.0

1.0.0.0 https://github.com/isotopsweden/wp-cargo

Cargo will push content to other services

  Sources   Download

MIT

The Requires

 

The Development Requires

plugin wordpress services data push cargo