WordPress Plugin Development A Starter Guide For Beginners.

Slides:



Advertisements
Similar presentations
WordPress Installation for Beginners Sheila Bergman
Advertisements

WordPress from Start to Finish Day 1: Installing and Using WordPress Looking at the WordPress database.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
USING WORDPRESS. WEEK 1 1.Why WP? 2.Setting Up WP 3.Exploring the Admin screen 4.Page Organization 5.Posting 6.Polls.
Easy Website Creation Using WordPress Welcome and Thank You to our Sponsors.
Content Management, Working with WordPress Svetlin Nakov Telerik Corporation
Create Your Own Webpage. Today’s Agenda Group activity Wordpress –Photos –Widgets –Header –Theme Prepare to share sites w/small group Wednesday.
Blogs – what, why and how? A blog is a web-log It is a simple website that anyone can setup without any advanced computer know-how It’s the future: blogs,
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Wordpress as a content management system Building a better website with content management systems | June 12, 2009.
Content Management, Working with WordPress Svetlin Nakov Telerik Corporation
Web Page Behavior IS 373—Web Standards Todd Will.
UWWD In our quest to eliminate bad websites, we present…. HALLELUJAH!!
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
WordPress Widgets Kathy E Gill 1 February What Are Widgets?  A “configurable code snippet" that makes it possible to modify function and appearance.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Getting an account with WordPress.com Open your web browser ( mozilla firefox, internet explorer, opera, etc.,)
WELCOME TO THE AHIA CONNECTED COMMUNITY! HEALTHCARE INTERNAL AUDIT'S PROFESSIONAL THOUGHT LEADERSHIP COMMUNITY.
Wordpress Tutorial 22 – 24 April Table of Contents Introduction Designing blog Writing and Publishing blog Pages Posts Categories Tags Links Comments.
Bones – HTML5 Wordpress Theme Development
Launch Your WordPress site in One Hour By Bret Phillips For slides, codes, and notes: Web Devils WordPress.
WordPress Web. WordPress Blogging system with full content management Personal publishing system Built on PHP scripting language and MySQL relational.
#psuweb13 WORDPRESS THEMES 101 A WORDPRESS THEME INTRO WORKSHOP.
Administration Tab CiviCRM. Data Organization in CiviCRM: "Building Blocks" Contacts Reports Mail Tags Activities Contribe Member Events and Event Attendences.
Creating Effective School and PTA Websites Sam Farnsworth Utah PTA Technology Specialist
Session 1 SESSION 1 Working with Dreamweaver 8.0.
WORDPRESS TECHNOLOGY BY AMEER. WELCOME INTRODUCTION WordPress is an Open Source software system used by millions of people around the world to create.
WordPress Architecture ► Core files – PHP ► MySQL database  Configured by the installation script ► wp-content directory  themes subdirectory: layout.
What’s new in Kentico CMS 5.0 Michal Neuwirth Product Manager Kentico Software.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Post-Module WordPress Plugins BTM 395: Internet Programming.
Drupal for client Maria Sherskova skype: sherskova.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
Creating Webpages. Today’s Topics Embed video Embed music More text formatting Wordpress.
#eduguruSummit WORDPRESS THEMES 101 SOME SIMPLE STARTER TIPS FOR WORDPRESS THEMES dotEduGuru Summit 2013.
Fundamentals of Web DevelopmentRandy Connolly and Ricardo HoarFundamentals of Web DevelopmentRandy Connolly and Ricardo Hoar Fundamentals of Web DevelopmentRandy.
WordPress for Beginners February 2, 2014 Facebook.
+ Publishing Your First Post USING WORDPRESS. + A CMS (content management system) is an application that allows you to publish, edit, modify, organize,
Presented by Karen Porter UM School of Business Administration & ImpactOnlineMarketing.com Getting Familiar with the Dashboard.
Intro to APACHE, MySQL, and PHP & freely available (hackable) Packages Aonghus Sugrue 04 Oct 2012.
XP New Perspectives on Microsoft Office Access 2003, Second Edition- Tutorial 6 1 Microsoft Office Access 2003 Tutorial 6 – Creating Custom Forms.
…for beginners Class #2. Reminders Tues 7/21, 7/28, 8/4: 7-9:30pm at CMU 243 (UW) WiFi (UW) user: event0960, pass: aEBk_uYXf_uUMm class website (new slides!):
Here are some things you can do while you wait 1.Open your omeka.net site in your browser (e.g. 2.Open.
Website Update and Use of Official accounts Dr.Lasantha Ranwala ( MBBS,MSc-Biomedical Informatics) Medical Officer - Health Informatics RDHS Office.
Thinking of Drupal 8? Get started with the resources.
How to use Drupal Awdhesh Kumar (Team Leader) Presentation Topic.
Learn What’s New in WordPress4.0 Presented by: SunTecOSS.
The main menu options and their usage are: Dashboard This will display your main Dashboard ‘homepage’. In the top left of your Dashboard you’ll see some.
Introduction To Simple WordPress Plugin Development
Getting an account with WordPress.com
Intro to WordPress (Using XAMPP)
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
Developing WordPress Plugins
CONTENT MANAGEMENT SYSTEM CSIR-NISCAIR, New Delhi
What is a Blog? short for Weblog journal on a website
Ultimate Guide to WordPress Plugin Development
PHP Training at GoLogica in Bangalore
WordPress Development
How to create a website using WordPress? Part 2: Dashboard
Easy methods to control your RSS Feeds Footer in WordPress Guided By: wpglobalsupportwpglobalsupport.
How to Add Currency Converter in WordPress Have you ever wanted to know how to add currency converter to WordPress? dont worry! Keep reading this guide.
WordPress Ultimate PDF Generator
B OOST W EBSITE P ERFORMANCE WITH T HE C USTOM W ORDPRESS P LUG -I N D EVELOPMENT
Easy Website Creation Using WordPress
Samer Koda IEEE-SEM – Section Student Representative IEEE-SEM-SA – Webmaster 12/7/2018.
So you were told to make a website
WordPress Development
Wordpress test.cs.edinboro.edu.
WordPress Development
Presentation transcript:

WordPress Plugin Development A Starter Guide For Beginners

Md Jahidul Islam (oneTarek) Senior Executive, Development A. R. Communications Blog: onetarek.comonetarek.com Facebook: fb.com/oneTarekfb.com/oneTarek

What is a Plugin? WordPress Plugins allow easy modification, customization, and enhancement to a WordPress blog. Instead of changing the core programming of WordPress, you can add functionality with WordPress Plugins. Here is a basic definition: WordPress Plugin: A WordPress Plugin is a program, or a set of one or more functions, written in the PHP scripting language, that adds a specific set of features or services to the WordPress weblog, which can be seamlessly integrated with the weblog using access points and methods provided by the WordPress Plugin Application Program Interface (API).

Why Do We Write a Plugin? Solve a problem Extend existing functionality Save time Portability Make money (???)

How does plug-in works? As shown in the figure, the host application provides services which the plug-in can use, including a way for plug-ins to register themselves with the host application and a protocol for the exchange of data with plug-ins. Plug-ins depend on the services provided by the host application and do not usually work by themselves. Conversely, the host application operates independently of the plug-ins, making it possible for end-users to add and update plug-ins dynamically without needing to make changes to the host application.

When Plugins are Loaded

WP Folder Structure

Starting Your First Plugin STEP 1: Create a new folder inside the folder wp-content/plugins/ and named it related to your plugin name STEP 2: Creating a new plugin you’ll need to start with a simple PHP file. This can be named anything but should generally reflect your plug-in’s official name. STEP 3: On the top your PHP file put some information about your plugin. The first lines of your plug-in must be comment information for the parsing engine. This is extremely important as WordPress will be unable to process your file without. Below is an example code snippet.

STEP 4: Save your PHP file. STEP 5: Your are done. Your plugin is ready. Now go to dash board plugin list. You will see you plugin name in the list Activate your plugin.

A Real Example Create a PHP file with following codes and save that into the plugins folder with any name, I named it my-floating-bar.php. Now active this plugin and go to your site home page. You will see a red colored bar with some moving texts

Some Necessary Topics to Learn Custom Post Types Custom Taxonomy Custom Metabox Post Meta WordPress API Plugin API(*****) Shortcode API Widgets API Options API Settings API Dashboard Widgets API Quicktags API Rewrite API Transients API Global Variables WP Media Library Plugin and Content Directories Adding Administration Menus Creating Options Pages Creating Tables with Plugins Playing With Database Query(WPDB)Playing With Database Query(WPDB) Custom Queries WP Query AJAX in Plugins WP Nonce Translation(i18n)Translation AJAX in WordPressAJAX WordPress Cookies WordPress Feeds XML-RPC WordPress Coding Standards

WordPress API Plugin API Shortcode API Widgets API Options API Settings API Dashboard Widgets API Quicktags API Rewrite API Transients API

Plugin API Detail: HooksHooks are provided by WordPress to allow your plugin to 'hook into' the rest of WordPress; that is, to call functions in your plugin at specific times, and thereby set your plugin in motion. There are two kinds of hooks: 1.Actions 2. FiltersActionsFilters Actions and filters allow you add your own functionality or modify your site’s behavior by hooking a callback function onto a specific tag in the core code, setting priorities and using parameters and arguments passed to the callback function. Hooks, Actions, and Filters to use in your Plugins Codex Action Reference)Action Reference Codex Filter Reference)Filter Reference The Beginner's Guide to WordPress Actions and Filters

