This file contains hidden or 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 hidden or 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
name: CD | |
# this workflow will deploy your application to production when | |
# a new release has been created in GitHub | |
on: | |
release: | |
types: [released] | |
push: | |
tags: | |
- 'v*' |
This file contains hidden or 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 | |
/** | |
* Most Recent Content block | |
* | |
**/ | |
/** | |
* First, let's compile an array of the things we want to display. The | |
* posts are the easy part, so let's do those first. | |
*/ |
This file contains hidden or 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 | |
/** | |
* Most Recent Content block | |
* | |
**/ | |
/** | |
* First, let's compile an array of the things we want to display. The | |
* posts are the easy part, so let's do those first. | |
*/ |
This file contains hidden or 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 hidden or 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) { |
This file contains hidden or 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
/*! | |
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome | |
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) | |
*/ | |
@import "font-awesome/scss/variables"; | |
/* FONT PATH VARIABLE | |
* -------------------------- */ | |
$fa-font-path: "font-awesome/fonts/"; | |
/* -------------------------- */ |
This file contains hidden or 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 plugin template by https://github.com/publicJorn | |
* Features: | |
* - dynamic plugin name (only supply once) so it's easy to change later | |
* - plugin factory to make it work in the browser, or with AMD / COMMONJS modules | |
* - Plugin instance is saved on the selector element | |
* - Default options are saved to the instance in case you need to figure out a difference between passed options | |
*/ | |
(function(global, factory) { | |
'use strict'; |
This file contains hidden or 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
### dry run | |
wp search-replace 'live-site.com' 'test-site.test' --skip-columns=guid --dry-run | |
### for real | |
wp search-replace 'live-site.com' 'test-site.com' --skip-columns=guid | |
### add admin user | |
wp user create jasper [email protected] --role=--role=administrator |
This file contains hidden or 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
function cptui_register_my_taxes_event_category() { | |
/** | |
* Taxonomy: Event Categories. | |
*/ | |
$labels = [ | |
"name" => __( "Event Categories", "custom-post-type-ui" ), | |
"singular_name" => __( "Event Category", "custom-post-type-ui" ), | |
]; |