Configuration Constants
A few Events Manager behaviors are set with PHP constants instead of options on a settings screen. Most exist for developers and for unusual sites, and most sites never need one.
How to set a constant
-
Open the
wp-config.phpfile in the root folder of your WordPress site. Keep a copy before you edit it. -
Add a
define()line above the line that reads/* That's all, stop editing! Happy publishing. */.wp-config.phpdefine( 'EM_HIDE_ADDONS', true ); -
Save the file. The change applies on the next page load.
To go back to the default, delete the line. Constants in this file apply to the whole installation, which on multisite means every site in the network.
Rows marked Pro need Events Manager Pro.
Display and front end
| Constant | Default | What it does |
|---|---|---|
EM_AJAX | true | Whether lists load new pages of results without reloading the page. Set to false to make pagination links load a full page. An ajax attribute on a shortcode overrides it for that list. |
EM_AJAX_SEARCH | true | Whether the search form shows results without reloading the page. Set to false to have searches submit and load a new page. |
EM_CONDITIONAL_RECURSIONS | 2 | How many levels deep conditional placeholders can be nested. |
EM_PAGES_TO_SHOW | 11 | The most page numbers shown in the pagination links under a list. |
EM_PAGINATION_CENTERED | true | Keeps the current page number in the middle of the pagination links. Set to false to turn that off. |
EM_CHECK_THE_LOOP | not set | Set to true if your theme shows event content in the wrong place, such as inside a menu or sidebar. Events Manager then replaces page content only inside the main WordPress loop. |
EM_DISABLE_AUTO_BOOKINGSFORM | not set | Set to true to stop the booking form being added to event pages that don't use an Events Manager format. Place it yourself with #_BOOKINGFORM or the booking form block. |
EM_JS_MOMENTJS_PH | true | Set to false to switch off the #_EVENTDATES_LOCAL and #_EVENTTIMES_LOCAL placeholders, which load the Moment.js script. They then print nothing. |
EM_BOOKING_MSG_JS_OFFSET | 30 | After a booking is submitted the page scrolls to the confirmation or error message. This is the gap, in pixels, left above the message. Raise it if a fixed header covers the message. |
EM_PHONE_INTL_ENABLED | true | Set to false to remove the international phone number field (country picker and validation) and its settings. Phone fields become plain text fields. |
Editing and admin
| Constant | Default | What it does |
|---|---|---|
EM_GUTENBERG | not set | Forces the editor used for events and locations: true for the block editor, false for the classic editor. It overrides the Editor option in the settings. See the event editor. |
EM_HIDE_ADDONS | not set | Set to true to hide the Events then Add-ons screen. |
EM_CUSTOM_ARCHETYPES | true | Set to false to switch off custom archetypes regardless of the settings. |
EM_SETTINGS_TABS | not set | Set to true to open each tab of the settings screen as a separate page load. By default the tabs switch in the browser without reloading. |
EM_UNFILTERED_HTML | not set | Set to true to let every administrator of the settings screen save unfiltered HTML in formats, including scripts. By default only users with WordPress's unfiltered_html capability can, which on multisite means super admins. Use it only where every settings user is fully trusted. |
EM_BOOKINGS_TABLE_ATTENDEE_PREFIX | true | Column headings for attendee fields in the bookings table read "Attendee" followed by the field name. Set it to your own text containing %s, such as 'Guest %s', or to false to show the field name alone. |
EM_AUTO_UPDATES | not set | With Always check the latest stable version? on, Events Manager offers new releases before WordPress.org's staged rollout reaches your site, but leaves them for you to install by hand. Set this to true to let WordPress auto-update to those releases too. See Latest stable version. |
Bookings
| Constant | Default | What it does |
|---|---|---|
EM_BOOKINGS_UNCANCEL_STATUS | 0 | The status a booking returns to when a cancellation is undone and its earlier status wasn't recorded. 0 is Pending and 1 is Approved. Bookings cancelled in current versions remember their earlier status, so this matters only for older ones. |
EM_BOOKING_HOLDS_BY_USER, EM_BOOKING_HOLDS_BY_IP | 2 | How many space holds one logged-in user, or one IP address, can have at a time across all events. See Booking Holds. |
EM_BOOKING_EVENT_HOLDS_BY_USER, EM_BOOKING_EVENT_HOLDS_BY_IP | 1 | The same limits for a single event. |
Exports and feeds
Performance
Events Manager Pro
| Constant | Default | What it does |
|---|---|---|
EMP_DEV_UPDATES | not set | Pro Set to true to receive development versions of Pro as updates. See Upgrading to a development version. |
EMP_SHARED_CUSTOM_FIELDS | not set | Pro By default the ID of a new custom user field is given a dbem_ prefix, so it can't clash with another plugin's user meta. Set to true to keep IDs as you type them, which lets a booking form field read and write a user meta key that another plugin also uses. |
EMP_FORMS_TEXTAREA_SIZE | not set | Pro The size of text area fields in booking forms, as rows and columns: '5,40'. The default is 2 rows and 20 columns. |
EM_EMAIL_QUEUE | true | Pro Set to false to stop the scheduled task that sends queued emails, such as event reminders. Queued emails are then not sent. |
EM_QR_ENDPOINT | em-qr | Pro The URL path used for ticket QR code images. |
EM_FE_ENDPOINT_ALIAS | not set | Pro An array of extra URL paths that also open the check-in screen. Add the old path here when you change the path in the settings, so QR codes already printed keep working. |
EM_RSVP_ENDPOINT_ALIAS | not set | Pro The same for the RSVP page, so links in emails already sent keep working after you change its path. |
EM_RSVP_ID_LENGTH | 8 | Pro The length of the code that identifies a booking in RSVP links. |
EMP_DISABLE_WARNINGS | not set | Pro Hides the admin notice shown when the installed Pro version is older than the free plugin recommends. Updating Pro is the better fix. |
EMP_DISABLE_CRITICAL_WARNINGS | not set | Pro When Pro is too old to run safely with the installed free plugin, Events Manager holds Pro back and shows a notice. Set to true to remove that safeguard. Not recommended. |
Examples
wp-config.php
// Let conditional placeholders nest three levels deep.
define( 'EM_CONDITIONAL_RECURSIONS', 3 );
// Export bookings with semicolons between columns.
define( 'EM_CSV_DELIMITER', ';' );
// Keep printed QR codes working after renaming the check-in path.
define( 'EM_FE_ENDPOINT_ALIAS', array( 'em-bookings' ) );