WordPress.org

Ready to get started?Download WordPress

Forums

How to remove feeds from the Dashboard (8 posts)

  1. mike503
    Member
    Posted 6 years ago #

    A bunch of people were having an issue with this, including myself, making a variety of plugins and other things. All I wanted to do was turn off the feeds from loading (I thought the AJAX loading was solving it, but it was still requiring the local PHP to make a connection, which is slow/breaks behind corporate firewalls)

    I knew there had to be a way, I tried a bunch of different methods to try to kill off the index_js() from being called, etc. This wound up working, I am not sure if a single remove_action line would work but I tried a variety of priorities and none seemed to work. However, adding an action which calls remove action worked. Doesn't seem like anyone had a simple solution for just that.

    Enjoy!

    function remove_dashboard_feeds() {
            remove_action('admin_head', 'index_js');
    }
    
    add_action('admin_head', 'remove_dashboard_feeds', 1);
  2. mike503
    Member
    Posted 6 years ago #

    I should state this first: the reason I was doing it like this is because we have a strict policy on not modifying the core functionality of a package. It should be easily upgradable and not require patching or manual tweaks for each version change. Everything we have been doing has been in an external plugin fashion. Otherwise I would have just hacked index.php simple enough :)

  3. Dgold
    Member
    Posted 6 years ago #

    . However, adding an action which calls remove action worked.

    Adding it where?

    I would like to be able to do this also, without hacking the admin index.php every time a new version of WP is released.

  4. MichaelH
    Member
    Posted 6 years ago #

    Just make it a plugin:

    <?php
    /*
    Plugin Name: Remove Dashboard Feeds
    Plugin URI: http://wordpress.org/#
    Description: Disables dashboard feeds.
    Author: Michael Shadle
    Version: 1.0
    Author URI: http://michaelshadle.com/
    */ 
    
    // The function
    function remove_dashboard_feeds() {
            remove_action('admin_head', 'index_js');
    }
    
    // The action
    add_action('admin_head', 'remove_dashboard_feeds', 1);
    
    ?>
  5. miketew
    Member
    Posted 6 years ago #

    oh hey, thanks michaelH :)

    Dgold: I guess to answer... you can put it anywhere in a plugin, as long as the add_action is called and the function is defined to remove the index_js action :)

    I guess I should post this properly on my site.

  6. mike503
    Member
    Posted 6 years ago #

  7. MichaelH
    Member
    Posted 6 years ago #

    And this plugin also
    http://wordpress.org/extend/plugins/dashboard-lite/ with this code:

    <?php
    /*
    Plugin Name: Dashboard Lite
    Plugin URI: http://www.bluetrait.com/page/wordpress-plugins/
    Description: Removes incoming links, dev news and planet news off the dashboard. Requires WordPress 2.2.0+
    Version: 0.1
    Author: Michael Dale
    Author URI: http://www.bluetrait.com/
    */
    
    add_action('admin_xml_ns', 'btdl_remove_dashboard_js');
    
    function btdl_remove_dashboard_js() {
    
    	remove_action('admin_head', 'index_js');
    
    }
    
    ?>
  8. MyNoise
    Member
    Posted 6 years ago #

    best plug in...finally got rid of those incoming feeds

Topic Closed

This topic has been closed to new replies.

About this Topic