View Categories

Environment variables

App Builder #

The following environment variables can be used in the App Builder

@wpda_wp_user_id WordPress user ID
@now Current date (+ time)
now() Current date

Notes #

  • Variable @wpda_wp_user_id in default where (Table Builder)
  • Variable @now as default value in the Form Builder
  • Variable now() in default where (Table Builder)
  • The user login and user email are still accessible through a query on the WordPress users table using variable @wpda_wp_user_id

Tables, Forms and Templates (Legacy) #

The following environment variables can be used in Tables, Forms and Templates.

$$USERID$$ WordPress user ID (please update to @wpda_wp_user_id)
$$USER$$ WordPress user login
$$EMAIL$$ WordPress user email
$$NOW$$ Current date
$$NOWDT$$ Current date + time

Environment variables can be used

  • As default values in Project Templates
  • In where clauses of Data Tables and Data Apps

Notes #

  • Since version 5.2.3 the WordPress user ID is also available through session variable @wpda_wp_user_id for all local and remote database connections. This features allows plugin users to use the WordPress user ID in queries, views, database triggers and stored procedures. Custom values are supported as well and can be added using a hook. Read more…