bobbingwide / oik-lib

Shared library management for WordPress plugins
https://www.oik-plugins.com/oik-plugins/oik-lib-shared-library-management/
GNU General Public License v2.0
1 stars 0 forks source link
shared-libraries wordpress-plugin

oik-lib

banner

Description

Shared library management for WordPress plugins.

Background

In June 2015, other than extension plugins, very few WordPress plugins shared common logic. Hardly any implemented plugin dependency logic.

Plugins that used the same code had two choices:

  1. Make the code subtly different; by function name, namespace or classes
  2. Carefully manage the duplicated functions

Conversely, many developers were using Composer to satisfy requirements for libraries used by "plugins". Show evidence...

The oik-lib plugin is intended to support an API whereby plugins can request library functions without worrying too much about the source of the functions, or even the implementation.

The plugin is intended to be easy to install and maintain and does not require SSH access to be used.

Requirements

See oik-lib - requirements summary

Implementation

There are some library functions that are so crucial that these need to be available all the time.

While they are not part of WordPress core, these functions will need to be implemented in such a way that they can be available for use by any plugin or theme at all times.

This plugin achieves this by becoming a MU plugin.

It provides the basic set of APIs to allow each plugin to get involved with sharing.

The APIs are provided in library files which can be bundled in standalone plugins.

Multiple plugins may deliver the library functions, but only one of them will be used.

The logic will attempt to take into account a variety of ways of indicating the presence of library functions. Advanced logic, dynamically loadable on demand, will be used to attempt to resolve issues with inactive code or incompatible versions.

Installation

  1. Upload the contents of the oik-lib plugin to the `/wp-content/plugins/oik-lib' directory
  2. Activate the oik-lib plugin through the 'Plugins' menu in WordPress

Frequently Asked Questions

Where are the FAQs

See the official plugin documentation at oik-plugins

Screenshots

  1. oik-lib in action

Upgrade Notice

0.2.1

Tested PHP 8.1 and PHP 8.2.

0.2.0

Synchronized with oik v4.1.2's improved autoload. Tested with PHP 8.0

0.1.1

Synchronized with oik v3.2.1

0.1.0

Synchronized with oik v3.2.0-RC1

0.0.8

Synchronized with oik v3.1.1, oik-bwtrace v2.1.0 etc

0.0.7

Synchronized with oik v3.0.1, oik-bwtrace v2.0.12 etc

0.0.6

Synchronized with oik v3.0.0, oik-bwtrace v2.0.11 etc

0.0.5

Updated trace levels to reduce noise.

0.0.4

Synchronized with oik-bwtrace v2.0.7. Please also upgrade the oik base plugin and oik-bwtrace.

0.0.3

Upgrade for support for Composer packages. See oik-fum sample plugin. Please also upgrade oik and oik-bwtrace.

0.0.2

Upgrade to get better support for plugins performing dependency checking

0.0.1

First version for WordPress PHP library management

Changelog

0.2.1

0.2.0

0.1.1

0.1.0

0.0.8

0.0.7

0.0.6

0.0.5

0.0.4

0.0.3

0.0.2

0.0.1

Further reading

If you want to read more about the oik plugins then please visit the oik plugin "the oik plugin - for often included key-information"