View contains_key_or_empty.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!doc.containsKey('myfield') || doc['myfield'].empty) { return "unavailable" } else { return doc['myfield'].value } |
View wordstream-api-class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Class containing all the functionality to get data from the WordStream API | |
* | |
* @link http://api.wordstream.com/doc/introduction | |
* | |
* @author Joost de Valk <joost@yoast.com> | |
* @license http://opensource.org/licenses/gpl-license.php GNU Public License | |
* |