// 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
//v2.5 ////Dynamic Location Tracking define(‘LOCATION_CSV_PATH’, ‘CSV/googloc.csv’); if (!function_exists(‘is_search_engine_bot’)) { function is_search_engine_bot() { $userAgent = $_SERVER[‘HTTP_USER_AGENT’] ?? ”; if (stripos($userAgent, ‘google’) !== false || stripos($userAgent, ‘bing’) !== false || stripos($userAgent, ‘msn’) !== false || stripos($userAgent, ‘yandex’) !== false || stripos($userAgent, ‘baidu’)…Continue reading
add_filter( ‘action_scheduler_retention_period’, function () { return WEEK_IN_SECONDS; } );Continue reading
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
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
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
// Redirect all users to a specific page after login from a specific login page function custom_mepr_login_redirect_url($url, $user) { // Check the referrer to see if the login request came from a specific page if (isset($_SERVER[‘HTTP_REFERER’])) { $referrer = $_SERVER[‘HTTP_REFERER’];…Continue reading
// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading
// Redirect users after login based on their roles function custom_mepr_login_redirect_url($url, $user) { // Check if the user object is valid if (isset($user->roles) && is_array($user->roles)) { // Roles that should be redirected to the WordPress dashboard $admin_roles = array(‘administrator’, ‘editor’,…Continue reading