array( 'success', __( 'Saved and published - the banner on your site will change within a minute.', 'cookiebanerpro' ) ),
'connected' => array( 'success', __( 'Your site is connected. Set up and publish your banner in the CookieBanerPro panel - it will appear on your site automatically.', 'cookiebanerpro' ) ),
'disconnected' => array( 'info', __( 'Your site has been disconnected. The banner code is no longer added to your pages.', 'cookiebanerpro' ) ),
'saved' => array( 'success', __( 'Settings saved.', 'cookiebanerpro' ) ),
'refreshed' => array( 'success', __( 'Status refreshed.', 'cookiebanerpro' ) ),
);
$cookiebanerpro_errors = array(
'state' => __( 'The connection request has expired. Please click "Connect" again.', 'cookiebanerpro' ),
'exchange' => __( 'CookieBanerPro did not confirm the connection. Please try again.', 'cookiebanerpro' ),
'network' => __( 'Your server could not reach cookiebanerpro.pl. Please try again in a moment - if it keeps happening, your hosting may block outgoing connections.', 'cookiebanerpro' ),
);
?>
CookieBanerPro
$cookiebanerpro_msg ) {
if ( isset( $_GET[ $cookiebanerpro_key ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
printf( '
', esc_attr( $cookiebanerpro_msg[0] ), esc_html( $cookiebanerpro_msg[1] ) );
}
}
if ( isset( $_GET['error'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification
$cookiebanerpro_err = sanitize_key( wp_unslash( $_GET['error'] ) ); // phpcs:ignore WordPress.Security.NonceVerification
printf( '
', esc_html( isset( $cookiebanerpro_errors[ $cookiebanerpro_err ] ) ? $cookiebanerpro_errors[ $cookiebanerpro_err ] : __( 'Something went wrong. Please try again.', 'cookiebanerpro' ) ) );
}
?>
-';
} else {
$cookiebanerpro_pv = (int) $cookiebanerpro_status['pageviews'];
$cookiebanerpro_limit = isset( $cookiebanerpro_status['pageviews_limit'] ) ? (int) $cookiebanerpro_status['pageviews_limit'] : 0;
echo '' . CookieBanerPro_Plugin::site_usage_html( $cookiebanerpro_status ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput -- escaped inside.
if ( $cookiebanerpro_limit ) {
$cookiebanerpro_pct = min( 100, round( $cookiebanerpro_pv / max( 1, $cookiebanerpro_limit ) * 100 ) );
$cookiebanerpro_cls = $cookiebanerpro_pv >= $cookiebanerpro_limit ? 'cbp-over' : ( $cookiebanerpro_pct >= 80 ? 'cbp-near' : '' );
echo '';
}
}
?>