PluginProbe
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification / 5.6.2
Double Opt-In for Contact Form 7 – Secure, GDPR-Compliant Email Verification v5.6.2
5.6.2 5.6.3 5.6.1 5.6.0 5.5.0 5.4.0 5.3.2 5.3.1 5.1.6 5.1.5 trunk 2.1.5 2.11 2.12 2.13 2.15 3.0.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.51 3.0.60 3.0.61 3.0.62 All 38 releases
← All changes | src/Health/SiteHealthIntegration.php +24 -1 5.3.1 → 5.6.2 View file →
@@ -214,8 +214,10 @@
214 214 echo '<div class="notice notice-error"><p><strong>';
215 215 echo esc_html__( 'Double Opt-In has detected a problem that will affect your visitors.', 'double-opt-in' );
216 216 echo '</strong></p><ul style="list-style:disc;margin-left:1.5em">';
217 217
218 + $actions = array();
219 +
218 220 foreach ( $criticals as $result ) {
219 221 printf(
220 222 '<li><strong>%s</strong><br>%s</li>',
221 223 esc_html( $result->getLabel() ),
@@ -220,12 +222,33 @@
220 222 '<li><strong>%s</strong><br>%s</li>',
221 223 esc_html( $result->getLabel() ),
222 224 esc_html( $result->getDescription() )
223 225 );
226 +
227 + // Collected rather than printed inline so the buttons end up
228 + // in one row under the list instead of interrupting it.
229 + if ( $result->getActionUrl() !== '' && $result->getActionLabel() !== '' ) {
230 + $actions[ $result->getActionUrl() ] = $result->getActionLabel();
231 + }
224 232 }
225 233
234 + echo '</ul><p>';
235 +
236 + // A check that knows how to fix itself says so here. Site Health is
237 + // where the full report lives, but a fix that is one click away
238 + // should not require finding that screen first — this notice runs
239 + // on the dashboard and the plugins list, which is where an operator
240 + // already stands when something has just gone wrong.
241 + foreach ( $actions as $url => $label ) {
242 + printf(
243 + '<a class="button button-primary" style="margin-right:.5em" href="%s">%s</a>',
244 + esc_url( $url ),
245 + esc_html( $label )
246 + );
247 + }
248 +
226 249 printf(
227 - '</ul><p><a class="button button-primary" href="%s">%s</a></p></div>',
250 + '<a class="button" href="%s">%s</a></p></div>',
228 251 esc_url( admin_url( 'site-health.php' ) ),
229 252 esc_html__( 'Open Site Health', 'double-opt-in' )
230 253 );
231 254 }