You appear to be a bot. Output may be restricted
Description
Return the API or method name given the full funcname and classname
Usage
$string = oikai_get_func( $funcname, $classname );
Parameters
- $funcname
- ( string ) required – which may be in form class::method
- $classname
- ( string ) required – alternative class name, which may be null
Returns
string the API or method name excluding the class and double colon operatorTO DO
Question: Should we raise a concern if the classname doesn't match what we find in funcname?Source
File name: oik-shortcodes/shortcodes/oik-api-importer.phpLines:
1 to 12 of 12
function oikai_get_func( $funcname, $classname ) { if ( $classname ) { $func = str_replace( "$classname::", "", $funcname ); } else { $func = $funcname; } $pos = strpos( $funcname, "::" ); if ( $pos !== false ) { $func = substr( $funcname, $pos+2 ); } return( $func ); }View on GitHub