Support » Fixing WordPress » Has contextual help tab for post edit pages been deprecated in WordPress 5?

  • I usually add content to the help tab for custom post types and default posts and pages. However, I have just noticed that I can’t find the contextual help tab on the actual post edit pages at all, it only appears on the post/page listing pages.

    Have these been deprecated? Can we bring this back?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator James Huff

    (@macmanx)

    Volunteer Moderator

    What you describe has never been a part of WordPress.

    Perhaps you were using a plugin for that which no longer works?

    Thread Starter lancedev

    (@lancedev)

    It has been though – have a look at this screenshot from a pre WP5 (WP4) installation: http://files.data.lancedev.net/wp/context-help.png

    It’s not a plugin as I have it available on multiple sites – I tend not to use plugins as I prefer to code my own functionality.

    But it seems with the new wordpress blocks/gutenberg they have removed the contextual help tab at the top. In fact I have just noticed that if I override the gutenberg editor with the legacy tinyMCE through using the following code, the contextual help shows up again.

    function disable_gutenberg($is_enabled, $post_type){
      return false;
    }
    add_filter('use_block_editor_for_post_type', 'disable_gutenberg', 10, 2);
    • This reply was modified 1 year, 1 month ago by lancedev.
    Moderator bcworkz

    (@bcworkz)

    As you’ve demonstrated, the help facility still exists within WP, but the block editor utilizes a different UI of which it is not a part. The block editor help facility takes one to Help Hub on this .org site. The local help facility is invoked by a JavaScript click event on the help tab graphic element. I believe if you were to insert a similar element into the edit page’s DOM, and add an event listener to it that invokes the same JavaScript, then you will have restored the functionality you seek.

    I don’t know offhand what JS function ought to be invoked to display the help facility, and I’m not a good enough JS coder to dig in and find out, but I believe a solution is close at hand for someone with the right skills or knowledge.

    Thread Starter lancedev

    (@lancedev)

    Yes I know what the JS code for it is but I just find it strange that they have ONLY taken it out for the block editor.

    Here’s the code for the click event for the help tab if anyone’s interested;

    function() {
      var b = a("#" + a(this).attr("aria-controls"));
      b.length && (b.is(":visible") ? screenMeta.close(b, a(this)) : screenMeta.open(b, a(this)))
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Has contextual help tab for post edit pages been deprecated in WordPress 5?’ is closed to new replies.