Пример #1
0
	<td colspan="2">
	<div id="debugblock" style="display:none;">
	<p><strong><?php 
_e('Debug Information', 'google-document-embedder');
?>
:</strong><br/>
	<?php 
_e('Note: Profile and settings export and diagnostic log (if present) will be attached.', 'google-document-embedder');
?>
</p>
	<textarea name="debug" id="debugtxt" style="width:100%;min-height:200px;font-family:monospace;" readonly="readonly">
<?php 
echo "=== GDE Debug Information ===\n\n";
echo "GDE Version: {$gde_ver} / GDE DB: " . get_site_option('gde_db_version', 0) . "\n";
echo "Profiles: " . gde_debug_tables('gde_profiles', true) . "\n";
echo "Secure Docs: " . gde_debug_tables('gde_secure', true);
echo "\n\n--- Env ---\n";
echo "WordPress Version: {$wp_version} [" . get_locale() . "]\n";
echo "Multisite: ";
if (is_multisite()) {
    echo "Yes ";
    if (is_plugin_active_for_network(plugin_basename(__FILE__))) {
        echo "(network activated)\n";
    } else {
        echo "(not network activated)\n";
    }
} else {
    echo "No\n";
}
echo "PHP Version: " . phpversion() . "\n";
echo "Plugin URL: " . GDE_PLUGIN_URL . "\n";
Пример #2
0
 * @author     Kevin Davis <*****@*****.**>
 * @copyright  Copyright 2014 Kevin Davis
 * @license    http://www.gnu.org/licenses/gpl.txt GPL 2.0
 * @link       https://wordpress.org/plugins/google-document-embedder/
 */
// boring init junk
$gde_ver = "2.6";
$gde_db_ver = "1.2";
// update also in gde_activate()
require_once plugin_dir_path(__FILE__) . 'functions.php';
global $wp_version;
$pdata = gde_get_plugin_data();
$gdeoptions = get_option('gde_options');
$gdetypes = gde_supported_types();
// check for db health
$healthy = gde_debug_tables();
// add admin functions only if needed
if (is_admin()) {
    require_once GDE_PLUGIN_DIR . 'functions-admin.php';
}
// get global settings - not implemented in this release
/*
if ( is_multisite() ) {
	$gdeglobals			= get_site_option( 'gde_globals' );
}
*/
// activate plugin, allow clear dx log on deactivate
register_activation_hook(__FILE__, 'gde_activate');
register_deactivation_hook(__FILE__, 'gde_deactivate');
// bring the magic
add_action('plugins_loaded', 'gde_load');