This file contains hidden or 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 | |
/** | |
* This script allows you to sync plugins from development machine with staging/live servers. | |
* Author: Svetoslav Marinov (SLAVI) | http://orbisius.com | |
* (c) All Rights Reserved. | |
* (c) Dec 2014 | |
* License: LGPL | |
* zzz_sync.php | |
*/ |
This file contains hidden or 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
; configuration for fake sendmail | |
; if this file doesn't exist, sendmail.exe will look for the settings in | |
; the registry, under HKLM\Software\Sendmail | |
[sendmail] | |
; you must change mail.mydomain.com to your smtp server, | |
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup) | |
; emails delivered via IIS's pickup directory cause sendmail to |
This file contains hidden or 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
[mail function] | |
; For Win32 only. | |
; http://php.net/smtp | |
;SMTP = localhost | |
; http://php.net/smtp-port | |
;smtp_port = 25 | |
; For Win32 only. | |
; http://php.net/sendmail-from | |
sendmail_from = [email protected] |
This file contains hidden or 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 | |
echo 'Ok'; | |
This file contains hidden or 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
Class HTML_Util { | |
/** | |
* Usage: HTML_Util::array2attribs(); | |
* @param array $attributes | |
* @param bool $make_them_data will prefix each key with 'data-' prefix so it's acessible via $('#elem').data(); | |
* @return string | |
* @see http://stackoverflow.com/questions/18081625/how-do-i-map-an-associative-array-to-html-element-attributes | |
*/ | |
public static function array2attribs($attributes = array(), $make_them_data = 0) { | |
$pairs = array(); |
This file contains hidden or 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 | |
/** | |
* This class is used in Orbisius Price Changer for WooCommerce | |
* This premium WooCommerce extension allows you to change product prices (up/down) for all products or for a selected category and its subcategories. | |
* You can review them before actually making the changes. | |
* | |
* @see http://club.orbisius.com/products/wordpress-plugins/woocommerce-extensions/orbisius-woocommerce-ext-price-changer/ | |
* @author jaywilliams | myd3.com | https://gist.github.com/jaywilliams | |
* @author Svetoslav Marinov (SLAVI) | http://orbisius.com |
This file contains hidden or 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 | |
// install it in mu-plugins | |
add_action('activated_plugin', 'dbg_log_error', 0, 2); | |
function dbg_log_error($plugin, $network_wide) { | |
if (ob_get_length() == 0) { | |
return ; | |
} | |
This file contains hidden or 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
wp_enqueue_script( 'jquery' ); | |
wp_enqueue_script( 'jquery-ui-core ' ); | |
wp_enqueue_script( 'jquery-ui-slider' ); | |
wp_register_style('my_jq_ui', '//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery.ui.all.css', __FILE__, false); | |
wp_enqueue_style('my_jq_ui'); | |
<div id="slider-range"></div> |
This file contains hidden or 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
// This function accepts lat latitude from a string | |
// e.g. 123,-234 | |
function getLatLngFromString(ll) { | |
var lat = ll.replace(/\s*\,.*/, ''); // first 123 | |
var lng = ll.replace(/.*,\s*/, ''); // second ,456 | |
var latLng = new google.maps.LatLng(parseFloat(lat), parseFloat(lng)); | |
return latLng; | |
}; |
This file contains hidden or 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 | |
/** | |
* This file will send you alerts when your clients install/uninstall plugins | |
* Usage: Save this as wp-content/mu-plugins/my-spy.php | |
* | |
* License: GPL | |
* @author orbisius.com | |
* Use it at your own risk. You may have to disclose this in your terms of service. | |
* Check with a laywer first. |