You appear to be a bot. Output may be restricted
Description
Save the hook invocationsThe oik_hook CPT does not need a "hook called by" (Invokers) field as this can be determined in reverse from the _oik_api_hooks metadata created for each oik_api instance.
Usage
oiksc_save_hooks( $post_id );
Parameters
- $post_id
- ( ID ) required – post ID of the API function that is being updated
Returns
voidSource
File name: oik-shortcodes/admin/oik-apis.phpLines:
1 to 11 of 11
function oiksc_save_hooks( $post_id ) { global $oikai_hook; bw_trace2( $oikai_hook, "hooks", true, BW_TRACE_VERBOSE ); $hooks = array(); if ( !empty( $oikai_hook ) ) { foreach ( $oikai_hook as $key => $value ) { $hooks[] = $value[2]; } } bw_update_post_meta( $post_id, "_oik_api_hooks", $hooks ); }View on GitHub