Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Plugins & Theme endpoints #323

Description

@philipjohn

Is the desire to, at some point, add routes and endpoints for plugins and themes? I.e for checking currently installed plugins/themes, installing and updating?

I'm thinking about a use for this and have the following routes and endpoints in mind...

Route: /plugins

  • GET: List of installed plugins, basically the output of get_plugins()

Route: /plugins/[plugin-name]

  • GET: Retrieve plugin metadata
  • POST: Install/activate plugin
  • PUT: Update plugin
  • DELETE: Delete installed plugin

Route: /themes

  • GET: List of installed themes

Route: /themes/[theme-name]

  • GET: Retrieve theme metadata
  • POST: Install/activate theme
  • PUT: Update theme
  • DELETE: Delete installed theme

What do you think?

Activity

  1. rmccue commented on Jun 23, 2014

    @rmccue
    Member

    I like the design you've given so far, but I'm not sure on separating POST/PUT. IMO, a better way would be to include an active key in the data that gets returned, and allow the client to change this. I'm not sure how updating would work, because you're correct that it is an action, so maybe PUT for that would work. I'll think about this more. :)

    With implementation, I suspect there'll be a few issues around activating plugins/themes, but otherwise it should be pretty straightforward.

    👍 on this. :)

  2. added this to the Future milestone on Jun 23, 2014
  3. willmot commented on Jun 30, 2014

    @willmot

    This would potentially allow us to some WPR functionality without requiring a dedicated plugin be installed, big 👍!

  4. philipjohn commented on Jul 6, 2014

    @philipjohn
    Author

    Very small beginnings here and here chaps.

  5. rachelbaker commented on Aug 5, 2014

    @rachelbaker
    Member

    Related issue: #107

  6. philipjohn commented on Aug 5, 2014

    @philipjohn
    Author

    In the interests of getting something small that could be built on, I'm planning on adding authentication to my work so far, and submitting a pull request for that. Once those basics are in, anyone can build on it.

    Does that sound sensible to folks as a way forward?

  7. michaelbeil commented on Aug 6, 2014

    @michaelbeil

    That sounds great @philipjohn. This could be a big win.

  8. modified the milestones: Future, 2.1 on Dec 8, 2015
  9. danielbachhuber commented on Jan 8, 2016

    @danielbachhuber
    Member

    @WP-API/amigos For managing activation, I think we should have a status attribute on Plugins and Themes. This will give us active and active-network

  10. danielbachhuber commented on Jan 30, 2016

    @danielbachhuber
    Member

    Theme management is now WIP as a separate plugin https://github.com/WP-API/wp-api-plugins-themes-endpoints

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions