/wp-admin-ajax

Demo for creating a wp options page powered by React.

Primary LanguagePHP

# wp-admin-ajax

Demo for creating a wp options page powered by React. This is a barebones example for updating a WordPress options field with an admin powered by React.

HOW TO RUN THE DEMO

Install the package into the Wordpress directory: wp-content/plugins

WORDPRESS FILES

plugin.php - Registers the plugin
ajax.php - Contains Wordpress Ajax interaction
settingsPage.php - Sets up the settings page
reactFileParser.php - Searches the build directory of the React application and enqueues relevant files

REACT FILES

React files are located in the admin directory. To edit the react files:

Install

npm install

Usage

npm start