-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1 - move non-main plugin files to includes. Add readme.txt
- Loading branch information
1 parent
9e795fb
commit 97e2a28
Showing
5 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* Admin functions for oik-loader.php | ||
*/ | ||
|
||
//oik_loader_activate_mu( true ); | ||
|
||
|
||
/** | ||
* Activate / deactivate oik-loader-mu processing | ||
* | ||
* @param bool $activate true to activate, false to deactivate | ||
*/ | ||
function oik_loader_activate_mu( $activate=true ) { | ||
$source = oik_path( 'includes/oik-loader-mu.php', "oik-loader" ); | ||
if ( defined( 'WPMU_PLUGIN_DIR' ) ) { | ||
$target = WPMU_PLUGIN_DIR; | ||
} else { | ||
$target = ABSPATH . '/wp-content/mu-plugins'; | ||
} | ||
bw_trace2( $target, "target dir", true, BW_TRACE_DEBUG ); | ||
//var_dump( debug_backtrace() ); | ||
//echo "Target: $target"; | ||
if ( is_dir( $target ) ) { | ||
$target .= "/oik-loader-mu.php"; | ||
if ( $activate ) { | ||
if ( !file_exists( $target ) ) { | ||
copy( $source, $target ); | ||
} | ||
} else { | ||
if ( file_exists( $target ) ) { | ||
unlink( $target ); | ||
} | ||
} | ||
} else { | ||
// Do we need to make this ourselves? | ||
bw_trace2( $target, "Not a dir?", true, BW_TRACE_ERROR ); | ||
//gobang(); | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
=== oik-loader === | ||
Contributors: bobbingwide, vsgloik | ||
Donate link: https://www.oik-plugins.com/oik/oik-donate/ | ||
Tags: oik, plugin, loader | ||
Requires at least: 5.1 | ||
Tested up to: 5.1 | ||
Stable tag: 0.0.0 | ||
|
||
WordPress Must Use plugin to load required plugins. | ||
|
||
== Description == | ||
|
||
|
||
|
||
|
||
== Installation == | ||
1. Upload the contents of the oik-loader plugin to the `/wp-content/plugins/oik-loader' directory | ||
1. Activate the oik-loader plugin through the 'Plugins' menu in WordPress | ||
1. Generate the oik-loader.csv file in the mu-plugins folder | ||
|
||
Note: The oik-loader-mu.php file is automatically copied to the mu-plugins folder | ||
|
||
|
||
|
||
== Frequently Asked Questions == | ||
|
||
= What is this plugin for? = | ||
It helps to reduce the number of activated plugins in blocks.wp-a2z.org | ||
It dynamically loads the required plugin for a block. | ||
|
||
= Which plugins can I deactivate? = | ||
Once all the blocks for a plugin have been generated then the plugin can be deactived. | ||
|
||
With the following exceptions: | ||
- oik-blocks - since these blocks are used in all content | ||
- plugins upon which oik-blocks depends for server side rendering | ||
|
||
Gutenberg is optional. | ||
|
||
|
||
== Screenshots == | ||
1. None | ||
|
||
== Upgrade Notice == | ||
= 0.0.0 = | ||
Prototype version developed with oik-magnetic-poetry. | ||
oik-blocks needs to be activated since these blocks are used by the block CPT. | ||
|
||
== Changelog == | ||
= 0.0.0 = | ||
* Added: includes/oik-loader-mu.php to automatically load the required plugin | ||
* Added: oik-loader.php - the main plugin file | ||
|
||
== Further reading == | ||
If you want to read more about oik plugins and themes then please visit | ||
[oik-plugins](https://www.oik-plugins.com/) | ||
|
||
|
||
|