<?php

// Custom WordPress Login Logo
function branded_login_logo() { ?>
  <style type="text/css">
    #login h1 a, .login h1 a {
      background-image: url("https://www.intergise.com/wp-content/uploads/2017/03/intergise-logo-black.png");
      background-size: 300px 107px;
      height: 107px;
      width: 300px;
      padding-bottom: 30px;
    }
  </style>
<?php }

add_action( 'login_enqueue_scripts', 'branded_login_logo' );

// Change login logo hover text
function login_logo_hover() {
    return 'Powered by Intergise';
}
add_filter('login_headertitle', 'login_logo_hover');

// Change welcome message
function howdy_message($translated_text, $text, $domain) {
  $new_message = str_replace('Howdy', 'Mambo', $text);
  return $new_message;
}
add_filter('gettext', 'howdy_message', 10, 3);

// Change footer credit
function change_footer_admin () {
  echo 'A safari website developed by <a href="http://www.intergise.com">Intergise</a>';
}

add_filter('admin_footer_text', 'change_footer_admin');

// Set default dashboard colour scheme
add_filter('get_user_option_admin_color', 'change_admin_color');
function change_admin_color($result) {
  return 'sunrise';
}

// Removes base dashboard widgets
function remove_dashboard_meta() {
    remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // WordPress News
    remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // Quick Draft
}
add_action('admin_init', 'remove_dashboard_meta');

?>