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
# Our base image | |
image: registry.gitlab.com/wpquark/docker-containers/php-node:2.0.0-php-7.3-node-12.13.0 | |
# Select what we should cache | |
cache: | |
key: "$CI_COMMIT_REF_SLUG-$CI_JOB_NAME" | |
paths: | |
- .yarn-cache | |
- .composer-cache |
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 | |
/** | |
* Add Support for EditorsKit Plugin | |
* | |
* @package Jarvis | |
* @subpackage EditorsKit | |
* @author Jeffrey Carandang <jeffreycarandang.com> | |
* @link https://editorskit.com/ | |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License | |
*/ |
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: User Switching Notice for WooCommerce | |
* Plugin URI: https://gist.github.com/bekarice/7785293fb60d7d5297a245b1c1271272 | |
* Description: Adds a frontend notice to switch back to your user on WooCommerce sites with User Switching. | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com/ | |
* Version: 1.0.0 | |
* Text Domain: user-switching-notice-for-woocommerce | |
* |
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 | |
/** | |
* Contact form 7 | |
* custom tag: [posts show:12] | |
* show parameter is optional | |
*/ | |
add_action('wpcf7_init', 'custom_add_form_tag_posts'); | |
function custom_add_form_tag_posts() | |
{ |
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 // Do not include this if already open! | |
/** | |
* Code goes in theme functions.php. | |
*/ | |
add_filter( 'woocommerce_product_subcategories_args', 'custom_woocommerce_product_subcategories_args' ); | |
function custom_woocommerce_product_subcategories_args( $args ) { | |
$args['exclude'] = get_option( 'default_product_cat' ); | |
return $args; |
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
# List of trackers for DNS blocking | |
# Taken from https://reports.exodus-privacy.eu.org/trackers/ and https://discourse.pi-hole.net/t/trackers/5656 | |
0.0.0.0 a4.tl2 | |
0.0.0.0 accengage.com | |
0.0.0.0 aatkit.com | |
0.0.0.0 adswizz.com | |
0.0.0.0 appboy.com | |
0.0.0.0 adnxs.com | |
0.0.0.0 appsflyer.com |
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
/** | |
* Get All orders IDs for a given product ID. | |
* | |
* @param integer $product_id (required) | |
* @param array $order_status (optional) Default is 'wc-completed' | |
* | |
* @return array | |
*/ | |
function get_orders_ids_by_product_id( $product_id, $order_status = array( 'wc-completed' ) ){ | |
global $wpdb; |
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 | |
class drivkraft_load { | |
/** | |
* Output featured image with SVG placeholder | |
* @return html | |
*/ | |
static function featured_image( $post_id = null, $size = 'medium', $colour = '#f3f3f3' ) { | |
global $post; |
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 | |
print "<h1>PHP Encryption with libsodium</h1>"; | |
$message = "This text is secret"; | |
$ciphertext = cryptor::encrypt("password", $message); | |
$plaintext = cryptor::decrypt("password", $ciphertext); | |
print "Message:<br />$message <br /><br />Ciphertext:<br />$ciphertext<br /><br />Plaintext:<br />$plaintext"; |
NewerOlder