| @@ -66,22 +66,12 @@ | ||
| 66 | 66 | * @throws \Exception |
| 67 | 67 | */ |
| 68 | 68 | protected function addPage() |
| 69 | 69 | { |
| 70 | - $currentUserAccessHelper = vchelper('AccessCurrentUser'); | |
| 71 | - if (vcvenv('VCV_ADDON_ROLE_MANAGER_ENABLED')) { | |
| 72 | - $atleastOneTabAvailableInHub = ( | |
| 73 | - $currentUserAccessHelper->part('hub')->can('elements_templates_blocks')->get() | |
| 74 | - || $currentUserAccessHelper->part('hub')->can('addons')->get() | |
| 75 | - || $currentUserAccessHelper->part('hub')->can('headers_footers_sidebars')->get() | |
| 76 | - || $currentUserAccessHelper->part('hub')->can('unsplash')->get() | |
| 77 | - || $currentUserAccessHelper->part('hub')->can('giphy')->get() | |
| 78 | - ); | |
| 70 | + if (!vchelper('HubDownload')->hasAccess()) { | |
| 71 | + return; | |
| 72 | + } | |
| 79 | 73 | |
| 80 | - if (!$atleastOneTabAvailableInHub) { | |
| 81 | - return; | |
| 82 | - } | |
| 83 | - } | |
| 84 | 74 | $page = [ |
| 85 | 75 | 'slug' => $this->getSlug(), |
| 86 | 76 | 'title' => __('Visual Composer Hub', 'visualcomposer'), |
| 87 | 77 | 'layout' => 'dashboard-hub', |
| @@ -102,11 +92,12 @@ | ||
| 102 | 92 | public function afterRender($response) |
| 103 | 93 | { |
| 104 | 94 | ob_start(); |
| 105 | 95 | $extraOutput = vcfilter('vcv:frontend:hub:extraOutput', []); |
| 96 | + $outputHelper = vchelper('Output'); | |
| 106 | 97 | if (is_array($extraOutput)) { |
| 107 | 98 | foreach ($extraOutput as $output) { |
| 108 | - echo $output; | |
| 99 | + $outputHelper->printNotEscaped($output); | |
| 109 | 100 | } |
| 110 | 101 | unset($output); |
| 111 | 102 | } |
| 112 | 103 | $variables = vcfilter('vcv:hub:variables', []); |