Skip to content

Instantly share code, notes, and snippets.

add_filter('gettext', 'change_howdy', 10, 3);
function change_howdy($translated, $text, $domain) {
if (!is_admin() || 'default' != $domain)
return $translated;
if (false !== strpos($translated, 'Howdy'))
return str_replace('Howdy', 'Welcome', $translated);
// Activate WordPress Maintenance Mode
function wp_maintenance_mode(){
if(!current_user_can('edit_themes') || !is_user_logged_in()){
wp_die('<h1 style="color:red">Website under Maintenance</h1><br />We are performing scheduled maintenance. We will be back online shortly!');
}
}
add_action('get_header', 'wp_maintenance_mode');
add_filter( 'auto_update_plugin', '__return_true' );
add_action(‘template_redirect’, ‘bwp_template_redirect’);
function bwp_template_redirect()
{
if (is_author())
{
wp_redirect( home_url() ); exit;
}
}
<files wp-config.php>
order allow,deny
deny from all
</files>
error_reporting(0);
@ini_set(‘display_errors’, 0);
define( 'DISALLOW_FILE_EDIT', true );
printf(
_n(
'One comment',
'%s comments',
get_comments_number(),
'sample-plugin'
),
number_format_i18n( get_comments_number() )
);
<div class="site-info">
<a href="http://wordpress.org/" >< ?php _e( 'Proudly powered by WordPress.', 'sample-plugin' ); ?></a>
</div>