How to remove an action added by plugin from theme?

As we all know, flexibility and customization is possible in WordPress because of action and filter. We can add as many actions and filters and remove them as well.

Lets take a look how we can remove an action from theme that is added via plugin.

Lets say, we have a class Wte_Paypal_Gateway:

class Wte_Paypal_Gateway

This class has a global object instance called $plugin_public.

global $plugin_public;

An action wte_paypal_submit_btn is hooked in a tag called

Continue Reading

Introduction to Settings API

Settings API

It is the back-bone of plugin development. It was first added in WordPress 2.7 and allows semi-automatic management of admin pages containing settings forms to be managed. It lets you define settings pages, where sections can be defined within those pages and fields within those sections.

Let’s take an example:

A function ‘wp_travel_engine_settings_page‘ is created where a sub-menu page ‘WP Travel Engine Admin Settings‘ is defined. This submenu page is added to a

Continue Reading

How to Take Your WordPress Site From Local to Live

Step 1: Exporting Local WordPress Database

For this, just go to http://localhost/phpmyadmin/ and (choose) click on your WordPress database. Next, click on the Export button at the top. While exporting choose custom, which will provide you with more options to export your database. Select all tables to export and gzipped for compression. Now, scroll down to press the Go button to download your database in the compressed zipped format.

Step 2: Uploading WordPress Files

Now

Continue Reading

Plugin Development Strategies and Maintenance

Strategies:

Strategies are the steps which we follow during the plugin development process. Below are some of the steps to be undertaken so that the process becomes more effective as well as faster.

Planning

Planning is the blue-print of a process. Before we directly go to the development of a plugin, we plan the road-map as well as the strategies we will be following. It includes all the processes from naming of the plugin to

Continue Reading
How to Use Ajax in WordPress

How to Use Ajax in WordPress

Ajax is already built into the core WordPress administration screens, adding more administration-side Ajax functionality to the plugin is fairly straightforward.

Example

Below is a simple example where a post id is sent via ajax and is used by a main handler function (here storing a post id in session) whenever a button(link) is clicked.

So, here is a link:

<a class=”order” data-nonce=”‘ . $nonce . ‘” data-post_id=”‘ . $post->ID . ‘” href=”javascript:void(0);”>Order</a> Function

The

Continue Reading