ondrejd/odwp

Library for rapid development of WordPress plug-ins.

Installs: 21

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/ondrejd/odwp

dev-master 2015-10-15 22:27 UTC

This package is not auto-updated.

Last update: 2025-09-28 01:17:16 UTC


README

Library for rapid development of WordPress plug-ins.

Usage

Usage is simple:

/**
 * My simple plug-in.
 */
class MySimplePlugin extends \odwp\SimplePlugin {
    protected $id = 'my-simple-plugin';
    protected $version = '0.1';
    protected $texdomain = 'my-simple-plugin';

    public function get_title($suffix = '', $sep = ' - ') {
        if (empty($suffix)) {
            return __('My Simple Plugin', $this->get_textdomain());
        }

        return sprintf(
            __('My Simple Plugin%s%s', $this->get_textdomain()),
            $sep,
            $suffix
        );
    }
} // End of MySimplePlugin

// ===========================================================================
// Plugin initialization

global $my_plugin;
$my_plugin = new MySimplePlugin();