Skip to content

Instantly share code, notes, and snippets.

@itthinx
Created September 14, 2023 12:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itthinx/4bf31fcad81fb1115ac69ce6fbf72b59 to your computer and use it in GitHub Desktop.
Save itthinx/4bf31fcad81fb1115ac69ce6fbf72b59 to your computer and use it in GitHub Desktop.
I am a minimalist plugin which logs 'I am Foo!' when the plugins_loaded action fires.
<?php
/**
* Plugin Name: Foo
* Description: I am a minimalist plugin which logs 'I am Foo!' when the plugins_loaded action fires.
*/
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Hooked on the plugins_loaded action.
*/
function foo_plugins_loaded() {
error_log( 'I am Foo!' );
}
add_action( 'plugins_loaded', 'foo_plugins_loaded' );
@itthinx
Copy link
Author

itthinx commented Sep 14, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment