Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
IMPROVING EASE OF USE WITHWORDPRESS ADMIN DASHBOARD
OVERVIEW
OVERVIEW1. User Roles.
OVERVIEW1. User Roles.2. The Login Screen.
OVERVIEW1. User Roles.2. The Login Screen.3. The Dashboard.
OVERVIEW1.   User Roles.2.   The Login Screen.3.   The Dashboard.4.   The Content Editor.
OVERVIEW1.   User Roles.2.   The Login Screen.3.   The Dashboard.4.   The Content Editor.5.   Other
USER ROLES- Create a “clean” admin account- Set-up the main user as an editor- Use the current_user_can() function:    if ...
THE LOGIN SCREEN
THE LOGIN SCREENHook: login_head
THE DASHBOARDTidy up...
THE DASHBOARDTidy up...- Does the client need this item?
THE DASHBOARDTidy up...- Does the client need this item?- Will the client use this item?
THE DASHBOARDTidy up...- Does the client need this item?- Will the client use this item?- Is this item an enhancement?
THE DASHBOARD
THE DASHBOARDHook: wp_dashboard_setup
THE DASHBOARDHook: wp_dashboard_setup// Globalise the Meta Box Widgets Arrayglobal $wp_meta_boxes;unset($wp_meta_boxes[das...
THE DASHBOARD
THE DASHBOARD
THE DASHBOARD
THE DASHBOARD                Hook: admin_menu
THE DASHBOARD                Hook: admin_menu                // Globalise the Menu Array                global $menu;     ...
THE DASHBOARD
THE DASHBOARD                // Add Theme Editing Capabilities                $role_object = get_role( editor );          ...
THE DASHBOARD
THE DASHBOARD                Hook: admin_head
THE DASHBOARD                Hook: admin_head                // Globalise the Submenu Array                global $submenu...
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITOR                     Hook: admin_head
THE CONTENT EDITOR                     Hook: admin_head                     ...                     <style>               ...
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITORHook: tiny_mce_before_init
THE CONTENT EDITORHook: tiny_mce_before_init// Force paste as plain text...$init[oninit] = setPlainText;
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITORHook: admin_init
THE CONTENT EDITORHook: admin_init// Add custom meta boxadd_meta_box( $id, $title, $callback, ... );
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITOR// render any shortcode and convert new lines to breaknl2br( $string ) # retains line breaksdo_shortcode...
THE CONTENT EDITOR
THE CONTENT EDITOR
THE CONTENT EDITORFilter: widget_text
THE CONTENT EDITORFilter: widget_text// render any shortcode in widgets.add_filter(widget_text, do_shortcode);
OTHER CONSIDERATIONS
OTHER CONSIDERATIONSAllow for Errors<a href="facebook.com">Facebook</a> <!-- Will return an error -->// http://www.faceboo...
OTHER CONSIDERATIONSAllow for Errors<a href="facebook.com">Facebook</a> <!-- Will return an error -->// http://www.faceboo...
CONCLUSION
CONCLUSION If it is difficult to update, it won’t get updated.
~fin.
Improving Ease of Use with the WordPress Admin
Upcoming SlideShare
Loading in …5
×

Improving Ease of Use with the WordPress Admin

1,391 views

Published on

