Description
Return information about the function implementing somethingWorks for: Implement "blah" action Implements the "blah" filter Implements [bw_code] shortcode
Usage
$array|null = oikai_function_implements( $desc );Parameters
- $desc
- ( string ) required – the function description
Returns
array|null $type[0] should contain action, filter or shortcode, $type[1] is the name of what's being implementedSource
File name: oik-shortcodes/admin/oik-apitype.phpLines:
1 to 13 of 13
function oikai_function_implements( $desc ) { $desc = str_replace( " the ", " ", $desc ); $desc = str_replace( "Implements ", "Implement ", $desc ); $descs = explode( " ", $desc . " 1 2 3 4 ", 4 ); $implements = strcasecmp( "Implement", $descs[0] ); if ( 0 == $implements ) { $type[0] = $descs[2]; $type[1] = $descs[1]; } else { $type = null; } return( $type ); }View on GitHub
