Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[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
You can’t perform that action at this time.