Пример #1
0
 public static function register_hooks()
 {
     $loader = Akses_Loader::get_instance();
     $loader->add_action('init', 'Akses_Allowance', 'register_post_type');
     $loader->add_action('add_meta_boxes', 'Akses_Allowance', 'define_metaboxes');
     $loader->add_action('save_post_' . Akses_Allowance::POST_TYPE_ID, 'Akses_Allowance', 'save', 10, 3);
     $loader->add_action('manage_' . Akses_Allowance::POST_TYPE_ID . '_posts_custom_column', 'Akses_Allowance', 'on_custom_allowance_column', 10, 2);
     $loader->add_action('akses_create_database', 'Akses_Allowance', 'create_database');
     $loader->add_filter('manage_' . Akses_Allowance::POST_TYPE_ID . '_posts_columns', 'Akses_Allowance', 'set_list_columns', 10, 3);
 }
Пример #2
0
 /**
  * Initialize the plugin, run the loader to execute all of the hooks with WordPress.
  *
  */
 public function init()
 {
     Akses_Loader::get_instance()->run();
 }
Пример #3
0
 public static function register_hooks()
 {
     $loader = Akses_Loader::get_instance();
     $loader->add_action('akses_activated', 'Akses_Membership', 'on_akses_activated');
     $loader->add_action('wc_memberships_user_membership_status_changed', 'Akses_Membership', 'on_wc_membership_status_change', 10, 1);
 }