As I dedicate more time toward Gutenberg Phase 2, I realize, what better way to understand some of the core concepts of Gutenberg than by building my own block. Sure I’ve helped build some Jetpack blocks recently, but that was really more teamwork than me soloing through the endeavor on my own. I learned a…
Author: pbrocks
Headless WordPress with React
An intro to building decoupled WordPress-powered websites using the WordPress REST API and Create React App Source: Headless WordPress with React
How to add WordPress Theme Styles to Gutenberg — Rich Tabor
Potential pitfallsIf your WordPress theme registers its entire front-end stylesheet for the Gutenberg editor, you’ll end up with a complete mess: Source: How to add WordPress Theme Styles to Gutenberg — Rich Tabor
Add Theme Color Palette to the Gutenberg Block Editor for WordPress
A comprehensive guide to creating theme color palettes. Learn more about styling themes for the new Gutenberg block editor in WordPress. Source: Add Theme Color Palette to the Gutenberg Block Editor for WordPress
Ajax function to return value – JavaScript – The SitePoint Forums
function cityconfirm(){ var cityid = document.getElementById(‘city’).value; alert(getcityvalue(cityid)); return confirm(‘Are you sure you want to delete’) } function getcityvalue(cityid){ // this will generate another thread to run in another function jQuery.ajax({ url: ‘http://mysite.com/lookupcity.asp?cityid=’ + cityid, type: ‘get’, dataType: ‘text/html’, success: function(data){ // return(data); } }); // it will always return here in function return “Hello”; }…
jQuery binding click to a link after AJAX call
Source: jQuery binding click to a link after AJAX call
[PHP] Singletons and Shared Instances – Alain Schlesser – Level Up WP
Experience Level: Intermediate to Advanced PHP In the post – published July 17, 2017 – Alain Schlesser examines use of the Singleton pattern in WordPress development with PHP, whether it’s a good or bad idea, and alternative approaches to solve the same problems. Article: Topics: What is a Singleton? Problems with the Singleton pattern: Singleton…
How to Create a WordPress Database Table
Add a table to your WordPress database and pull data from it to your website. Learn how to query and insert data with the $wpdb class. Source: How to Create a WordPress Database Table
JS dump()
The dump() function for JavaScript tries to emulate the print_r() function of PHP.
SelectControl
https://gist.github.com/rogerlos/7502541070942e16a1188dd0bb9ac2b9