You appear to be a bot. Output may be restricted
Description
Handle the hookThe hook can either be a WordPress hook, one of "ours", or some other plugin's or theme's hook We need to create a post for it regardless of whose it is. If it happens to be a WordPress hook then we may eventually show the link to the WordPress documentation when viewing the hook's details. e.g. http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext or http://codex.wordpress.org/Plugin_API/Action_Reference/plugins_loaded
Usage
oikai_handle_hook( $key, $value, $tokens, $context, $doaction );
Parameters
- $key
- ( mixed ) required –
- $value
- ( mixed ) required –
- $tokens
- ( mixed ) required –
- $context
- ( mixed ) required –
- $doaction
- ( mixed ) optional default: 1 –
Returns
voidSource
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 27 of 27
function oikai_handle_hook( $key, $value, &$tokens, $context, $doaction=true ) { $hook = oikai_concoct_hook_name2( $tokens ); bw_push(); $post_id = _oikai_create_oik_hook( $hook, $context ); bw_pop(); if ( $post_id ) { //e( $hook['prehook'] ); oikai_set_links( $post_id, $hook, $context, $tokens ); //$token[] = retlink( "bw_hook $context", get_permalink( $post_id ), $hook['hook'] ); //e( $hook['posthook'] ); // wp_strip_all_tags( $hook ) } else { //e( $value ); } //e( $encaps ); if ( $doaction ) { /** * Record this action/filter invocation for the current function */ do_action( "oikai_record_hook", $context, $hook, $post_id ); } bw_context( "dummy_TCES", false ); oikai_set_context( $post_id ); return( $post_id ); }View on GitHub