Skip to content

Instantly share code, notes, and snippets.

@tommcfarlin
Last active February 15, 2016 22:29
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 tommcfarlin/68681aa403a22060585f to your computer and use it in GitHub Desktop.
Save tommcfarlin/68681aa403a22060585f to your computer and use it in GitHub Desktop.
[WordPress] Gives an example of how to initialize a WordPress hook through the use of priorities and existing actions.
<?php
add_action( 'current_screen', 'pressware_start_acme_class', 99, 0 );
/**
* Registers and enqueues the code responsible for #dowork
*
* @since 1.0.0
*/
function pressware_start_acme_class() {
$plugin = new Acme_Class();
$plugin->init();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment