Skip to content

Instantly share code, notes, and snippets.

@Kichrum
Kichrum / inherit.js
Last active August 29, 2015 14:04
Inheritance in JavaScript for EcmaScript 3
/**
* One more version of inheritance for ES3
* @author Kichrum
*/
var inherit = function(Parent) {
var Child = function(){ Parent.apply(this, arguments) }
// We can use
// Child.prototype = Object.create(Parent.prototype)
// here for ES5 instead of next 3 lines:
@Kichrum
Kichrum / relevanssi.diff
Last active December 26, 2015 23:19
Relevanssi comma separate fix.
diff --git a/wp-content/plugins/relevanssi/lib/common.php b/wp-content/plugins/relevanssi/lib/common.php
index 5ac8d4b..a797aaa 100644
--- a/wp-content/plugins/relevanssi/lib/common.php
+++ b/wp-content/plugins/relevanssi/lib/common.php
@@ -396,7 +396,7 @@ function relevanssi_get_custom_fields() {
return $custom_fields;
}
else {
- $custom_fields = explode(",", $custom_fields);
+ $custom_fields = explode("\n", $custom_fields);