├── .gitignore
├── README.md
├── customize-react-street-address-control.php
├── package.json
├── phpcs.xml
├── public
└── index.html
├── src
├── StreetAddressControl.jsx
├── StreetAddressForm.jsx
└── index.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # production
10 | /build
11 |
12 | # misc
13 | .DS_Store
14 | .env.local
15 | .env.development.local
16 | .env.test.local
17 | .env.production.local
18 |
19 | npm-debug.log*
20 | yarn-debug.log*
21 | yarn-error.log*
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # Customize React Street Address Control
3 |
4 | A demonstration for how to create a Customizer control using a React component as its content.
5 |
6 | This is a WordPress plugin which you can activate to see the React-driven Customizer control in action. Upon activation, a new “business address” control will appear in the Site Identity section. Supplying a value will cause a sticky footer in the preview to populate with the business's address. Note that you will have to run `npm install && npm run build` prior to activating the plugin.
7 |
8 | The street address control manages a setting value that is a JSON object which looks like:
9 |
10 | ```json
11 | {
12 | "street": "123 Main St",
13 | "city": "Portland",
14 | "state": "OR",
15 | "zip": "97205"
16 | }
17 | ```
18 |
19 | You may also run `npm run start` which will start a local development server that serves out an HTML page with the Customizer control running standalone for testing.
20 |
21 | See [gh-pages demo](https://xwp.github.io/wp-customize-react-street-address-control/).
22 |
23 | What follows is the the original `create-react-app` documentation.
24 |
25 | -----
26 |
27 | This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
28 |
29 | Below you will find some information on how to perform common tasks.
30 | You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
31 |
32 | ## Table of Contents
33 |
34 | - [Updating to New Releases](#updating-to-new-releases)
35 | - [Sending Feedback](#sending-feedback)
36 | - [Folder Structure](#folder-structure)
37 | - [Available Scripts](#available-scripts)
38 | - [npm start](#npm-start)
39 | - [npm test](#npm-test)
40 | - [npm run build](#npm-run-build)
41 | - [npm run eject](#npm-run-eject)
42 | - [Supported Language Features and Polyfills](#supported-language-features-and-polyfills)
43 | - [Syntax Highlighting in the Editor](#syntax-highlighting-in-the-editor)
44 | - [Displaying Lint Output in the Editor](#displaying-lint-output-in-the-editor)
45 | - [Debugging in the Editor](#debugging-in-the-editor)
46 | - [Formatting Code Automatically](#formatting-code-automatically)
47 | - [Changing the Page `