Browse files

Merge pull request #16 from barryceelen/patch-2

Removes link to options-discussion.php from dashboard welcome panel
  • Loading branch information...
2 parents b5bd8ed + ceab8d4 commit 23aca747dec7c5c53b5d191c8f2a2546ac30fa07 @bueltge committed Aug 8, 2013
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();
});
//]]>

0 comments on commit 23aca74

Please sign in to comment.