Skip to content

Instantly share code, notes, and snippets.

digitalinkwell

Block or report user

Report or block digitalinkwell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View remove-howdy
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);
View maintenance-mode.php
// 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');
View auto-plugin-updates.php
add_filter( 'auto_update_plugin', '__return_true' );
View hide-author-usernames.php
add_action(‘template_redirect’, ‘bwp_template_redirect’);
function bwp_template_redirect()
{
if (is_author())
{
wp_redirect( home_url() ); exit;
}
}
View hide-wp-config.php
<files wp-config.php>
order allow,deny
deny from all
</files>
View stop-php-error-reports.php
error_reporting(0);
@ini_set(‘display_errors’, 0);
View handling-plurals.php
printf(
_n(
'One comment',
'%s comments',
get_comments_number(),
'sample-plugin'
),
number_format_i18n( get_comments_number() )
);
View link-in-paragraph-translation.php
View translating-html.php
<div class="site-info">
<a href="http://wordpress.org/" >< ?php _e( 'Proudly powered by WordPress.', 'sample-plugin' ); ?></a>
</div>
You can’t perform that action at this time.