Speaker at WordCamp Orlando – Intro to WordPress Development

I’ll be a WordCamp Speaker in Orlando this year. WordCamp Orlando is October 8th and my speaking time is Saturday afternoon. My presentation topic will be a crash course intro to development for beginners. I’ve given some presentations similar to this at work and have even had pieces of this presentation in parts of other talks I have given, but it will be nice to just focus the whole time on the intro for attendees that feel dev presentations get too deep too quickly.orlando-wordcamp-hero

So You Wanna Dev? Join the Team!

“WP Dev/tools for beginners: ftp, git, svn, php, html, css, sass, js, jquery, IDEs, themes, child themes, the loop, hooks, APIs, CLI, agile, bootstrap, SEO, slack… etc.
We’ll discuss the language and various acronyms and buzzwords used by devs in this crash course introduction to the developer’s world. Overview of primary development processes and terms and what software is needed to play the game. We’ll cover what you need to go from zero to developer and hopefully how to have fun on the way.”

I’ve been a WordCamp Speaker in the past, but it’s been specific to Atlanta. Orlando will be fun and I’m excited about the KidsCamp sessions they have going too!

WordCamp parents can now usher in the next generation of WordPress builders at our first annual KidsCamp! Parents attending WordCamp can bring their junior builders along and enjoy a day of parent-child learning under the tutelage of some of our WordPress Master Builders!

WordCamp Orlando 2016 will be at the UCF Rosen College of Hospitality Management in south Orlando! So get your tickets and bring the kids. I may or may not be stopping in to Harry Potter World while I’m in town. =)

Speaking at WPCampus

I’m pleased to announce that I’ll be speaking at WPCampus! It’s the conference “Where WordPress Meets Higher Education”. My presentation is titled ‘The Modular Web For WordPress’.

WPCampus 2016 is the inaugural conference for the WPCampus community, a gathering of web professionals, educators and people dedicated to the confluence of WordPress in higher education. The concept for WPCampus is an education focused, non-profit event which will allow people to share and learn about WordPress in the world of higher education. So if you’re into WordPress and/or higher education and/or the web in general, it’s the place for you come July. Get a ticket to a wealth of knowledge and ideas.

wpcampus-speaker-confirmation

I will be presenting on a topic that I’ve thought a lot about and have become pretty passionate about. I’ll discuss Modular Web Development and specifically how to integrate a modular development mindset into a WordPress development workflow.

Here is the official session description:

WordPress the CMS, meets the Modular Web. We need to stop thinking about a website as a collection of pages and templates, but as a set of modules and a system to manage them. Modules, like Legos, are interchangeable and can be combined fairly quickly to create an infinite number of results all while both showing variety and remaining consistent. With this modular paradigm shift, our workflows improve, our websites improve and our very well-being improves. Let’s explore how to use WordPress to manage site content using modules. We’ll see what this does for our development process and programming as well for our content management via the admin. We’ll discuss how to build and maintain a module library, and use it for every site you build. These principles have been immensely helpful in each team or project where I’ve put them into practice, so we’ll even take a look at a few examples and point out where to learn more.

legos

While this may not be a topic specific to higher education, I think it very relevant in that having a smart process helps projects be more flexible, more on time and more on budget. I’m happy to be able to contribute to WordPress in education as well as WordPress ideas in general. I will be speaking on Friday, July 15th (I’ll try to update this with a time once it’s decided and announced). As I said, tickets (early bird even) are available now so go get yours. And if you’re interested check out my other presentations.

Recapping WordCamp Atlanta 2016 – Day 0 – The Dev Workshop

Just off a busy but enjoyable weekend of WordCamp Atlanta @wordcampatl. I was able to attend the friday developer workshop and the Saturday sessions of the conference. Though I was a speaker at WordCamp Atlanta in 2012 (From Photoshop PSD to WordPress Theme), 2013 (Your firstborn child theme. Child themes 101+2), and 2014 (Custom Post Types or Choose Your Own Adventure), I couldn’t make it in 2015, I wasn’t selected this year as a speaker. However, I was also able to volunteer to help out and to take some photos and staff the Happiness Room. I also volunteered a couple weeks ago to speak at a WordPress meetup group (Modifying Your Theme’s Design – Learning CSS), so I feel like I was able to still give back.

2016-03-18 12.46.19

Overall

TLDR; It was a great conference and like always, talking to people was the best part, though there were some great informative and even entertaining sessions I attended.

Beginner WordPress Development – Workshop

Micah Wood Aaron Reimann

2016-03-18 09.16.25

The workshop was a great way for many to get started with WordPress development. Micah and Aaron went over from the basics of development through child-theming. I stepped up to help others get started, since we were all installing mamp to get a local wordpress install setup. Even with the famous 5 minute install it was taking most people a long time to get setup, though we can blame the wifi for most of the issues I believe. We then cloned Micah’s child theme demo from github into our theme dir and he get started through the demo. Follow along by reading his blog post length commit messages. It was great to help out! I even learned a few tricks about some WordPress hooks, the loop and template hierarchy.

