Skip to content

Commit

Permalink
add scb-info.php
Browse files Browse the repository at this point in the history
git-svn-id: http://plugins.svn.wordpress.org/scb-framework/trunk@494060 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
scribu committed Jan 23, 2012
1 parent dcdd059 commit 452df63
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions scb-info.php
@@ -0,0 +1,48 @@
<?php

/**
* Displays information about how scbFramework is loaded.
*
* Usage:
*
* 1. Go to wp-content and look for a directory called mu-plugins (create it if it doesn't exist)
* 2. Place this file inside the mu-plugins directory
* 3. Go to wp-admin.
*/

add_action( 'admin_notices', '_scb_info' );

class scbUtil {}

function _scb_info() {
echo '<div class="updated"><pre>';

if ( defined( 'SCB_LOAD_MU' ) ) {
echo "scbFramework was loaded as a must-use plugin.\n\n";
}

if ( class_exists( 'scbLoad4' ) ) {
list( $classes, $candidates ) = scbLoad4::get_info();

echo "scbFramework candidates:\n";

foreach ( $candidates as $path => $rev ) {
echo dirname( $path ) . " - r$rev\n";
}
} else {
$found = array_filter( array(
'scbUtil', 'scbOptions', 'scbForms', 'scbTable',
'scbWidget', 'scbAdminPage', 'scbBoxesPage',
'scbCron', 'scbHooks'
), 'class_exists' );

if ( empty( $found ) ) {
echo 'scbFramework not found.';
} else {
echo "scbFramework classes present: " . implode( ', ', $found ) . " (unknown source)\n";
}
}

echo '</pre></div>';
}

0 comments on commit 452df63

Please sign in to comment.