• laxmana

    (@laxmana)


    Hi

    I tried to use the alo_easymail_newsletter_content filter by adding add_filter(‘alo_easymail_newsletter_content’, ‘my_custom_function’); but I notice that it also filters my html template.

    Is that the normal behavior of this filter ?

    Thanks in advanced and thanks for the great plugin and your time.

    https://www.ads-software.com/plugins/alo-easymail/

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

    (@laxmana)

    I manage to do it like this:

    $newsletter_id = $_POST['newsletter'];
    
    $posts = get_post_meta($newsletter_id, '_placeholder_easymail_mod_posts', true);
    
    $newsletter = get_post($newsletter_id);
    
    $newsletter_content = $newsletter->post_content;
    Plugin Author eventualo

    (@eventualo)

    Sorry for delay…
    About your 1st post, you are right: the filters are applied to entire newsletter content, including html template. You could change priority in your filter (e.g. 7 instead of 10) to be executed before standard plugin filters:

    add_filter ( 'alo_easymail_newsletter_content',  'my_custom_function', 7, 4 );

    About your 2nd post, I think your code is right.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter Newsletter Content Filters HTML Template’ is closed to new replies.