Visual Studio Code Editor for WordPress Development

I’m using Visual Studio Code editor for WordPress Development. Following are the list of extensions and theme I have installed.

Extensions

WordPress Toolbox – The ultimate WordPress snippet collection for Visual Studio Code.

WooCommerce – Snippets & autocomplete – A collection of WooCommerce snippets and autocompletion.

PHP IntelliSense – Advanced Autocompletion and Refactoring support for PHP

phpcs – PHP CodeSniffer for Visual Studio Code

phpcbf – PHP Code Beautifier and Fixer

PHP DocBlocker – A simple, dependency free PHP specific DocBlocking package

PHP Debug – Debug support for PHP with Xdebug

GitLens — Git supercharged – Supercharge the Git capabilities built into Visual Studio Code — Visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more

Git History – View git log, file history, compare branches or commits

WPCS Whitelist Flags – Add WordPress Coding Standards whitelist flags to your code.

Prettify Selected JSON – VS Code Extension to prettify selected JSON blocks

XML Tools – XML Formatting, XQuery, and XPath Tools for Visual Studio Code

Rainbow CSV – highlight csv and tsv files in different colors

Excel Viewer – View Excel spreadsheets and CSV files within Visual Studio Code workspaces.

Theme

Shades of Purple – ⚡ A professional theme with hand-picked & bold shades of purple 💜 to go along with your VS Code. A custom VS Code theme with style.

wp_cache_flush() – Think twice before using it

wp_cache_flush() is WordPress core function which can be used to flush entire object cache. But why I said, “Think twice before using it“. There is a reason why not to use this function in the plugin/theme.

Continue reading “wp_cache_flush() – Think twice before using it”

Hooks and Functions for Meta Box

Following are the hooks and functions which use to add custom meta boxes to one or more screens.

Hooks

Functions

WordPress widgets – where and how they are saved in database

In this article, I will tell you how WordPress widgets stored in {prefix}_options table as key/value pair when you set widget in a sidebar.

sidebars_widgets and widget_{widget_ID}  are the options.

Continue reading “WordPress widgets – where and how they are saved in database”

REST API – Filter REST URL prefix

REST API architecture is included in WordPress 4.4 version. So you can register custom REST API endpoints. Default REST API URL prefix is wp-json. Continue reading “REST API – Filter REST URL prefix”

WordPress is Now Fully Translated Into Gujarati

હવે વર્ડપ્રેસ ગુજરાતી બોલશે. It was great experience as General Translation Editors (GTE) and Translation Contributors. I have started use of WordPress in Gujarati language on one of my blog. Thanks to all contributors. Continue reading “WordPress is Now Fully Translated Into Gujarati”

Hooks inside wp_insert_post()

I felt that as WordPress developer we need to know about various hooks which is fired when post is created and updated. wp_insert_post and wp_update_post functions are called when post is create/update. Continue reading “Hooks inside wp_insert_post()”