mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Allow plugin activation even if plugin generates extra output. Make warning more informative. fixes #13585
git-svn-id: https://develop.svn.wordpress.org/trunk@15017 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -334,15 +334,14 @@ if ( !empty($invalid) )
|
||||
|
||||
<?php if ( isset($_GET['error']) ) :
|
||||
|
||||
if (isset($_GET['charsout']))
|
||||
$errmsg = sprintf(__('Plugin could not be activated because it generated %d characters of <strong>unexpected output</strong>.'), $_GET['charsout']);
|
||||
if ( isset($_GET['charsout']) )
|
||||
$errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']);
|
||||
else
|
||||
$errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.');
|
||||
|
||||
?>
|
||||
<div id="message" class="updated"><p><?php echo $errmsg; ?></p>
|
||||
<?php
|
||||
if ( wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?>
|
||||
if ( !isset($_GET['charsout']) && wp_verify_nonce($_GET['_error_nonce'], 'plugin-activation-error_' . $plugin) ) { ?>
|
||||
<iframe style="border:0" width="100%" height="70px" src="<?php echo admin_url('plugins.php?action=error_scrape&plugin=' . esc_attr($plugin) . '&_wpnonce=' . esc_attr($_GET['_error_nonce'])); ?>"></iframe>
|
||||
<?php
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user