Download the PHP package plugin-sdk/wp without Composer

On this page you can find all versions of the php package plugin-sdk/wp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wp

plugin-sdk/wp

Read-only mirror. This repository is auto-generated from the packages/wp-composer/ subdirectory of artificialpoets/plugin-sdk by a git subtree split GitHub Action on every tagged release.

File issues + PRs against the main repo, not here. The mirror is rebuilt on every release; any commits pushed directly here will be overwritten.

The WordPress runtime for Plugin SDK — a declarative manifest loader, fluent Settings/REST/Migration APIs, plus the admin-UI render helpers. Drop a plugin-sdk.json in your plugin root, call Plugin::fromManifest() once, and the SDK wires up:

…then gets out of your way for handlers and business logic.

Pair with @plugin-sdk/wp-core-css for the stylesheet.

Install

Requires PHP 7.4 or later.

Declarative quickstart

Add a plugin-sdk.json to your plugin root:

In your plugin's main PHP file:

That's the whole bootstrap. Errors in the manifest throw ConfigException with the full validation trace, so you fail fast at boot time instead of hitting a half-broken admin page later.

Fluent runtime (imperative layer)

The declarative loader compiles to the same fluent calls — you can use either layer or both.

Admin UI render helpers

The package also includes the original render helpers — useful for hand-rolled admin pages that don't fit the settings model:

The rendered HTML uses real WordPress admin class names — .wrap, .notice notice-success is-dismissible, .form-table, .button button-primary, etc. — so plugin admin pages look indistinguishable from a native WP screen and inherit the user's color scheme automatically.

Available helpers

All methods live on \PluginSDK\WP\Components as static methods. Each underlying renderer is also available directly (e.g. \PluginSDK\WP\Components\Button::render()).

Actions

Icons

Notice

Forms

Navigation

Layout

Data display

Tables

Feedback

Asset enqueue

Example

See examples/settings-page.php for a complete plugin admin page demonstrating most components.

Security

The declarative runtime bakes in capability checks (via current_user_can), nonce verification (settings forms use WP's options.php round-trip), and per-field sanitisation. REST routes run JSON-schema validation before the handler executes — a malformed body is rejected with a rest_invalid_body 400 response, never reaching your code.

Every render helper accepting user-controllable strings (label, title, message, URL, attribute value) runs them through esc_html() / esc_attr() / esc_url() (with safe fallbacks when WordPress functions aren't loaded). Methods that take pre-rendered HTML (e.g. notice() with $message_html) are documented as such — escape inputs yourself with \PluginSDK\WP\Html::esc() if they're user-controllable.

Tests

Zero-dep PHP test harness — no PHPUnit needed:

Tests run against WP-function stubs that capture invocations, so the runtime can be unit-tested without WordPress installed.

License

Apache 2.0. See the LICENSE at the repo root.


All versions of wp with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package plugin-sdk/wp contains the following files

Loading the files please wait ...