Category Archives: Technology

The Making of a WordPress Event

Planning a large event or series of smaller events is a lot of work. I learned this by experience recently. More on that later.

But all that work is totally worth it. WordPress is WordPress because of the community that builds it, builds with it, designs, supports, promotes, and does everything else with it. This community has been mostly ad hoc, but this year we are focusing in a big way on organizing the organizing of the community. We are putting together a ton of stuff to help out organizers.

If you are an organizer, and would like to help other organizers, the place to go is: The time is now. We need you, and deep down inside, you know that you need us too. ūüôā

A Simpler Semantic Assertions Data Model

I have been thinking about Semantic Assertions for several years. It is easy to let things get complex fast.

Currently, I am looking at a very simple data module. With what could have been additional fields being additional rows instead. Hopefully this will work out to make querying faster.

First, every tag instance must have an instance_id, a tag, and a tagged_instance. The tagged_instance itself points to another tag instance that the first instance is modifying/clarifying/defining/grouping or it points to a tag instance with an tagged_instance of zero which is a terminal tag at least within that system. It could however be a link to tags stored in other systems.

So the default mode becomes tagging of tagging instances. The exception, a tagged_instance of 0 covers traditional tagging and tagging of tags. For traditional tagging, the target (typically a url) gets assigned a number first on a row with a tagged_instance of 0 and the target url in the tag field, then that instance is tagged. Tags also are defined with a tag instance that has a tagged_instance of zero, but are combined with plain text in the tag field. Taggers are simply a select set of tags that are tagged with a specially designated tag.

There are a lot pieces that I left out for this round. Hope to write about this again soon.

MAMP, Xdebug, PEAR and a Few Other Acronyms

MAMP is seriously awesome, it comes preinstalled with just about everything you could need for PHP development. But a lot of the power of MAMP is hidden under a thin layer of nearly incomprehensible options files.

To help myself next time I have to setup a dev environment, and to help you if you happen to find yourself in the same situation, here are a few helpful hints.

First, a handy article on what xdebug is and how to use it.

If you are running MAMP Pro, which I kinda like, then you have to go to different place to edit that php.ini file he talks about. This article will help with that

Next to get PHPUnit up and running I discovered here and that I needed to install PEAR.

I tried first, but I got a little stuck at this point. Got the error: Could not get contents of package “/Applications/MAMP/bin/php/php5.4.4/bin/pear”. Invalid tgz file.

This article, by a friend actually, suggested running all the commands from the root folder. I had been typing each command from inside /Applications/MAMP/bin/php/php5.4.4/bin/

That seemed to do the trick but I also did pear config-set auto_discover 1 as suggested here Between the two, I now have PHPUnit installed.

List of Hooks in WordPress Core JavaScript

As promised quite a while ago (better late than never), here is a list of all trigger style hooks in WordPress core JavaScript.