Actions Hooks Actions allow you to run your own function at a specific point in the processing of the WordPress. Action hooks are essentially placeholders. Wherever an action hook is placed, it will execute any code that has been “hooked” to it. For example, you might want to do something when a post is published. You may want to send an with detail about your published post. You may want to add your own HTML/JS code on the footer section of your website. Some example of Action hooks: wp_head, wp_footer, publish_post, save_post, the_post, MoreMore How to use action hooks? We can hook our own function at a particular point by using add_action function.add_action add_action( $hook_name, $my_function_to_add, $priority, $accepted_args ); WordPress will call my function on the specific point by using do_action() function.do_action() Example: add_action( “wp_footer”, “my_floating_bar”);

Filter Hooks Filters allow you to intercept and modify data as it is processed. For example, you might want not to show any post title more than 60 characters. Then you just need to modify the post title by using your custom function with the filter hook for post title. Some example of Filter hooks: the_content, the_title, wp_title, the_date, the_time, the_permalink, MoreMore How to use action hooks? We can modify particular data with our own function by using add_filter function.add_filter add_filter( $tag, $function_to_add, $priority, $accepted_args ); WordPress will pass specific data through my function by using apply_filters function.apply_filters Example: add_filter( “the_title”, “my_title_limit”);

Shortcode API Introduced in WordPress 2.5 is the Shortcode API, a simple set of functions for creating macro codes for use in post content. The average user acting as editor has the ability to publish dynamic content using macros, without the need for programming skills. Example: The following shortcode (in the post/page content) would add a photo gallery into the page [gallery] Detail Guide and Tutorial: ordpress-shortcodes-complete-guide/ ordpress-shortcodes-complete-guide/