I’ll share one tip many might not have realized when dealing with child themes. The difference between get_template_directory_uri and get_stylesheet_directory_uri.

I’ll post an update on Day 2 when I’ve had time to digest some more of the great presentations.

 

Modifying Your Theme’s Design – Learning CSS: Atlanta WordPress Users Group Presentation

Here’s my presentation for the Atlanta WordPress Users Group to continuing their discussion on theming. The meetup gives you a first hand look at modifying your Theme’s look and feel. We’ll be showing you how to make typical changes to existing themes. We will not be showing you how to create your own theme from scratch, though we will have a meetup later in the year to do that.

During this meetup we discussed:

• What is CSS and why do we use it?

• What are ‘typical’ modifications to themes and how to make them

• Using ‘inspect element’ and/or ‘firebug’ to find and test

• Correct way to change Fonts

• Simple color theory and design

Here’s the slide deck for the presentation

The presentation overviews the internet, teaches us how to spell HTML and other web programming “languages” that come together to form a WordPress website, like HTML, CSS & PHP. We even discussed web development tools like FTP clients and which text editors to use. We went over what makes up a wordpress theme and then the concept of child themes. Discussed the process of creating your own child theme with just a couple files and that you can create a child theme for any theme out there. We demoed how to view source and dissect any website, but more importantly, how to inspect elements on your site and live-edit the css for any element. Then to write these CSS rules to our theme to lock in the edits in your child theme.

If you have any further questions that you would specifically like reviewed, leave them in the comments below and I’ll respond.

We created a child theme for twentysixteen

We created our own child theme and discussed the benefit to creating a child theme over other ways to modify a WP theme. Our twentysixteen child theme did wonders for the look:

Screenshot 2016-03-10 08.32.56

We explored the code to create our own WordPress child theme

Here are the code snippets for review


<?php
function theme_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( $parent_style ) );
}
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
?>

view raw

functions.php

hosted with ❤ by GitHub


