Category: Programming
-
WordPress Block Variation: Unlocking it’s Power
The WordPress Block Variation API allows developers to create variations of existing blocks, maintaining core functionality and scalability. Learn to create a block variation in detail.
-
Create a tag in Git
Creating tags from the command line To create a tag on your current branch, run the following commands in your terminal: Add -a to generate an Β annotated tag if you want to include a description with your tag:: This will generate a local tag containing the current state of the branch you’re working on. Tags…
-
Composer commands
Install Dependencies Install De Dependencies To generate the autoloader, go head and fire:
-
Disable Gutenberg (Block Editor)
Totally disable Gutenberg in whole site Disable Gutenberg in specific Post type.
-
Gutenberg List all Blocks
If you want to get list of all blocks then you can use getBlockTypes from block store. We can use @wordpress/blocks package to retrieve block store. useSelect hook from @wordpress/data package will be used to access getBlockTypes function from block store. It can only be used in a component. Here is an example
-
Luxon JS useful functions
Date time to unix timestamp: Convert to different timezone Get users current timezone
-
WordPress install / activate plugin using WP API and JavaScript
Install plugin function: Uses: Activate plugin function. Uses: