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…
Category: Apply to
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
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
JavaScript Promises
Promises are becoming a big part of the JavaScript world, with many new APIs being implemented with the promise philosophy. Source: JavaScript Promises
brew install php-code-sniffer composer global require wp-coding-standards/wpcs
brew install php-code-sniffer composer global require wp-coding-standards/wpcs phpcs –config-set installed_paths ~/.composer/vendor/wp-coding-standards/wpcs/ Source: brew install php-code-sniffer composer global require wp-coding-standards/wpcs p – Pastebin.com