Git Product home page Git Product logo

pods-wp-cli's Introduction

wp pods and wp pods-api

This is a package that implements the wp pods and wp pods-api commands for WP-CLI.

It provides access to add/save/duplicate/delete in the Pods class and add_pod/save_pod/duplicate_pod/reset_pod/delete_pod in the PodsAPI class in the Pods Framework.

Importing and Exporting methods are still in development.

Requirements

Installation

First, make sure you have the package index configured:

cd ~/.wp-cli/
php composer.phar config repositories.wp-cli composer http://wp-cli.org/package-index/

Then, just install the package:

php composer.phar require pods-framework/pods-wp-cli=dev-master

Usage

Just run it:

wp pods

$ wp pods add --pod=my_pod --field1=Value --field2="Another Value"
Pod item added
ID: 123
$ wp pods save --pod=my_pod --item=123 --field1=Value2 --field2="Another Value2"
Pod item saved
ID: 123
$ wp pods duplicate --pod=my_pod --item=123
Pod item duplicated
New ID: 124
$ wp pods delete --pod=my_pod --item=123
Pod item deleted

See http://pods.io/docs/code/pods/ for more information about the various methods.

wp pods-api

$ wp pods-api add-pod --name=apple --type=post_type --label=Apples --singular_label=Apple
Pod added
ID: 125
$ wp pods-api save-pod --name=apple --label="Apple Types" --singular_label="Apple Type"
Pod saved
ID: 125
$ wp pods-api duplicate --name=apple --new_name=apple2
Pod duplicated
New ID: 126
$ wp pods-api reset --name=apple
Pod content reset
$ wp pods-api delete --name=apple
Pod deleted

Field operations for wp pods-api is still in development.

See http://pods.io/docs/code/pods-api/ for more information about the various methods.

pods-wp-cli's People

Contributors

sc0ttkclark avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.