An Open Letter to Matt Mullenweg

Hi Matt, you don’t know me. I’m one of the hundreds, if not thousands, of WordPress project contributors who have donated time to organize community events, answer questions in the forum, persuade colleagues to trust and use WordPress, and I have made small contributions to WordPress Core.

Your unnecessary public conflict with WP Engine over licensing makes it extremely difficult for industry professionals to trust WordPress as a reliable and mature content management system that higher education, companies, and organizations can rely on to share content and information. Locking out WP Engine affiliated contributors and taking over plugins is unacceptable behavior. Your actions put into question the security and future of WordPress as a platform when you challenge dedicated contributors who question your actions to fork the project or leave.

No affiliation with WP Engine requirement on WordPress.org.
No affiliation with WP Engine requirement on WordPress.org. (View full size)

I’m asking you to respect the contributions of everyone in our community, regardless of their employers—demanding allegiance for or against anyone is authoritarian—remove the “I am not affiliated with WP Engine in any way, financially or otherwise.” log-in requirement, it divides us. WP Engine employees, their clients, are dedicated and valued contributors to the project and you seem unable to comprehend why your actions are a problem.

Web professionals rely on WordPress for income and their livelihoods. Your needlessly public vendetta against Silver Lake Capital and WP Engine, no matter how well-intentioned you think it is, impacts us all. Recognize that your actions have real consequences, and don’t dismiss the community’s concerns and complaints; we work in this space and you benefit from our labor. But most importantly, you don’t own WordPress; it’s a GPL licensed project and belongs to the world. If WP Engine decides to turn off post revisions, that’s their right.

I expect you to respect us all

  • Restore equal access to all .org resources, let the WP Engine drama play out in civil court.
  • Restore the accounts of contributors, especially those who respectfully disagree with you.
  • Remove your childish WP Engine Affiliation log-in requirement. Their employees and clients contribute to the success of WordPress even if Silver Lake will not.
  • Stop taking over maintained plugins; this is an unacceptable breach of trust.

Matt, your recent actions are an absolute disappointment; the WordPress project deserves better leadership. It’s time you move on and trust WordPress to the community.

Sincerely,
Joseph Dickson, WordPress Contributor, WordCamp Organizer, and Speaker

Attachment Image Snippet

This snippet for wp_get_attachment_image_src frequently appears in my theme development to select an image by its unique ID in the WordPress media library.

Handy for instances where logos, banners, or any other image frequently recurs on a website and you’d rather store that image in the media library where it can be replaced or modified dynamically.

// replace 7 with unique ID number of image
$image_attributes = wp_get_attachment_image_src( $attachment_id = 7, 'full' );

// retrieves alternative text from image information 
$alt = get_post_meta( $attachment_id , '_wp_attachment_image_alt', true );

if ( $image_attributes ) {
	echo '<img src="'. $image_attributes[0] .'" width="' . $image_attributes[1] . '" height="' . $image_attributes[2] . '" alt="' . $alt . '" />';
}

How it works

  • Set the unique id number in the snippet
  • Displays the image and relevant attributes

This code is based on the official Code References at WordPress.org for wp_get_attachment_image_src() and as get_post_meta().

Adding alt text to a post thumbnail

While working on a custom navigation using WP_Query and has_post_thumbnail for an icon I ran into an accessibility concern. By default, the_post_thumbnail will not display an alt tag when rendered in the browser. In the following code snippet I add an alt tag using the image file’s title.

<?php

// The Post Array
$args = array(
	'category_name'	=> 'disasters, emergency-procedures',
	'orderby'	=> 'title',
	'order'		=> 'ASC',
);

// The Query
$the_query = new WP_Query( $args );

// The Loop
if ( $the_query->have_posts() ) {
	while ( $the_query->have_posts() ) {
		$the_query->the_post();
		echo '<a href="' . get_permalink() . '">'; 
		echo '<article class="emergency-icon">';
			// check if the post has a Post Thumbnail assigned to it.
			if ( has_post_thumbnail() ) {

				the_post_thumbnail(
					array(40,40),
					array('alt' => get_the_title() )
				);
			}

			echo '<span class="entry-title">' . get_the_title() . '</span>';
		echo '</article>';
		echo '</a>';
	}
	/* Restore original Post Data */
	wp_reset_postdata();
} else {
	// no posts found
}

In short the code above starts with a query that looks for categories slugged”disasters” and emergency-procedures then orders the results by title in ascending order.

Customized html is then wrapped around the results along with an alt attribute taken from the image’s title then included within the img tag.

Technically speaking, it would be more appropriate to use the alt field set for the image. However, alt text has to be generated manually where as the title is automatically created when media is uploaded to the library.