How to Internationalize Your WordPress Plugin

The WordPress developer should always make their plugin Internationalize to automatically translatable.  In this article, I will explain to you, How to Internationalize Your WordPress Plugin? That can be used in different languages WordPress site. Read and Follow the step by step guide to building an Internationalize WordPress Plugin.

Why Internationlization?

If there are various other WordPress Plugin available that help us to translate our site to another language then why one more step for developers to make plugin Internationalization? Why we need it?

Nowadays there are various plugin available to make a multilanguage site

1. Polylang

2. WPML

3. qTranslate X

4. xili-language

5. Google Language Translator

But this is generally an extra step taken by the site owner. when there is no translation available for a string of a plugin that is been used on site.

So Its Standard for a Good WordPress Developer that he should add his plugin translation whether it is a WordPress.org plugin or whether for any client. This one step will make your plugin user life easy.

How to Internationalize WordPress Plugin

There are few steps we will have to take as a WordPress developer when developing a WordPress Plugin.

  • Add Text Domain in the Plugin
  • Wrap all plugin string in translatable functions
  • Add language folder and specify path of that language folder in plugin Domain path
  • Add .po, .mo and .pot file of your plugin translation in your that language folder

 

WordPress Plugin Internationalization series

Below is the video series of WordPress Plugin Internationalisation that will help you with a live example to make an Internationalize WordPress Plugin. Follow the video series to make your plugin Work on any language WordPress Site.

Like and subscribe to our youtube channel – BuddyDevelopers

How To Install Git on Ubuntu Machine

Introduction

How to Install Git on Ubuntu is necessary requirement of a beginner LAMP Developer. Git is a version control System. Git helps you to manage your application code at source level. You can track changes, revert to previous stages, and branch to create alternate versions of files and directories. In this guide we will explain you how to add Git on Ubuntu with command line in really easy steps. After reading this article, you will able to Install, configure, Use Git on your Ubuntu Machine

Install git on Ubuntu

In order to use Git features, we will have install it first on our system. We can install it with apt-get package manager.

sudo apt-get update
sudo apt-get install git

The first command will update apt-get package manager with latest version of all software packages.
second command will install Git on your system.

Now Git is in Our system. We can check and Confirm Git with its version.

git --version

Now time to configure it with Your Github account.  In order to use it to add and edit commit on Github repository.

Setup git Account on Ubuntu

Now time to setup git account on Ubuntu. Git need proper information in order to allow add commit on remote git repository.

The easiest way of doing this is through

git config 

Specifically, we need to provide our name and email address because git embeds this information into each commit we do.
we can configure this information through

   git config --global user.name "Your Name"
   git config --global user.email "youremail@domain.com"

We can see all of the configuration items that have been set by typing:

git config --list

You should now have git installed and ready to use on your system.

From and To date field setup in JQuery UI Datepicker

JQuery UI DatePicker

JQuery UI Datepicker is a jQuery Plugin and mostly used option for making date type text field.
JQuery UI Date picker has many functions, event, the trigger that previously build and we can reuse them and do the stuff we want quickly.

I am sure till now you have searched about Date picker, if you are not familiar with it. but still, If you want to know more about Date picker. you can go and check here for detail explanation of other option provided by jQuery UI Date Picker.
In this Article, I am going to give a demo of how to make From and To date range field using jQuery UI Date Picker. 

From and To date Range Field:

Generally, when we want to make a date range field we use datepicker() method of JQuery Datepicker Plugin.

Example. Start Date and End Date of Events.

Here In Start and End Date fields, we have to make sure several things in order to make it perfect.
One point to consider is End Date can’t be less than Start Date.
If we can enter End Date to be less than the Start date of Event in the field. that means we have Bug in our code.
Hope so, my Example below will clear your doubt and helps you to make date range fields.

Demo Example with a solution:

 

I hope it’s clear how easy to make the Date range field work perfect. If you have any comment or question, I would be happy to answer them in the comment box below.

Git Cherry-Pick Command

Sometimes some of the branches in your git repository are not in use. We can’t merge them in master and the end action to remove them to clean our repository.

When we need Cherry-pick command

we check those Old branches we found several commits are useful that we can pick and use in our latest code. Now, what should we do to use this piece of code? You can not merge that branch otherwise you will have lots of conflict and Old code to deal with 🙁 The other option will be to copy that code and use it 😀 😜 To handle such situation you have cherry-pick command in Git. which will allow you to Apply the changes introduced by some existing commits. You can directly use only that piece of commit changes without adding any additional code.

How to use cherry-pick command

To use cherry pick command you will need commit Hash.
commit hash
Commit SHA 
You can copy commit Hash from any one of location and use it to cherry-pick that commit in your latest code.

Command to do cherry-pick

There are various other options available in cherry-pick command that you can use to extend the cherry-pick command functionality. take a look at this link

