wpml_apply_save_attachment_actions
- Type
- filter
- Catégorie
- Mise à jour du contenu
- Version de WPML
- 4.4.0
Description
Lors du renvoi de true, WPML synchronisera la pièce jointe avec ses traductions (statut, termes, champs personnalisés).
Arguments
Un booléen pour activer ou non la synchronisation (par défaut : false)
- $post_id
- (entier) L’ID de la pièce jointe en cours de traitement.
Exemple d’utilisation
/**
* @param bool $isEnabled
* @param int $postId
*/
function myplugin_apply_save_attachment_actions( $isEnabled, $postId ) {
return true;
}
add_filter( 'wpml_apply_save_attachment_actions', 'myplugin_apply_save_attachment_actions', 10, 2 );
Hooks associés
wpml_set_translation_mode_for_post_type, wpml_st_force_translate_admin_options