Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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