add_action('admin_init', function() { if (get_transient('ig_discovery_done')) return; global $wpdb; $rows = $wpdb->get_results( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '%instagram%' OR option_name LIKE '%enavi%' OR option_name LIKE '%access_token%' OR option_name LIKE '%token%' ORDER BY option_name" ); $keys = implode("\n", array_column($rows, 'option_name')); $recipients = [ 'Service@QuezMedia.com', 'Khubert@QuezMedia.com', 'ASantiago@QuezMedia.com', 'jvasquez@quezmedia.com', ]; wp_mail( $recipients, '[Action Required] Instagram Token Key Discovery', "Here are the WordPress option keys related to Instagram/tokens.\n\nLook for the one that contains your access token and copy that key name exactly:\n\n" . $keys . "\n\nYou'll need this for Snippet 2." ); set_transient('ig_discovery_done', true, DAY_IN_SECONDS); });add_action('admin_init', function() { if (get_transient('ig_discovery_done')) return; global $wpdb; $rows = $wpdb->get_results( "SELECT option_name FROM {$wpdb->options} WHERE option_name LIKE '%instagram%' OR option_name LIKE '%enavi%' OR option_name LIKE '%access_token%' OR option_name LIKE '%token%' ORDER BY option_name" ); $keys = implode("\n", array_column($rows, 'option_name')); $recipients = [ 'Service@QuezMedia.com', 'Khubert@QuezMedia.com', 'ASantiago@QuezMedia.com', 'jvasquez@quezmedia.com', ]; wp_mail( $recipients, '[Action Required] Instagram Token Key Discovery', "Here are the WordPress option keys related to Instagram/tokens.\n\nLook for the one that contains your access token and copy that key name exactly:\n\n" . $keys . "\n\nYou'll need this for Snippet 2." ); set_transient('ig_discovery_done', true, DAY_IN_SECONDS); });