ImagePress 9.0: Faster, Smoother Settings Management

on in WordPress | Last modified on

We’re excited to announce ImagePress 9.0, a major release that improves how the plugin stores and manages your settings. If you’re using ImagePress, this update is something to look forward to—everything you love about the plugin just got better.

What’s New?

Faster Performance

The biggest improvement in version 9.0 is performance. We’ve completely redesigned how ImagePress stores your settings inside WordPress, making everything faster and more responsive. This means:

  • Quicker page loads on your WordPress dashboard
  • Faster settings pages when you’re configuring ImagePress
  • Better overall site performance, especially if you have many images

Seamless Upgrade Experience

The good news? Upgrading is effortless. When you update to ImagePress 9.0:

  • All your settings are automatically preserved — nothing gets lost
  • The migration happens automatically on your first page load
  • You’ll see a confirmation message on your dashboard letting you know everything went smoothly
  • No configuration needed on your part

What You Don’t Have to Worry About

  • ✅ All your image galleries remain intact
  • ✅ All your plugin settings carry over
  • ✅ Your user profiles, collections, and likes stay exactly the same
  • ✅ Zero downtime during the update

For Site Administrators

When you update to ImagePress 9.0, you’ll notice a success message on your dashboard confirming that the migration completed. This is just letting you know that everything is working perfectly—no action required from you.

All your configured settings (image slugs, gallery layouts, member features, notifications, and more) will work exactly as they did before, but now they’re running on our improved system.

Who Benefits From This Update?

Everyone does! Whether you’re a site owner with a small photo gallery or running a large community site with thousands of images, ImagePress 9.0 delivers:

  • Faster dashboard and settings pages
  • More reliable option management
  • Better compatibility with WordPress
  • A solid foundation for future improvements

When Should You Update?

We recommend updating to ImagePress 9.0 when it’s convenient for you. There’s no rush, but the sooner you update, the sooner you’ll experience the performance improvements. The update is safe, non-destructive, and fully backward-compatible.

Overview

Version 9.0.0 represents a major architectural refactoring of ImagePress options management. This release migrates from a legacy single-array option storage to individual normalized WordPress options, improving performance, maintainability, and compatibility.

What Changed

1. Options Architecture Refactoring

  • Before: All plugin options stored in single imagepress array
  • After: Each option stored as individual WordPress option with normalized naming
  • Naming Convention:
    • ip_*imagepress_* (e.g., ip_slugimagepress_slug)
    • cinnamon_*imagepress_* (e.g., cinnamon_author_slugimagepress_author_slug)
    • Other keys → imagepress_<key>

2. Non-Destructive Migration System

  • Location: includes/migration.php
  • Function: imagepress_migrate_options()
  • Runs: Once on plugin load (hooks into plugins_loaded at priority 5)
  • Flag: imagepress_migration_v9_completed prevents re-execution
  • Safety: Copies values to new options WITHOUT deleting legacy ones

3. Updated Wrapper Functions

  • imagepress_get_option($option): Now reads from migrated individual options with legacy fallback
  • imagepress_update_option($option_array): Now writes to both individual options AND legacy array
  • Location: includes/functions.php (lines 788-822)
  • Benefit: All existing code continues to work without modification

4. Admin Settings Pages Updated

Files updated to use wrapper functions instead of manual array merging:

  • includes/page-settings.php (6 save handlers updated)
  • includes/page-setup.php (3 save handlers updated)

5. Migration Completion Notice

  • Dashboard tab now displays success notice after migration completes
  • Visual confirmation for administrators that v9 migration succeeded
  • Location: includes/page-settings.php (lines 68-73)

6. Performance Optimizations (from v8.7.2)

Carried forward from previous optimizations:

  • Removed error_log() debug call from collections module
  • Fixed inefficient SELECT * queries (now use SELECT COUNT(*) or specific columns)
  • Fixed redundant get_term_by() lookups in loops
  • Fixed double get_the_term_list() execution
  • Added pagination to masonry grid shortcode
  • Optimized attachment counting with direct queries

Migration Details

Automatic Migration Process

  1. Plugin loads and includes includes/migration.php
  2. imagepress_migrate_options() executes on plugins_loaded hook (priority 5)
  3. Checks if imagepress_migration_v9_completed flag exists – if yes, exits
  4. Reads legacy imagepress array option
  5. For each key, determines new normalized option name
  6. Copies value to new option using add_option() (doesn’t overwrite existing)
  7. Migrates standalone old-prefix options (e.g., cinnamon_hide_dashboardimagepress_hide_dashboard)
  8. Sets completion flag to prevent re-running

Backward Compatibility

  • Legacy imagepress array option is PRESERVED
  • Wrapper functions provide fallback to legacy storage
  • Existing custom code using old wrapper functions continues to work
  • Admin write operations maintain both new and legacy formats during transition

Upgrade Path for Existing Installations

For End Users

  1. Update plugin to v9.0.0
  2. Migration runs automatically on first page load
  3. Check Dashboard tab for migration success notice
  4. All settings preserved – no action required

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *