Skip to content

Instantly share code, notes, and snippets.

@jdembowski
Created March 4, 2017 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdembowski/b57fdd1481651619b894fc734a6517ff to your computer and use it in GitHub Desktop.
Save jdembowski/b57fdd1481651619b894fc734a6517ff to your computer and use it in GitHub Desktop.
Remove nag notices from Swell Lite theme
<?php
// Queue up the child theme CSS
add_action( 'wp_enqueue_scripts', 'cleanretina_child_enqueue_styles' );
function cleanretina_child_enqueue_styles() {
$parent_style = 'parent-style';
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
add_action( 'admin_enqueue_scripts', 'mh_remove_credits' );
function mh_remove_credits() {
// Remove nag notices.
remove_action( 'admin_notices', 'swell_lite_admin_notice' );
remove_action( 'admin_notices', 'swell_lite_admin_footer_notice' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment