wphooks.info - activated_plugin

activated_plugin

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-admin/includes/plugin.php:
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
			 *
			 * If a plugin is silently activated (such as during an update),
			 * this hook does not fire.
			 *
			 * @since 2.9.0
			 *
			 * @param string $plugin       Path to the main plugin file from plugins directory.
			 * @param bool   $network_wide Whether to enable the plugin for all sites in the network
			 *                             or just the current site. Multisite only. Default is false.
			 */
			do_action( 'activated_plugin', $plugin, $network_wide );
		}

		if ( ob_get_length() > 0 ) {
			$output = ob_get_clean();
			return new WP_Error('unexpected_output', __('The plugin generated unexpected output.'), $output);
		}
		ob_end_clean();
	}