Your SlideShare is downloading. ×
Hooking into Comments
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Hooking into Comments

6,778
views

Published on

Published in: Technology

2 Comments
3 Likes
Statistics
Notes
  • @riscphree: I included a link to download the PDF version on my site: http://dentedreality.com.au/2010/08/wordcamp-savannah-2010/
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Any chance on getting this in PPT or something for us Windows users? Absolutely no way to get Keynote files to run afaik.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
6,778
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
51
Comments
2
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Mark’s talk -- hooks/actions
    Theme developers?
    Plugins that work with comments?
    Copy-paste the comments form
    Comment form from Twentyten


  • Kubrick
    43 Lines
  • Logic, needs to be repeated on each theme
    if the user is logged in,
    if comments are enabled, etc
  • Twentyten
  • Same logic, different theme!






  • Twentyten






  • Others available: what happens when logged in?
    When not logged in and registration is required?
    When replying to another message









  • Hook in and save in commentmeta!

    add_action( ‘wp_insert_comment’ ) + save into $_SESSION


  • wp_options to enable the “feature” and how often to show it
  • Add the message to the top of the form
  • Add a hidden field to save against the comment to know who “won”

  • Don’t forget to hook into comment submission and save in commentmeta

    add_action( ‘wp_insert_comment’ )




  • Transcript

    • 1. Hooking into Comments comment_form() is your friend
    • 2. The Old
    • 3. kubric
    • 4. kubric
    • 5. r13029
    • 6. r13029
    • 7. Can We Make This Better?
    • 8. D.R.Y.
    • 9. D.R.Y. o n ‘ t
    • 10. D.R.Y. o e n p ‘ e t a t
    • 11. D.R.Y. o e o n p u ‘ e r t a s t e l f
    • 12. The New
    • 13. r13029
    • 14. • Replying to another comment • Comments open/closed? • Registration Required? • wp_login_form()! • User Logged In? • Previously entered name/email/URL • Standardized actions/filter
    • 15. But I want to...
    • 16. Filters comment_form_default_fields comment_form_defaults comment_form_logged_in comment_form_field_{$name}
    • 17. title_reply Filters comment_notes_before { comment_form_default_fields } comment_field comment_notes_after label_submit
    • 18. Actions comment_form_before comment_form_must_log_in_after comment_form_top comment_form_logged_in_after comment_form_before_fields comment_form_after_fields comment_form comment_form_after comment_form_comments_closed
    • 19. comment_form_before Actions comment_form_before_fields comment_form_after_fields comment_form comment_form_after
    • 20. Visual
    • 21. Functional
    • 22. FREE Set of Steak Knives!!!
    • 23. d) All of the above
    • 24. Ideas?
    • 25. Questions?
    • 26. Beau Lebens @beaulebens beau@automattic.com dentedreality.com.au

    ×