You appear to be a bot. Output may be restricted
Description
Return the function name of the function to invoke built from parms
Usage
$string = bw_funcname( $prefix, $key, $value );
Parameters
- $prefix
- ( string ) required – the function name prefix e.g. "_bw_create_content"
- $key
- ( string ) required – the multi-word key e.g. About oik-plugins"
- $value
- ( mixed ) optional –
Returns
string $funcname – the function name to invoke Example: Return the function name to create content for an about us page $funcname = bw_funcname( "_bw_create_content", "About oik-plugins" ); Would return the most detailed function that exists _bw_create_content _bw_create_content_about _bw_create_content_about_oik _bw_create_content_about_oik_plugins Note: In the original version of this code it happily produced _sc_help_caption for wp_caption So check what happens in the setup plugin ?Source
File name: oik-bwtrace/libs/bobbfunc.phpLines:
1 to 13 of 13
function bw_funcname( $prefix, $key, $value=NULL ) { $funcname = $prefix; $testname = $funcname; $keys = explode( "-", bw_plugin_namify( $key )); foreach ( $keys as $keyword ) { $testname .= '_'.$keyword; //bw_trace2( $testname, "testname", false ); if ( function_exists( $testname ) ) { $funcname = $testname; } } return( $funcname ); }View on GitHub View on Trac