Support » Plugins and Hacks » [Resolved] Remove Html Tag / Stream Admin Menu Position

[Resolved] Remove Html Tag / Stream Admin Menu Position

  • Hi there,

    first of all nice plugin, really well coded.
    As you can see from the subject of this post i was wondering:

    1) how to remove the html tag <!-- Stream WordPress user activity plugin v1.4.5 -->?

    2) how to move down to the last position the “stream” menu link in the admin section backend.

    I really appreciate hear from you a response.
    Thanks in advance!


Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Jonathan Bardo


    Hey there mr_pa!

    Here are the steps to resolve your issues:

    1) To remove the html tag, you can implement this quick filter in your theme functions.php
    add_filter( 'wp_stream_frontend_indicator', '__return_empty_string' )

    2) To move stream down the menu link you can implement this other filter in your theme functions.php
    add_filter( 'wp_stream_menu_position', 'XX' ) (note replace XX with the position you want i.e a number)

    N.B You can also create a mu-plugins that implement those 2 filters instead of putting them in your theme. That way if you change theme, those filters will still be activated.

    Have a great day!

    Thanks for your speedy support.

    Regarding to the second point, i already tried with the solution that you provided but i got this waring:

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '99' not found or invalid function name in .....

    Note: i added the filter to the functions.php of my child theme.

    Any suggestion?

    Plugin Author Frankie Jarrett


    It’s because 99 must be an integer, not a string. So just remove the quotes around it.

    Unfortunately even without quotes the warning persists 🙁

    Plugin Author Frankie Jarrett


    Oh, sorry I just looked at original code above, there needs to be a function called or an anonymous function that’s doing the return value.

    I just tested these, and they work:

    add_filter( 'wp_stream_frontend_indicator', function() { return false; } );
    add_filter( 'wp_stream_menu_position', function() { return 99; } );

    Ok i suppose to be solved with:

    add_filter( 'wp_stream_menu_position', function() { return 99; } );

    What do you think?

    Plugin Author Frankie Jarrett


    That’s correct.


    Plugin Author Jonathan Bardo


    I’m so sorry about that! My bad on that function call!

    Plugin Author Frankie Jarrett


    No worries JB!


    I’m trying to get menu under Dashboard, but it doesn’t seem to play nicely with the native wordpress hook to re-arrange menu order. The following doesn’t work to change the order and adding ‘admin.php?page=wp_stream’ to the array also has no effect.

    function gs_custom_menu_order($menu_ord) {
    	return array(
    add_filter('custom_menu_order', '__return_true');
    add_filter('menu_order', 'gs_custom_menu_order');
    add_filter( 'wp_stream_menu_position', function() { return 3; } );

    How can we get this to work with the native WordPress hook?


    Plugin Author Frankie Jarrett



    Are you saying that you want Stream to appear as a submenu of Dashboard? That is not supported since Stream has it’s own set of submenus.

    Please clarify, thanks!

    Nope. Just want it listed below the dashboard menu item, not a submenu.

    Plugin Author Frankie Jarrett


    Thanks for clarifying, Brian.

    What you are describing is the default position of Stream: http://note.io/1qxuINI

    Also see: https://github.com/x-team/wp-stream/blob/40c928b0105452b2c5f9fd9bb5537e6bc0c705d9/includes/admin.php#L123

    I will need a little more insight into what you mean, specifically for your application.

    Thanks. That helps me understand.

    I guess the problem is when I use this filter to change the menu order of other items it messes up the placement of the Stream menu item, putting it below my Project CPT (‘edit.php?post_type=project’).

    When I try to include Stream (‘admin.php?page=wp_stream’) and add it to the array it doesn’t seem to be recognized. Not sure why.


Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Resolved] Remove Html Tag / Stream Admin Menu Position’ is closed to new replies.