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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Episode 2: Attribute Binding and Basic Events</title> | |
<script src="https://unpkg.com/vue@3"></script> | |
<style> | |
html, body { | |
height: 100%; | |
} |
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 copy this line | |
/** | |
* This will turn on deferred transactional emails in WooCommerce. This may help if you | |
* are experiencing slow checkouts or checkout timeouts. | |
*/ | |
add_filter( 'woocommerce_defer_transactional_emails', '__return_true' ); |
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
// general PHP and WordPress warnings, error messages and status information | |
define( 'WP_DEBUG', true ); | |
define( 'WP_DEBUG_LOG', true ); | |
define( 'WP_DEBUG_DISPLAY', false ); | |
define( 'WPS_DEBUG', true ); | |
// script and style | |
define( 'WPS_DEBUG_SCRIPTS', true ); |
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 brand color palette to acf color picker | |
* https://www.advancedcustomfields.com/resources/javascript-api/#filters-color_picker_args | |
* | |
*/ | |
function kronos_acf_input_admin_footer() { | |
?> | |
<script type="text/javascript"> |
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
<div id="container"> | |
<h3>Lazy loading CSS background images</h3> | |
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam at ligula non lorem facilisis finibus. Suspendisse turpis lacus, tempus sit amet dignissim sit amet, pretium non sem. Ut malesuada purus ac magna placerat, tempus commodo turpis consectetur. Nunc vitae metus vehicula nunc congue varius. Suspendisse egestas urna non finibus feugiat. Vestibulum maximus, nunc et tempus convallis, dui ante vestibulum est, in lobortis purus sapien eget lacus. Suspendisse cursus enim non quam mollis imperdiet. Pellentesque convallis eget nunc vitae fringilla. Fusce interdum, velit semper varius aliquet, eros sapien facilisis erat, iaculis vulputate erat arcu vel neque. Suspendisse dignissim hendrerit lorem. Etiam metus ex, finibus vitae iaculis vitae, iaculis non ex. Phasellus commodo id ante id consequat. Nunc consectetur viverra lacus non fringilla. Pellentesque nec nisl vulputate, sagittis nisl id, venenatis nisi. Nunc malesuada tellus a elit s |
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
jQuery(document).ready(function($) { | |
jQuery.fn.cleardefault = function() { | |
return this.focus(function() { | |
if( this.value == this.defaultValue ) { | |
this.value = ""; | |
} | |
}).blur(function() { | |
if( !this.value.length ) { | |
this.value = this.defaultValue; |
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
#!/bin/bash | |
find . -name "*.php" -exec grep "base64" '{}' \; -print &> b64-detections.txt | |
find . -name "*.php" -exec grep "eval" '{}' \; -print &> eval-detections.txt |
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
#!/bin/sh | |
set -e | |
vendor/bin/phpunit | |
(git push) || true | |
git checkout production | |
git merge master |
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 custom_validate_coupon($errors) { | |
global $wpdb; | |
//If user is not logged in, then they've never used a coupon before | |
if(!MeprUtils::is_user_logged_in()) { return $errors; } | |
$coupon_code = (isset($_POST['mepr_coupon_code']) && !empty($_POST['mepr_coupon_code']))?stripslashes($_POST['mepr_coupon_code']):''; | |
if(($coupon = MeprCoupon::get_one_from_code($coupon_code)) && isset($coupon->ID) && $coupon->ID) { |
NewerOlder