This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Add a custom admin dashboard welcome widget | |
function custom_dashboard_widget() { | |
echo '<h1>Welcome to your new WordPress site built by an awesome developer</h1>'; | |
} | |
function add_custom_dashboard_widget() { | |
wp_add_dashboard_widget('custom_dashboard_widget', 'Integrity Welcomes You To WordPress!', 'custom_dashboard_widget'); | |
} | |
add_action('wp_dashboard_setup', 'add_custom_dashboard_widget'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#https?://(www\.)?(http://domain.com|altdomainname.wpengine.com)/wp-(content|includes)# => https://domain.com/wp-$3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `db_table_name`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('999999', 'alpinealex', MD5('password'), 'Alpine Alex', 'alex@alpinealex.com', 'https://alpinealex.com/', '1999-01-01 00:00:00', '', '0', 'Alpine Alex'); | |
INSERT INTO `db_table_name`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '999999', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `db_table_name`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '999999', 'wp_user_level', '10'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Customize Admin toolbar if you do desiced to keep it around... | |
function change_toolbar($wp_toolbar) { | |
$wp_toolbar->remove_node('comments'); | |
$wp_toolbar->add_node(array( | |
'id' => 'myhelp', | |
'title' => 'Help', | |
'meta' => array('target' => 'help') | |
)); | |
$wp_toolbar->add_node(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Custom login styles | |
function custom_login_styles() { | |
echo '<style type="text/css"> | |
.login h1 a { background-image:url('.get_template_directory_uri().'/images/logo.png) !important; text-align: center !important; width: 350px !important; background-size: 234px; 82px !important;} | |
body {background-color: #F6F6F6!important;} | |
div.updated, .login .message {color: #fff !important; border-color: #950639 !important; background-color: #CF153D !important;} | |
</style>'; | |
} | |
add_action('login_head', 'custom_login_styles'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Make TinyMCE editor awesome! | |
function make_mce_awesome( $init ) { | |
$init['theme_advanced_blockformats'] = 'h2,h3,h4,p'; | |
$init['theme_advanced_buttons1_add'] = 'copy, cut, paste, redo, undo'; | |
$init['theme_advanced_buttons2_add'] = 'anchor, hr, sub, sup'; | |
$init['theme_advanced_disable'] = 'wp_help'; | |
return $init; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove Meta-Boxes from Posts & Pages Editor Screens | |
function remove_extra_meta_boxes() { | |
remove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts | |
remove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages | |
remove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts | |
remove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts | |
remove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts | |
remove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages | |
remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove Meta-Boxes from Posts & Pages Editor Screens | |
function remove_extra_meta_boxes() { | |
remove_meta_box( 'postcustom' , 'post' , 'normal' ); // custom fields for posts | |
remove_meta_box( 'postcustom' , 'page' , 'normal' ); // custom fields for pages | |
remove_meta_box( 'postexcerpt' , 'post' , 'normal' ); // post excerpts | |
remove_meta_box( 'postexcerpt' , 'page' , 'normal' ); // page excerpts | |
remove_meta_box( 'commentsdiv' , 'post' , 'normal' ); // recent comments for posts | |
remove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages | |
remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); // post tags |
NewerOlder