PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 6.2.2
MainWP Dashboard: Self-hosted WordPress Management for Agencies v6.2.2
6.2.2 6.2.1 6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 All 155 releases
← All changes | modules/api-backups/classes/class-api-backups-overview.php +6 -4 5.1 → 6.2.2 View file →
@@ -9,10 +9,12 @@
9 9 */
10 10
11 11 namespace MainWP\Dashboard\Module\ApiBackups;
12 12
13 -use function MainWP\Dashboard\mainwp_current_user_have_right;
14 -use function MainWP\Dashboard\mainwp_do_not_have_permissions;
13 +// Exit if accessed directly.
14 +if ( ! defined( 'ABSPATH' ) ) {
15 + exit;
16 +}
15 17
16 18 /**
17 19 * MainWP API Backups Overview
18 20 */
@@ -110,10 +112,10 @@
110 112 * Render backups list.
111 113 */
112 114 public function render_backups_list() {
113 115
114 - if ( ! mainwp_current_user_have_right( 'dashboard', 'manage_api_backups' ) ) {
115 - mainwp_do_not_have_permissions( esc_html__( 'manage api backups', 'mainwp' ) );
116 + if ( ! \mainwp_current_user_can( 'dashboard', 'manage_api_backups' ) ) {
117 + \mainwp_do_not_have_permissions( esc_html__( 'manage api backups', 'mainwp' ) );
116 118 return;
117 119 }
118 120 Api_Backups_Admin::render_header();
119 121 ?>