Write Your First Word Press Plugin

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Write Your First Word Press Plugin - Presentation Transcript

    1. Write your first WordPress Plugin Ibrahim Abdel Fattah Mohamed, aka bingorabbit www.bingorabbit.com Twitter: @bingorabbit .. and I HEART WordPress
    2. Agenda ● What is a WordPress Plugin? ● Why do I need to write a WordPress Plugin? ● Plugin files structure and headers. ● How to add my plugin to my WordPress Blog. ● How to contribute to WordPress Development? ● Questions..
    3. What is a WordPress Plugin? A piece of code, written to solve a problem or to add a specific functionality that is not there.
    4. Why do I need to write a WordPress Plugin? ● Solving a problem. ● Add new functionality ● You love it, but have a better implementation? ● Modify it, extend it ● Want to make money?
    5. How can I write a plugin? ● Find a problem you need to solve, or something new to add. ● Warm your hands. ● Choose a descriptive name. ● Document every little thing. ● Think about the license. ● Then start coding it..
    6. Structure Wordpress/ |- wp-content/ |- plugins/ |- YourPlugin/ |- mainfile.php |- js/ |- css/ |- php/
    7. Headers <?php /* Plugin Name: Your desired name Plugin URI: http://path.to/plugin/ Description: What does it actually do? Version: x.Y Author: This should be you Author URI: http://path.to/you/ */ ?>
    8. Hooks ● Hooks are just..hooks.. ● Used to attach your plugin to a working system. ● Two types of Hook; Actions and Filters
    9. Actions ● Actions, are just actions.. ● Actions triggers an event or a function. ● When a post is published (action), send an email to the administrator (function, event or reaction). add_action('hook_name', 'your_function_name', [priority], [accepted_args]);
    10. Filters Database/User <----> Filters <----> Data ● Filters are also just..Filters.. ● Example, add some text just after every post. add_filter('hook_name', 'your_function_name', [priority], [accepted_args]);
    11. Sample Plugin: Email Friends on New Post
    12. Important Links ● Writing a Plugin ( http://codex.wordpress.org/Writing_a_Plugin) ● Plugin API (http://codex.wordpress.org/Plugin_API) ● Actions Reference ( http://codex.wordpress.org/Plugin_API/Action_Reference) ● Filters Reference ( http://codex.wordpress.org/Plugin_API/Filter_Reference) ● WordPress Coding Standards ( http://codex.wordpress.org/WordPress_Coding_Standards)
    13. Contributing to WordPress..
    14. Why? ● Improve the software you use.. ● Being a part of the community, learning and experience.
    15. Where? ● Documentation, aka Codex ( http://codex.wordpress.org/Codex:Contributing) ● Translation ( http://codex.wordpress.org/Translating_WordPress) ● Support Forum (http://www.wordpress.org/support) ● IRC Channel (#WordPress-dev on Freenode) ● Development (Next Slide?)
    16. How? ● Trac (http://trac.wordpress.org/) ● Code it, refine it, or just test it.. ● Got a bug? Go and report it.. http://wordpress.org/development/2009/03/contributing-to-wordpress-part-i-development/
    17. Any Questions?..
    18. Thanks!.. Ibrahim Abdel Fattah Mohamed www.bingorabbit.com www.catreloaded.net

    + Ibrahim Abdel Fattah MohamedIbrahim Abdel Fattah Mohamed, 8 months ago

    custom

    1443 views, 1 favs, 2 embeds more stats

    A session by Eng.Ibrahim Abdel Fattah Mohamed in Wo more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1443
      • 1415 on SlideShare
      • 28 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 25
    Most viewed embeds
    • 16 views on http://br.bingorabbit.com
    • 12 views on http://event.wordcampegypt.com

    more

    All embeds
    • 16 views on http://br.bingorabbit.com
    • 12 views on http://event.wordcampegypt.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories