Changeset 2958 for sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/load-other-mu-plugins.php
- Timestamp:
- 04/14/2016 08:23:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/load-other-mu-plugins.php
r2442 r2958 3 3 defined( 'WPINC' ) or die(); 4 4 5 // mu-plugins in sub-directories 6 require_once( __DIR__ . '/wp-cli-commands/bootstrap.php' ); 7 require_once( __DIR__ . '/camptix-tweaks/camptix-tweaks.php' ); 5 wcorg_include_individual_mu_plugins(); 6 wcorg_include_mu_plugin_folders(); 8 7 9 // Private mu-plugins 10 $private_mu_plugins = glob( WP_CONTENT_DIR . '/mu-plugins-private/*.php' ); 11 if ( is_array( $private_mu_plugins ) ) { 12 foreach ( $private_mu_plugins as $plugin ) { 13 if ( is_file( $plugin ) ) { 14 require_once( $plugin ); 8 /** 9 * Load individually-targeted files 10 * 11 * This is because the folder contains some .php files that we don't want to automatically include with glob(). 12 */ 13 function wcorg_include_individual_mu_plugins() { 14 require_once( __DIR__ . '/wp-cli-commands/bootstrap.php' ); 15 require_once( __DIR__ . '/camptix-tweaks/camptix-tweaks.php' ); 16 } 17 18 /** 19 * Load every mu-plugin in these folders 20 */ 21 function wcorg_include_mu_plugin_folders() { 22 $include_folders = array( 23 dirname( __DIR__ ) . '/mu-plugins-private', 24 __DIR__ . '/jetpack-tweaks', 25 ); 26 27 foreach ( $include_folders as $folder ) { 28 $plugins = glob( $folder . '/*.php' ); 29 30 if ( is_array( $plugins ) ) { 31 foreach ( $plugins as $plugin ) { 32 if ( is_file( $plugin ) ) { 33 require_once( $plugin ); 34 } 35 } 15 36 } 16 37 }
Note: See TracChangeset
for help on using the changeset viewer.