Update Vendor/Venue Post

// Update Vendor and Venue Posts // Update existing post title, content, author and custom fields with values from Gravity Forms. class GW_Update_Posts { protected $_args; public function __construct( $args = array() ) { // Set our default arguments, parse…Continue reading

PHP [Gravity Wiz]: Update Vendor Post

/** // * Gravity Wiz // Gravity Forms // Update Posts // * https://gravitywiz.com/how-to-update-posts-with-gravity-forms/ // * // * Update existing post title, content, author and custom fields with values from Gravity Forms. // * // * @version 0.6 // *…Continue reading

Fix Image Caption Rendering Issue Caused by WPResidence Theme

if(!function_exists(‘wp_get_attachment’) ) : function wp_get_attachment( $attachment_id ) { $attachment = get_post($attachment_id); if( $attachment ) { $caption = function_exists(‘aioseoImageSeo’) ? aioseoImageSeo()->tags->replaceTags(aioseo()->options->image->caption->format, $attachment->ID, ‘caption’) : $attachment->post_excerpt; return array( ‘alt’ => get_post_meta($attachment->ID, ‘_wp_attachment_image_alt’, true), ‘caption’ => $caption, ‘description’ => $attachment->post_content, ‘href’ => esc_url(get_permalink($attachment->ID)),…Continue reading

Add post meta if content has WP Tasty

add_filter( ‘tasty_pins_old_attributes_migration_content’, function ( $content, $post ) { if ( str_contains( $content, ‘WP Tasty’ ) ){ update_post_meta( $post->ID, ‘wp-tasty-here’, true ); } // You can also change $content to modify the contents of the post. return $content; }, 10, 2…Continue reading

NSB News and Events Aggregator

// Include Simple HTML DOM parsing library if needed (you can also manually include it if necessary) if (!function_exists(‘file_get_html’)) { function file_get_html($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $output = curl_exec($ch); curl_close($ch); return…Continue reading

NSB News and Events Aggregator

// Include Simple HTML DOM parsing library if needed (you can also manually include it if necessary) if (!function_exists(‘file_get_html’)) { function file_get_html($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $output = curl_exec($ch); curl_close($ch); return…Continue reading

Untitled Snippet (copy)

// Include Simple HTML DOM library for scraping (You may need to download and include this library). if (!function_exists(‘file_get_html’)) { function file_get_html($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $output = curl_exec($ch); curl_close($ch); return…Continue reading

Submit Vendor and Venue Profile Claims on User Activation

// Description: // This script processes vendor and venue profile claims upon user activation in WordPress, leveraging Gravity Forms activation hooks. It normalizes business names for consistency, locates matching posts, updates claim metadata, and sends admin notifications. The script is…Continue reading

Vendor Claims Handling on User Activation in WordPress

// Description: // This script manages vendor profile claims within WordPress upon user activation, integrating Gravity Forms activation hooks and handling the normalization of business names for better matching. It adds functionality to normalize and find matching vendor posts by…Continue reading