Developer Documentation - sovware/directorist GitHub Wiki

Helper Functions

directorist_is_email_verification_enabled() - (since 7.7) - Check if email verification is enabled.

directorist_get_page_id( string $page_name ) - (since 7.5) - Get a Directorist page id by page key/name.

directorist_get_var( &$var, $default = null ) - (since 7.3) - Get data if set, otherwise return a default value or null. Prevents notices when data is not set.

directorist_is_listing_author( $listing_id = null, $user_id = null ) - (since 7.1.1) - Check if the given listing id belongs to the given user id.

directorist_is_current_user_listing_author( $listing_id = null ) - (since 7.1.1) - Check if the given listing id belongs to the current user.