How to import native ES modules in WordPress
Don’t want to use Webpack et al? You can import native EcmaScript modules in WordPress:
Don’t want to use Webpack et al? You can import native EcmaScript modules in WordPress:
Add to functions.php ```php <?php require_once ‘get_theme_support_block_style.php’;
Find and hide Gutenberg block styles.
(from my post at Local Community)
Here’s a list of free courses from Scrimba, in suggested order, that I recommend:
Thanks to Weston Ruter at XWP, removing all the default WordPress customizer entries is easy using the Customizer Blank Slate plugin. The only caveat is that it must be loaded as a plugin. So what do you do if you want to use it in a theme? You add Customizer Blank Slate...
Another proof of concept. The custom control You create a custom control by extending the WP_Customize_Control class. I check for WP_Customizer_Control existence before adding custom control because WP_Customize_Control is loaded on customizer page only. list_svg() Create a option list with URLs to SVG files. The SVG files are defined in svg.json...
Testing WP Gears and the Heartbeat API, WP Gears is at https://github.com/10up/WP-Gears. NOTE: this plugin is run continuously, triggered by 'plugins_loaded', you should use an event triggered by the user (onclick, onhover etc))
tl;dr - Code Climate is a very easy to implement linter for PHP, JavaScript, CSS etc. [A linter] find code that doesn't correspond to certain style guidelines source: Wikipedia When I upgraded my plugins to support WordPress 4.6, I decided that I wanted to follow the WordPress Coding Standards....
Purpose of this demo is to demonstrate, for the theme developer, how to use the customizer postmessage transport and a preview script to toggle complex theme elements on or off. In this demo I'll toggle displaying the author and post date. Theme code: When the post meta is toggled off,...