JS Widgets plugin for WordPress
PHP JavaScript CSS
Latest commit efcfd5c Nov 14, 2016 @westonruter westonruter committed on GitHub Merge pull request #14 from xwp/bugfix/starter-content
Ensure old encoded instance data setting value format is supported
Permalink
Failed to load latest commit information.
bower_components Include only needed react/redux files Aug 3, 2016
css Fix styling of post collection widget select2 component Oct 3, 2016
dev-lib @ 30b4b22 Update wp-dev-lib 3594c73...30b4b22: Merge pull request xwp/wp-dev-li… Jul 5, 2016
js Add 100% width to object-selector Oct 4, 2016
php Ensure old encoded instance data setting value format is supported (s… Nov 14, 2016
.babelrc Ignore jsx files in JSHint and JSCS May 6, 2016
.coveralls.yml flesh out readme and add dev files May 4, 2016
.david-dev flesh out readme and add dev files May 4, 2016
.dev-lib flesh out readme and add dev files May 4, 2016
.eslintignore Include only needed react/redux files Aug 3, 2016
.eslintrc Add valid-jsdoc to eslintrc May 14, 2016
.gitignore Rename browserified file to fix grunt build Aug 20, 2016
.gitmodules Add dev-lib May 3, 2016
.jscsrc Add post collection widget Aug 20, 2016
.jshintignore Include only needed react/redux files Aug 3, 2016
.jshintrc Add dev-lib May 3, 2016
.travis.yml flesh out readme and add dev files May 4, 2016
Gruntfile.js Rename browserified file to fix grunt build Aug 20, 2016
bower.json Add redux dependency May 18, 2016
composer.json Bump version to 0.1.1 Oct 4, 2016
contributing.md flesh out readme and add dev files May 4, 2016
js-widgets.php Bump version to 0.1.1 Oct 4, 2016
package.json Bump version to 0.1.1 Oct 4, 2016
phpcs.ruleset.xml Add dev-lib May 3, 2016
readme.md Add stable tag Oct 4, 2016
readme.txt Add stable tag Oct 4, 2016

readme.md

JS Widgets

The next generation of widgets in core, embracing JS for UI and powering the Widgets REST API.

Contributors: xwp, westonruter
Tags: customizer, widgets, rest-api
Requires at least: 4.5
Tested up to: 4.7-alpha
Stable tag: 0.1.1
License: GPLv2 or later

Build Status Coverage Status Built with Grunt devDependency Status

Description

Also could be known as Widget Customizer 2.0, Widgets 3.0, or Widgets Next Generation.

This plugin implements:

Plugin Dependencies:

Features:

  • Widget instance settings in the Customizer are exported from PHP as regular JSON without any PHP-serialized base64-encoded encoded_serialized_instance.
  • Customizer settings can be directly mutated via JavaScript instead of needing to do an update-widget Admin Ajax roundtrip; this greatly speeds up previewing.
  • Widget have a technology-agnostic JS API for building their forms, allowing Backbone, React, or any other frontend technology to be used for managing the form.
  • Compatible with widgets stored in a custom post type instead of options, via the Widget Posts module in the Customize Widgets Plus plugin.
  • Compatible with Customize Snapshots, allowing changes made in the Customizer to be applied to requests for widgets via the REST API.
  • Compatible with Customize Setting Validation.
  • Includes (eventually) re-implementation of all core widgets using the new WP_JS_Widget API.

Limitations/Caveats:

  • Widgets that extend WP_JS_Widget will not be editable from widgets admin page. A link to edit the widget in the Customizer will be displayed instead.
  • Only widgets that extend WP_JS_Widget will be exposed via the REST API. The plugin includes a WP_JS_Widget proxy class which demonstrates how to adapt existing WP_Widget classes for the new widget functionality.

Changelog

0.1.1 - 2016-10-03

  • Add 100% width to object-selector.
  • Fix typo in sanitizing Post Collection input.
  • Fix PHP issue when attempting to assign an undefined array index to another undefined array index.
  • Fix styling of post collection widget select2 component.
  • Fix accounting for parse_widget_setting_id returning WP_Error not false.

0.1.0 - 2016-08-24

Initial release.