Disable Automatic Updates Emails

// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading

Buy with Prime

add_action( ‘woocommerce_after_add_to_cart_form’, ‘QL_add_text_under_add_to_cart’ ); function QL_add_text_under_add_to_cart () { global $product; ?>Continue reading

Buy with Prime

add_action( ‘woocommerce_after_add_to_cart_form’, ‘QL_add_text_under_add_to_cart’ ); function QL_add_text_under_add_to_cart () { global $product; ?>Continue reading

(cloud) TRACKING: LOCATION

//v2.7 ////Dynamic Location Tracking define(‘LOCATION_CSV_PATH’, ‘CSV/googloc.csv’); /** * Generate unique visitor ID based on IP and user agent */ function dl2_get_visitor_id() { return md5($_SERVER[‘REMOTE_ADDR’] . ($_SERVER[‘HTTP_USER_AGENT’] ?? ”)); } function validate_zip($zip) { return preg_match(‘/^[0-9]{4,5}$/’, $zip) ? $zip : ”; }…Continue reading

User_Name

function display_logged_in_firstname() { if (is_user_logged_in()) { $current_user = wp_get_current_user(); $first_name = $current_user->first_name ? $current_user->first_name : ‘there’; return “Hi {$first_name},”; } else { return “Hi there,”; } } add_shortcode(‘user_firstname’, ‘display_logged_in_firstname’);Continue reading

(cloud) Publish & Perma-Delete

// Leo is Amazing // Add custom row actions add_filter(‘post_row_actions’, ‘add_custom_row_actions_42j51’, 10, 2); add_filter(‘page_row_actions’, ‘add_custom_row_actions_42j51’, 10, 2); function add_custom_row_actions_42j51($actions, $post) { if (current_user_can(‘delete_posts’)) { $url = wp_nonce_url(admin_url(“admin-post.php?action=permanent_delete_post&post=” . $post->ID), ‘permanent_delete_post_’ . $post->ID); $actions[‘permanent_delete’] = ‘Permanently Delete‘; } if ($post->post_status ==…Continue reading

Consultants (copy)

function create_consultant_logs_entry($log_content) { // Check if Pods is active if (!function_exists(‘pods’)) { error_log(‘Pods is not active.’); return false; } $logs_pod_name = ‘logs’; // The name of the Pod $log_entry_field = ‘log’; // The field in the Pod to store the…Continue reading

Consultants (copy)

function create_consultant_logs_entry($log_content) { // Check if Pods is active if (!function_exists(‘pods’)) { error_log(‘Pods is not active.’); return false; } $logs_pod_name = ‘logs’; // The name of the Pod $log_entry_field = ‘log’; // The field in the Pod to store the…Continue reading

Consultants

function create_consultant_logs_entry($log_content) { // Check if Pods is active if (!function_exists(‘pods’)) { error_log(‘Pods is not active.’); return false; } $logs_pod_name = ‘logs’; // The name of the Pod $log_entry_field = ‘log’; // The field in the Pod to store the…Continue reading