Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: *fixed: basic group map – help with Group Extension API


Anonymous User 96400
Inactive

@anonymized-96400

You need to provide the hook yourself, like so:

`function display()
{
// some stuff

do_action( ‘my_custom_display_hook’ );
}`

Then you attach something to it like so:
`function my_custom_display_content()
{
// some content
}
add_action( ‘my_custom_display_hook’, ‘my_custom_display_content’ );`

If you add this in a class context the action call would look like so and you would probably call it in the constructor:
`add_action( ‘my_custom_display_hook’, array( &$this, ‘my_custom_display_content’ ) );`

I guess that’s just an example, cause you wouldn’t want to add the option to the display function, but rather to the edit function.

Skip to toolbar