We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b13e29 commit be2d51bCopy full SHA for be2d51b
php/integrations/class-wpml.php
@@ -144,7 +144,7 @@ public function setup_cron() {
144
* @return string|null
145
*/
146
public function add_wpml_context( $context, $attachment_id ) {
147
- if ( 'attachment' === get_post_type( $attachment_id ) ) {
+ if ( is_null( $attachment_id ) || 'attachment' === get_post_type( $attachment_id ) ) {
148
$context = apply_filters( 'wpml_current_language', null );
149
}
150
0 commit comments