I still got some problem.
I use Postie 1.4.30 and Polylang 0.9.8.
I put the code:
<?php
function add_polylang_language($post) {
foreach ($post['post_category'] as $key=-->$cat) {
$term = term_exists($cat, 'language');
if ($term) {
global $polylang;
$polylang->set_post_language($post['ID'], $term['term_id']);
unset($post['post_category'][$key]);
}
}
return $post;
}
add_filter('postie_post', 'add_polylang_language');
?>
in a file named filterPostie.php directly in the folder wp-content and then nothing happens when I send an e-mail. When I run postie manually it outputs:
Checking for mail manually
Starting mail fetch
Time: 2013-01-24 19:01:53 GMT
and then it halts. When I remove the filterPostie.php the e-mails are being received again like before, without language prefix if they are received automatically and with language prefix if I press “run postie”.
Am I supposed to do any changes in the code above?