Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Publishing a Plugin on WordPress.org

Publishing a Plugin on WordPress.org

How do you get a plugin onto the WordPress.org repository? What steps do you need to take? Are there any specific requirements? These are just some of the questions this talk, aimed at anyone who wants to push a plugin to the WordPress.org repository will answer. We will go through the steps you need to take in order to prepare your plugin, some best practices in the plugin code and how to submit it to .org.

Mark Wilkinson

April 14, 2016
Tweet

More Decks by Mark Wilkinson

Other Decks in Technology

Transcript

  1. SANITIZE & VALIDATE wp_kses( $string, $allowed_html, $allowed_protocols ) esc_html( $text

    ) / esc_url( $url ) / esc_attr( $attr ) $wpdb->insert( $table, (array) $data )
  2. EXAMPLE <input type=“text” name=“title” value=“” /> $title = sanitize_text_field( $_POST[

    ‘title’ ] ); update_post_meta( $post_id, ‘my_title’, $title );
  3. EXAMPLE <input type=“text” name=“title” value=“” /> $title = sanitize_text_field( $_POST[

    ‘title’ ] ); update_post_meta( $post_id, ‘my_title’, $title ); $title = get_post_meta( $post->ID, ‘my_title’, true ); <h1><?php echo esc_html( $title ); ?></h1>
  4. readme.txt https://wordpress.org/plugins/about/readme.txt https://wordpress.org/plugins/about/validator/ Contributors: wpmarkuk, highrisedigital Donate link: http://markwilkinson.me/saythanks/ Tags:

    users, user switching Requires at least: 3.1 Tested up to: 4.4 Stable tag: 1.0.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html
  5. SVN

  6. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES
  7. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES
  8. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES
  9. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES
  10. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES
  11. 1.  Must be compatible with the GNU General Public License

    v2, or later 2.  Must not do anything illegal, or be morally offensive 3.  You have to actually use the Subversion repository we give you 4.  The plugin must not embed external links on the public site (like a "powered by" link) without explicitly asking the user's permission. 5.  If you don’t specify a compatible license, what you check in is considered GPLv2 or later. 6.  We also have a large list of detailed guidelines, but mostly they say how not to be a spammer. FOLLOW THE RULES