You appear to be a bot. Output may be restricted
Description
Return the token at $index if it's of type $typeThis doesn't include code to return the literal values
Usage
$$token = _oiksc_get_token_object( $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
$token the token or nullSource
File name: oik-shortcodes/classes/oik-listapis2.phpLines:
1 to 13 of 13
function _oiksc_get_token_object( $tokens, $index, $type=null ) { $token = null; if ( is_array( $tokens[$index] ) ) { if ( $tokens[$index][0] === $type ) { $token = new oiksc_token_object( $tokens[$index] ); } else { $token = null; } } elseif ( $tokens[$index] == $type ) { $token = new oiksc_token_object( $type ); } return( $token ); }View on GitHub