CONFIGURATION

Configurable plugin constants

Override upload limits, execution limits, cache behavior and shortcode names from wp-config.php.

Version
0.3.3
Reviewed
Language
English · fallback
On this page
  1. Processing and asset behavior
  2. Track uploads
  3. Leaflet plugin-script wrapper
  4. Shortcode names
  5. Differences from the legacy wiki page

WP Trip Summary defines its constants in abp01-plugin-header.php. The constants below are guarded with defined(), so you can override them in wp-config.php before WordPress loads the plugin.

// Add overrides before the line that loads wp-settings.php.
define('ABP01_TRACK_UPLOAD_CHUNK_SIZE', 512000);
define('ABP01_TRACK_UPLOAD_MAX_FILE_SIZE', 20 * 1024 * 1024);
Use constants only for deployment-level configuration

Changing a constant affects the whole WordPress installation. Prefer the plugin settings screen whenever it exposes the option you need.

Processing and asset behavior

Constant Type Default Purpose
ABP01_MAX_EXECUTION_TIME_MINUTES int 10 Maximum execution-time limit the plugin may request for operations such as processing a track.
ABP01_DISABLE_MINIFIED boolean false Intended to disable minified assets. The current source marks it as not yet used.
ABP01_POST_TRIP_SUMMARY_DATA_CACHE_EXPIRATION_SECONDS int 600 Trip-summary data cache duration in seconds; 10 minutes by default.

Track uploads

Constant Type Default Purpose
ABP01_TRACK_UPLOAD_CHUNK_SIZE int 102400 Maximum chunk uploaded in one request, in bytes. Larger files are uploaded sequentially.
ABP01_TRACK_UPLOAD_MAX_FILE_SIZE int max(wp_max_upload_size(), 10485760) Maximum accepted track size: the larger of the WordPress limit and 10 MiB.
Server limits still apply

Raising a plugin value does not raise PHP, web-server or proxy limits. Align upload_max_filesize, post_max_size and upstream request limits.

Leaflet plugin-script wrapper

These values are used by abp01-plugin-leaflet-plugins-wrapper.php.

Constant Type Default Purpose
ABP01_WRAPPED_SCRIPT_MAX_AGE int 31 * 24 * 60 Maximum age, in seconds, used for HTTP cache headers.
ABP01_WRAPPED_SCRIPT_MAX_MEMORY int|string '256M' Memory limit requested by the wrapper. Accepts bytes or PHP shorthand.
ABP01_WRAPPED_SCRIPT_MAX_EXECUTION_TIME_MINUTES int 1 Execution-time limit requested by the wrapper, in minutes.
Effective cache duration

The source describes ABP01_WRAPPED_SCRIPT_MAX_AGE as 31 days, but the current expression evaluates to 44,640 seconds—12 hours and 24 minutes. Verify the intended value before overriding it.

Shortcode names

Constant Type Default Purpose
ABP01_VIEWER_SHORTCODE string 'abp01_trip_summary_viewer' Inserts the viewer at a chosen location in post content.
ABP01_TRIP_TYPE_STATS_SHORTCODE string 'abp01_trip_type_stats' Shortcode name used for trip-type statistics.
ABP01_TRIP_STATS_SHORTCODE string 'abp01_trip_stats' Shortcode name used for trip statistics.
Changing an established shortcode

Existing posts retain the old shortcode text. Update existing content or provide a compatibility path before deploying a renamed shortcode.

Differences from the legacy wiki page

  • The duplicated ABP01_VIEWER_SHORTCODE row appears only once here.
  • ABP01_WRAPPED_SCRIPT_MAX_MEMORY uses the current source default, '256M'.
  • Cache expiration and the statistics shortcodes were added from the current plugin header because they are also overrideable.