Byron Rode (improving ease of use with the word press admin)

496 views
432 views

Published on

From my experience of making WordPress sites for clients, and for clients in South Africa in particular, there are a lot of people out there who get over-whelmed if updating their site isn’t quick and easy and involves too many menus and processes. As developers I think we can get too caught up in how clever we are being, without considering the needs of the end user. My talk aims to put across some solutions I’ve come across for making the whole process of updating a site as painless and simple as possible

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
496
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Byron Rode (improving ease of use with the word press admin)

  1. 1. IMPROVING EASE OF USE WITHWORDPRESS ADMIN DASHBOARD
  2. 2. OVERVIEW1. User Roles.2. The Login Screen.3. The Dashboard.4. The Content Editor.5. Other
  3. 3. USER ROLES- Create a “clean” admin account- Set-up the main user as an editor- Use the current_user_can() function: if ( !current_user_can( administrator ) ) { //do something awesome here }
  4. 4. THE LOGINHook: login_head
  5. 5. THE DASHBOARDTidy up...-Does the client need this item?-Will the client use this item?-Is this item an enhancement?
  6. 6. THE DASHBOARDHook: wp_dashboard_setup// Globalise the Meta Box Widgets Arrayglobal $wp_meta_boxes;unset($wp_meta_boxes[dashboard][normal][core][dashboard_right_now]);
  7. 7. THE DASHBOARD
  8. 8. THE DASHBOARD
  9. 9. THE DASHBOARD Hook: admin_menu // Globalise the Menu Array global $menu; ... unset( $menu[key($menu)] ); ...
  10. 10. THE DASHBOARD // Add Theme Editing Capabilities $role_object = get_role( editor ); $role_object-add_cap( edit_theme_options );
  11. 11. THE DASHBOARD Hook: admin_head // Globalise the Submenu Array global $submenu; ... unset( $submenu[themes.php][7] ); ...
  12. 12. THE CONTENT EDITOR
  13. 13. THE CONTENT EDITOR Hook: admin_head ... style #edit-slug-box strong, #sample-permalink, #edit-slug-buttons {display:none;} /style ...
  14. 14. THE CONTENT EDITOR
  15. 15. THE CONTENT EDITOR
  16. 16. THE CONTENT EDITORHook: tiny_mce_before_init// Force paste as plain text...$init[oninit] = setPlainText;
  17. 17. THE CONTENT EDITOR
  18. 18. THE CONTENT EDITOR
  19. 19. THE CONTENT EDITORHook: admin_init// Add custom meta boxadd_meta_box( $id, $title, $callback, ... );
  20. 20. THE CONTENT EDITOR
  21. 21. THE CONTENT EDITOR
  22. 22. THE CONTENT EDITOR// render any shortcode and convert new lines to breaknl2br( $string ) # retains line breaksdo_shortcode( $content ) # applies any shortcode(s) in$content...$meta = nl2br( get_post_meta( $postid, $field, $single =true ) );return do_shortcode($meta);...
  23. 23. THE CONTENT EDITOR
  24. 24. THE CONTENT EDITORFilter: widget_text// render any shortcode in widgets.add_filter(widget_text, do_shortcode);
  25. 25. OTHER CONSIDERATIONS
  26. 26. OTHER CONSIDERATIONSAllow for Errorsa href=facebook.comFacebook/a !-- Will return an error --// http://www.facebook.com, www.facebook.com, facebook.com willall work.if( strpos( $url, http:// ) === false ) return http:// . $url;else return $url...Consider creating a plugin
  27. 27. CONCLUSION If it is difficult to update, it won’t get updated.
  28. 28. ~fin...

×