Skip to content

Instantly share code, notes, and snippets.

View Nerd-Rush's full-sized avatar

Nathan Rollag Nerd-Rush

View GitHub Profile
@Nerd-Rush
Nerd-Rush / gist:2269df3f4a2308a61981720f82e9f655
Created December 13, 2023 20:09
Add Footer Credit to WordPress Admin
function wp_admin_footer_text() {
echo '<span style="color:#50575e">Website built by Nerd Rush! For questions or support, please visit our website at <a href="https://nerdrush.com/" target="blank" rel="noopener">www.nerdrush.com</a></span>';
}
add_filter('admin_footer_text', 'wp_admin_footer_text');
@Nerd-Rush
Nerd-Rush / Client editing disclaimer PHP snippet
Last active January 29, 2024 00:15
Dismissable WordPress message to your clients.
// Client editing disclaimer
function custom_admin_notice_with_logo() {
$user_id = get_current_user_id();
if (get_user_meta($user_id, 'custom_notice_dismissed', true) !== 'yes') {
if (current_user_can('administrator') || current_user_can('editor') || current_user_can('author')) {
$nonce = wp_create_nonce('custom_notice_dismiss_nonce');
$image_url = 'https://nerdrush.com/wp-content/uploads/2023/08/Nerd-Rush-Logo-Blue-2023.svg'; // External image URL
?>
<div class="notice notice-warning custom-notice" style="padding-top: 20px;">
<img src="<?php echo esc_url( $image_url ); ?>" alt="Logo" style="width: 120px; display: block; margin-bottom: 10px;">