There’s no “updated” column in the wp_options
table.
mysql> describe wp_options;
+--------------+-----------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+-----------------+------+-----+---------+----------------+
| option_id | bigint unsigned | NO | PRI | NULL | auto_increment |
| option_name | varchar(191) | NO | UNI | | |
| option_value | longtext | NO | | NULL | |
| autoload | varchar(20) | NO | MUL | yes | |
+--------------+-----------------+------+-----+---------+----------------+
4 rows in set (0.07 sec)
If you need to know when an option was updated, you’ll need to inject that information into the option itself. If you’re managing the code, it’s easy enough: just add a new field to the array that you’re saving.
eg:
update_option(
'instagram',
array(
'username' => 'semirtravels',
'user_id' => '{your user ID}',
// ...
'last_updated' => time(),
)
);
If not, you might be able to intercept it using the pre_update_option_{$option}
filter hook:
add_filter( 'pre_update_option_instagram', 'wpse_400857_add_updated_time', 10, 3 );
/**
* Adds the current time() to the value of the `instagram` option.
*
* @param mixed $value The option's value.
* @param mixed $old_value The option's previous value.
* @param string $option The option name.
* @return mixed The filtered option value.
*/
function wpse_400857_add_updated_time( $value, $old_value, $option ) {
$value['last_updated'] = time();
return $value;
}