-
Custom Profile Picture
Give your users a custom profile image Upload image Crop your desired position That’s it!! Share your thoughts.
-
Make a PHP Package & Publish On Packagist
I was curious how composer get those packages form online.When we run a command in cmd where it goes and get that package !!Can I make a package for me? Let’s start with very basic Create a composer.json file and paste this code modify according to your package name You can also run composer init…
-
Add PHPCS and WPCS in Windows Auto configure using comoposer | Add to project level
Setup CLI Install PHPCS via Composer composer global require “squizlabs/php_codesniffer=*”The global keyword will add the package into global package directory “Composer\vendor\” Install WPCS via Composer composer global require “wp-coding-standards/wpcs” Add WPCS to PHPCS This command paths can be modified if you’re using custom directory to install PHPCS phpcs –config-set installed_paths %APPDATA%\Composer\vendor\wp-coding-standards\wpcs Check it! phpcs -i…
-
Let’s Make a New Product By Rest API
Create a REST API (No code) Go to WooCommerce settings click Advance tab then click Add key button Enter the fields data and Generate API key Congrats We’ve Generated!! We can see the description and other stuff appeared ok let’s move to main part. To communicate with the WooCommerce REST API we will use WooCommerce…
-
Fix Deprecated: Creation of dynamic property Class::$attr is deprecated
<?php class Ifat { function __construct(){ $this->name = “ifat”; echo $this->name; } } new Ifat(); // Deprecated: Creation of dynamic property Ifat::$name is deprecated in patha/tempCodeRunnerFile.php on line 4 class FixedIfat { private $name; function __construct(){ …
-
Regex Character Class
javascriptCopy codeconst str = ‘There are 123 apples in the basket’; const regex = /\d+/; console.log(str.match(regex)); // Output: [‘123’] javascriptCopy codeconst str = ‘My phone number is (555) 123-4567’; const regex = /\D+/; console.log(str.match(regex)); // Output: [‘My phone number is (‘, ‘) ‘, ‘-‘, ”] pythonCopy codeconst str = ‘The quick brown fox jumps over…
-
Basic Regex
javascriptCopy codeconst str = ‘hello world!’; const regex = /\w/; console.log(str.match(regex)); // Output: [‘h’] javascriptCopy codeconst str = ‘hello world!’; const regex = /o/; console.log(str.match(regex)); // Output: [‘o’] javascriptCopy codeconst str = ‘hello world!’; const regex = /[a-z]/; console.log(str.match(regex)); // Output: [‘h’] javascriptCopy codeconst str = ‘hello world!’; const regex = /.*/; console.log(str.match(regex)); // Output:…
-
How to make next and previous in wordpress blog page.
Making a next previous section for blog is very interesting feature it’s tells your reader what content you’re providing next page if user can see the title or the thumbnail of the next blog it brings more trust as reader perspective here is the code sample you can modify the design and code as your…