' . esc_html__( 'ezCache', 'ezcache' ) . ': ' . sprintf( esc_html__( 'WebP Processing is currently running, %d images remaining.', 'ezcache' ), $count_pending ) . '
';
}
if ( ! get_site_option( 'ezcache_first_run', false ) ) {
update_site_option( 'ezcache_first_run', 1 );
}
}
function admin_clear_cache() {
if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], 'wpb-clear-cache' ) ) {
wp_nonce_ays( 'wpb-clear-cache' );
}
$this->plugin->ezcache->clear_cache();
wp_redirect( wp_get_referer() );
exit;
}
function maybe_show_admin_bar( $show_admin_bar ) {
$settings = Settings::get_settings();
if ( ! $settings->no_cache_known_users ) {
return false;
}
return $show_admin_bar;
}
/**
* Inject premium feature gates into the UI
*/
/**
* @deprecated Branding is now handled by the Vue 2.0 frontend (options.css/options.js).
* This method is no longer hooked. Kept for reference only.
*/
function inject_branding_css() {
$screen = get_current_screen();
if ( ! $screen || strpos( $screen->id, 'ezcache' ) === false ) {
return;
}
?>
id ) {
return;
}
if ( \Upress\EzCache\PremiumFeatures::is_premium() ) {
return; // Premium user, no gates needed
}
$premium_features = \Upress\EzCache\PremiumFeatures::get_premium_features();
$features_json = json_encode( $premium_features );
$upgrade_url = '#pricing';
?>