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.3 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 All 156 releases
← All changes | pages/page-mainwp-wp-updates.php +13 -8 5.2 → 6.2.2 View file →
@@ -6,8 +6,13 @@
6 6 */
7 7
8 8 namespace MainWP\Dashboard;
9 9
10 +// Exit if accessed directly.
11 +if ( ! defined( 'ABSPATH' ) ) {
12 + exit;
13 +}
14 +
10 15 /**
11 16 * Class MainWP_WP_Updates
12 17 *
13 18 * @package MainWP\Dashboard\
@@ -66,9 +71,9 @@
66 71 <div id="mainwp-ignored-cores" class="ui segment">
67 72 <?php if ( MainWP_Utility::show_mainwp_message( 'notice', 'mainwp-ignored-cores-info-message' ) ) : ?>
68 73 <div class="ui info message">
69 74 <i class="close icon mainwp-notice-dismiss" notice-id="mainwp-ignored-cores-info-message"></i>
70 - <?php printf( esc_html__( 'Manage WordPress you have told your MainWP Dashboard to ignore updates on global or per site level. For additional help, please check this %1$shelp documentation%2$s.', 'mainwp' ), '<a href="https://kb.mainwp.com/docs/manage-updates/" target="_blank">', '</a> <i class="external alternate icon"></i>' ); ?>
75 + <?php /* translators: 1: opening anchor tag, 2: closing anchor tag */ printf( esc_html__( 'Manage WordPress you have told your MainWP Dashboard to ignore updates on global or per site level. For additional help, please check this %1$shelp documentation%2$s.', 'mainwp' ), '<a href="https://docs.mainwp.com/sites/updates/manage-updates/" target="_blank">', '</a> <i class="external alternate icon"></i>' ); ?>
71 76 </div>
72 77 <?php endif; ?>
73 78 <?php
74 79 /**
@@ -73,9 +78,9 @@
73 78 <?php
74 79 /**
75 80 * Action: mainwp_cores_before_ignored_updates
76 81 *
77 - * Fires on the top of the Ignored Plugins Updates page.
82 + * Fires on the top of the Ignored Plugin Updates page.
78 83 *
79 84 * @since 5.2
80 85 */
81 86 do_action( 'mainwp_cores_before_ignored_updates', $websites );
@@ -86,9 +91,9 @@
86 91 </h3>
87 92 <?php static::render_global_ignored( $decodedIgnoredCores ); ?>
88 93 <div class="ui hidden divider"></div>
89 94 <h3 class="ui header">
90 - <?php esc_html_e( 'Per Site Ignored WordPress' ); ?>
95 + <?php esc_html_e( 'Per Site Ignored WordPress', 'mainwp' ); ?>
91 96 <div class="sub header"><?php esc_html_e( 'These are WordPress you have told your MainWP Dashboard to ignore updates per site level and not notify you about pending updates.', 'mainwp' ); ?></div>
92 97 </h3>
93 98 <?php static::render_sites_ignored( $websites ); ?>
94 99 <?php
@@ -94,9 +99,9 @@
94 99 <?php
95 100 /**
96 101 * Action: mainwp_cores_after_ignored_updates
97 102 *
98 - * Fires on the bottom of the Ignored Plugins Updates page.
103 + * Fires on the bottom of the Ignored Plugin Updates page.
99 104 *
100 105 * @since 4.1
101 106 */
102 107 do_action( 'mainwp_cores_after_ignored_updates', $websites );
@@ -134,9 +139,9 @@
134 139 <?php foreach ( $ignored_vers as $ignored_ver ) { ?>
135 140 <tr ignored-ver="<?php echo esc_attr( $ignored_ver ); ?>">
136 141 <td><?php echo 'all_versions' === $ignored_ver ? esc_html__( 'All', 'mainwp' ) : esc_html( $ignored_ver ); ?></td>
137 142 <td class="right aligned">
138 - <?php if ( mainwp_current_user_have_right( 'dashboard', 'ignore_unignore_updates' ) ) : ?>
143 + <?php if ( \mainwp_current_user_can( 'dashboard', 'ignore_unignore_updates' ) ) : ?>
139 144 <a href="#" class="ui mini button" onClick="return updatesoverview_cores_unignore_globally( '<?php echo esc_js( rawurlencode( $ignored_ver ) ); ?>' )"><?php esc_html_e( 'Unignore', 'mainwp' ); ?></a>
140 145 <?php endif; ?>
141 146 </td>
142 147 </tr>
@@ -143,9 +148,9 @@
143 148 <?php } ?>
144 149 <?php // phpcs:enable ?>
145 150 <?php endif; ?>
146 151 </tbody>
147 - <?php if ( mainwp_current_user_have_right( 'dashboard', 'ignore_unignore_updates' ) ) : ?>
152 + <?php if ( \mainwp_current_user_can( 'dashboard', 'ignore_unignore_updates' ) ) : ?>
148 153 <?php if ( $ig_vers ) : ?>
149 154 <tfoot class="full-width">
150 155 <tr>
151 156 <th scope="col" colspan="2">
@@ -239,9 +244,9 @@
239 244 <td><?php echo 'all_versions' === $ignored_ver ? esc_html__( 'All', 'mainwp' ) : esc_html( $ignored_ver ); ?></td>
240 245 <td><a href="<?php echo 'admin.php?page=ManageClients&client_id=' . intval( $website->client_id ); ?>" data-tooltip="<?php esc_attr_e( 'Jump to the client', 'mainwp' ); ?>" data-position="right center" data-inverted="" ><?php echo esc_html( $website->client_name ); ?></a></td>
241 246 <td class="right aligned">
242 247 <?php
243 - if ( mainwp_current_user_have_right( 'dashboard', 'ignore_unignore_updates' ) ) :
248 + if ( \mainwp_current_user_can( 'dashboard', 'ignore_unignore_updates' ) ) :
244 249 ?>
245 250 <a href="#" class="ui mini button" onClick="return updatesoverview_unignore_cores_by_site( <?php echo intval( $website->id ); ?>, '<?php echo esc_js( rawurlencode( $ignored_ver ) ); ?>' )"> <?php esc_html_e( 'Unignore', 'mainwp' ); ?></a>
246 251 <?php endif; ?>
247 252 </td>
@@ -254,9 +259,9 @@
254 259 MainWP_DB::free_result( $websites );
255 260 }
256 261 ?>
257 262 </tbody>
258 - <?php if ( mainwp_current_user_have_right( 'dashboard', 'ignore_unignore_updates' ) && $count ) : ?>
263 + <?php if ( \mainwp_current_user_can( 'dashboard', 'ignore_unignore_updates' ) && $count ) : ?>
259 264 <tfoot class="full-width">
260 265 <tr>
261 266 <th scope="col" colspan="5">
262 267 <a class="ui right floated small green labeled icon button" onClick="return updatesoverview_unignore_cores_by_site_all();" id="mainwp-unignore-cores-detail-all">