WPML
wpml_apply_save_attachment_actions
Type
filter
Category
Updating Content
WPML Version
4.4.0

Description

When returning true, WPML will synchronize the attachment with its translations (status, terms, custom fields).

Arguments

A boolean to enable or not the synchronization (default: false)


$post_id

(integer) The attachment ID being processed.

Example usage

/**
* @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 );

wpml_set_translation_mode_for_post_type, wpml_st_force_translate_admin_options

All 3 Updating Content hooks →