Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removes link to options-discussion.php from dashboard welcome panel

  • Loading branch information...
commit ceab8d4b688d4697cc3e52e01a8f3c738cb99e59 1 parent b5bd8ed
@barryceelen barryceelen authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 remove-comments-absolute.php
View
9 remove-comments-absolute.php
@@ -41,7 +41,7 @@ public function __construct() {
add_filter( 'add_menu_classes', array( $this, 'add_menu_classes' ) );
// remove items in dashboard
- add_action( 'admin_footer-index.php', array( $this, 'remove_comments_areas' ) );
+ add_action( 'admin_footer-index.php', array( $this, 'remove_dashboard_comments_areas' ) );
// change admin bar items
add_action( 'wp_before_admin_bar_render', array( $this, 'admin_bar_render' ) );
@@ -248,17 +248,20 @@ function add_menu_classes( $menu ) {
}
/**
- * Remove areas for comments in backend via JS
+ * Remove comment related elements from the admin dashboard via JS
*
* @access public
* @since 0.0.1
* $return string with js
*/
- public function remove_comments_areas() {
+ public function remove_dashboard_comments_areas() {
?>
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready( function($) {
+ // Welcome screen
+ $( '.welcome-comments' ).remove();
+ // 'Right Now' dashboard widget
$( 'div.table_discussion:first' ).remove();
});
//]]>
Please sign in to comment.
Something went wrong with that request. Please try again.