You appear to be a bot. Output may be restricted
Description
Return the token value at $index if it's of type $type
Usage
$$value = _oiksc_get_token( $tokens, $index, $type );
Parameters
- $tokens
- ( array ) required – array of tokens from token_get_all()
- $index
- ( integer ) required – the index to the $tokens array
- $type
- ( constant ) optional – constant token type required
Returns
$value value of token or null This doesn't include code to return the literal valuesSource
File name: oik-shortcodes/admin/oik-apis.phpLines:
1 to 12 of 12
function _oiksc_get_token( $tokens, $index, $type=null ) { if ( is_array( $tokens[$index] ) ) { if ( $tokens[$index][0] === $type ) { $value = $tokens[$index][1]; } else { $value = null; } } else { $value = null; } return( $value ); }View on GitHub