Presentation for WordCamp Cape Town 2011

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Improving Ease of Use with the WordPress Admin

  1. 1. IMPROVING EASE OF USE WITHWORDPRESS ADMIN DASHBOARD
  2. 2. OVERVIEW
  3. 3. OVERVIEW1. User Roles.
  4. 4. OVERVIEW1. User Roles.2. The Login Screen.
  5. 5. OVERVIEW1. User Roles.2. The Login Screen.3. The Dashboard.
  6. 6. OVERVIEW1. User Roles.2. The Login Screen.3. The Dashboard.4. The Content Editor.
  7. 7. OVERVIEW1. User Roles.2. The Login Screen.3. The Dashboard.4. The Content Editor.5. Other
  8. 8. 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 }
  9. 9. THE LOGIN SCREEN
  10. 10. THE LOGIN SCREENHook: login_head
  11. 11. THE DASHBOARDTidy up...
  12. 12. THE DASHBOARDTidy up...- Does the client need this item?
  13. 13. THE DASHBOARDTidy up...- Does the client need this item?- Will the client use this item?
  14. 14. THE DASHBOARDTidy up...- Does the client need this item?- Will the client use this item?- Is this item an enhancement?
  15. 15. THE DASHBOARD
  16. 16. THE DASHBOARDHook: wp_dashboard_setup
  17. 17. THE DASHBOARDHook: wp_dashboard_setup// Globalise the Meta Box Widgets Arrayglobal $wp_meta_boxes;unset($wp_meta_boxes[dashboard][normal][core][dashboard_right_now]);
  18. 18. THE DASHBOARD
  19. 19. THE DASHBOARD
  20. 20. THE DASHBOARD
  21. 21. THE DASHBOARD Hook: admin_menu
  22. 22. THE DASHBOARD Hook: admin_menu // Globalise the Menu Array global $menu; ... unset( $menu[key($menu)] ); ...
  23. 23. THE DASHBOARD
  24. 24. THE DASHBOARD // Add Theme Editing Capabilities $role_object = get_role( editor ); $role_object->add_cap( edit_theme_options );
  25. 25. THE DASHBOARD
  26. 26. THE DASHBOARD Hook: admin_head
  27. 27. THE DASHBOARD Hook: admin_head // Globalise the Submenu Array global $submenu; ... unset( $submenu[themes.php][7] ); ...
  28. 28. THE CONTENT EDITOR
  29. 29. THE CONTENT EDITOR
  30. 30. THE CONTENT EDITOR Hook: admin_head
  31. 31. THE CONTENT EDITOR Hook: admin_head ... <style> #edit-slug-box strong, #sample-permalink, #edit-slug-buttons {display:none;} </style> ...
  32. 32. THE CONTENT EDITOR
  33. 33. THE CONTENT EDITOR
  34. 34. THE CONTENT EDITOR
  35. 35. THE CONTENT EDITORHook: tiny_mce_before_init
  36. 36. THE CONTENT EDITORHook: tiny_mce_before_init// Force paste as plain text...$init[oninit] = setPlainText;
  37. 37. THE CONTENT EDITOR
  38. 38. THE CONTENT EDITOR
  39. 39. THE CONTENT EDITOR
  40. 40. THE CONTENT EDITORHook: admin_init
  41. 41. THE CONTENT EDITORHook: admin_init// Add custom meta boxadd_meta_box( $id, $title, $callback, ... );
  42. 42. THE CONTENT EDITOR
  43. 43. THE CONTENT EDITOR
  44. 44. 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);...
  45. 45. THE CONTENT EDITOR
  46. 46. THE CONTENT EDITOR
  47. 47. THE CONTENT EDITORFilter: widget_text
  48. 48. THE CONTENT EDITORFilter: widget_text// render any shortcode in widgets.add_filter(widget_text, do_shortcode);
  49. 49. OTHER CONSIDERATIONS
  50. 50. OTHER CONSIDERATIONSAllow for Errors<a href="facebook.com">Facebook</a> <!-- Will return an error -->// http://www.facebook.com, www.facebook.com, facebook.com will allwork.if( strpos( $url, http:// ) === false ) return http:// . $url;else return $url...
  51. 51. OTHER CONSIDERATIONSAllow for Errors<a href="facebook.com">Facebook</a> <!-- Will return an error -->// http://www.facebook.com, www.facebook.com, facebook.com will allwork.if( strpos( $url, http:// ) === false ) return http:// . $url;else return $url...Consider creating a plugin
  52. 52. CONCLUSION
  53. 53. CONCLUSION If it is difficult to update, it won’t get updated.
  54. 54. ~fin.

×