JakubMarian (@jakubmarian)

Forum Replies Created

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

  • JakubMarian
    Participant

    @jakubmarian

    Have you created the topic using the form that’s part of the forum, or using the administration panel? If I use the administration panel, everything is saved as it should; however, when I use the submit form in the forum, characters get converted to HTML entities.

    I tested it using a clean installation of the latest version of WordPress with the default theme where the only plugin installed was bbPress, with exactly the result I have described above.


    JakubMarian
    Participant

    @jakubmarian

    But how do I make the values accessible to the class? If the getter just gets the value from global variables, it will see them as empty as well. I think I’ll just write another version of the script used in the header and include it in the theme files. It’s silly, because some of the work will have to be done twice every time the forum is loaded, but it is still the least performance-hurting way to do that.


    JakubMarian
    Participant

    @jakubmarian

    I could, but adding two database queries (that’s what update/get_option() does) for each variable I need to pass to the theme files is ridiculous; this could considerably hurt the website performance.

    Even worse, it could even completely fail if several users used the website at the same time, because the option has just one common value for all users. If the script preparing the website for another user rewrites the value before your script reaches the point where the value is read from the database, you get a wrong value.

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