Skip to content

Instantly share code, notes, and snippets.

@deeeki
Created December 11, 2011 08:23
Show Gist options
  • Save deeeki/1459330 to your computer and use it in GitHub Desktop.
Save deeeki/1459330 to your computer and use it in GitHub Desktop.
クラスメソッドでフック
class wp_atnd_widget extends WP_Widget {
//クラスメソッド
static public function register() {
register_widget('wp_atnd_widget');
}
//...
}
//クラスメソッドでフック
add_action('widgets_init', array('wp_atnd_widget', 'register'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment