An intro to building decoupled WordPress-powered websites using the WordPress REST API and Create React App
Source: 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
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
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
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"; }
Source: Ajax function to return value – JavaScript – The SitePoint Forums
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 […]
Source: [PHP] Singletons and Shared Instances – Alain Schlesser – Level Up WP
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.
The dump() function for JavaScript tries to emulate the print_r() function of PHP.
https://gist.github.com/rogerlos/7502541070942e16a1188dd0bb9ac2b9
Promises are becoming a big part of the JavaScript world, with many new APIs being implemented with the promise philosophy.
Source: JavaScript Promises
Render a shortcode or deliver a block.