Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Info
titleArchived

The UI Options Wordpress Plugin is no longer in development and has been archived.


This is a quick guide for getting setup and started for development work on the UIO Wordpress Plugin.

...

The uio-wordpress-plugin is essentially a WP plugin wrapper around Infusion's UI Options component. The basic parts of the plugin will be discussed below, but it may be useful to familiarize yourself with both the wp plugin and UI Options documentation.

The directory structure is of the form:

...

  • infusion

...

  • uio.css

...

  • template.html

...

  • uio.js

...

.

...

...

lib/infusion

lib/infusion contains the Infusion code and resources. The specific version information is located in the Version.md file. In general the contents of this directory should only be modified if you are updating the version of Infusion distributed with the plugin.

src/css/uio.css

src/css/uio.css contains the plugin specific styling needed for UI Options. In particular, you'll want to add/modify styles here for the plugin to work with Wordpress themes by default. All other styles used by UI Options are sources from lib/infusion

src/html/template.html

src/html/template.html contains the HTML required by UI Options. The template is injected into the page, and used as the container for rendering UI Options into. 

src/js/uio.js

src/js/uio.js will be injected into each page of the Wordpress site, and contains the initialization code for running UI options. This includes injecting the templates for UI Options itself and for the Table of Contents (ToC) widget.

...

ui-options.php

This is the main plugin and is used by Wordpress to identify the plugin. The information about the plugin is contained in a header comment at the top of the file. This information is used to display the plugin information on the Wordpress Admin's Plugin page. Additionally global variables for UIO_PLUGIN_URL and UIO_PLUGIN_DIR are set here, and logic for determining which other php scripts to run. 

admin-options.php

Provides the configuration for adding a settings panel to the Wordpress admin interface for the UI Options plugin.

...

inject-dependencies.php

Adds the CSS and JS dependencies to the Wordpress pages. Also used to translate some php data for use in the JavaScript files.

...

set-defaults.php

Sets the default values for the settings that can be modified on the plugins settings page.

...

uio.

...

js

uio.js will be injected into each page of the Wordpress site, and contains the initialization code for running UI options. This includes injecting the templates for UI Options itself and for the Table of Contents (ToC) widget.

uio.css

uio.css contains the plugin specific styling needed for UI Options. In particular, you'll want to add/modify styles here for the plugin to work with Wordpress themes by default. All other styles used by UI Options are sources from lib/infusion

template.html

template.html contains the HTML required by UI Options. The template is injected into the page, and used as the container for rendering UI Options into