Between [company name]
And [customer name].
window.mobileCheck = function() { | |
let check = false; | |
(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v |
<? | |
# MIT license, do whatever you want with it | |
# | |
# This is my invoice.php page which I use to make invoices that customers want, | |
# with their address on it and which are easily printable. I love Stripe but | |
# their invoices and receipts were too wild for my customers on Remote OK | |
# | |
require_once(__DIR__.'/../vendor/autoload.php'); |
# Based on this answer: https://stackoverflow.com/a/61859561/1956278 | |
# Backup old data | |
Rename-Item -Path "./data" -NewName "./data_old" | |
# Create new data directory | |
Copy-Item -Path "./backup" -Destination "./data" -Recurse | |
Remove-Item "./data/test" -Recurse | |
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory | |
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse |
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": [ | |
{ | |
"command": "copy", | |
"keys": "ctrl+shift+c" | |
}, | |
{ | |
"command": "paste", |
<?php | |
/** | |
** look up and index a value from a post relationship field | |
** set the datasource to the relationship field | |
** get the post id of that related post and use it to | |
** lookup its associated value | |
** for ACF you may want get_field() instead of get_post_meta() | |
** remember to do a full re-index after adding code | |
** check the wp_facetwp_index table if needed to see what values are being indexed | |
**/ |
<?php | |
function has_an_active_subscriber( $product_id = null ){ | |
// Empty array to store ALL existing Subscription PRODUCTS | |
$products_arr = array(); | |
$products_subscr = get_posts( array( | |
'numberposts' => -1, | |
'post_status' => 'publish', |
/* | |
Here we're filtering the site_url() and get_site_url() functions which are called dozens and dozens of times during a request. | |
In this case we only want to modify $url if the filter was called from a particular PHP class (rtCamp\WP\Nginx\Helper) | |
*/ | |
add_filter( 'site_url', function( $url = '' ) { | |
$backtrace = wp_debug_backtrace_summary(); | |
if ( stripos( $backtrace, 'rtCamp\WP\Nginx\Helper' ) ) { | |
$url = str_replace( 'https://', 'http://', $url ); | |
} | |
return $url; |