Last active
June 21, 2022 09:37
-
-
Save tommyskott/6bbfac21508de147a6678d8232d32d07 to your computer and use it in GitHub Desktop.
Require WordPress mu-plugins in vanilla wp projects.
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
<?php | |
/* | |
Plugin Name: B&S Autoloader | |
Plugin URI: https://github.com/borgenfalkskott | |
Description: Mu-plugin autoloader for vanilla Wp. | |
Version: 1.1.0 | |
Author: Borgenfalk & Skott | |
Author URI: https://borgenfalk.se | |
License: MIT | |
*/ | |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); | |
require_once __DIR__ . '/bs-wp-reset/bs-wp-reset.php'; | |
require_once __DIR__ . '/bs-wp-meta/bs-wp-meta.php'; | |
require_once __DIR__ . '/bs-wp-no-jquery/bs-wp-no-jquery.php'; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE: You only need this autoloader if your plugin lives in a sub folder e.g.
/plugin-name/plugin-name.php
Place the autoloader.php in
/wp-content/mu-plugins/
.WordPress looks automatically for plugin files in the mu-plugins folder.