So You Want to Build and Release a Plugin? WordCamp Lancaster 2014

50 %
50 %
Information about So You Want to Build and Release a Plugin? WordCamp Lancaster 2014
Technology

Published on March 1, 2014

Author: ryanduff

Source: slideshare.net

Description

My talk from WordCamp Lancaster 2014. Things to implement when preparing a plugin for public release.

SO YOU WANT TO BUILD AND RELEASE A PLUGIN… Ryan Duff WordCamp Lancaster 2014

ABOUT ME • Long time WordPress user • Plugin Developer • Meetup Organizer

A BIT OF PLUGIN HISTORY

my-hacks.php

VERSION 1.2 (May 22, 2004)

Plugin API

THINGS TO CONSIDER

YOUR CODE

FILTERS

apply_filters( $tag, $value, $var ... ) http://codex.wordpress.org/Function_Reference/apply_filters

EXAMPLE $query_args = array( 'post_type' => 'books', 'posts_per_page' => 5, 'author' => 3 ); $books = new WP_Query( apply_filters( 'wclanc_books_query', $query_args ) );

ACTIONS

do_action( $tag, $arg_a, $arg_b, $etc ); http://codex.wordpress.org/Function_Reference/do_action

EXAMPLE do_action( 'wclanc_books_before' ); echo '<div class="wclanc_books">'; while( $books->have_posts() ) : $books->the_post() echo '<div class="wclanc_book">'; do_action( 'wclanc_before_book_title', get_the_ID() ); echo '<h3 class="wclanc_book_title">' . get_the_title() . '</h3>'; do_action( 'wclanc_after_book_title', get_the_ID() ); echo '</div>'; endwhile; echo '</div>'; do_action( 'wclanc_books_after' );

INTERNATIONALIZATION

EXAMPLE /* * Plugin Name: i18n Test * Author: Ryan Duff * Text Domain: wclanc-i18n */ $text = __( ‘This is a test', ‘wclanc-i18n' ); _e( ‘This test will echo', ‘wclanc-i18n' ); https://codex.wordpress.org/I18n_for_WordPress_Developers

PLUGIN SETTINGS http://themeoptions.wordpress.com/

OTHER CONSIDERATIONS • Code style • Documentation • Errors

PLUGIN LICENSE

COMMON LICENSES • GPL v2/v3 • MIT (X11) • Apache License v2 • WTFPL v2 1) http://wordpress.org/plugins/about/ 2) http://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses

PLUGIN HOSTING

• WordPress.org • GitHub • Both?

QUESTIONS?

RYAN DUFF RYAN@FUSIONIZED.COM @RYANCDUFF

Add a comment

Related presentations

Related pages

So You Want to Build and Release a Plugin? WordCamp ...

1. SO YOU WANT TO BUILD AND RELEASE A PLUGIN…Ryan Duff WordCamp Lancaster 2014. 2. ABOUT ME •Long time WordPress user•Plugin Developer•Meetup Organizer
Read more

WordCamp Lancaster 2014 - maintainn.com

WordCamp Lancaster 2014. ... titled So, you want to build and release a plugin? will be about getting your ... WordPress Support Services by Maintainn ...
Read more

WordCamp Lancaster 2014 – Notes and Links - Andrew Gehman

WordCamp Lancaster 2014 was ... So, you want to build and release a plugin? ... 3 Designs Lesson I Learned From WordCamp Lancaster (Webkite.com) 2014 ...
Read more

Plugin Development @ WordCamp Norway 2014 - Technology

1.Plugin Development WordCamp Norway 2014. 2. ... Test your plugin on PHP 5.2. 66. Thank you. ! ... So You Want to Build and Release a Plugin? WordCamp ...
Read more

sponsor Archives - WordPress Support Services by Maintainn

WordCamp Lancaster 2014. February 18, 2014. ... titled So, you want to build and release a plugin? will be about getting your feet wet with building a ...
Read more

September 2014 – Make WordPress Community

Make WordPress Community. Handbooks; ... * So You Want to Be An ... in the month of August we have published videos from one so far. WordCamp Russia 2014 .
Read more

Speakers | WordCamp NYC 2014

WordCamp NYC 2014. Search. ... where we build websites for leading companies in the media, ... and Professional WordPress Plugin Development.
Read more