Upload
cp-thapa
View
676
Download
0
Embed Size (px)
DESCRIPTION
The Re-brand WordPress Admin is for developers who want to give their clients a more personalized and less confusing content management system with amazing look and feel.
Citation preview
ReBrand WordPress Admin
WordPress Meet Up August 2014
By : Chandra Prakash Thapa
Before we start ?
At a minimum, you need to know: WordPress Hooks functions.php
WordPress Hooks?
Hooks allows us to “hook into” WordPress System to retrieve, insert or modify data or perform certain actions, without modifying the core files.
Two types : Actions : Perform Tasks Filters : Manipulate Data
Ref: • http://code.tutsplus.com/articles/the-beginners-guide-to-wordpress-actions-and-filters--wp-27373• http://www.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-hooks/• http://blog.teamtreehouse.com/getting-aquainted-with-wordpress-action-hooks
functions.php
Template.
Acts like a WordPress plugin.
Define functions, classes, actions and filters.
Add features and extend the functionality.
Ref: • http://www.wpbeginner.com/glossary/functions-php/
Modify the Login Logo
Modify the Login Logofunction wpnepal_admin_logo() {
echo '<style>.login h1 a {background-
image:url('.get_template_directory_uri(). '/images/logo.png) !important;
background-size:100%;width:185px;height:58px;
}</style>';
}
add_action('login_head', 'wpnepal_admin_logo');
Ref: • http://diythemes.com/thesis/rtfm/add-image-logo-wordpress-login/
Modify the Login Logo
Modify the Login Logo
Remove Logo from Admin Bar
Remove Logo from Admin Bar
function wpnepal_admin_bar_remove() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu('wp-logo');}
add_action('wp_before_admin_bar_render', 'wpnepal_admin_bar_remove', 0);
Ref: • http://www.staroneweb.co.in/remove-wordpress-logo-admin-bar-pages/
Remove Logo from Admin Bar
Customize the Dashboard
Customize the Dashboard
function wpnepal_custom_dashboard_widgets() { // Quick Press remove_meta_box('dashboard_quick_press', 'dashboard', 'side'); // WordPress blog remove_meta_box('dashboard_primary', 'dashboard', 'side'); wp_add_dashboard_widget('custom_help_widget', 'Help and Support', 'wpnepal_custom_dashboard_help');}
Ref: • http://codex.wordpress.org/Function_Reference/remove_meta_box
Customize the Dashboard
function wpnepal_custom_dashboard_help() { echo '<p> Your custom message.</p>';}
add_action('wp_dashboard_setup', 'wpnepal_custom_dashboard_widgets');
Customize the Dashboard
Custom admin footer text
Custom admin footer text
function custom_admin_footer() { echo "<p>Powered by : <a href='http://merobox.com/' >MeroBox </a></p> ";} add_filter('admin_footer_text','custom_admin_footer');
Custom admin footer version
Custom admin footer version
add_filter('update_footer','wpnepal_footer_version',11);
function wpnepal_footer_version() { return 'mBox Theme Frameork v1.0';}
Change the Default Gravatar
Change the Default Gravatar
add_filter('avatar_defaults','wpnepal_newgravatar');
function wpnepal_newgravatar($avatar_defaults) {$myavatar = get_bloginfo('template_directory') .
'/images/merobox.png';$avatar_defaults[$myavatar] = "MeroBox";return $avatar_defaults;
}
Change the Default Gravatar[ Go to > Dashboard-> Settings -> Discussion ]
Change the Default Gravatar
Custom Admin Style
Custom Admin Style
function wpnepal_admin_css() {
wp_enqueue_style('admin_css', get_template_directory_uri().'/css/admin.css');
}
add_action('admin_print_styles', 'wpnepal_admin_css' );
Custom Admin Style
/* Custom Amazing Background */#wpwrap{
background-image: url(../images/bk1.jpg);background-size: 100% 100%;
}
Custom Admin Style
Custom Admin Style
/* Text, Heading color */body,h2, #footer-upgrade, #adminmenu div.wp-menu-image:before{
color: #eee;}.hndle, p{
color: #222;}
Custom Admin Style/* Transparent Menu, White color */#adminmenuwrap, .wp-submenu ,.wp-submenu-wrap{
background-color: transparent !important;
}#adminmenu, .wp-submenu ,.wp-submenu-wrap{
background-color: rgba(255, 255, 255, 0.18);
}
Reference[ For more ]• http://code.tutsplus.com/articles/the-beginners-guide-to-wordpress-actions-and-
filters--wp-27373• http://www.smashingmagazine.com/2011/10/07/definitive-guide-wordpress-
hooks/• http://blog.teamtreehouse.com/getting-aquainted-with-wordpress-action-hooks• http://www.wpbeginner.com/glossary/functions-php/• http://diythemes.com/thesis/rtfm/add-image-logo-wordpress-login/ Google.com