How to Delete Hidden Files on Mac

Go to the directory –

To remove .git file –

FB Video Showing

<div class="fb-video"
  data-href="https://www.facebook.com/Sixers/videos/10155469471232516/"
  data-width="500"
  data-allowfullscreen="true"></div>

  <!-- Load Facebook SDK for JavaScript -->
  <script>(function(d, s, id) {
	var js, fjs = d.getElementsByTagName(s)[0];
	if (d.getElementById(id)) return;
	js = d.createElement(s); js.id = id;
	js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.6";
	fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));</script>

PHP Tricks

  1. To see the var_dump output with decoration see below –
echo '<pre>', var_dump( $style_post ), '</pre>';

How to Replace Master Branch with Another Branch?

Suppose we have created a dev branch from the master branch and then the dev branch has got some new commits. So, now we want to keep only the dev branch’s codes in master branch except all the old codes from the master. Let see how we can do that –

Make sure that your local master is up to date with the master remote:

Read More “How to Replace Master Branch with Another Branch?”

How to Show Admin Notice on Plugin Activation?

1. Add the code in the Notice Class like Below –

Read More “How to Show Admin Notice on Plugin Activation?”

WPCS with Visual Studio Code

Installation

The easiest way to get started with PHP_CodeSniffer is to download the Phar files for each of the commands:

# Or download using wget
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
wget https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar

# Then test the downloaded PHARs
php phpcs.phar -h
php phpcbf.phar -h

Composer Read More “WPCS with Visual Studio Code”

Git Command

Git Command

Go to the directory you want to initiate Git and then follow the commands:

  1. Initiate the git:
  2. Remove Git if you have initiated in a wrong place ( Be aware if there is another git in the subdirectory):
  3. To add all the files(including subdirectory) to staging step:

After Installation of Visual Studio Code

Go to Preferences  → Settings and then paste code within {} brackets –

 

Thanks!

 

 

Change Custom Post Type Name Safely.

Just replace the second line’s post type names:

 

Source: https://wordpress.stackexchange.com/questions/97026/how-do-i-safely-change-the-name-of-a-custom-post-type