Posted inTechnology / php / Programming / wordpress

How to Create a WordPress Plugin in 10 Minutes Flat

Today, We want to share with you How to Create a WordPress Plugin in 10 Minutes Flat.In this post we will show you how to create plugin in WordPress step by step, hear for how to create plugin in wordpress step by step with example we will give you demo and example for implement.In this post, we will learn about Create a Custom WordPress Plugin From Scratch with an example.

How to Create a WordPress Plugin in 10 Minutes Flat

There are the Following The simple About How to Make a Word-press Plugin in 10 Minutes Flat Full Information With Example and source code.

As I will cover this Post with live Working example to develop how to create plugin in wordpress with example, so the create wordpress plugin from scratch for this example is following below.

Step 1: Structure of the WordPress Plugin

|-new-tab-redirect-plus
|--new-tab-redirect-plus.php
|--readme.txt

Step 2: Coding WordPress Plugin

new-tab-redirect-plus.php

dir = dirname(__FILE__);
	}


	function ntrp_comment_links_in_new_window($text) 
	{
		$url = stripslashes_deep ( esc_attr ( get_option ( 'ntrp-website-full-url' ) ) );
		$check_plugin_enable = stripslashes_deep ( esc_attr ( get_option ( 'ntrp-open-comment-links-in-new-window' ) ) );
		$check_othor = stripslashes_deep ( esc_attr ( get_option ( 'ntrp-othar-comment-links-in-new-window' ) ) );

		if(!empty($check_plugin_enable)){
				return str_replace('',$s[1]);

				$text =  ''.$t[1].'';
				return str_replace('
	

New Tab Redirect Plus By Pakainfo

Custom WordPress Comment Links in New Tab


Open Link in a New Tab
Open WordPress Comment Links in New Tab/Window (add target=”_blank”)

OR

Open Link in a New Tab

© 2017 - www.pakainfo.com

Sorry, New Tab Redirect Plus requires PHP version 5.0 or greater.

"; } function ntpr_register(){ add_filter('comment_text', array($this,'ntrp_comment_links_in_new_window')); add_action ( "admin_init", array($this,'ntpr_plugin_settings') ); add_filter ( 'the_content',array($this,'ntrp_com_content') ); add_action('admin_head', array($this,'admin_js')); // Add initialization and activation hooks add_action('init', array($this,'ntpr_api_init')); } function ntpr_activate(){ add_action( 'activated_plugin', array($this,'ntpr_activation_redirect') ); flush_rewrite_rules(); } function ntpr_deactivate(){ flush_rewrite_rules(); } } if(class_exists('ntprwp')){ $ntpr = new ntprwp(); $ntpr->ntpr_register(); } //activation register_activation_hook(__FILE__,array($ntpr,'ntpr_activate')); // desactivation register_deactivation_hook(__FILE__,array($ntpr,'ntpr_deactivate')); //desinsallation function ntpr_plugin_activate(){ register_uninstall_hook( __FILE__, 'ntpr_uninstall' ); } register_activation_hook( __FILE__, 'ntpr_plugin_activate'); // And here goes the uninstallation function: function ntpr_uninstall(){ delete_option('ntrp-website-full-url'); delete_option('ntrp-open-comment-links-in-new-window'); delete_option('ntrp-othar-comment-links-in-new-window'); }

Step 3: Create a WordPress Readme TXT File

readme.txt

=== New Tab Redirect Plus ===
Plugin Name: New Tab Redirect Plus
Contributors: pakainfo
Donate link: https://www.pakainfo.com/donate
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: comment, author, links, new tab, new window, comment author links, open in new window, open in new tab, comments new tab, wordpress comment links, open, comments, author url, target blank, blank, external-links, target new
Requires at least: 4.0
Tested up to: 5.1
Stable tag: 1.0

Stop any fake data sending visitors away - By default, Open WordPress Comment Links in New Tab/Window (add target=”_blank”) tab or window with: New Tab Redirect Plus.

== Description ==
New Tab Redirect Plus will allow you to have your comment visitors links open in a new tab or window. In other words, instead of leaving your site completely when clicked, they will open in a new tab.

This plugin opens all the web links added in the footer comments URL, in a new tab or window which helps to decrease the bounce rate and increase user engagement on your wordpress blog.

Opens all the Web site links (URLs) added in the comments and author URL, in a new tab or window.

This will increase the likelihood that visitors will continue browsing your website.

Simple, fast, and effective!

= Some of the features include: =
*Open comment links in a new tab or the same tab
*change a custom link's destination with a redirect
*Open WordPress Comment Links in New Tab/Window (add target=”_blank”)
*Replace URL INTO Your Custom web URL
*Works with http:// and https:// links
*Simple, fast, and effective!

== Installation ==

= From within WordPress =
1. Visit 'Plugins > Add New > Search plugins'
1. Search for 'New Tab Redirect Plus' and click to install
1. Activate New Tab Redirect Plus from your Plugins page.
1. Go to Settings > New Tab Redirect Plus.

You can also download the zip file from this page and upload it from the Plugins >> Add New > Upload page.

= Manually =
1. Upload the `new-tab-redirect-plus` folder to the `/wp-content/plugins/` directory
1. Activate the New Tab Redirect Plus plugin through the 'Plugins' menu in WordPress
1. Configure the plugin by going to the WordPress `Settings` menu, then to `New Tab Redirect Plus` that appears in your admin menu

== Frequently Asked Questions ==

= What does this plugin do? =

This plugin opens all the links added in the comments and author URL, in a new tab or window which helps to decrease the bounce rate and increase user engagement on your blog.


= Are there any limitations? =

No - Any specific requirements for this(New Tab Redirect Plus) plugin

= Is that it? =

Pretty much, yeah.


== Screenshots ==

1. WordPress Admin Dashboard New Tab Redirect Plus in Settings Page
2. Enable the wordpress Open Comment Links in New Window  - target _blank set
3. Enable/change a custom link's destination with a redirect


== ChangeLog ==

= 1.0.0, August 21, 2019 =

* First Initial Release

== Upgrade Notice ==

* Just click Update Now from the Plugins or Updates screen and let WordPress do it for you automatically. Nothing else needs done.

New Tab Redirect Plus 1
New Tab Redirect Plus 1

New Tab Redirect Plus 2
New Tab Redirect Plus 2

New Tab Redirect Plus 3
New Tab Redirect Plus 3

Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to Create a WordPress Plugin in 10 Minutes Flat.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype