Skip to content

Instantly share code, notes, and snippets.

@amostajo
Created April 22, 2016 06:11
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 amostajo/16e1b237fe3b4592e73b5f2006be9251 to your computer and use it in GitHub Desktop.
Save amostajo/16e1b237fe3b4592e73b5f2006be9251 to your computer and use it in GitHub Desktop.
Wordpress MVC - Add action with controller, priority and accepted tags
<?php
public function on_admin()
{
$this->add_action( 'save_post', 'PostController@save', 5, 2 );
$this->add_action( 'admin_menu', 'AdminController@menu', [ 5, $this->config ], 10, 2 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment