• i have my selfhosted theme update service witch works perfectly on normal wordpress instalation,

    On multisite the functions.php file of the theme is not executed/included, so the update hook is not added.

    the file is only included (appeart to upgrade) when i activate the theme on the main site of the network.

    anyone knows ho to add the update hook/filter to the network update?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Remember, Multisite upgrades plugins and themes via the network admin, not per-site, so the update hook would have to be called via that.

    What kind of code are you using for that?

    Thread Starter Andrés

    (@odosuiadan)

    i’m using w-sahdow’s class
    https://w-shadow.com/blog/2011/06/02/automatic-updates-for-commercial-themes/

    this class uses the
    add_filter('site_transient_update_themes', array($this,'injectUpdate'));
    function to add the hook,

    point is: i tried to put a simple echo “TEST”; in my themes function.php file, and then go to the network admin panel. “TEST” only is printed (in network andmin) if i have activated the theme on the main site of the network.

    my conclusion is that the same happens to the hook, since , i think, the themes function.php file is only included if the theme is active in the networks main site (don’t know why it must be the main site).

    I don’t know how to add the “update check” hook if functions.pho is not included.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Ah, okay, what’s at work here is that the normal theme information that you’d see in a single site is moved to Network admin. couple that with the fact that the function only gets called if the theme is active and the fact that the network utelizes the main site theme (site 1 is the master site), yeah, I’d expect to see all that :/

    Tl;dr
    Updating themes is the purview of network -> themes on Multisite.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘selfhosted theme update not working properly’ is closed to new replies.