$_img ) { if ( substr( $_img, 0, strlen( "{$img_name}" ) ) === "{$img_name}" ) { unset( $new_candidates[ $_key ] ); } } $GLOBALS['prevdem_img'] = $new_candidates; return apply_filters( 'islemag_prevdem_home_uri_filter', get_template_directory_uri() . '/ti-prevdem/img/' ) . $img_name; } /** * Filter thumbnail image * * @param string $input Post thumbnail. */ function islemag_the_post_thumbnail( $input ) { if ( empty( $input ) ) { $placeholder = islemag_get_prevdem_img_src(); return ''; } return $input; } add_filter( 'islemag_get_prev_img', 'islemag_the_post_thumbnail' );