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

Maintaining Sites with Preventive Development

Maintaining Sites with Preventive Development

WordCamp Baltimore 2013 talk, revised for WordCamp Philly 2014.

ramiabraham

May 22, 2014
Tweet

More Decks by ramiabraham

Other Decks in Technology

Transcript

  1. Hi Rami Abraham; • Developer at Maintainn.com • Freelance developer...sometimes

    • twitter: @ramiabraham • RamiAbraham.com • Likes staying sane and keeping clients/customers happy.
  2. To: Diane the Developer From: Claire the Client Subject: OMGZ

    HOW DO I DO THIS????? Hai, HOW DO I DO THE THING?????? NEED TO KNOW ASAPPPP KTHX!!!!!!1 - Claire Non-Urgent ‘urgencies’
  3. 1. Dashboard Customizations - Custom wp-login.php stylesheet function custom_login_stylesheet() {

    wp_enqueue_style( 'custom_login_stylesheet', get_template_directory_uri() . '/css/login. css' ); } add_action('login_head', 'custom_login_stylesheet');
  4. 2. Dashboard Customizations - Change login logo url in wp-login.php

    function custom_login_logo_url($url) { return 'http://www.yoursite.com/logo. png'; } add_filter( 'login_headerurl', 'custom_login_logo_url' );
  5. 3. Dashboard Customizations - Add a Custom Stylesheet for wp-admin

    function custom_admin_css() { wp_enqueue_style( 'custom_admin_css', get_template_directory_uri() . '/css/admin. css' ); } add_action('admin_head', 'custom_admin_css' );
  6. 4. Dashboard Customizations - Remove wp-admin Menu Pages function remove_menu_pages()

    { remove_menu_page('link-manager.php'); remove_menu_page('edit-comments. php'); } add_action( 'admin_init', 'remove_menu_pages' );
  7. 5. Dashboard Customizations - Change admin menu order function custom_menu_order($menu_order)

    { if (!$menu_order) return true; return array( 'index.php', 'edit.php?post_type=page', 'edit.php' ); } add_filter('custom_menu_order', 'custom_menu_order'); add_filter('menu_order', 'custom_menu_order');
  8. 6. Dashboard Customizations - Change 'Enter Title Here' default for

    post title area function custom_default_title($title){ $title = 'Type the title here'; return $title; } add_filter( 'enter_title_here', 'custom_default_title' );
  9. 7. Dashboard Customizations - Change admin footer text content function

    change_footer_content() { echo 'Here is some custom admin footer content'; } add_filter('admin_footer_text', 'change_footer_content');
  10. 8. Dashboard Customizations - Add a custom dashboard widget function

    my_custom_dashboard_widgets() { global $wp_meta_boxes; wp_add_dashboard_widget('custom_help_widget', 'Open a support request', 'custom_dashboard_help'); } function custom_dashboard_help() { echo 'To open a support request, just fill in this...'; } add_action('wp_dashboard_setup', 'my_custom_dashboard_widgets');
  11. 9. Dashboard Customizations - Remove dashboard widgets function disable_default_dashboard_widgets() {

    remove_meta_box('dashboard_right_now', 'dashboard', 'core'); remove_meta_box('dashboard_recent_comments', 'dashboard', 'core'); remove_meta_box('dashboard_incoming_links', 'dashboard', 'core'); remove_meta_box('dashboard_plugins', 'dashboard', 'core'); remove_meta_box('dashboard_quick_press', 'dashboard', 'core'); remove_meta_box('dashboard_recent_drafts', 'dashboard', 'core'); remove_meta_box('dashboard_primary', 'dashboard', 'core'); remove_meta_box('dashboard_secondary', 'dashboard', 'core'); } add_action('admin_menu', 'disable_default_dashboard_widgets');
  12. 10. Dashboard Customizations - Remove dashboard widgets - but only

    according to the user role function customize_meta_boxes() { global $current_user; get_currentuserinfo(); if ($current_user->user_level < 3) remove_meta_box('postcustom','post','normal'); } add_action('admin_init','customize_meta_boxes');
  13. 11. Dashboard Customizations - Remove Columns from Post/Page View Screen

    function pc_my_columns_filter( $columns ) { unset($columns['author']); unset($columns['tags']); unset($columns['categories']); unset($columns['tags']); return $columns; } add_filter( 'manage_edit-post_columns', 'pc_my_columns_filter', 10, 1 ); function pc_my_custom_pages_columns($columns) { unset( $columns['author'] ); return $columns; } add_filter( 'manage_pages_columns', 'pc_my_custom_pages_columns' );
  14. User related: Does it feel cramped in the dashboard? Is

    the layout confusing or unclear? Want a custom look and feel?
  15. Tips: 7. Block search engines. 8. Make it a private

    site. (http auth, IP, etc) 9. Backup the stage, too. 10. Emphasize training materials here. 11. In some cases, you can allow the client to deploy to live. Wait no.
  16. User related: This is a safe area. Test your content!

    Can’t set up staging? Go local.
  17. Local snippets. Coda (native) Sublime Text + (snippet xml syntax)

    Notepad ++ (via plugin) Eclipse (Templates) Vim (via plugins)
  18. User related: These post statuses can hold content that you

    frequently re-use: - Drafts - Private posts and pages *You can also add more.
  19. User related: Whatever theme you choose, have someone audit the

    code - unless you know it’s from a high-quality source.
  20. User related: Have an active project with a developer or

    agency? If they’re not using any task/project management, ask them to, or use one yourself!
  21. Most project management apps have file-sharing. You can also use

    the WP Media Manager to store some files, and can define further mimetypes via post_mime_types
  22. User related: It’s your content. You should have access to

    it. Keep track of your assets. Use dropbox or other services as repositories.
  23. User related: Make sure your site is backed up, whether

    you maintain the site or not. Ask a developer for a recommendation, not Google. Test-driving backup plugins is dangerous.
  24. User related: WordPress 3.6+ post and page revisions are excellent.

    Use them! You can get very fine-grained, multi-user revision control of your website content with plugins like Edit Flow.
  25. User related: Explain what you’d like to see. How’s the

    site performing for you? Does it feel normal? Provide examples of interfaces you like.
  26. User related: Ask for documentation. Never buy un-documented themes. Make

    sure you know how to use your site before the site launches.
  27. User related: • If you see errors that contain the

    word “redeclare”, have the site checked out for these issues.
  28. User related: • Ask about backups and security. • Assess

    the value of your site to you or your business. Worth it?