Project

General

Profile

Actions

Feature #3151

closed

Add submenu items in Help section of WP Admin Bar

Added by Matt Gold about 10 years ago. Updated almost 10 years ago.

Status:
Resolved
Priority name:
Low
Assignee:
Daniel Jones
Category name:
Toolbar
Target version:
Start date:
2014-04-02
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

In connection with ticket 3129: http://redmine.gc.cuny.edu/issues/3129

It turns out that Luke was suggesting that we add submenu options to the top WP Admin Bar.

Chris, do you have thoughts and/or objections?

Boone, I'm assuming that this wouldn't be difficult to implement on a technical level, but if that's wrong, please let me know.


Files

help.png (365 KB) help.png Matt Gold, 2014-04-03 06:43 PM
Actions #1

Updated by Chris Stein about 10 years ago

  • Assignee changed from Chris Stein to Boone Gorges

No objections. We already do it for About so it seems like it should be straightforward to implement one for Help.

We should keep the same order and formatting as on the main nav Help as currently implemented.

Boone, sending along to you.

Actions #2

Updated by Boone Gorges about 10 years ago

  • Category name changed from Information Architecture to Toolbar
  • Status changed from Assigned to Reporter Feedback

It's fairly easy to add things to the admin bar. Can you be specific about what you want added?

Actions #3

Updated by Matt Gold about 10 years ago

Thanks, Boone. Please add the links currently on the main nav bar. Annotated screenshot attached. Please note that we included dashes per this ticket to indicate sub items

Actions #4

Updated by Boone Gorges about 10 years ago

I'm assuming that these items should be added under CUNY Academic Commons > Help, right? Do you want them displayed as a new flyout submenu (as CUNY Academic Commons > About) or using the dashes?

Actions #5

Updated by Matt Gold about 10 years ago

Yes, thanks. I think that the idea is to make the following options a fly-out from Help:

Help Site
- FAQs
- Codex
- Tour
WordPress Help Forum
Group for Group Admins

This, we would both be using a fly-out and using the dashes; the dashes help us avoid having to use a third-level fly-out. Does that make sense?

Actions #6

Updated by Matt Gold about 10 years ago

  • Status changed from Reporter Feedback to Assigned
Actions #7

Updated by Boone Gorges almost 10 years ago

  • Assignee changed from Boone Gorges to Daniel Jones

Dan, could you have a look at this? Our toolbar mods are all located in wp-content/plugins/cac-bp-admin-bar-mods/cac-bp-admin-bar-mods.php. There are lots of examples of adding/removing/modifying toolbar items in that file, so I'm guessing that you'll have enough to go on to generate the static links that Matt has requested above.

For this (and other tickets in the 1.7 target version), please work on the 1.7.x branch from Github. For larger features/fixes, feel free to work on a task-specific branch locally, and then push that branch up to Github for me to review. Otherwise, you're welcome to push directly to 1.7.x. When you've done so, please leave a link to the Github changeset(s) where the changes were made. And in your git commit message, please mention the ticket number (#3151). That way, we'll have two-way references between this ticket and the relevant changesets.

Actions #8

Updated by Daniel Jones almost 10 years ago

I added the links that are in the main menu to the admin bar, following the pattern of the "About" menu. I don't think it's ideal to hardcode the URL for the help site, but wasn't sure how to generate it in a way similar to bp_get_root_domain(). Also, on a second look I think I need to make a couple of formatting changes to bring things in line with Wordpress recommendations.

Here's a link to the changeset: https://github.com/cuny-academic-commons/cac/commit/1b192ecf517209ffb425e439b72b2f14753c902b.

Actions #9

Updated by Boone Gorges almost 10 years ago

Looks pretty good, Dan - thanks.

The hardcoded help.commons.gc.cuny.edu is not ideal, but it's not really worth doing something much more dynamic just for the sake of dev/staging sites.

One request I do have - both for http://help.commons.gc.cuny.edu and codex.commons.gc.cuny.edu - is to ensure that they are HTTP or HTTPS as appropriate (the Commons can be viewed over HTTPS, though we don't enforce it). Here's how to do it in WP:

$link = 'http://codex.commons.gc.cuny.edu';
if ( is_ssl() ) {
    $link = set_url_scheme( $link, 'https' );
}
Actions #10

Updated by Daniel Jones almost 10 years ago

Okay thanks Boone I added the SSL check for the help link and the Codex link here: https://github.com/cuny-academic-commons/cac/commit/4aa667a302d08ff123ddfe21898b34d2d738f2b6

I realized that I made a small typo in the Codex link which I fixed here - https://github.com/cuny-academic-commons/cac/commit/6e7b440ad390aafb7295978887b3ff0423c33cb3

Sorry I don't know how I didn't pick that up when I was testing the links before pushing. I'll be more careful next time. Is there anything else we should change here?

Actions #11

Updated by Boone Gorges almost 10 years ago

  • Status changed from Assigned to Resolved

Sorry I don't know how I didn't pick that up when I was testing the links before pushing

No problemo :)

This looks great. Thanks, Dan!

Actions

Also available in: Atom PDF