是的,非常肯定。将下面的框架代码作为一个函数的基础,该函数可以执行您想要的操作,并将其放置在您的函数中。php:
function your_vimeo_meta_function ($post_id) {
// some verifications first
if ( $post_id == null || empty($_POST) )
return;
if ( !isset( $_POST[\'post_type\'] ) || $_POST[\'post_type\']!=\'post\' )
return;
if ( wp_is_post_revision( $post_id ) )
$post_id = wp_is_post_revision( $post_id );
global $post;
if ( empty( $post ) )
$post = get_post($post_id);
/*
* do your vimeo stuff here
*/
update_post_meta($post_id, \'your_vimeo_key_name\', $your_vimeo_value);
// if this key doesn\'t exist, it will be created. If it exists, it will be updated
}
add_action(\'save_post\', \'your_vimeo_meta_function\', 12 );