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: PDB Volunteer Dropdown | |
* Description: load the registered volunteers into a Participants Database form | |
* dropdown | |
*/ | |
/* | |
* sets our function to be called when the pdb-form_element_build_dropdown action | |
* is triggered by the form | |
*/ |
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 | |
/* | |
* dl-file.php | |
* | |
* Protect uploaded files with login. | |
* | |
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
* | |
* @author hakre <http://hakre.wordpress.com/> | |
* @license GPL-3.0+ |
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 | |
namespace GM\VirtualPages; | |
/** | |
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com> | |
* @license http://opensource.org/licenses/MIT MIT | |
*/ | |
class Controller implements ControllerInterface { | |
private $pages; |
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
let gulp = require('gulp'), | |
replace = require('gulp-batch-replace'), | |
filesExist = require('files-exist'); | |
gulp.task('bt4', () => | |
{ | |
let diff = { | |
'@media (min-width: $screen-xs-min) and (max-width: $screen-sm-max)': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, xs))', | |
'@media (min-width: $screen-xs) and (max-width: ($screen-md-min - 1))': '@media (min-width: map-get($grid-breakpoints, xs)) and (max-width: map-get($grid-breakpoints, md)-1)', |
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 | |
function enqueue_select2_jquery() { | |
wp_register_style( 'select2css', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.css', false, '1.0', 'all' ); | |
wp_register_script( 'select2', '//cdnjs.cloudflare.com/ajax/libs/select2/3.4.8/select2.js', array( 'jquery' ), '1.0', true ); | |
wp_enqueue_style( 'select2css' ); | |
wp_enqueue_script( 'select2' ); | |
} | |
add_action( 'admin_enqueue_scripts', 'enqueue_select2_jquery' ); |
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
# Optimized my.cnf configuration for MySQL/MariaSQL on cPanel/WHM servers | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# === Updated July 2018 === | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have less or more resources available you should adjust accordingly to save CPU, | |
# RAM and disk I/O usage. | |
# The settings marked with a specific comment or the word "UPD" after the value |
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
# my.cnf for TAKIS Server | |
# BEGIN CONFIG INFO | |
# DESCR: 8 GB RAM, InnoDB only, ACID, few connections, heavy queries | |
# TYPE: SYSTEM | |
# END CONFIG INFO | |
[client] | |
port = 7000 | |
socket = /var/lib/mysql/mysql.sock |
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
SELECT p.`ID`, | |
p.`post_title` AS coupon_code, | |
p.`post_excerpt` AS coupon_description, | |
Max(CASE WHEN pm.meta_key = 'discount_type' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS discount_type, -- Discount type | |
Max(CASE WHEN pm.meta_key = 'coupon_amount' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS coupon_amount, -- Coupon amount | |
Max(CASE WHEN pm.meta_key = 'free_shipping' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS free_shipping, -- Allow free shipping | |
Max(CASE WHEN pm.meta_key = 'expiry_date' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS expiry_date, -- Coupon expiry date | |
Max(CASE WHEN pm.meta_key = 'minimum_amount' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS minimum_amount, -- Minimum spend | |
Max(CASE WHEN pm.meta_key = 'maximum_amount' AND p.`ID` = pm.`post_id` THEN pm.`meta_value` END) AS maximum_amount, -- Maximum spend | |
Max(CASE WHEN pm.m |
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 | |
/* | |
* Dynamically Generated Checkboxes in a WordPress Settings Page | |
* | |
* This file is fully functional and ready to be used in a plugin or theme to generate this Settings Page | |
* | |
*/ | |
Class Pizza_Shop { |
OlderNewer