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 | |
/* | |
Plugin Name: Orbisius Sample Code | |
Plugin URI: http://club.orbisius.com/products/ | |
Description: Sample plugin to return JSON | |
Version: 1.0.0 | |
Author: Svetoslav Marinov (Slavi) | |
Author URI: http://orbisius.com | |
License: GPL v2 | |
*/ |
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 | |
/* | |
Make sure that the function name matches the function name in the parent theme's functions.php file. | |
Also in the parent theme there must be a block e.g. !function_exists('function_name_that_you_want_to_override') | |
that will tell you that it is safe to override that function. | |
*/ | |
function function_name_that_you_want_to_override() { | |
} |
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 | |
/** | |
* This function schedules an email by passing -odd paramaters to sendmail. | |
* Those emails will be processed depending on: /etc/sysconfig/sendmail (using 1h) | |
* if sendmail is running all the time. | |
* | |
* @param string $email recipient | |
* @param string $subject - subject | |
* @param string $message - the message |
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 | |
/** | |
* 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. |
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
How To Setup Let's Encrypt SSL certificate for a news Site and Fix Mixed Content Error | |
/////////////////////////////////// | |
// put this in wp-config.php | |
// orbisius.com | |
// GPL | |
ob_start( 'orbisius_custom_link_corrector_global' ); | |
/** | |
* This is used here to correct all links that are not ssl |
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
; 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 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 code allows you to make some WooCommerce Checkout Fields optional. | |
Blog post http://orbisius.com/link/3710 | |
Author: Svetoslav Marinov (Slavi) | |
Author URI: http://orbisius.com | |
*/ | |
/* | |
Installation |
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
# | |
# OpenSSL example configuration file. | |
# This is mostly being used for generation of certificate requests. | |
# | |
# This definition stops the following lines choking if HOME isn't | |
# defined. | |
HOME = . | |
RANDFILE = $ENV::HOME/.rnd |
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
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 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 |