Home Forums Newsletter Plugin Support Theme options problem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #11360
    Paul Bakker

    Hi Stefano,

    Thank you for this amazing plugin!
    I’m on version 3.5.9, and I think I discovered a bug in controls.php.
    On line 190, where the $value_array is searched for an option name, the object you’re looking for is $value. It should be $key.

    After changing that locally, somehow when going to step “(2) Go to edit this message” the plugin still doesn’t remember my options.
    I’m creating my own theme.
    My scenario:
    I have two select boxes, one of which points to a post containing the html for the html-part of an e-mail, the other to a post containing the text version.

    theme-options.php contains:

    $controls->select_group('theme_newsletter_post_html', $posts_hash); where $posts_hash contains key/value pairs like "newsletter-html-source" => "newsletter-html-source" and likewise $controls->select_group('theme_newsletter_post_text', $posts_hash);

    In theme.php:

    $newsletter_post = $theme_options['theme_newsletter_post_html'][0]
    $my_post = get_page_by_title( $newsletter_post, OBJECT, 'post' );
    echo $my_post->post_content;

    plus some context.

    Can you tell why the options don’t survive through to step 2?

    Paul Bakker


    Hi, the control “select_group” is bugged and will be fixed. Said that, the option should be saved. Try to look directly in the database the option named newsletter_emails_theme_[yourthemename] to see if the serialized data contains your option. Why not to use two regular select with different names to select the two html and text posts?

    Paul Bakker

    Thanks for suggesting the regular select. That works perfect.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.