I really do enjoy my visits to Bridge City. The last time I was there for a WordCamp was back in 2015, before I started this writing project, but my adventures have taken me there number of times of the years. Everyone told me how wet and rainy I should expect it to be, but the rain seemed to stop right before I got there and Friday, during the day it was really nice out. It was the exact right intro to what turned out to be an awesome WordCamp Portland 2018
This years #Wapuu for #WCPDX! HUGE shoutout to @garber_evag for designing him and for @stickergiant for providing the stickers! #gratitude #WordPress #WordCamp #lumberjackwapuu #beardymcbeards #wcpdxwapuu pic.twitter.com/liLGBiFmLS
— WordCamp Portland (@wcpdx) November 5, 2018
Food and Fun
Seeing some sights
I flew in a day early so I could soak up some Portland culture, like their traditions of unique bars, food trucks and of course, legendary donuts. I decided to also check out the natural settings that are abundant in Portland. There is a really nice city transit based self guided tour you can take called The 4T Trail that I highly recommend if you want to see some amazing sites and hike an 1,100 foot elevation change.
#wcpdx pic.twitter.com/2BOdK5pGiR
— Dwayne McDaniel (@McDwayne) November 2, 2018
Though, not all sites of Portland impressed me as much.
Ahhh, the lovely sites of Portland. Best hotel view yet. #wcpdx pic.twitter.com/uSPUcnGnTL
— Dwayne McDaniel (@McDwayne) November 1, 2018
Speaker Dinner
My camp activities officially kicked off with the traditional Speaker/Sponsor/Organizer/Volunteer dinner at Old Town Brewing. Beer was made abundant and vegan and gluten free options were covered. More importantly, the conversations were lively. Od friends caught up and some awesome connections were made. A few of us made our way to Ground Kontro for some late night video game fun before bed.
#wcpdx speaker dinner with some awesome people! Like @felixarntz @ataylorme @LarrySwanson @valendesigns pic.twitter.com/XXYnWwcJaa
— Dwayne McDaniel (@McDwayne) November 3, 2018
Saturday
I showed up to the beautiful, though very remote feeling Templeton Student Center at Lewis & Clark College on an overcast morning to find Blue Star Donuts awaiting us along with some decent local brewed coffee. The day got off to a great start as we got wired up with all that sugar and caffeine.
Get your SW turkey donuts while they last. #wcpdx pic.twitter.com/xiabrUK1BP
— Cameron Yee (@cjygx) September 23, 2017
Lunch
We had pre-made sandwiches for our mid-day meal. I was very pleasantly surprised to find a new favorite recipe out of the meal, as they introduced me to the concept of Chickpea-of-the-sea, a vegan tuna salad alternative. While not an exact clone, the recipe I linked to is close enough. Game changer for me and the garbanzo.
Oops – I forgot to share this cool, reusable lunch bag! #WCPDX #Swag #PDXTech #Portland pic.twitter.com/SohcHeZniQ
— Eric Pretorious (@epretorious) November 3, 2018
We had candy for snacks. Not everyone was excited as Robert here, but we all enjoyed it.
This guy! #wcpdx @rnissenbaum pic.twitter.com/W0xT00V03p
— WordCamp Portland (@wcpdx) November 3, 2018
After Party
Immediately after our long, but terrific day we journeyed up the road a piece to Buffalo Gap Saloon & Eatery where we took over the whole upstairs area. A buffet of interesting pub food options, including some hummus, greeted us along with a drink ticket or two. There was a folk band a’playing by the time we left. Pretty good sound to them, check out John Nilsen and the SWIMFISH if you like that sort of music.
We enjoyed good food, drinks, and hanging out with each other at the #wcpdx after party! pic.twitter.com/eLFnHYvBSb
— WordCamp Portland (@wcpdx) November 4, 2018
Not all of us where ready to end the night and a handful made our way down the road to the McMenamins Breweries Fulton Pub for some late night cider and a little tiny bit of tequila before we called an official end to the unofficial end to WordCamp Portland 2018.
#wcpdx after after party at @CaptainNeon pic.twitter.com/tiT2hDYwYD
— Dwayne McDaniel (@McDwayne) November 4, 2018
Sessions
PHP for WordPress
Alena Holligan
You can’t learn the basics too deeply. That is why I went. What I walked away with was the best way to explain arrays I have every heard about, via a candy metaphor. Also, her dedication to “don’t just toss code into function.php” made this one of my favorite talks about adding functionality of I have seen yet. I know not implemented her example code yet, but can’t wait to dig in and understand it a bit better. If you know anyone who is trying to understand plugin development, this should be mandatory viewing, once on WordPress.tv.
Raw Notes:
example repo at https://github.com/sketchings/wp-random-quote-playground
PHP for WP
let’s not put our code in themes
Candy she gave out
that is the value we are storing
Reese’s, m&ms, etc
Ben, what candy do you have?
need to name variables to call them
more complex with arrays
M&Ms are like arrays
packets with individual pieces
it is multiple items in the item
lot of array functions
Nesting arrays
array within an array
just like a big candy bag has multiple M&M bags
name the key is associative array, names let us call things
variables: Scalar (bool, int, float, string)
$workday = false;
$hour = 6;
$price = 15.25;
$quote = “sting”; //string
constants
define ( ‘FORCE_SSL_ADMIN’, true); – // Constant bool that does not change
An opening and a closing in PHP (not all have closings)
leave off if EOF
Make a random quote generator
$motivation = array(
“string 1”
“String 2”
);
$motivation[] = $quote;
echo $motivation[0];
//indexed array by default, numbered — this is faster but can get complex
Alexia messes up array when counting by 10s, off by one
Functions!
way to repeat code without rewriting it
lot of pre-made functions that you should leverage
string substr
int strlen
string trim (rtrim, ltrim)
int strpos – find position of first appearance of sub string specified
strtolower – lowercase
mixed str_replace
Array functions
array_merge
//our own functions
function sketchings_quotes — add your namespace thing in front, sketchings is her namespace github
$motivation = array(…);
$encouragement = array(…);
if ( in_array(strowlower(trim($category)), array(‘motivation’)
Conditionals
if this, then that
inside her own function again
if the category is not empty
pass to category and get quotes
if hour > 4 && < 17
motivation
else
encouragement
array_rand($quotes)
echo
Loops
things we are going to do to variables
Types of loops
for
while
do…while
foreach ($search as $word){
$content
str_ireplace() – replace word no matter the case
…
return $content;
}
that is the basics of PHP
Plugins
writing a function with the above code
minimum viable plugin is one file
sketings-random-quote-playground.php
<?php
/*
Plugin Name: wp Random Quote Playground
*/
// THAT IS ALL YOU NEED, that would run
interacting with WP
Themes – look and feel, not how it acts
Plugins – added functionality
Hooks – Themes and Plugins Hook into Core using Actions and Filters
Actions – add or remove functionality
Filters – Change data
First we do an action
add_action ( ‘wp_head’, ‘sketchings-random-quote_style’ );
when the wp_head is called, call this function
wp_register_style( “”)
plugin_dir_url( FILE ) . ‘css/styles.css’
Registered, used, where
now add in function
add_filter (‘the_content’, ‘sketchings_tooltip’);
when you push your hook, WP passes some things in automatically
passes ($content) for instance gets us WP content
function sketchings_random_quote_shortcode( $atts ) {return sketchings_random_quote( $atts[category’]);
}
add_shortcode(
‘random-quote’, ‘sketchings_random_quote’);
)
@sketchings – PhP for #WordPress. #WCPDX pic.twitter.com/A9TKTM60pv
— Chris Wales (@ggschrisw) November 3, 2018
My talk
Letβs learn Git. No more excuses.
I love giving this talk and learn from it every time I give it. This time I remembered that the best answer to a lot of question is just showing how I would look up such an answer. I also learned a bit about how PHPStorm deals with Git by helping someone after my talk.
@McDwayne here you go pic.twitter.com/gOlthgFbHv
— Theresa Potratz (@TheresaPotratz) November 3, 2018
Not one, but three talks back to back!
How to clean up the WordPress Database
David Greenwald
This should be mandatory viewing for anyone who wants to become a serious web maintenance professional. He is going to give a longer version of this in the future and I can’t wait to see the slides and more how to info from there. Keep an eye on this presenter, serious WP rising star.
Raw Notes:
Friend had site, 100K monthly visitors
Cheap shared to VPS n fix
Cloudflare didn’t work either
wpoptimize to try and clean DB
it was the DB, old plugin leaded in lot of crap
282MB Options table before
2MB after
5 users at once = 1 gig of ram
DB are sneaky, expensive, bad for business and traffic
All your WP content lives in the DB
plugins add their own table
plugin ads a ton of tables
yoast does to
woo does a lot
not bad, just need to be careful
biggest issues
Large umber of rows
large data size
how to tell if DB is slow
speed test to tell
Google says 200ms or less
def less than 500ms
high traffic increases web delivery times
can be slow due to
slow server
old PHP 5.6 and older
Slow DB
or all three
Caching is a band-aid for the DB, always test is caching off
most important tables for cleanup
wp_options
wp_postmeta
wp_post
wp_comments
wp_tables
DB detective tools
plugins
wysql tools
always backup your DB first
wp-optimize
can clean DB of trash
wp-Optomize is good for post and comment tables
does not solve options table
looking for bad actors, abandoned from old plugins
code example
It is a truth universally acknowledged that a talk at #wcpdx about cleaning up the database must be in want of a Jane Austen reference; nicely done @davidegreenwald π pic.twitter.com/mkiJaJNoeQ
— Andrea Middleton (@andmiddleton) November 3, 2018
Gutenberg and WordCamp.orgβs Shortcodes
Corey McKrill
This might be the first Gutenberg Case Study talk I have seen live. Maybe the fist ever? If there is another one, please let me know. And what a case study! Improving the experience of the WordCamp.org site through new functionality not possible with the old shortcodes points to a bold future where were are less restricted on what we can do on the browser side!
Raw Notes:
Works on WP.org
site network
how they went form shortcodes to blocks
if he can make a block, so can you
12 year old site
custom post type called speaker
“I am a post”
speaker shortcode shows name, gravatar and description
when thinking on it 3 stages
1. server side render
but this means has to reload the whole preview and UX is slow
2. native JS on the client side
had to learn more react things
every time change parameter it is really, really fast
more complex and steeper learning curve
static in the preview though, have to use sidebar controls
thinking outside the []
things you couldn’t do with the shortcode system
select individual speakers
ope source, you can contribute
wordcamp=block=speakers
Enjoying this case study about converting https://t.co/McUP6PCoIe shortcodes to Gutenberg blocks by @coreymckrill at #wcpdx pic.twitter.com/Ni8DuXLkeO
— Andrea Middleton (@andmiddleton) November 3, 2018
Holy Blockamole: Tips On Learning Block Development
Andrew Taylor
After his talk he summed up the whole thing as “Start with PHP”, which is likely way less intimidating for folks new to Gutenberg development. Thinking about how your users ‘should’ use Gutenberg is another great tidbit that was in there. Providing them guardrails is going to be a lot less of an uphill than trying to just dive in and write your own custom block.
Raw Notes:
lot to learn
start with the user experience in mind
Start with PHP
eventually you will need to write custom blocks
add theme support, much easier learning curve than writng new blocks
apply block filters
this gives guardrails
post type templates
shows the user the one and only and best way to do things
dynamic blocks
what is output on page can get saved in static blocks
when post is in an RSS or mobile, needs to be different , can’t be static
render callback in PHP
don’t start from scratch! wp-cli,
understand modern JS
been evolving for a long time
evolving faster now
lot of new ideas and concepts, big leaps
but doable
React and JSX
change the state, not the DOM
attribute for things like Location
state error messages
review the source code of Gutenberg itself
how did they build core blocks?
thorough documentation
in-depth tutorials
great code samples, they had both modern and ES5
review the goals and philosophies, before you write a line of code
Why learn Gutenberg block development? @ataylorme says: to create a great user experience. #wcpdx pic.twitter.com/Dh0BRWnrKY
— Andrea Middleton (@andmiddleton) November 3, 2018
Types, Subtypes, Meta, Options β An Abstract View On Data Structures in WordPress
Felix Arntz
If you want to better understand how WordPress works from a data interrelation perspective, this is the definitive talk on the subject.
Every so often a talk is so engrossing and the subject matter so dense that it is all I can do to just keep up mentally. When that happens I can’t take as thorough notes as I would like. Very luck for me, and for everyone, Felix wrote a brilliant blog article that discusses this topic in depth. Go read that.
Felix Arntz's Abstract View On Data Structures in WordPress – not that abstract, but super interesting as he deconstructs the WP database. #wcpdx pic.twitter.com/vDImNuFixZ
— Cameron Yee (@cjygx) November 3, 2018
7 Keys to Sustainable WordPress Projects, Inspired by Buildings
Nick Halsey
I love any talk that draws from a completely separate field than computer science. It reminds me of one of my favorite Viola Spolin quotes β “The environment will teach us, if we let it, everything it has to teach”. Also, this talk gave the most succinct and clear interpretation of the WordPress Philosophy maybe ever given.
Raw Notes:
Looking at buildings
example 1: $30mil building getting $135mil rebuild
example 2: reduced impact and costs by reusing same frame
example 3: PostTension Concrete Flat-Slab Structures – environmental impact is pretty bad
resiliency: Washington County Public Services
thinking for the future
building codes
Zoning code
what the building can be, how much x it can have
how tall it can be
you can work around codes if better results are agreed upon and proved
WP Philosophy is like the
He has reduced this down to:
Implementation
1. focused
2. Simplified
3. Generalized
4. Automated
Process
5, Iterative
6. Attentive
7. Open – to the 4 freedoms the GPL presents
Design Review
must meet with architect before applying Zones
peer feedback to get it ready to propose the final draft
examples in Portland
he works on theme installer in customizer
streamline the process
worked with team to get to good UX
Modular construction
pre-cast facade
structure reusable custom post types
he built sheet music site
explains benefits of custom post types
ties taxonomy
Retrofit/iterate
not seismically stable county building
exterior cross beam frames
worked on 14 color 4.5 color picker in customizer
little improvements like quicker previews are good way to iterate and improve over time
adaptive reuse
transforming an old boarded up factory into event space
entirely new use but keep character and history
Annenberg Digital Lounge
shared taxonomy and could keep much out of the box WP core pieces that were in place
tool taxonomy
Balancing Disruptive Innovation
Mass-timber tower firesafe and seismically
more innovative materials, and costlier
so on hold now
but made other projects more doable
Gutenberg is here and about to be shipped in core in 2 weeks
7 keys to sustainable WP projects:
1 building codes
2 the WP philosophy
3 Design and Code Review
4 Modular Construction
5 Retrofit/Iterate
6 Adaptive Reuse
7 Balance Disruptive innovation
Awesome lesson about how to make sustainable WordPress projects via lessons from architecture and construction of buildings at #wcpdx from @NickHalsey_ pic.twitter.com/HmpjlwOzlQ
— Dwayne McDaniel (@McDwayne) November 3, 2018
Special surprise guest Q&A with Matt Mullenweg
We were all in for a treat as they announced instead of just regular closing remarks, Matt himself would be joining us for a Q&A session. We crowded into the main hall, which kind of felt like a church, to hear Matt answer our questions and give his general thoughts around the community. I am honestly still processing the whole thing as I write this. Parts felt like the best positive, inspiring stuff he has said yet and a couple comments around community left me a bit more perplexed about how we participate as individual non-core contributors. His admission that there have been some large Project Management oversights that have occurred does encourage me to think that this might be seriously tackled sooner than later. I really do hope this video makes it to WordPress.tv sooner than later.
Raw Notes:
“Gutenberg broke a plugin I was using, when it updates ‘Is it a have to thing?'”
which plugin? Events calendar
explained how to use classic plugin and how to adopt Gutenberg
“How is it coming back day to day”
Twitter makes people fight more
“what is the tipping point of people being on board with Gutes
getting early adoption key, want it to be non-event
changed support calls?
non-event, not really
muscle memory vs learning curve
Beta releases never get this kind of distribution
maybe 2K to 3K
Gutes has 600K, many in production
push date to 26th
backup in January part of the plan
Need more eyes, wordpress.com
“launched 2 sites with Gutes, working on new stuff, old sites, Fun to work with. Blocks make
SEO!
“A11y things growing, what up with that?”
We had some project management disconnect
things we can do better
volunteer team should not be external from core
over 200 closed issues from the beginning
poorly in many parts that the a11y team didn’t point out
Accessibility
holistic look
many plugins don’t ever care about accessibility
as we replace widgets and shortcodes into a consistent framework
open it up to users who
“not about Gutes,
it is what does the future look like in a world of distrust and central authorities”
WP is not part of the distribution system
twitter is very polarizing
likes to talk about it on twitter
lot of good comes from these networks
technological optimist
social networks have woken up to the problem
thing are getting better with figuring out
“Are we still going to call it Gutenberg? ”
Codenames take on lives of their own
Gutenberg is being adopted by other CMS
New WordPress
its all WP to people outside this room
just be in passing
they kind of expect what new
“One surprising thing you have learned that has changed his thinking around ecosystems around OSS”
Next year we will focus more on the 5 for the future
40 full time volunteers from Automattic
reinvest back into core development
should be able to do 3-5 Gutes size projects at once
need much better Project Management
Policy that will be adopted
hundreds of volunteers
coordination should align Core’s values
“Too soon to ask? But what about React, what happens in the future JS and WP?”
REST API
Gutes is first thing built on the REST API
they found a lot of gaps along the way
APIs must be made more robust
Gutes Semantic HTML
cross CMS Gutes blocks
WP hot dignity
APIs
Alrighty. β¦@photomattβ© shows up for Q & A β¦@wcpdxβ© #wcpdx pic.twitter.com/kfteP2MANX
— BobWP (@bobWP) November 4, 2018
Wrapping Up
Portland reminds me a lot of San Francisco. It is weird and wonderful and full of people not from there. I left Portland with more to think about than when I arrived which is a pretty good sign that this was a good camp. I also realized a few things about myself while I had time to think while hiking, leading me to believe I should be hiking more. There are a lot of reasons I want to get back to Stumptown in the not too distant future, but at minimum I am already looking forward to getting back for WordCamp Portland 2019!
#WCPDX swag for the win! pic.twitter.com/v9d9nF5sgP
— Bluehost (@bluehost) November 3, 2018
Thank you for all your hard work #WCPDX organizers! All of you bring your talents and skills to make a FANTASTIC day of WordCamping! All of you make it possible and your time and effort is appreciated β€οΈππ€πβ€οΈππβ€οΈ #WordPress #WordCamp #PDX #Portland pic.twitter.com/06C1ZUu0Ow
— WordCamp Portland (@wcpdx) November 5, 2018
Funny you say that. If you remember, WordCamp Portland 2015 was at a church!
Great recap. You should visit more often.