This file contains hidden or 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 | |
/** | |
* Security: Hide login errors | |
*/ | |
add_filter('login_errors', create_function('$a', "return null;")); | |
?> |
This file contains hidden or 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 | |
/** | |
* Disable/Limit Number of Post Revisions | |
* | |
*/ | |
# Maximum 5 revisions # | |
define('WP_POST_REVISIONS', 5); | |
# Disable revisions # | |
define('WP_POST_REVISIONS', false); | |
?> |
This file contains hidden or 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 | |
/** | |
* Change version in WP-Admin footer | |
*/ | |
function change_footer_version() { | |
return 'Version 1.0.0'; | |
} | |
add_filter( 'update_footer', 'change_footer_version', 9999 ); | |
?> |
This file contains hidden or 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 | |
/** | |
* Show tag cloud | |
*/ | |
wp_tag_cloud(array( | |
'smallest' => 10, // size of least used tag | |
'largest' => 18, // size of most used tag | |
'unit' => 'px', // unit for sizing | |
'orderby' => 'name', // alphabetical | |
'order' => 'ASC', // starting at A |
This file contains hidden or 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 | |
/** | |
* Check if post is child | |
*/ | |
function ma_is_child_of($page_id) { | |
global $post; | |
$is_child = false; | |
$parents = get_post_ancestors($post); | |
if ($parents) { | |
foreach ($parents as $one_parent_id) { |
This file contains hidden or 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 | |
/** | |
* Chage the login logo URL | |
*/ | |
add_filter( 'login_headerurl', 'my_custom_login_url' ); | |
function my_custom_login_url($url) { | |
return 'http://www.example.com'; | |
} | |
?> |
This file contains hidden or 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 | |
/** | |
* Disable the Visual Editor | |
*/ | |
add_filter( 'wp_default_editor', create_function('', 'return "html";') ); | |
?> |
This file contains hidden or 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 | |
/** | |
* Disable the Admin Bar | |
*/ | |
show_admin_bar(false); | |
?> |
This file contains hidden or 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 | |
/** | |
* Disable dashboard widgets | |
*/ | |
function remove_dashboard_widgets() { | |
global $wp_meta_boxes; | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']); | |
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']); |
This file contains hidden or 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 metaboxes from Posts and/or Pages | |
*/ | |
function remove_meta_boxes() { | |
# Removes meta from Posts # | |
remove_meta_box('postcustom','post','normal'); | |
remove_meta_box('trackbacksdiv','post','normal'); | |
remove_meta_box('commentstatusdiv','post','normal'); | |
remove_meta_box('commentsdiv','post','normal'); |