- find me on twitter, codepen
- heckle me on Twitter, use the hashtag
- a little bit about myself
- worked on the web for over a decade now
- just left a gig at TheZebra.com
- a team of about 2 dozen
- was there about 2 years
- lone designer, lots of engineers
- made me think about our process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Block whitelist | |
* Only allow certain blocks to be used | |
*/ | |
add_filter( 'allowed_block_types', 'our_allowed_block_types' ); | |
function our_allowed_block_types( $allowed_blocks ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ... the rest of your file here | |
acf_register_block_type(array( | |
'name' => 'hero', | |
'title' => __('Hero'), | |
'description' => __('A custom hero block.'), | |
'render_template' => 'template-parts/blocks/hero/hero.php', | |
'category' => 'formatting', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Block helpers | |
* add special classes when certain blocks appear, put this in your functions.php file or include it somewhere | |
*/ | |
// add block classes in body and post class | |
function blocks_body_class( $classes ) { | |
global $post; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content="List Posts From WordPress Using REST API With cURL In PHP"> | |
<title>WordPress REST API</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DJI Osmo Mobile http://amzn.to/2tgSBDL ($292) | |
DJI Osmo High Capacity Battery http://amzn.to/2tgJz9v ($42) | |
DJI Osmo Base http://amzn.to/2sbfVlT ($14) | |
DJI Osmo Tripod http://amzn.to/2tgtvVk ($55) | |
DJI Osmo Stick http://amzn.to/2sbNOTH ($64) | |
Total Retail $467 | |
Sale Price $325 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// toss this in your functions.php (or elsewhere) | |
function get_shorty($count = 15){ | |
global $post; | |
$str = get_the_content(); | |
$str = implode(' ', array_slice(explode(' ', $str), 0, $count)); | |
return $str.'...'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('acf/format_value/type=textarea', 'do_shortcode'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//start by checking for a couple of key pieces of info | |
$current_user = wp_get_current_user(); | |
$private_comments = get_post_meta($post->ID, 'private_comments', true); | |
$meta_lock = get_post_meta($post->ID, 'meta_lock', true); | |
$time_lock = get_post_meta($post->ID, 'time_lock', true); | |
//if the post has the custom field 'meta_lock' | |
if ($meta_lock) { | |
//check the current user for that meta field | |
$user_meta_key = get_user_meta($current_user->ID, $meta_lock, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class wordup_session_rsvp { | |
function __construct() | |
{ | |
$this->hooks(); | |
} | |
function hooks() |
NewerOlder