This is a set of two dynamic enzymes useful for suspending and resuming another plugin.
Work in progress...
This would be the content of a post of yours. The thingy plugin would be filtering content as usual.
// the important bit it JSON.stringify, because elasticsearch doesn't work without it | |
jQuery.post('http://elasticsearch.example.com:9200/activity/_search/', JSON.stringify({ | |
"query": { | |
"term": { | |
"activity.id": "1234" | |
} | |
} | |
}), function (data) { |
These are my enzymes for the table of contents shown at http://andowebsit.es/blog/noteslog.com/nzymes/.
See Example 1: table-of-contents;example-1
This setup allows a post author to easily create and maintain a table of contents straight into the visual editor of a page. (See table-of-contents;toc-left.md and table-of-contents;toc-right.md) At the same time, the table of contents can be added to any other WordPRess place, so that it's shown when the context of that place is rendered by WordPress. (See table-of-contents;example-1.html)
---- | |
TEMPORARY DIRECTORY: This is where plugin / theme authors can store temporary files and directories. When a temporary directory expires, the garbage collector will delete it. | |
* '''tmp_dir_create'''( $expiration, $primary_file ) | |
* ==> string $absolute_path | WP_Error $error | |
* Create a temporary directory specifically for the plugin/theme defined by $primary_file. | |
* '''tmp_dir_info'''( $absolute_path, $with_listing = false ) | |
* ==> array $tmp_info | WP_Error $error | |
* Get info about the temporary directory at $absolute_path. |
/** | |
* Check the syntax of a code snippet. | |
* | |
* @param $code | |
* | |
* @return mixed|null|string | |
*/ | |
function php_lint( $code ) | |
{ | |
$result = null; |
// Proof of concept for WordPress bug #30891: Unchecked property overloading is detrimental to OOP. | |
class CheckedOverloading { | |
public $legacy_public = 'legacy_public'; | |
protected $legacy_protected = 'legacy_protected'; | |
private $legacy_private = 'legacy_private'; | |
//... | |
public $fresh_public = 'fresh_public'; |
<?php | |
echo 'Hello World!'; |
//... | |
if(!defined('GAREE_MUSTACHEPHP')) { | |
include_once('Mustache.php'); | |
define('GAREE_MUSTACHEPHP', true); | |
} | |
function flickr_api($path = '') { | |
return 'https://api.flickr.com' . $path; | |
} |
jQuery.news = (function($) { | |
var broker = $({}); | |
return { | |
subscribe: function() { | |
$.fn.on.apply(broker, arguments); | |
}, | |
unsubscribe: function() { |
$.equals = function( a, b, options ) { | |
options = $.extend({ | |
// if true, in case of inequality, a trace of the first difference is logged to the console | |
verbose: false, | |
// use 'strict' for ===, 'abstract' for == | |
comparison: 'strict', |