How JS Files and CSS Files are loaded in WordPress

In examples shown below only js files are considered but concepts (along with hook names) remain same for stylesheets too. FRONTEND: Scripts and Styles should be enqueued using wp_enqueue_script() & wp_enqueue_style() functions. You can call those functions anywhere you want but ideally they should be called on wp_enqueue_scripts hook. function myslug_enqueue_style() { wp_enqueue_style( 'some-css',<url-of-css-file>, false …

How JS Files and CSS Files are loaded in WordPress Read More »

How To Add ESLint and Prettier to the Project

Install eslint and install-peerdeps globally. If it throws any permission error, then prepend sudo to below command. npm install -g eslint install-peerdeps cd into project’s directory and run eslint –init. This will generate eslint config for project. (Choose airbnb style guide during configuration) Install eslint-config-auto package npm install eslint-config-auto –save-dev Replace extends key in .eslintrc …

How To Add ESLint and Prettier to the Project Read More »

The Purpose of Life

To me, the purpose of life is 1. to SPREAD LOVE ❤️ 2. to live in the current moment 3. to preserve humanity and make it better (I don’t mean human revolution here. I am referring to becoming a better human) This post is going to be a long one! I believe in God. The …

The Purpose of Life Read More »

Semantic Versioning

Semantic versioning is a formal convention for specifying compatibility. It uses a three-part version number: major version; minor version; and patch. Version numbers convey meaning about the underlying code and what has been modified. For example, versioning could be handled as follows Code status Stage Rule Example version First release New product Start with 1.0.0 1.0.0 Backward compatible …

Semantic Versioning Read More »

9 Steps Strategy to introduce Vue in existing project without loosing SEO Ranking

If you are introducing Vue in existing project where html is being generated on server side, then below process will help in not loosing current SEO score of the site. We’ll be introducing Vue progressively in the project. Wrap everything from first to last html element within body tag inside a new div with id …

9 Steps Strategy to introduce Vue in existing project without loosing SEO Ranking Read More »

How to install v8js pecl extension on Ubuntu having PHP 7.3

sudo wget -O phpv8js-installer.sh https://gist.githubusercontent.com/sumitpore/339df4326c6a6f9275dd43b4568c1a69/raw/2abce2b00e85535aeba4656c318876e6902bbe39/phpv8js-installer.sh && bash phpv8js-installer.sh References: https://github.com/phpv8/v8js/blob/php7/README.Linux.md https://hub.docker.com/r/gytist/php-fpm-v8js/dockerfile https://stackoverflow.com/questions/40091987/compiling-v8js-extension-after-v8-was-built-with-gn-build-as-opposed-to-gyp/40092109#40092109 https://gist.github.com/aozisik/a522e3b602daff6ae51f134aa949eec9