Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 31

Thread: WordPress theme repository

  1. #11
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Default

    My worry is that the new install from the admin panel is going to make it much harder for themes that aren't in the repository.

    To be quite honest I think WordPress needs to be more flexible about where it can get its themes from.

  2. #12
    andrea_r's Avatar
    andrea_r is offline WordPress Rockstar
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,325

    Default

    Well, the plugin installer is already in, but you can still install plugins manually.

  3. #13
    Ryan's Avatar
    Ryan is offline WordPress Legend
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,801

    Default

    Quote Originally Posted by davecoveney View Post
    My worry is that the new install from the admin panel is going to make it much harder for themes that aren't in the repository.
    I think WordPress.org would be quite happy with that. I'd guess they're keen to get as many different themes into the repository as possible.

  4. #14
    davecoveney is offline Tavern Regular
    Join Date
    Jan 2009
    Posts
    211

    Default

    I just think there should be a way for plugin and theme developers to easily have their work picked up and installed from other repos.

    The whole point of community projects is that all power isn't concentrated in one place - if it is, then a lot of the charm goes.

    Ultimately, after several years in the community I no longer really know who it is who makes decisions on how WordPress.org is run, nor how those decisions are reached. It's not really an open project in that sense. One of my concerns is that WordPress is a rival to WordPress.com and that having them so close together means that some decisions may be being made, if perhaps only subconsciously, that could be designed to favour the money making system over the best interests of the WP community.

    It's this kind of thing that has had me looking at other CMSs, regardless of how good WordPress is (and it's very very good.)
    Last edited by davecoveney; 05-19-2009 at 03:02 AM.

  5. #15
    dancole's Avatar
    dancole is offline Tavern Regular
    Join Date
    Jan 2009
    Location
    USA
    Posts
    237

    Default

    Quote Originally Posted by davecoveney View Post
    I just think there should be a way for plugin and theme developers to easily have their work picked up and installed from other repos.
    I've personally looking into how the WordPress code gets its data and even wrote some code to allow a theme not in the WordPress.org Repository to automatic updates from another source.

    If Theme Developers wanted to expand the WordPress.org software to get information from other locations, all they would have to do is package some functions with plugins they make. Even though, I think Automatic would catch on and it wouldn't be there for everyone, but it's an option.
    Dan Cole, Future Engineer.

  6. #16
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    865

    Default

    It's quite possible for a plugin or theme to hook into the auto-update functions and make it check/get updates from elsewhere. Since we're talking about themes here, I'll talk about that first.

    The theme update is a twicedaily cron job. This fires a hook to wp_update_themes. This action hook calls the wp_update_themes() function, which goes and makes a hit to api.wordpress.org with the theme names and versions. The response gets taken and stored in a transient option called update_themes.

    Transient options may be new to you, because they're new to 2.8. Transient options are just like normal options except for a few things:
    1. New functions to deal with them: set_transient and get_transient.
    2. Transient options expire after some time period. After the timeout, the option, from your point of view, ceases to exist. Internally, this means that if you try to get a transient, and it's timed out, then the transient is removed from the database and you get returned false.
    3. If you happen to be using a object caching plugin to speed up your WordPress, then these options do not get stored in the database, only in the cache.
    4. If #3 is not the case, then they get stored as normal options, with _transient_ in front of their names, and with a corresponding _transient_timeout_ option as well.

    The best way to think of them is basically just as options with a timeout and leave the details alone.

    Anyway, the update_themes transient is an array which you'll need to look at in order to understand its structure. It's pretty simple, actually.

    Once you've examined the structure of it, then actually making your theme check for updates is simple. Here's the basic gist of it:
    a) Make a function to check your own site for updates.
    b) Make that function get and then modify the update_themes transient accordingly.
    c) Hook your new function into the wp_update_themes action hook.
    d) Put that code into your theme's functions.php file.

    Voila. When your theme is the active theme, then the auto-update will now make it hit your site and check for updates every 12 hours (this is a maximum limit, not a minimum... it could take longer... also, it's 60 minutes if they go directly to the themes page in the admin screens). The important thing here is that however you do it, your site needs to be *FAST* in order to respond to this sort of thing. My advice would be to simply have a static text file with the proper response on your server that you just update manually when you release a new theme version, and have it retrieve that. Remember that anybody using your theme is now going to hit your site every 12 hours, after all, you don't want to kill your server.

    Also, look closely at the theme_update_available() function, as you can make the theme update automatically, notify only, or just provide the user a link to go get the theme so that they can update it manually.

    Providing a link to the new theme is easy. Automatic updating is a bit trickier, but can still be done, if you want.

  7. #17
    Brad is offline Here For The Peanuts
    Join Date
    Jan 2009
    Location
    USA
    Posts
    142

    Default

    Otto,

    I'm a little lost here.

    Does 2.8 effectively "phone home" looking for an update of my activated theme checking against the theme repository? Is that a user controlled option that can be turned of in admin?

    Does it look for updates for ALL "installed themes" or just the "activated" theme?

    What happens (in layman's terms) when I have a theme installed and/or activated that has not made it into the repository?

  8. #18
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    Well, Otto provides the methods on how it could be done, but I personally wouldn't like to see support added to WordPress to allow theme or plugin authors to use their sites as mini repositories. Considering plugins seem to have free reign on your blog, I think something like this would really increase the hazard of bad plugins being installed, especially if the mini repositories were browseable from the backend of WordPress or the repository itself.

    I do remember asking Matt if they ever planned on adding support for automatic theme or plugin upgrades to take place outside of the repository and he said no.

  9. #19
    Otto's Avatar
    Otto is offline On The Rocks
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    865

    Default

    Quote Originally Posted by Brad View Post
    Does 2.8 effectively "phone home" looking for an update of my activated theme checking against the theme repository?
    Yes.

    Quote Originally Posted by Brad View Post
    Is that a user controlled option that can be turned of in admin?
    No. A plugin will likely exist to disable checking, in the same way that plugins already exist to disable checking of the core and plugin updates now.

    Quote Originally Posted by Brad View Post
    Does it look for updates for ALL "installed themes" or just the "activated" theme?
    All. This takes the same amount of time as checking for just one, so there's no reason not to check them all. It's one http request/response no matter how many they check for.

    Quote Originally Posted by Brad View Post
    What happens (in layman's terms) when I have a theme installed and/or activated that has not made it into the repository?
    Same as with the plugin update checker now, a plugin not in the repository doesn't get any response back for it and so never shows an update being available.

    Quote Originally Posted by Jeffro View Post
    Well, Otto provides the methods on how it could be done, but I personally wouldn't like to see support added to WordPress to allow theme or plugin authors to use their sites as mini repositories. Considering plugins seem to have free reign on your blog, I think something like this would really increase the hazard of bad plugins being installed, especially if the mini repositories were browseable from the backend of WordPress or the repository itself.
    I've already seen plugins that do hook into the necessary bits to do this sort of thing for themselves. And why not? I mean, if you're running a plugin, then the author already has free reign. Making it check back with his own site is already possible, even without the update checking code.

    Edit: Note that I'm only talking about update checking and automatic upgrading here. The plugin *browser* thing is a whole different kettle of fish. Replacing or adding to that is whole another level of magnitude.

    Quote Originally Posted by Jeffro View Post
    I do remember asking Matt if they ever planned on adding support for automatic theme or plugin upgrades to take place outside of the repository and he said no.
    Fair enough, but the whole thing is already based on a hook system. Hooking your own functions in is one line of code. There's nothing they need to do to "allow" it, it's inherent in the design.

    I think what Matt might have meant is that there's no plans for letting plugin authors hook into the backend at api.wordpress.org. There's never been anything stopping an author from having a plugin or theme make an http request back to their own site for any reasons they prefer.

  10. #20
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,359

    Default

    Otto, would there be any way you could write a guest post explaining how the update checking/process works? Or just post it on your blog and I'll link to it.

Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •