Example #1
0
<?php

/*
Plugin Name: Hello World
Plugin URI: https://github.com/eabay/oow-sample-plugin
Description: Sample plugin to show Oow usage.
Author: Erhan Abay
Version: 1.0
Author URI: http://erhanabay.com/
*/
require_once __DIR__ . '/vendor/autoload.php';
$manager = new Oow\Plugin\PluginManager();
$manager->addPlugin(new SampleApp\Plugins\HelloWorld());
 License: GPL2
*/
add_action('admin_notices', 'acc_check_environment');
function acc_check_environment()
{
    if (version_compare(PHP_VERSION, '5.3', '<')) {
        echo '<div class="error">';
        echo '<p>Automatic Currency Converter requires PHP verion ' . '5.3' . ' or newer';
        echo ', but yours is ' . PHP_VERSION . '.</p>';
        echo '<p>The plugin has been deactivated.</p>';
        echo '</div>';
        require_once ABSPATH . '/wp-admin/includes/plugin.php';
        deactivate_plugins(__FILE__);
        exit;
    }
    global $wp_version;
    if (version_compare($wp_version, '3.3', '<')) {
        echo '<div class="error">';
        echo '<p>Automatic Currency Converter requires WordPress verion ' . '3.3' . ' or newer';
        echo ', but yours is ' . $wp_version . '.</p>';
        echo '<p>The plugin has been deactivated.</p>';
        echo '</div>';
        require_once ABSPATH . '/wp-admin/includes/plugin.php';
        deactivate_plugins(__FILE__);
        exit;
    }
}
load_plugin_textdomain('auto_currency_converter', false, dirname(plugin_basename(__FILE__)) . '/languages/');
require_once __DIR__ . '/vendor/autoload.php';
$manager = new Oow\Plugin\PluginManager();
$manager->addPlugin(new Akky\AutoCurrencyConverter());
Example #3
0
<?php

/*
Plugin Name: Gemius Tracking Code
Plugin URI: https://github.com/eabay/wordpress-gemius-plugin
Description: This plugin integrates Gemius and WordPress by automatically adding tracking code. You can set different identifiers for home and all other pages from settings page.
Author: Erhan Abay
Version: 2.3.0
Author URI: http://erhanabay.com
License: See LICENSE file
*/
$pm = new \Oow\Plugin\PluginManager();
$pm->addPlugin(new \Gemius\EmbedCodePlugin());