Support » Plugin: No Nonsense » Bugs, questions, suggestions

  • Resolved Ov3rfly


    Remove Comments from admin should also remove comments columns in posts/pages/media/etc. list view, considered as a bug.

    How can we test if Disable XML-RPC works? Currently a call of still shows a message:

    XML-RPC server accepts POST requests only.

    Considered as maybe a bug.

    Could Disable XML-RPC also remove

    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="" />

    or similar which is added in wp_head rsd_link action?

    Could you add removal of wp_head wlwmanifest_link action?

    Could you add removal of wp_head wp_shortlink_wp_head and template_redirect wp_shortlink_header action?

    Could you add removal of wp_head wp_generator action?

    Could you add removal of wp_head rest_output_link_wp_head and template_redirect rest_output_link_header action?

    Could you enhance Remove WordPress logo on login screen with Replace WordPress logo on login screen with site icon if present, example code:

    function ov3rfly_login_enqueue_scripts() {
    	if ( has_site_icon() ) {
    <style type="text/css">
    .login #login h1 a {
    	background-image: url("<?php echo get_site_icon_url( 192 ); ?>"); // 192 retina/hires, 84 normal
    .login #login h1 a:focus {
    	-webkit-box-shadow: none;
    	box-shadow: none;
    add_action( 'login_enqueue_scripts', 'ov3rfly_login_enqueue_scripts' );

    Could you add Replace WordPress logo link on login screen with site url, example code:

    function ov3rfly_login_headerurl( $url ) {
        return get_bloginfo( 'url' );
    add_filter('login_headerurl', 'ov3rfly_login_headerurl' );

    Thanks for the plugin, greatly appreciated.

    No Nonsense 1.3.0, WordPres 5.8.2

Viewing 15 replies - 16 through 30 (of 34 total)
  • Thread Starter Ov3rfly


    Maybe wp would be better than init, it runs later. First I wanted to suggest wp_loaded but then I read in docs, that it runs before admin_init and whatever plugins might only add their actions there.

    Plugin Author room34


    I have a tendency to use init or admin_init in situations like this (functions that wrap multiple other hooks), just to be sure I’m not potentially wrapping a hook that has already run (obviously an issue with this previously trying to add template_redirect hooks in wp_head which comes later!). Given what’s in there now, using wp would work. But if in the future I end up adding more features within the same function, it might need to be called earlier.

    Obviously another plugin could overwrite what I’m doing here using a later hook, but that’s just the nature of WordPress.

    Thread Starter Ov3rfly


    But if in the future I end up adding more features within the same function, it might need to be called earlier.

    You probably mean …called later. WordPress logic: Low priority number = earlier, high priority number = later.

    Another issue, also about priority, installed plugin on some customer sites, comment icon in admin bar did not disappear there, tracked it down, WordPress file wp-includes/class-wp-admin-bar.php line 651 messes with comments in an admin_bar_menu action with a priority of 60.

    Currently plugin uses 11:

    add_action('admin_bar_menu', function($wp_admin_bar) { $wp_admin_bar->remove_node('comments'); }, 11, 1);

    Should be changed to 61:

    add_action('admin_bar_menu', function($wp_admin_bar) { $wp_admin_bar->remove_node('comments'); }, 61);

    Removal works fine with 61 on above site. Note that ,1 can be omitted $accepted_args is 1 by default.

    No Nonsense 1.4.4

    Plugin Author room34


    I meant what I said. It needs to be in init instead of wp in case it needs to insert another hook that comes before wp. I know how priorities work within a single hook; I was talking about how I’m using init to set up later hooks in one place.

    I’ll change my admin_bar_menu action to priority 99 to catch this issue you mentioned and any likely others we’re not aware of. (Come to think of it, I’ve had to set that ridiculously high in the past because of MonsterInsights, as I recall, so maybe I should make it 99999 or something like that.)

    Thread Starter Ov3rfly


    Another suggestion, I am adding this in all child themes:

    // remove "edit link" in frontend below posts, pages, etc.
    add_filter( 'get_edit_post_link', function( $link ) { return null; } );

    Also I saw some props in changelog for suggestions, feel free to add me too. 🙂

    And a sidenote about dashboard widgets, Site Health is offered as an option also on sites which do not have Site Health function/widget, pre WP 5.2 or similar.

    • This reply was modified 6 months, 2 weeks ago by Ov3rfly. Reason: sidenote Site Health
    Plugin Author room34


    Good idea on removing front-end edit links. I don’t use themes that include those in the first place often enough to have thought of it yet.

    @ov3rfly Also I saw some props in changelog for suggestions, feel free to add me too. 🙂

    Already planning to!

    Thread Starter Ov3rfly


    Bug with Remove Posts from admin, it does not remove “New > Post” from admin bar, suggested fix, with priority of your choice 😉

    add_action('admin_bar_menu', function($wp_admin_bar) { $wp_admin_bar->remove_node('new-post'); }, PHP_INT_MAX);
    Thread Starter Ov3rfly


    Rolling out your plugin to some more customer sites brought up this suggestion for a cosmetic fix for Replace WordPress logo on login screen, add this to site icon css: .login h1 a { border-radius: 4px; }

    Plugin Author room34


    That one seems like it is probably better suited to theme development, rather than for me to assume that all site owners want rounded corners on their icons.

    Thread Starter Ov3rfly


    Theme developers are not aware of use of the site icon outside of their frontend design or when used as icon on phones (where rounded corners are added automagically). A radius of 4px is almost nothing and matches the look of icon much better to login button and overall WordPress login screen. This also affects only icons which completely fill the square, most site icons are transparent and the radius has no effect there.

    Thread Starter Ov3rfly


    Saw the refactored Remove Howdy, it could be a bit fragile as it currently depends on that span html, here a more general and (imho) better solution:

    add_filter( 'gettext', function( $translated_text, $text, $domain ) {
    	if ( $domain == 'default' && $text == 'Howdy, %s' )
    		return '%s';
    		return $translated_text;
    }, 10, 3 );

    No Nonsense 1.5.0

    Plugin Author room34


    I agree the gettext filter is probably a more reliable way to make the change, but I’ve hade some feedback about eliminating the greeting altogether, not just (arguably the stupidest aspect of the greeting) the choice of “Howdy” for US English.

    I was originally just going to replace the output of that element altogether with the current user’s display name, but that would also remove the Gravatar. The way I’m handling it now is a bit crude, and assumes WordPress will never change the HTML output of that element (which of course can’t be guaranteed, but I’d say a significant change to it is unlikely). But I think the biggest problem with my current approach is that some languages might put the greeting after the display name, and I’m not accounting for that.

    But at the moment, assuming we can trust that the <span> will always be there, and that this issue is primarily a nuisance for users whose language puts the greeting first (if there even are languages that put it after the name; I haven’t confirmed that), I think the current approach will suffice. I am planning to change it eventually, I’m just still trying to decide on the best way to do it.

    Regarding the rounded corners on the site icon on the login screen, I’m starting to come around to your thinking… especially since the example in the Customizer shows rounded corners. But I feel like if it’s going to do that, it should be more than 4 pixels… it should match what the Customizer shows.

    • This reply was modified 6 months, 2 weeks ago by room34.

    I was wondering if there was any way this plugin could block unwanted advertising posts from other plugins on the main admin page (some are really persistent and annoying)

    Plugin Author room34


    That would be nice, wouldn’t it! Unfortunately I don’t think that’s really going to be feasible, since there’s no reliable way for me to determine what is or isn’t a legitimate admin notice, and I think the plugin would probably get suspended by the admins if it were found to be actively blocking admin notices from other plugins.

    Fair enough, thanks for rapid reply! Two persistent offenders so I’ll look to source alternatives to them…

Viewing 15 replies - 16 through 30 (of 34 total)
  • The topic ‘Bugs, questions, suggestions’ is closed to new replies.