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
// file: | |
///plugins/woocommerce-subscriptions/vendor/woocommerce/subscriptions-core/includes/class-wcs-download-handler.php | |
/** | |
* Grant downloadable file access to any newly added files on any existing subscriptions | |
* which don't have existing permissions pre WC3.0 and all subscriptions post WC3.0. | |
* | |
* @param int $product_id | |
* @param int $variation_id | |
* @param array $downloadable_files product downloadable files |
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: R Debug | |
Description: Set of dump helpers for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: https://www.rarst.net/ | https://gist.github.com/Rarst/1739714 | |
License: MIT | |
*/ |
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 | |
/** | |
* How to Allow Non-Admin Users to Access WordPress Customizer. Published on the qSandbox - https://qsandbox.com/675 | |
* <a href="https://qsandbox.com/?utm_source=qs_blog_code&utm_medium=p675" title="Free Test/Staging WordPress site by qSandbox.com">Free Test/Staging WordPress site by qSandbox.com</a> | |
* @param array $all_caps | |
* @param array $cap | |
* @param array $args | |
* @return array array | |
* @see https://codex.wordpress.org/Plugin_API/Filter_Reference/user_has_cap |
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
/* | |
vanbo/wc-css-make-storefront-product-tabs-horizontal | |
credit: https://gist.github.com/vanbo/c05e9b9512bd53e3680c82e1c6e4e6a3 | |
*/ | |
.product .woocommerce-tabs ul.tabs { | |
width: 100%; | |
float: none; | |
margin-right: 5.8823529412%; | |
} |
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
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
<?php | |
// Author: Slavi Marinov | Orbisius.com & qSandbox.com | |
// 0) Read this article https://medium.com/@qsandbox/getting-started-with-mandrill-c2c3a6ba5c2a | |
// 1) Join Mandrill at http://mandrill.com/ | |
// 2) Download PHPMailer from https://github.com/PHPMailer/PHPMailer | |
// Adapted example from: shared/PHPMailer-master/examples/mailing_list.phps | |
require_once 'shared/PHPMailer-master/class.phpmailer.php'; | |
require_once 'shared/PHPMailer-master/class.smtp.php'; | |
$message = "This is a test message prepared on: " . date( 'r' ) . " from " . $_SERVER['HTTP_HOST'] . ' ' . $_SERVER['REMOTE_ADDR']; |
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
// the vhost has this line to define the environment 'SetEnv DEV_ENV development' | |
$suffix = empty($_SERVER['DEV_ENV']) ? '.min' : ''; | |
wp_register_style('my-awesome-plugin', plugins_url("/assets/main{$suffix}.css", __FILE__), false, | |
filemtime( plugin_dir_path( __FILE__ ) . "/assets/main{$suffix}.css" ) ); | |
wp_enqueue_style('my-awesome-plugin'); | |
wp_enqueue_script( 'jquery' ); | |
wp_register_script( 'my-awesome-plugin', plugins_url("/assets/main{$suffix}.js", __FILE__), array('jquery', ), | |
filemtime( plugin_dir_path( __FILE__ ) . "/assets/main{$suffix}.js" ), true); |
NewerOlder