Settings & Options

Access FilterX settings at FilterX → Settings in the WordPress admin, or manage them through the REST API.

Default Plugin Options

These options are set automatically on plugin activation:

OptionDefaultDescription
filterx_enable_caching1 (true)Enable transient response caching for facet choices and REST responses
filterx_cache_ttl86400 (24h)Cache duration in seconds for cached facet data
filterx_index_batch_size100Number of posts to process per indexing batch
filterx_rest_cache_ttl3600 (1h)Cache duration for REST API responses
filterx_enable_etag1 (true)Enable ETag headers for browser-level HTTP caching
filterx_version1.0.0Current installed plugin version (used for migration tracking)

Admin Settings Sections

  • Enable/disable the plugin globally
  • Debug mode toggle (forces fresh data, logs index operations)
  • Permalink slug for FilterX pages
  • Index batch size (100 / 500 / 1000 posts per batch)
  • Queue worker interval (how often background jobs are processed)
  • Cache driver: WordPress Transients (default), Redis, or Memcached
  • Enable lazy loading for facet choices (load on expand only)
  • Enable ETag HTTP caching
  • WooCommerce — Enable/disable (auto-detected but can be manually disabled)
  • ACF — Enable field picker in facet source selector
  • Elementor — Register FilterX widgets
  • Gutenberg — Register FilterX blocks
  • WPML — Enable language-aware indexing
  • Polylang — Enable language-aware indexing
  • Default color scheme: Light / Dark
  • Default font family for facet widgets
  • Border radius for facet containers
  • Primary / accent color (CSS variable override)
  • Saved theme presets
  • Export all facets, grids, card templates, and settings as a single JSON file
  • Import JSON — merge or replace existing configurations
  • Conflict resolution: Skip Duplicates / Overwrite / Rename

Programmatic Settings Access

# Read settings via WordPress options

$settings = get_option( 'filterx_settings', [] );

$cache_ttl = get_option( 'filterx_cache_ttl', 86400 );

# REST API (admin only)

GET /wp-json/filterx/v1/settings

PATCH /wp-json/filterx/v1/settings

# Export / Import

POST /wp-json/filterx/v1/settings/export

POST /wp-json/filterx/v1/settings/import

Service Container API

FilterX uses a compiled PSR-11-compatible DI container. Access services programmatically:

// Get plugin instance

$plugin = filterx();

// Get DI container

$container = filterx_container();

// Bind a service

$container->singleton( 'my_service', MyService::class );

// Get a service

$service = $container->get( 'my_service' );

// Tag and retrieve groups

$container->tag( 'my_service', 'filterx_services' );

$all = $container->tagged( 'filterx_services' );

// Make with parameter overrides

$obj = $container->make( MyClass::class, [ 'dep' => $value ] );

Uninstalling FilterX

⚠️ Data Deletion on Uninstall

When you delete FilterX from the Plugins screen (not just deactivate), the uninstall script runs and removes:

  • All 6 custom database tables (filterx_index, filterx_facets, filterx_grids, filterx_cards, filterx_queue, filterx_migrations)
  • All filterx_* WordPress options
  • All filterx_* transients
  • All scheduled crons

Export your configuration before uninstalling if you want to preserve your facets and grids.