1,881 reputation
1641
bio website tomauger.com
location Toronto, Canada
age
visits member for 3 years, 1 month
seen Mar 25 at 20:52

WordPress developer. Always learning. Hoping to contribute.


Dec
3
accepted How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Nov
30
comment Is there a WP Way of getting a filehandle?
Haha, thanks Chris - this is a great writeup for people interested in learning about WP_Filesystem usage! But I'm not sure you have addressed my concern about getting the resource handle to the file. From what I can see, get_contents() returns the file as a string, not the filehandle resources that I need for my external library. If we look at, for example, the Direct implementation simply uses PHP's file_get_contents( $file ), which returns the entire file's contents as a string, but does not give you the filehandle resource. Unless I'm mistaken.
Nov
29
asked Is there a WP Way of getting a filehandle?
Nov
29
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
@bungeshea Take a look at Otto's answer wordpress.stackexchange.com/a/74122/3687. Since 1.7 Subversion DOES NOT put a .svn in every directory of your working copy.
Nov
29
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Excellent suggestion, Ralf! I wonder whether the filesystem API couldn't handle some of the things shell_exec() was attempting to accomplish...
Nov
28
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Hey @Otto, thanks for the detailed writeup. I'm in the unfortunate situation of having inherited a Linux server without a lot of knowledge about server administration - this explains my out of date Subversion (and probably a host of other things). I'll read the literature and figure out how to upgrade it, right soon! I think it might be interesting to look into writing a plugin that allows tighter integration of the WP auto-updater and various version control systems, such that the updater was a notifier, and the actual update happens through the VC system. Maybe someday I'll have the time!
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
I still don't think @Ashfame's solution is universal. Some plugins delete files, others add files. In those circumstances, more work is to be done. In between his steps, there should be at least an svn st and svn add and possibly svn rm to handle those circumstances. Probably an svn st | grep '^\?' | awk '{print $2}' | xargs svn add etc...
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Thanks Otto for the clarification. I should apologize @Ashfame for my snarky tone.
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
that's an interesting approach. sounds like a heck of a lot of custom work - basically writing a plugin to allow you to update other plugins. I wonder whether this is the basic premise behind how svn-auto-upgrade plugin is supposed to work. Sad thing is, I had that plugin installed and it still didn't do the trick...
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
I should probably check out Git eventually, but it's avoiding the question regarding SVN, which is what this project is on and I can't change that right now. Now how is .gitignore different from svn:ignore? Are you suggesting I put an ignore on my plugins dir? That would be fine, but then I have to upgrade the plugins again on the PROD environment, which could lead to more outage time than I'd like, since if there are any dependencies on the plugins, those would potentially be broken until the update were finished.
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
The issue is that your "process" is so vague and generic that it's not a solution. Look at your steps: checkout on local, do update, test, commit, checkout on production. That's a basic workflow for any situation. Furthermore, it's weird. Are you really going to "checkout" the repository on your production? What if your production is already under version control - you don't want to check it out, you want to do svn update. Are you sure you meant "checkout"? At any rate, what breaks is your step #2. As soon as you update the plugin, WP deletes the .svn folder. So now you cannot commit.
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Tried the following: copied each of the plugins to pluginname_BAK, then ran rm -r pluginname and then svn rm pluginname. To my utter surprise, when I tried to commit I then got svn:/trunk/wp-content/plugins/pluginname is out of date. SVN hell.
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
I guess it works for you, but anyway.
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Yeah, that totally doesn't work. It would be nice. But it doesn't work like that.
Nov
27
revised How do you allow plugins to be updated using the GUI without breaking your subversion repository?
added 715 characters in body
Nov
27
comment How do you allow plugins to be updated using the GUI without breaking your subversion repository?
Nope, maybe that worked before, but it ain't working now. I'll update my question, hopefully get some eyes on it.
Nov
11
awarded  Popular Question
Nov
6
comment remove_action or remove_filter with external classes?
Very cool functions. Thanks for posting that here!
Oct
23
comment Best way to initiate a class in a WP plugin?
I like this singleton-like approach. However, I question using plugins_loaded as your initializing action hook. This hook is meant to be run after all plugins have loaded. By hooking in after it, you are kind of hijacking that hook, and may fun into conflicts or startup-sequence issues with other plugins or themes that hook into plugins_loaded. I wouldn't hook into any action to run your initialization method. The plugin architecture was designed to run inline, not on an action.
Oct
16
answered Approve post directly from preview mode?