Date post: | 10-Apr-2017 |
Category: |
Technology |
Upload: | linchpin |
View: | 132 times |
Download: | 2 times |
SUBMITTING YOUR FIRST PLUGIN TO WORDPRESS.ORG@BostonWP
@aaronware@linchpin_agency
AARON WAREPRESIDENT @ LINCHPINNearly 20 years as a Web Professional 8ish years using WordPress (right around WP 2.0)
I lead an awesome team at Linchpin. We have some plugins on WordPress.org One of them I am going to talk about shortly
@aware on WordPress.org and on Slack @aaronware on Twitter
@bostonwp@aaronware
@linchpin_agency
@aaronware@linchpin_agency
WE’RE HIRING! LINCHPIN.AGENCY/CAREERS
WORDPRESS RIJoin Us! 2nd Tuesday of Every Month at 6:00PM
W o r d P r e s s R I@WordPressRI #RIWP
COME SEE ME @ WORDCAMP BOSTON
WORDCAMP RISeptember 30th & October 1st New England Tech East Greenwich Campus
Tickets Now Available! 2016.rhodeisland.wordcamp.org
Assumptions
I AM ASSUMING YOU HAVE A PLUGIN ALREADY BUILT
@bostonwp
AND WE WILL BE RETROFITTING + ADJUSTING
OUR EXISTING PLUGIN.
@aaronware@linchpin_agency
Assumptions
I AM ASSUMING YOU HAVE…
@bostonwp
THOUGHT ABOUT SECURITY + INVESTIGATED THE WORDPRESS CODING STANDARDS
@aaronware@linchpin_agency
More Tools
@bostonwp
I’LL SHARE SOME USEFUL LINKS AT THE END
IF YOU ARE STARTING FROM SCRATCH OR NEED SOME USEFUL LINKS
@aaronware@linchpin_agency
WHY?MY FIRST QUESTION
http://giphy.com/gifs/coca-cola-sad-futbol-noo-qn6rtLtmwIX60
@bostonwp
@aaronware@linchpin_agency
IN A CONVOLUTED SPACE DOES YOUR PLUGIN DO SOMETHING DIFFERENT?
WHO CARES?
WordPress.org Plugin Repo
WILLINGNESS TO PARTICIPATE
▸ Are you willing to answer questions about your plugin?
▸ Are you willing to fix issues that come up?
▸ Are you open to feature requests?
▸ Are you willing to Open Source your plugin? (It’s required)
▸ Are you open to haters hating?
@bostonwp@aaronware
@linchpin_agency
WordPress.org Plugin Repo
MORE STUFF▸ The plugin must not do anything illegal, or be morally offensive (that’s subjective,
we know).
▸ The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission.
▸ They also have a large list of detailed guidelines, but mostly they say how not to be a spammer.
@bostonwp
https://wordpress.org/plugins/about/@aaronware
@linchpin_agency
Getting Ready To Rumble
IF YOU’RE COOL WITH THE PREVIOUS ITEMS….
Are you pumped or what?
@bostonwp http://giphy.com/gifs/kids-warrior-ultimate-DrTJN2J8fzaA8
▸ Is the Ultimate Warrior even wearing pants?
▸ That kid at the end has a sweet cowboy hat
@aaronware@linchpin_agency
LET’S GET TO WORK!@aaronware
@linchpin_agency@bostonwp
WHAT IS GPL? WHY IS IT REQUIRED AND WHAT DOES THAT HAVE TO DO WITH MY PLUGIN?
- BRUCE WILLIS
Aaron Ware
Understanding GPL and how to say GNU
https://www.gnu.org/gnu/pronunciation.en.html
@bostonwp
@aaronware@linchpin_agency
WordPress Foundation Stance on GPL
WHAT IS GPL?The GPL is a copyleft license, which means that derived works can only be distributed under the same license terms. This is in distinction to permissive free software licenses, of which the BSD licenses and the MIT License are the standard examples.
https://en.wikipedia.org/wiki/GNU_General_Public_License
https://www.gnu.org/licenses/gpl.html@aaronware
@linchpin_agency
@bostonwp
WordPress Foundation Stance on GPL
HOW DOES GPL AFFECT MY PLUGIN ON WORDPRESS.ORG?The WordPress Foundation considers all plugins and themes listed on WordPress.org as derivative work of WordPress as such. Plugins and Themes released on on WordPress.org are have the GPLv2 and above license automatically applied to them upload submission to the .org repo.
https://wordpress.org/about/license/
▸ Your plugin must be compatible with the GNU General Public License v2, or any later version. We strongly recommend using the same license as WordPress — “GPLv2 or later.”
▸ If you don’t specify a compatible license, what you check in is considered GPLv2 or later.
@aaronware@linchpin_agency
@bostonwp
readme.txt
THE MOST USEFUL FILE IN YOUR ENTIRE PLUGIN
@bostonwp
https://wordpress.org/plugins/about/readme.txt@aaronware
@linchpin_agency
DO NOT USE THE TAG “PLUGIN” IN YOUR PLUGINS LIST OF TAGS!
- WAYNE GRETZKY
Aaron Ware
Proper Tag Usage
https://wordpress.org/plugins/tags/ @aaronware@linchpin_agency
@bostonwp
readme.txt continued…
STARTING NEW, GETTING INSPIRATION OR GENERATING
▸ You can manually edit the file shared in the previous slide.
▸ Get inspiration from some popular plugin’s readme.txt files for examplesSee: https://wordpress.org/plugins/stream/ <— I think it’s a great example
▸ Use Generate WP: https://generatewp.com/plugin-readme/
@aaronware@linchpin_agency@bostonwp
readme.txt landing
VALIDATING
▸ https://wordpress.org/plugins/about/validator/ will validate your plugin readme.txt for formatting and quasi markdown validation
@aaronware@linchpin_agency@bostonwp
i18n l10n
LOCALIZATION, INTERNATIONALIZATION AND TRANSLATION
▸ Your plugin can be translation ready in just a few steps
▸ Updating your Plugin Header to include a text domain and domain path (optional)
▸ Use the WordPress gettext methods for String output of your plugin. Think _e(‘hello Dolly’, ‘my-plugin’); vs echo “Hello Dolly”;
▸ Use Poedit, Grunt and Glotpress to allow for translation
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/https://developer.wordpress.org/reference/functions/load_plugin_textdomain/
i18n l10n
LOCALIZATION, INTERNATIONALIZATION AND TRANSLATION▸ An example .pot file based used in translation
https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/https://developer.wordpress.org/reference/functions/load_plugin_textdomain/https://make.wordpress.org/polyglots/handbook/tools/poedit/
Visual Elements
ASSETS FOLDER
The assets/ folder of your plugin will house banners, icons and screenshots of your plugin. These assets will be displayed within the .org plugins directory and within the WordPress dashboard.
More Info About Assets
IMAGE SIZES▸ Start by creating an assets/ directory in the root of your SVN checkout (if one doesn't
already exist). This will be on the same level as tags/ and trunk/, for example.
▸ Inside that assets/ directory, you can make a file named banner-772x250.png or banner-772x250.jpg. The image must be exactly 772 pixels wide and 250 pixels tall. No GIFs.
▸ To support high-DPI (aka 'retina') displays, you can additionally make a file named banner-1544x500.png or banner-1544x500.jpg. The image must be exactly 1544 pixels wide and 500 pixels tall. No GIFs. This image, if present, will only be served when the website detects that the viewing browser is on a high-DPI display. Read this feature’s announcement post for more details and special notes about creating this image.
Initial Plugin Submission
NOT A LOT OF REQUIREMENTS
▸ Plugin Name
▸ Plugin Description
▸ A valid .zip of your plugin that also include a read file
▸ Volunteers do the initial review so be patient
@aaronware@linchpin_agency@bostonwp
YOUR NEW .SVN REPOAfter Plugin Approval
SVN (SUB VERSION)Oldie but Goldie https://wordpress.org/plugins/about/svn/
@aaronware@linchpin_agency
@bostonwp
Svn And The .Org Repo
MAKING COMMITS TO WORDPRESS.ORG▸ WordPress.org is a plugin host not just a directory. In order to handle releases we
have to play within the rules of the sand box.
▸ Once created you will use your wordpress.org credentials to also log into your repo
▸ SVN while different in how it works, it is similar to git in that they are both versioning systems.
▸ I wont get into the complexities of mirroring .git to .svn because I’m not an expert.
@aaronware@linchpin_agency@bostonwp
Svn And The .Org Repo
YOUR FIRST CHECKOUT. PUTTING THINGS IN THE TRUNK
@aaronware@linchpin_agency@bostonwp
Trunk is similar to master (in git)
Svn And The .Org Repo
YOU CAN “TAG” STABLE RELEASES TO KEEP ORGANIZED
@aaronware@linchpin_agency@bostonwp
Svn And The .Org Repo
YOU CAN ALSO USE BRANCHES FOR DEVELOPMENT AS WELL
@aaronware@linchpin_agency@bostonwp
▸ This is useful for beta releases.
▸ Also good practice in general.
▸ Personally I only ever use Tags and Trunk
▸ I have a deploy script I wrote in Grunt to create a package for wordpress.org with out off my build scripts
Sharing Is Caring
PROMOTING YOUR PLUGIN▸ Meet Ups are great for feedback prior to release (or post release)
▸ WordPress Advanced Users Group on Facebook
▸ Reaching out to WP Tavern and other online publications
▸ Jetpack.pro
@bostonwp@aaronware
@linchpin_agency
Useful Things
STARTING FROM SCRATCH AND MORE TOOLS
▸ Pluginception: https://wordpress.org/plugins/pluginception/
▸ generator-wp-make: https://github.com/10up/generator-wp-make
▸ Poedit
▸ Have you checked out the WordPress Coding Standards? https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards
▸ What do you guys use?
@aaronware@linchpin_agency
THANKS FOR HAVING ME
@bostonwp@aaronware
@linchpin_agency
AARON WAREPRESIDENT @ LINCHPINNearly 20 years as a Web Professional 8ish years using WordPress (right around WP 2.0)
I lead the awesome team at Linchpin. We have some plugins on WordPress.org One of them I am going to talk about shortly
@aware on WordPress.org and on Slack @aaronware on Twitter
@bostonwp@aaronware
@linchpin_agency
QUESTIONS AND COMMENTS TIME!
@bostonwp@aaronware
@linchpin_agency