Plugin loaded, but not running

After some extended debugging we found the issue. The plugin uses Google’s url shortener api, which uses an api key for any kind of large volume. Our dev instance (more accurately the public ip assoiated with it) was under the threshold for not needing a key. Production was over but there wasn’t adequate error handling … Read more

Create Array from data in the OPTIONS table

$all_options = wp_load_alloptions(); $plugin_order_options = array(); foreach( $all_options as $name => $value ) { if(stristr($name, ‘plugin_order_’)) $plugin_order_options[$name] = $value; } print_r($plugin_order_options); In plain English: We load all WP options in $all_options. We copy options from $all_options to $plugin_order_options if their name contains plugin_order_. We print $plugin_order_options. We scratch our head, unhappy with the size of … Read more

Organizing The Custom Post Type with Taxonomies / Parent Posts

I think it could be a good idea to create two more hierarchical (category like) taxonomies, called Artists and Albums. This way, you’ll be able to query your posts based on taxonomy / term relationships. Basically, what I’m saying is this: Artists -> custom hierarchical taxonomy List item -> custom hierarchical taxonomy Songs -> custom … Read more

Displaying External Data – Not Posts

You can hook the content of any post and request data you want through WordPress HTTP API. Like this: add_filter(‘the_content’, ‘my_content_178750’, 1, 99); function my_content_178750($content) { return wp_remote_retrieve_body(wp_remote_get(‘http://example.com’)); } Also there is possibility to check path you’re on and decide what you want to get depending on that.