// 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
/** // * 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
/* Get vendor post ID by user ID */ function get_vendor_post_id_by_user( $user_id ) { $args = array( ‘post_type’ => ‘vendor’, ‘author’ => $user_id, ‘post_status’ => array( ‘publish’, ‘pending’, ‘draft’ ), ‘numberposts’ => 1, ‘fields’ => ‘ids’, ); $vendor_posts = get_posts(…Continue reading
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_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
// 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
// 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
// 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
// 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