Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cvons

    (@cvons)

    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?

    Thread Starter cvons

    (@cvons)

    Thanks for the answers.
    I’m afraid that the development version of Polylang doesn’t seems to help.

Viewing 2 replies - 1 through 2 (of 2 total)