Closed kcristiano closed 6 years ago
@kcristiano Thanks for the PR! Could you convert to tab-indented whitespace please?
I think this also needs a check for the CiviReport component being active - basically the same format as the other menu items: if ( array_key_exists( 'CiviReport', $components ) ) { ...
since CiviReport can be switched off.
One last thing to check - I had problems when checking permissions with the access_civireport
format - hence my use of the access CiviReport
format throughout the menu method. Could you please double-check? Thanks!
@christianwach I never disable CiviReports, so it did not occur to me to add the check, thanks for pointing it out.
Both formats of permission checks work for me in Single Site. I went with Access CiviReport
to be consistent.
I changed the code formatting from CiviCRM to WP. I think it's now correct.
@kcristiano I think that's an algorithm for formatting whitespace in CiviCRM :-) Not to worry - thanks for including the checks - I'll convert to WordPress whitespace. Cheers!
FWIW, done in 2c171567a664cd86df680b2cf5626e48af2d9533
Update admin_bar_add to have a menu item for Reports