<?php
/**
* The template for displaying the header
*
* Displays all of the head element and everything up until the "site-content" div.
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="who" content="is your daddy">
<link rel="profile" href="http://gmpg.org/xfn/11">
<?php if ( is_singular() && pings_open( get_queried_object() ) ) : ?>
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php endif; ?>
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<div id="page" class="site">
<div class="site-inner">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentysixteen' ); ?></a>
<header id="masthead" class="site-header" role="banner">
<div class="site-header-main">
<div class="site-branding">
<?php
$description = get_bloginfo( 'description', 'display' );
if ( $description || is_customize_preview() ) : ?>
<p class="site-description"><?php echo $description; ?></p>
<?php endif; ?>
<?php if ( is_front_page() && is_home() ) : ?>
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php else : ?>
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
<?php endif; ?>
</div><!– .site-branding –>
<?php if ( has_nav_menu( 'primary' ) || has_nav_menu( 'social' ) ) : ?>
<button id="menu-toggle" class="menu-toggle"><?php _e( 'Menu', 'twentysixteen' ); ?></button>
<div id="site-header-menu" class="site-header-menu">
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentysixteen' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'primary',
'menu_class' => 'primary-menu',
) );
?>
</nav><!– .main-navigation –>
<?php endif; ?>
<?php if ( has_nav_menu( 'social' ) ) : ?>
<nav id="social-navigation" class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Social Links Menu', 'twentysixteen' ); ?>">
<?php
wp_nav_menu( array(
'theme_location' => 'social',
'menu_class' => 'social-links-menu',
'depth' => 1,
'link_before' => '<span class="screen-reader-text">',
'link_after' => '</span>',
) );
?>
</nav><!– .social-navigation –>
<?php endif; ?>
</div><!– .site-header-menu –>
<?php endif; ?>
</div><!– .site-header-main –>
<?php if ( get_header_image() ) : ?>
<?php
/**
* Filter the default twentysixteen custom header sizes attribute.
*
* @since Twenty Sixteen 1.0
*
* @param string $custom_header_sizes sizes attribute
* for Custom Header. Default '(max-width: 709px) 85vw,
* (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
*/
$custom_header_sizes = apply_filters( 'twentysixteen_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
?>
<div class="header-image">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
</a>
</div><!– .header-image –>
<?php endif; // End header image check. ?>
</header><!– .site-header –>
<div id="content" class="site-content">

view raw

header.php

hosted with ❤ by GitHub


/*
Theme Name: Child of 2016
Theme URI: http://example.com/twenty-fifteen-child/
Description: Twenty Sixteen Child Theme
Author: Evan Mullins
Author URI: https://circlecube.com
Template: twentysixteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twenty-sixteen-child
*/
.site-branding .site-title a {
color: cyan;
font-size: 4rem;
// border: 1px solid red;
margin: 50px;
padding: 50px;
}
.site-description {
text-indent: -999rem;
background: url(img/logo.png) center center no-repeat transparent;
background-image: url(img/logo.png);
display: block;
width: 500px;
height: 500px;
background-size: contain;
padding:0;
}
.entry-date {
font-size: 10px;
}
.entry-footer,
.entry-footer a {
color: pink;
}
.entry-footer a {
color: pink;
}
a {
color: tomato;
}
a:hover {
color: rgba(130,203,45, .8);
}
a:visited {
color: #00cc33;
}
.widget_meta {
display:none;
}
.widget_recent_comments {
padding: 1rem;
margin: 1rem 0 4rem;
}
.widget_recent_comments .widget-title {
background: black;
color: pink;
padding: 1rem;
}
.site-info .site-title {
font-size: 3rem;
}

view raw

style.css

hosted with ❤ by GitHub

How to Add a class to the WordPress comments submit button

This WordPress feature slipped by me, but since the release of WP 4.1 there is a great and simple new filter that I’ve been watching for a number of years here. Interestingly this ticket was opened 5 years ago today, so some have literally been waiting years! The commentform.php file now has a couple more options available as explained in this changeset.

add_filter( 'comment_form_defaults', 'circlecube_comment_form' );I have been using foundation and bootstrap on sites and have struggled with the best way to add a button class to this button since I wanted it to inherit the frameworks styles for a button. I’ve seen a few ways to go about doing this, like using javascript (ug), or adding an extra button and hiding the original button with css (meh). But now it’s a simple little filter to add to comment_form_defaults.  Just add your desired class value to ‘class_submit’ in the args. I’ve put it into a simple little gist to add a ‘button’ class to my input type equals submit:


function circlecube_comment_form( $args ) {
$args['class_submit'] = 'button'; // since WP 4.1
return $args;
}
add_filter( 'comment_form_defaults', 'circlecube_comment_form' );

view raw

functions.php

hosted with ❤ by GitHub

How to fix “The called constructor method for WP_Widget is deprecated since version 4.3.0!”

Have you updated WordPress recently to find notices warning you of something related to your Widgets? These notices will show up if you have your site in debug mode (which you should in your local environment, but not on your production website) with the setting in wp-config.php.

Notice: The called constructor method for WP_Widget is deprecated since version 4.3.0! Use

__construct()

instead. in /wp-includes/functions.php on line 3457.

Screenshot 2015-09-17 13.19.49

Here is an example of what you likely have currently in your functions.php file to register your existing widget(s) (in old functions.php on the bottom) and then an example of how to update the widget class with the _construct update (in new functions.php on the top).

human_time_diff « WordPress Codex

Determines the difference between two timestamps.The difference is returned in a human readable format such as “1 hour”, “5 mins”, “2 days”.

Source: Function Reference/human time diff « WordPress Codex

Used this little known, but nice gem today. It’s a core WordPress function that gives human relative time from any other datetime in “U” format. Like so:

human_time_diff( date("U", strtotime($twitter_data[$i]->created_at)) );

Add Links to Twitter Mentions, Hashtags, and URLs with PHP

This gem helped me out today as I was working with the Twitter API to create a custom WordPress widget. I was about to do exactly this and was not looking forward to it, luckily I did a quick search and found this webtips post. Thanks!

If you’re using the Twitter v1.1 API to fetch a user’s statuses from their timeline, then you’ve likely come across the fact that user mentions, hashtags, and urls do not have links in the “text” node of the JSON response the API returns. There is no element to follow the link, and there are no links to follow to check out a mention or hashtag on Twitter site. This can easily be overcome using PHP and parsing some of the data in the JSON response and wrapping the entities in the desired elements.

Source: Add Links to Twitter Mentions, Hashtags, and URLs with PHP

Add Shortcode with Add Media Button

This code snippet really helped me today and since the post doesn’t have commenting enabled, I wanted to say thanks here! Working on building a WordPress plugin that generates shortcodes and wanted an interface for the user to create their own with a wizard of sorts, so using a media button, shortcode and thickbox all together wasn’t very documented anywhere that I could find until I came across this one and I was happy to be able to lift what I needed from this snippet and see my code working like a charm now. The plugin I’m working on is for the Greenhouse Recruiting site and pulls in a job board onto your site via their API. The shortcode wizard will be included in a release soon so you can see it in action.

add shortcode to a page or post without remembering the shortcode itself… choose the shortcode parameters and then have it automatically place itself in the editor

via Add Shortcode with Add Media Button.

A Developer’s Guide to Contributing to WordPress Core

Here’s a great post from the team at delicious brains, the same team who brings us WP Migrate DB Pro for all our wordpress database migration needs (and do a bang up job I might add). They discuss all the in and out of working with trac and the ticketing system as well as setting up a development site for testing and running unit test, making (and submitting) code patches and using svn to manage it all. It’s an awesome post full of meaty details on how to start getting involved, since if you’re new to it all, it certainly is a lot to figure out on your own. Give it a read and dive in to work toward your own contributions!

basics for finding things to work on, how to handle the WordPress source code, how to submit your work and what you might expect to happen from there.

via A Developer’s Guide to Contributing to WordPress Core.