Widgets API Widgets were originally designed to provide a simple and easy-to-use way of giving design and structure control of the WordPress Theme to the user, which is now available on properly "widgetized" WordPress Themes to include the header, footer, and elsewhere in the WordPress design and structure. Detail Guide and Tutorials: widgets-part-1-of-2--wp-20348http://code.tutsplus.com/tutorials/writing-maintainable-wordpress- widgets-part-1-of-2--wp to-creating-widgets-in-wordpress-28http://justintadlock.com/archives/2009/05/26/the-complete-guide- to-creating-widgets-in-wordpress-28

Options API The Options API is a simple and standardized way of storing data in the database. The API makes it easy to create, access, update, and delete options. All the data is stored in the wp_options table under a given custom name. This page contains the technical documentation needed to use the Options API. A list of default options can be found in the Option Reference.wp_optionsOption Reference Detail Guide and Tutorials:

Settings API The Settings API,allows admin pages containing settings forms to be managed semi-automatically. It lets you define settings pages, sections within those pages and fields within the sections. Detail Guide and Tutorials: to-the-wordpress-settings-api-part-1-what-it-is-why-it- matters--wp-24060http://code.tutsplus.com/tutorials/the-complete-guide- to-the-wordpress-settings-api-part-1-what-it-is-why-it- matters--wp wordpress-plugin-settings-api/ wordpress-plugin-settings-api/

Dashboard Widgets API The Dashboard Widgets API makes it very simple to add new widgets to the administration dashboard. Detail Guide and Tutorials: dashboard-widgets--wp-29778http://code.tutsplus.com/tutorials/how-to-build-custom- dashboard-widgets--wp custom-dashboard-widgets-in-wordpress/ custom-dashboard-widgets-in-wordpress/

Quicktags API The Quicktags API allows you to include additional buttons in the Text (HTML) mode of the WordPress editor. Detail Guide and Tutorials: quicktags/ quicktags/

Rewrite API WordPress allows theme and plugin developers to programmatically specify new, custom rewrite rules Example: Detail Guide and Tutorials: ritehttp://codex.wordpress.org/Class_Reference/WP_Rew rite 3. basics--wp-25474http://code.tutsplus.com/articles/the-rewrite-api-the- basics--wp-25474

Transients API WordPress Transients API, which offers a simple and standardized way of storing cached data in the database temporarily by giving it a custom name and a timeframe after which it will expire and be deleted Detail:

Tutorials And Books Tutorials: How to Create a WordPress Plugin Top 6 WordPress Plugin Development Tutorials 2 Essential Guides and Resources Books: WordPress Plugin Development (Beginner's Guide) Professional WordPress Plugin Development

Questions?

THANK YOU