Skip to content

Commit

Permalink
Improve flexibility of context actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mboynes committed Aug 17, 2015
1 parent 054c0ba commit 6f8980d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions fieldmanager.php
Expand Up @@ -418,17 +418,17 @@ function fm_trigger_context_action() {
* the values returned by fm_calculate_context(). For example, the Edit
* screen for the Page post type would fire "fm_post_page".
*/
do_action( "fm_{$context}_{$type}" );
} else {
/**
* Fires when a specific Fieldmanager context, but not type, loads.
*
* The dynamic portion of the hook name, $context, refers to the first
* value returned by fm_calculate_context(). For example, the Edit User
* screen would fire "fm_user".
*/
do_action( "fm_{$context}" );
do_action( "fm_{$context}_{$type}", $type );
}

/**
* Fires when a specific Fieldmanager context loads.
*
* The dynamic portion of the hook name, $context, refers to the first
* value returned by fm_calculate_context(). For example, the Edit User
* screen would fire "fm_user".
*/
do_action( "fm_{$context}", $type );
}
add_action( 'init', 'fm_trigger_context_action', 99 );

Expand Down

0 comments on commit 6f8980d

Please sign in to comment.