• For the past several weeks, I’ve noticed that the General Settings on my site would occasionally just…disappear. In particular, the Site Title, Timezone, Date Format, and Time Format. Pulled my hair out trying to figure out why my posts were suddenly publishing on UTC time.

    I just figured it out. Those settings disappeared when I entered my API key in the Yo admin page.

    And then, when I’d notice that the general settings were gone and I reentered those…the API key would disappear from Yo.

    Looking through the code, I believe I figured out the problem: For some reason, you’re associating the setting for the API key with WP’s general settings. Here:

    function register_yo_setting() {
        register_setting( 'general', 'yo_api_key');
    }

    and here:

    echo settings_fields( 'general' );

    In both cases, I just renamed ‘general’ to ‘yogeneral’ and the disappearing settings and API key stopped disappearing. It would be great to fix this — drove me crazy.

    https://ww.wp.xz.cn/plugins/yo/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Bug that resets general settings’ is closed to new replies.