« first day (1010 days earlier)      last day (3923 days later) » 

12:51 AM
hmm apparently this exists now wphooks.info
 
 
10 hours later…
10:41 AM
@Sven I use 'mp6' === get_user_option( 'admin_color' ) to check if MP6 is active. If so, set the icon in add_menu_page() to div and enqueue styles. Otherwise just put the URL to png file in add_menu_page()
Also, don't bother adding styles for the x32 screen icon in MP6
 
Good idea! I'll try it and add it to my blogpost tonight :)
I've got a lot of work to do right now...
 
11:08 AM
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
	require __DIR__ . '/vendor/autoload.php';
} else {
	wp_die( 'This plugin install is incomplete, run <code>composer install</code> on the <code>wp-content/plugins/'.basename(__DIR__).'</code> plugin folder to install dependencies.</p><p>For instructions on installing composer:</p><ul><li><a href="http://getcomposer.org/doc/00-intro.md#installation-nix"> see here for *nix</a></li><li><a href="http://getcomposer.org/doc/00-intro.md#installation-windows">here for Windows</a></li></ul>' );
@Rarst a little graceful failure for those unaware of composer who blindly clone/checkout?
 
@TomJNowell good idea, but needs more elaborate check - if there isn't vendor dir in plugin it might simply mean it's on site's level
 
indeed, perhaps a check on composer.lock?
 
maybe just class_exists().... will think, it's before tea and I have site to pimp bit later
 
 
3 hours later…
2:00 PM
Your Guide to Composer in WordPress http://composer.rarst.net/ #ComposerPHP #WordPress
@userabuser there, happy? :)
 
@Rarst I will be tomorrow when I digest that! Yipee :D
nice work... one small step forward to making WP feel like modern php env.
 
tomorrow?.. after all that nagging? :)
 
who was I kidding, read it already :D
 
2:27 PM
@Rarst have you tried using Doctrine in a plugin yet?
 
Doctrine what? there is a lot of stuff in Doctrine
 
nope. I use cache here and there (not in WP yet). really I want Doctrine Cache for WP object cache, will get on that some time
 
I've got it working in a plugin
cli-config.php in the tutorial gives out broken code which was a hassle but its creating schemas now and working fine
I should probably put it up as a boilerplate plugin
Pimple/Doctrine/Composer plugin wordpress
 
someone on Twitter was recently talking about Laravel orm with WP, but no links given so might have been private stuff
 
why freeagent-plugin file name? :)
 
argh
fixed
 
3:11 PM
Seam back end in CWP is at consistent 10ms per transaction... overoptimized :) should have spend some time on Apache instead... which I still can on other hand
 
3:53 PM
@Rarst looks good, maybe mention composer "update" since it's a key feature(at least to me)
 
I didn't want to be retelling docs, so I focused on WP-specific parts and slapped links to documentation all over
also updates are tad shaky with wpackagist so far
 
ya good point, I wasn't really familiar with composer until I tried it couple weeks ago
 
low adoption :) but I hope it will go up fast, because it's way nicer to use than version control stacks nightmare
 
4:25 PM
@Rarst you need to focus on making the first bit thats read on the homepage easier to digest and simpler
perhaps a brief paragraph left aligned and on the right a simple wp plugin composer.json
and try not to use dependency manager as the explanation, if you dont grasp the need or desire for a dependency manager the whole thing is lost on the reader
package manager, installer, etc
 
need a break from it for fresh view. my head was in it for a week non-stop
 
4:57 PM
404 for queryposts.com/?s=maybe+unserialize Hey, this shouldn’t happen! :P
 
@toscho :( yeah, need to make search fuzzier...
 
 
4 hours later…
8:30 PM
Is it a good idea to use is_plugin_active() within an add_action() to trigger another add_action();or would I rather check for get_user_option with an conditional?
How do I measure which one is faster?
 
@Sven xdebug, xhprof... but really as for performance most things in WP don't make a dent ont the background of core itself
 
@Rarst Okay, thx :)
 
9:24 PM
@Sven the way I see it, get_user_option is future-proof; if something changes in the MP6 plugin or it gets moved into core, as long as the pre_get_user_option filter is still in place (which it would be, to maintain backwards compat), the code will still work. Nobody's going to fake an active plugin when MP6 is moved to core
 
@bungeshea :)
@bungeshea Nice! Good point! I will definitely add this to my blogpost :)
 
@Sven just curious, what format do you have the icons in? I am using three inline base64'd SVGs as CSS background images for the three menu states, but I'm not sure what the latest spec was
btw if you use Emmet or Compass, they can do the base64'ing for you
 
@bungeshea I'm also using it as base64 inline; I converted it as an iconfont, so I'm only having one icon while changing the color/background-color for the menu states via CSS
 
9:39 PM
Iconfonts, cool
 
This is only possible for flat icons (like the MP6 icons); It's kinda difficult if you are having more realistic/graphic icons
 
10:02 PM
@bungeshea Thx, again for the explanation. I've added it to the post: hofmannsven.com/2013/laboratory/wordpress-dashicons
 

« first day (1010 days earlier)      last day (3923 days later) »