/**
*/
function oik_ww_activation()
{
    static $plugin_basename = null;
    if (!$plugin_basename) {
        $plugin_basename = plugin_basename(__FILE__);
        add_action("after_plugin_row_" . $plugin_basename, __FUNCTION__);
        require_once "admin/oik-activation.php";
    }
    $depends = "oik:2.5";
    oik_plugin_lazy_activation(__FILE__, $depends, "oik_plugin_plugin_inactive");
}
/**
 * Implement "admin_notices" action for oik-nivo-slider 
 *
 * This code will produce a message when oik-nivo-slider is activated but oik isn't
 *
 * Note: oik-nivo-slider now reports that it's dependent upon oik v2.1
 * Note: oik-nivo-slider now dependent upon oik v2.4 
 * Note: oik-nivo-slider now dependent upon oik v3.0.0 
 */
function oik_nivo_activation()
{
    static $plugin_basename = null;
    if (!$plugin_basename) {
        $plugin_basename = plugin_basename(__FILE__);
        add_action("after_plugin_row_oik-nivo-slider/oik-nivo-slider.php", "oik_nivo_activation");
        if (!function_exists("oik_plugin_lazy_activation")) {
            require_once "admin/oik-activation.php";
        }
    }
    $depends = "oik:3.0.0";
    oik_plugin_lazy_activation(__FILE__, $depends, "oik_plugin_plugin_inactive");
}
예제 #3
0
/**
 * Implement "admin_notices" for oik-fum
 *
 * Using Scribu's method we would have had the following in the header
 * 
 * Depends: oik base plugin,oik-lib: shared library management
 * 
 * Using this method what we want to be able to do is check for the presence of a number 
 * of alternative plugins...
 * 
 * oik-fum depends on either oik:3.0.0 or oik-lib:0.0.2
 * 
 * Our current test on oik_require_lib doesn't work because oik-bwtrace also provides this
 * we either need to look for something that's shared by oik and oik-lib
 * OR we need to develop the improved dependency checking to use the '|' for OR. 
 * 
 */
function oikf_admin_notices()
{
    static $plugin_basename = null;
    if (!$plugin_basename) {
        $plugin_basename = plugin_basename(__FILE__);
        // bw_trace2( $plugin_basename, "plugin_basename" );
        add_action("after_plugin_row_oik-fum/oik-fum.php", "oikf_admin_notices");
        if (!function_exists("oik_plugin_lazy_activation")) {
            require_once "admin/oik-activation.php";
        }
    }
    if (!function_exists("oik_require_lib")) {
        $depends = "oik:3.0.0|oik-lib:0.0.2|oik-bwtrace:2.0.1";
        oik_plugin_lazy_activation(__FILE__, $depends, "oik_plugin_plugin_inactive");
    }
}
예제 #4
0
/**
 * Implement "admin_notices" hook for oik-wp and oik-batch to check plugin dependency
 *
 * Note: createapi2 and listapis2 are dependent upon oik-shortcodes, BUT oik-batch itself is not.
 * Not yet... Anyway createapi2 and listapis2 should be moved to oik-shortcodes.
 * BUT oik-batch/oik-wp.php may have a user interface for defining / redefining the initial status for PHPUnit tests
 * so it's probably dependent upon oik v3.0 
 * 
 */
function oik_batch_activation()
{
    static $plugin_basename = null;
    if (!$plugin_basename) {
        $plugin_basename = plugin_basename(__FILE__);
        add_action("after_plugin_row_oik-batch/oik-batch.php", "oik_batch_activation");
        add_action("after_plugin_row_oik-batch/oik-wp.php", "oik_batch_activation");
        if (!function_exists("oik_plugin_lazy_activation")) {
            oik_require("admin/oik-activation.php", "oik-batch");
        }
    }
    $depends = "oik:3.0";
    // We have to tell the lazy activation routine the correct plugin; oik-batch or oik-wp ?
    // So don't do it for admin_notices only the after_plugin_row ones
    $current_filter = current_filter();
    if ("admin_notices" != $current_filter) {
        $plugin = basename($current_filter);
        oik_plugin_lazy_activation($plugin, $depends, "oik_plugin_plugin_inactive");
    }
}