Start Stop Youtube Video with External Buttons

In This Article you will get a easy way to start and stop youtube video with external link/button click. But before that let see ..

How to add Youtube video in HTML?

Implementing Youtube videos on HTML web page is an easy task.
Just copy paste Embed link of youtube video on your HTML page

Copy this Frame code and you can Adjust these parameters.

Start Stop Youtube Video on External Link Click

Sometimes we get the specific requirement to start and stop this Youtube video on external link click.
You can consider the example of Youtube video slider.
In Such slider, sometimes we have to start and stop youtube videos on next and prev button click.

Although we have Youtube Developer API Handling such cases is very easy https://developers.google.com/youtube/player_parameters

But sometimes when we are in hurry, We don’t prefer to look these kinds of lengthy code

Here we have a Small Demo of Start and Stop Youtube Video with external button click

How to Plan Your Day Effectively

We always weak up in morning with full of physical and mental energy. But as we go with our day we feel lost, tired, washed up.

Why? Why?  Why? ……

Ans:  It is only because we not organize our day properly.  
Not agree with me? Let me explain you …..

What is Mind ?

Our Mind not made to hold the information like a hard disk.

Memory-not-harddisk-buddydevelopers
Memory is not a hard disk

It made to processes the things Like a RAM.

Memory is like a ram - Buddydevelopers
Human Memory is like a Ram

 

So When we open multiple Application in it. Our mind becomes slower.
Tired Mind By BuddyDevelopers

And results
Anger….  Stress…  Depression ….

So till evening our status either look calm like

OR
for someone, it’s like  Super HOT

Now I am going to tell you reason and solution to overcome this problem.

Generally, in morning we start opening many applications in our mind like what to eat? where to go, friends birthday, party, office work, social media and much more….
And result, our mind starts processing all these work and we not able to maintain effectiveness for the day and at the end, we look as described in above pictures.

Now I am going to tell you the  way to go from Om to OMG

 

How to Plan Your Day Effectively?

To the plan an effective and productive day. Sit for 15 min and follow following five steps.

  • Collection
    Collect all information for the day and upcoming events.  Write down all you task for the day in a paper. 
    In short, make a list of your daily goals.
  • Processing
    Write down a suggesting solution for your task. How you can handle that task or what is that you can do to complete that task. 
  • Organize
    Now it’s time to organize your list and prioritize your daily task. Organize then based on the importance of the task. Which is more important do it first.
  • Review
    Now the time to review the list once again and do the required changes if anything you missed.
  • Do IT
    Yes, Now the time to do the work as per list.
    After making this list take it seriously. if you want to do some fun or take a break. you should mention that too in your task. do the work as per task priority list.

Now at the End Commitment to do the work. Believe me, it works just follow it for few days and see the changes in your like.

IF YOU FAIL TO PLAN, YOU PLAN TO FAIL

Type of Cache in WordPress

WordPress Cache Type

There are following types of Cache we can implement to make our website

  • Super Faster
  • Increase search engine ranking
  • Increase performance
  • User friendly

Page Cache: Page Cache refer to Caching pages in the html file. and serve the cached file to a user on recurrent request.

Object Cache: WordPress inbuild has a feature of caching DB queries is called object cache. The object cache is non-persistent cache. It does not maintain state. means it will reside in memory only for a duration of a request. Object cache will get stored for a period of time until persistent cache plugin not installed in site.
If persistent cache plugin not installed in the site it stored in Option table.

Database Cache: Similar as of Object Cache we can Cache other DB queries with Database Cache.

Opcode caching: It refers to caching compile PHP code. PHP is an object oriented programming language and it get compiled by PHP compiler on each request Opcode cache is caching compile PHP file code.

You can explore server-level cache options in details from here

How To Enable Siteground SuperCacher For WordPress Site

Buddypress Notification Plugin

This is a news to all BuddyPress lover and Users. I have just uploaded a New and my first plugin in WordPress directory for BuddyPress notification.

Buddy Notification Bell

User Experience

we see the notification on the social network usually comes with some ping alert  (Ex Facebook).

  • This Plugin not only shows Notification but also it shows them in with a ring tone.
  • It has a clear UI to show notification in dropdown format.
  • It will help to improve User experience and give a decent look and feel.

Buddy Notification Bell

Buddy Notification bell plugin is fine Buddypress Notification plugin that shows BuddyPress notification in bell format and it provides a clear interface to show all BuddyPress notification with a shortcode.

Bell Shortcode

You can use [buddy_notification_bell] to show all Buddypress Notification.
You can use this [buddy_notification_bell] on Text widget to show to Notification on the sidebar.

I am trying to improve it better and better soon we will come with another version( Buddy notification bell 1.0.2 ).
Contributors are welcome.
GitHub repo https://github.com/1naveengiri/buddy-notification-bell