wphooks.info - activated_plugin

activated_plugin

(trunk - 5.0-alpha-43317)

The hook occurs in the following file:

wp-admin/includes/plugin.php:
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
			 *
			 * 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 plugin file relative to the 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();
	}