These demonstrate a wide variety of approaches to adding hook in JavaScript. A few of these may not really fit well into the list but I include them in for completeness.

  • [] jQuery(document).triggerHandler(‘wpcountwords’, [ post_data[“content”] ]);
  • [controls.js:731] triggerCallback: function(cbName, arg) {
  • [] this.trigger( ‘add’, value );
  • [] this.trigger( ‘remove’, value );
  • [] this.parent.trigger( ‘change’, this );
  • [] this.trigger(, );
  • [] api.trigger( ‘save’, request );
  • [] api.trigger( ‘saved’ );
  • [] api.trigger( ‘activated’ );
  • [] api.trigger( ‘ready’ );
  • [] this.window.triggerHandler( ‘hashchange’ );
  • [] this.trigger( ‘open’ );
  • [] this.trigger( ‘close’ );
  • [] preview.trigger( ‘settings’, api.settings.values );
  • [] preview.trigger( event, args );
  • [] jQuery(‘body’).trigger(‘beforePreWpautop’, [o]);
  • [] jQuery(‘body’).trigger(‘afterPreWpautop’, [o]);
  • [] jQuery(‘body’).trigger(‘beforeWpautop’, [o]);
  • [] jQuery(‘body’).trigger(‘afterWpautop’, [o]);
  • [] $(document).triggerHandler(‘wpcountwords’, [ co.val() ]);
  • [] $(document).triggerHandler(‘wpcountwords’, [ co.val() ]);
  • [thickbox.js:165] if ( ! jQuery(document).triggerHandler( ‘wp_CloseOnEscape’, [{ event: e, what: ‘thickbox’, cb: tb_remove }] ) )
  • [thickbox.js:256] if ( ! jQuery(document).triggerHandler( ‘wp_CloseOnEscape’, [{ event: e, what: ‘thickbox’, cb: tb_remove }] ) )
  • [thickbox.js:278] jQuery(“#TB_window”).fadeOut(“fast”,function(){jQuery(‘#TB_window,#TB_overlay,#TB_HideSelect’).trigger(“tb_unload”).unbind().remove();});
  • [] $(document).triggerHandler(‘wpcountwords’, [ content ]);
  • [] if ( ! jQuery(document).triggerHandler( ‘wp_CloseOnEscape’, [data] ) )
  • [] $(document).triggerHandler(‘wpcountwords’, [ txtarea.val() ]);
  • [] $(list).trigger( ‘wpListAddEnd’, [ s, list.wpList ] );
  • [] $(list).trigger( ‘wpListDelEnd’, [ s, list.wpList ] );
  • [] $(list).trigger( ‘wpListDelEnd’, [ s, list.wpList ] );
  • [] $(list).trigger( ‘wpListDimEnd’, [ s, list.wpList ] );
  • [] $(list).trigger( ‘wpListDimEnd’, [ s, list.wpList ] );
  • [] if ( ! $(document).triggerHandler( ‘wp_CloseOnEscape’, [{ event: event, what: ‘wplink’, cb: wpLink.close }] ) )
  • [] this.element.trigger(‘river-select’, [ li, event, this ]);

Open-Source Universal Data and Power Interface

The open-source universal data and power interface (OSUDAPI) is a small magnetically coupled connection type that uses fiber-optics at the point of transfer for data and also has two dedicated pins for ac or dc power transfer that is negotiated by the data channel before power tranfer begins.

This connection type replaces all home and auto power outlets coming in two household sizes and a third¬†industrial¬†size to accomodate higher power transfer rates. The same protocol can also be used for gasoline pumps at fuel stations to ensure that only the correct fuel type is dispensed. It can also be used¬†in medical facilities for IV’s and in any other situation where ensuring the right connection is essential.

The data specifications remain the same for all sizes. This data connection type replaces USB, Thunderbolt, audio jacks, VGA, HDMI, RCA, and essentially all other data cables, including SCSI and other cables that are typically internal to the computer.

This enables using the same cable for serial, parallel, analog and power, but could easily lead to confusion with multiple wires in use all with identical heads. So these cord have a matching serial number printed at each end as well as two to four multi-colored strips of varying widths that provide over 1000 different easily distinguishable patterns so you can easily trace cords.

For each cord that is plugged in the devices perform a handshaking routine through the data channel to determine the capabilities of the device at the other end. For example, a phone is plugged into a power-source the phone sends info that it is able to both send and receive power at certain specs, but that it is currently low on power. The power source then responds that it can provide power. Later a headset is plugged into the same port and the phone send the same info, but the headset responds that it requires power but can provide audio input and output.

The physical make-up of the connector is such that magnetic portion is male on the left and female on the right. So that either end of a cord can be plugged into any port simply by rotating correctly, and any two devices can be connected.

The data and power transfers that any pairing is capable of is determined by the handshaking process. For devices that are not powered or have fully drained batteries. The handshaking protocol specifies that a small amount of power should be provided if no response is made to initial requests. This enables even non-powered devices to handshake.

As part of the roll-out of this connection type, adapters for every type of connection will be sold. The more popular ones will be sold in kits. Adoption will be accelerated by using the profits from the sale of adapters to subsidize the switching costs for manufacturers.