Forum Replies Created

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

    (@tfr79)

    Thanks for your time sharing your thoughts on this @akirak – from my knowledge you would just have to change line 19 to sth. this:
    $this->file_path = WP_CONTENT_DIR . '/custom-global-variables/' . md5( AUTH_KEY ) . (is_multisite() ? ('-'. get_current_blog_id()) : '') . '.json';

    Thread Starter tfr79

    (@tfr79)

    Hi @akirak, when we use your plugin on different websites of a multisite WP installation, all sites read the cgv values from the same database file. So if I define a cgv variable like “super_secret” = 12345 on one of the websites, this variable is immediately visible on any other website of the multisite network as soon as the cgv plugin is activated on that other site. And thus any change to the value affects any usages within the multisite network.

    In concrete we have prices with the same name but with a value that differs slightly between different websites of the network. This is currently not possible with cgv.

    One might rather want to keep those variables private for a single website inside the network. So my suggestion is to add sth. like get_current_blog_id() to the filename in order to keep cgv values separated from different blogs.

    • This reply was modified 4 years ago by tfr79.
Viewing 2 replies - 1 through 2 (of 2 total)