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_action( 'woocommerce_customer_save_address', 'jsforwp_update_address_for_orders', 10, 2 ); | |
function jsforwp_update_address_for_orders( $user_id ) { | |
$customer_meta = get_user_meta( $user_id ); | |
$customer_orders = get_posts( array( | |
'numberposts' => -1, | |
'meta_key' => '_customer_user', |
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 | |
/** | |
* Postmark Headers for Gravity Forms. | |
* | |
* @param [type] $email Email. | |
* @param [type] $message_format Message Format. | |
* @param [type] $notification Notification. | |
*/ | |
function postmark_headers_for_gravityforms( $email, $message_format, $notification, $entry ) { | |
$entry_id = $entry['id'] ?? ''; |
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
https://gist.github.com/paulund/6687336 | |
https://wpdatatables.com/crud-system-in-wordpress/ | |
https://www.davidangulo.xyz/how-to-create-crud-operations-plugin-in-wordpress/ | |
https://wpdataaccess.com/2020/04/08/how-to-use-wp-data-access-classes-in-your-own-php-code/ | |
https://paulund.co.uk/crud-queries-for-wordpress-custom-tables |
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 | |
/* Exit if accessed directly. */ | |
defined( 'ABSPATH' ) || exit; | |
// Require WordPress Upgrade. | |
require_once ABSPATH . 'wp-admin/includes/upgrade.php'; | |
function upgrade_v2() { |
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 | |
// Exit if accessed directly. | |
defined( 'ABSPATH' ) || exit; | |
if ( ! class_exists( 'Google_Cloud_Functions' ) ) { | |
/** | |
* Google Cloud Functions | |
*/ |
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
#!/usr/bin/env bash | |
command -v bc > /dev/null || { echo "bc was not found. Please install bc."; exit 1; } | |
{ command -v drill > /dev/null && dig=drill; } || { command -v dig > /dev/null && dig=dig; } || { echo "dig was not found. Please install dnsutils."; exit 1; } | |
NAMESERVERS=`cat /etc/resolv.conf | grep ^nameserver | cut -d " " -f 2 | sed 's/\(.*\)/&#&/'` | |
PROVIDERS=" |
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
DELETE FROM wp_usermeta | |
WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
) |
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
#!/usr/bin/env bash | |
# purpose delete inactive WordPress themes | |
WPPATH="" | |
WPFLAGS="--path=${WPPATH} --skip-plugins --skip-themes --allow-root" | |
THEMEEXCEPTIONS=( | |
twentynineteen | |
) |
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
.dataTables_info { | |
float:right; | |
margin-right:7px; | |
padding:10px; | |
} | |
.dataTables_paginate { | |
float:right; | |
height:28px; | |
margin-top:3px; |
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 | |
/** | |
* Portable PHP password hashing framework. | |
* | |
* @package phpass | |
* @since 2.5.0 | |
* @version 0.3 / WordPress | |
* @link http://www.openwall.com/phpass/ | |
*/ |