/** * ERC Utilities * */ function get_Cid($s_id, $user_id, $insert = null) { if (!$s_id || !$user_id) return null; $user = new WP_User($user_id); // if (!in_array(‘client’, $user->roles)) return null; $show = get_city($s_id) . ‘ ‘ . get_year($s_id); $loop = new…Continue reading
add_filter( ‘aioseo_report_summary_enable’, ‘__return_false’ );Continue reading
add_filter( ‘pre_load_textdomain’, ‘__return_false’, -5 ); add_filter( ‘pre_load_script_translations’, ‘__return_false’, -5 );Continue reading
/** * Assigns a specific WordPress user role based on the selected value in a WPForms multiple-choice field. * * @link https://wpforms.com/how-to-assign-user-roles-conditionally-in-wordpress/ * * @param array $user_data Array containing user registration data. * @param array $fields Array of form fields…Continue reading
// Gravity Forms hook for form 5 (vendor) add_action(‘gform_after_submission_5’, function ($entry, $form) { $post_id = rgar($entry, ‘1’); if (!$post_id || get_post_type($post_id) !== ‘vendor’) return; // Check if the required meta fields exist if (!get_post_meta($post_id, ‘target_market_1_city’, true)) return; // Update taxonomy…Continue reading
function wpb_set_post_views($postID) { $count_key = ‘wpb_post_views_count’; $count = get_post_meta($postID, $count_key, true); if($count==”){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, ‘0’); }else{ $count++; update_post_meta($postID, $count_key, $count); } } //Get rid of prefetching to keep the count accurate remove_action( ‘wp_head’, ‘adjacent_posts_rel_link_wp_head’, 10,…Continue reading