Keep first name - \s(.*)
Keep last name - ^\S*
Remove numbers from end of string \d(.*)
////////////////////////////////////////// | |
// CHANGE DEFAULT WP EMAIL FROM ADDRESS // | |
////////////////////////////////////////// | |
function wp_send_email( $original_email_address ) { | |
return '[email protected]'; | |
} | |
add_filter( 'wp_mail_from', 'wp_send_email' ); | |
/////////////////////////////////////// |
<?php | |
add_action('woocommerce_email_before_order_table', 'custom_order_header', 20, 4); | |
function custom_order_header( $order, $sent_to_admin, $plain_text, $email ) { | |
if ($email->id == 'customer_processing_order') { | |
echo '<p>Once your order is processed...</p>'; | |
} | |
} |
// https://ghostscript.com/doc/current/Ps2pdf.htm | |
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf |
grep '1/Oct/2018' /var/www/vhosts/system/*/logs/access_log | awk '{print $1,$7}' | sort | uniq -c | sort -nr | head -100 |
version: "3.3" | |
services: | |
my-wpdb: | |
image: mariadb | |
ports: | |
- "8081:3306" | |
environment: | |
MYSQL_DATABASE: wordpress | |
MYSQL_ROOT_PASSWORD: password | |
volumes: |
Keep first name - \s(.*)
Keep last name - ^\S*
Remove numbers from end of string \d(.*)
/* These functions are set to run on init and can be removed after they've run once. There is no need to keep them in the functions file */ | |
/* Credit goes to https://ryanbenhase.com/giving-editors-access-to-gravity-forms/ */ | |
////////////////// | |
// GRANT ACCESS // | |
////////////////// | |
function grant_gforms_editor_access() { | |
$role = get_role( 'editor' ); | |
$role->add_cap( 'gform_full_access' ); | |
} | |
add_action( 'init', 'grant_gforms_editor_access' ); |
<h3>JS</h3> | |
<script> | |
function setCookie(cname, cvalue, exdays) { | |
var d = new Date(); | |
d.setTime(d.getTime()+(exdays*24*60*60*1000)); | |
var expires = "expires="+d.toGMTString(); | |
document.cookie = cname + "=" + cvalue + "; " + expires + '; path=/'; | |
} |
pscp [email protected]:/home/username/file-to-download.zip C:\Users\Username\new-file.zip |