/** * Returns a nicely formatted distance. * * @since 1.3.8 * * @param str $distance The distance to format * @param bool $singular Whether to return a singular value or plural * @param bool $lowercase True to return a lowercase label, otherwise false. * @return str $distance Newly formatted distance */ function mdjm_format_distance($distance, $singular = false, $lowercase = false) { $label = mdjm_travel_unit_label($singular, $lowercase); $search = array('km', 'mi', ' '); $replace = ''; $formatted = trim(str_replace($search, $replace, $distance)); $formatted = mdjm_format_amount($formatted, true); $formatted = $formatted . ' ' . $label; return apply_filters('mdjm_format_distance', $formatted, $distance); }
/** * Retrieve the array of plugin settings * * @since 1.3 * @return array */ function mdjm_get_registered_settings() { /** * 'Whitelisted' MDJM settings, filters are provided for each settings * section to allow extensions and other plugins to add their own settings */ $mdjm_settings = array('general' => apply_filters('mdjm_settings_general', array('main' => array('general_settings' => array('id' => 'general_settings', 'name' => '<h3>' . __('General Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'company_name' => array('id' => 'company_name', 'name' => __('Company Name', 'mobile-dj-manager'), 'desc' => __('Your company name.', 'mobile-dj-manager'), 'type' => 'text', 'std' => get_bloginfo('name')), 'time_format' => array('id' => 'time_format', 'name' => __('Time Format', 'mobile-dj-manager'), 'desc' => sprintf(__('Select the format in which you want your %s times displayed. Applies to both admin and client pages', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => array('g:i A' => date('g:i A', current_time('timestamp')), 'H:i' => date('H:i', current_time('timestamp'))), 'std' => 'H:i'), 'short_date_format' => array('id' => 'short_date_format', 'name' => __('Short Date Format', 'mobile-dj-manager'), 'desc' => __('Select the format in which you want short dates displayed. Applies to both admin and client pages', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('d/m/Y' => date('d/m/Y') . ' - d/m/Y', 'm/d/Y' => date('m/d/Y') . ' - m/d/Y', 'Y/m/d' => date('Y/m/d') . ' - Y/m/d', 'd-m-Y' => date('d-m-Y') . ' - d-m-Y', 'm-d-Y' => date('m-d-Y') . ' - m-d-Y', 'Y-m-d' => date('Y-m-d') . ' - Y-m-d'), 'std' => 'd/m/Y'), 'show_credits' => array('id' => 'show_credits', 'name' => __('Display Credits?', 'mobile-dj-manager'), 'desc' => sprintf(__('Whether or not to display the %sPowered by ' . '%s, version %s%s text at the footer of the %s application pages.', 'mobile-dj-manager'), '<span class="mdjm-admin-footer">', MDJM_NAME, MDJM_VERSION_NUM, '</span>', mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager'))), 'type' => 'checkbox')), 'debugging' => array('debugging_settings' => array('id' => 'debugging_settings', 'name' => '<h3>' . __('Debugging MDJM', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enable_debugging' => array('id' => 'enable_debugging', 'name' => __('Enable Debugging', 'mobile-dj-manager'), 'desc' => __('Only enable if MDJM Support have asked you to do so. Performance may be impacted', 'mobile-dj-manager'), 'type' => 'checkbox'), 'debug_log_size' => array('id' => 'debug_log_size', 'name' => __('Maximum Log File Size', 'mobile-dj-manager'), 'hint' => sprintf(__('MB %sDefault is 2 (MB)%s', 'mobile-dj-manager'), '<code>', '</code>'), 'desc' => __('The max size in Megabytes to allow your log files to grow to before you receive a warning (if configured below)', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'small', 'std' => '2'), 'debug_warn' => array('id' => 'debug_warn', 'name' => __('Display Warning if Over Size', 'mobile-dj-manager'), 'desc' => __('Will display notice and allow removal and recreation of log files', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'debug_auto_purge' => array('id' => 'debug_auto_purge', 'name' => __('Auto Purge Log Files', 'mobile-dj-manager'), 'desc' => __('If selected, log files will be auto-purged when they reach the value of <code>Maximum Log File Size</code>', 'mobile-dj-manager'), 'type' => 'checkbox')), 'uninstall' => array('uninst_settings' => array('id' => 'uninst_settings', 'name' => '<h3>' . __('Uninstallation Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'uninst_remove_db' => array('id' => 'uninst_remove_db', 'name' => __('Remove Database Tables', 'mobile-dj-manager'), 'desc' => __('Should the database tables and data be removed when uninstalling the plugin? ' . 'Cannot be recovered unless you or your host have a backup solution in place and a recent backup.', 'mobile-dj-manager'), 'type' => 'checkbox'), 'uninst_remove_mdjm_posts' => array('id' => 'uninst_remove_mdjm_posts', 'name' => __('Remove Data?', 'mobile-dj-manager'), 'desc' => __('Do you want to remove all MDJM pages', 'mobile-dj-manager'), 'type' => 'checkbox'), 'uninst_remove_mdjm_pages' => array('id' => 'uninst_remove_mdjm_pages', 'name' => __('Remove Pages?', 'mobile-dj-manager'), 'desc' => __('Do you want to remove all MDJM pages?', 'mobile-dj-manager'), 'type' => 'checkbox'), 'uninst_remove_users' => array('id' => 'uninst_remove_users', 'name' => __('Remove Employees and Clients?', 'mobile-dj-manager'), 'desc' => __('If selected, all users who are defined as clients or employees will be removed.', 'mobile-dj-manager'), 'type' => 'checkbox')))), 'events' => apply_filters('mdjm_settings_events', array('main' => array('event_settings' => array('id' => 'event_settings', 'name' => '<h3>' . sprintf(__('%s Settings', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</h3>', 'desc' => '', 'type' => 'header'), 'event_prefix' => array('id' => 'event_prefix', 'name' => sprintf(__('%s Prefix', 'mobile-dj-manager'), mdjm_get_label_singular()), 'desc' => sprintf(__('The prefix you enter here will be added to each unique %s, contract and invoice ID', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'text', 'size' => 'small'), 'show_active_only' => array('id' => 'show_active_only', 'name' => sprintf(__('Hide Inactive %s?', 'mobile-dj-manager'), mdjm_get_label_plural()), 'desc' => sprintf(__('Select to include only active %1$s within the <code>All</code> view on the %1$s screen.', 'mobile-dj-manager'), mdjm_get_label_plural(true)), 'type' => 'checkbox'), 'employer' => array('id' => 'employer', 'name' => __('I am an Employer', 'mobile-dj-manager'), 'desc' => __('Check if you employ staff other than yourself.', 'mobile-dj-manager'), 'type' => 'checkbox'), 'artist' => array('id' => 'artist', 'name' => __('Refer to Performers as', 'mobile-dj-manager'), 'hint' => '<code>' . __('Default is DJ', 'mobile-dj-manager') . '</code>', 'desc' => __('Change the name of your performers here as necessary.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => __('DJ', 'mobile-dj-manager')), 'default_contract' => array('id' => 'default_contract', 'name' => __('Default Contract', 'mobile-dj-manager'), 'desc' => sprintf(__('Select the default contract for your %s. Can be changed per %s', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => mdjm_list_templates('contract')), 'warn_unattended' => array('id' => 'warn_unattended', 'name' => __('New Enquiry Notification', 'mobile-dj-manager'), 'desc' => __('Displays a notification message at the top of the Admin pages to Administrators if there are outstanding Unattended Enquiries.', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'events_order_by' => array('id' => 'events_order_by', 'name' => __('Default Order By', 'mobile-dj-manager'), 'desc' => sprintf(__('Select how you want to see %s ordered within the %s admin list', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => array('ID' => __('Contract ID', 'mobile-dj-manager'), 'post_date' => __('Creation Date', 'mobile-dj-manager'), 'event_date' => sprintf(__('%s Date', 'mobile-dj-manager'), mdjm_get_label_singular()), 'value' => __('Total Cost', 'mobile-dj-manager')), 'std' => 'event_date'), 'events_order' => array('id' => 'events_order', 'name' => __('Default Order', 'mobile-dj-manager'), 'desc' => '', 'type' => 'select', 'options' => array('ASC' => __('Ascending', 'mobile-dj-manager'), 'DESC' => __('Descending', 'mobile-dj-manager')), 'std' => 'DESC'), 'set_client_inactive' => array('id' => 'set_client_inactive', 'name' => __('Set Client Inactive?', 'mobile-dj-manager'), 'desc' => sprintf(__('Set a client to inactive when their %s is cancelled, rejected or marked as a failed enquiry and they have no other upcoming %s.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_label_plural(true)), 'type' => 'checkbox', 'std' => '1'), 'journaling' => array('id' => 'journaling', 'name' => __('Enable Journaling?', 'mobile-dj-manager'), 'desc' => sprintf(__('Log and track all client & %s actions (recommended).', 'mobile-dj-manager'), mdjm_get_label_singular()), 'type' => 'checkbox', 'std' => '1')), 'playlist' => array('playlist_settings' => array('id' => 'playlist_settings', 'name' => '<h3>' . __('Playlist Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enable_playlists' => array('id' => 'enable_playlists', 'name' => sprintf(__('Enable %s Playlists by Default?', 'mobile-dj-manager'), mdjm_get_label_singular()), 'desc' => sprintf(__('Check to enable Client Playlist features by default. Can be overridden per %s.', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'checkbox', 'std' => '1'), 'close' => array('id' => 'close', 'name' => __('Close the Playlist', 'mobile-dj-manager'), 'hint' => sprintf(__('Enter %s0%s to never close.', 'mobile-dj-manager'), '<code>', '</code>'), 'desc' => sprintf(__('Number of days before %s that the playlist should close to new entries.', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'text', 'size' => 'small', 'std' => '5'), 'upload_playlists' => array('id' => 'upload_playlists', 'name' => __('Upload Playlists?', 'mobile-dj-manager'), 'desc' => sprintf(__('With this option checked, your playlist information will occasionally be transmitted back to the MDJM servers ' . 'to help build an information library. The consolidated list of playlist songs will be freely shared. ' . 'Only song, artist and the %s type information is transmitted.', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'checkbox')), 'packages' => array('package_settings' => array('id' => 'package_settings', 'name' => '<h3>' . __('Package & Addon Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enable_packages' => array('id' => 'enable_packages', 'name' => __('Enable Packages', 'mobile-dj-manager'), 'desc' => __('Check this to enable Equipment Packages & Add-ons.', 'mobile-dj-manager'), 'type' => 'checkbox'), 'package_excerpt_length' => array('id' => 'package_excerpt_length', 'name' => __('Description Length', 'mobile-dj-manager'), 'desc' => __('The maximum number of characters for the package/addon description.', 'mobile-dj-manager'), 'hint' => __('Entering <code>0</code> will render the full exceprt if it exists, otherwise the description', 'mobile-dj-manager'), 'type' => 'number', 'size' => 'small', 'step' => '5', 'std' => '55'), 'package_contact_btn' => array('id' => 'package_contact_btn', 'name' => __('Add Contact Button?', 'mobile-dj-manager'), 'hint' => sprintf(__('Select to auto add a contact button to the end of package/addons post content. The link will redirect to the <code>Contact Page</code>page as defined in <a href="%s">Pages</a>', 'mobile-dj-manager'), admin_url('admin.php?page=mdjm-settings&tab=client_zone§ion=pages')), 'desc' => sprintf(__('If you use the <a href="%s" target="_blank">Dynamic Contact Forms</a> add-on, the package/addon will be auto selected on page load', 'mobile-dj-manager'), 'http://mdjm.co.uk/products/dynamic-contact-forms/'), 'type' => 'checkbox'), 'package_contact_btn_text' => array('id' => 'package_contact_btn_text', 'name' => __('Text for Contact Button', 'mobile-dj-manager'), 'desc' => '', 'type' => 'text', 'std' => __('Enquire Now', 'mobile-dj-manager'))), 'travel' => array('travel_settings' => array('id' => 'travel_settings', 'name' => '<h3>' . __('Travel Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'travel_add_cost' => array('id' => 'travel_add_cost', 'name' => __('Add Travel Cost to Price?', 'mobile-dj-manager'), 'desc' => sprintf(__('If selected, the travel cost will be added to the overall %s cost', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'checkbox'), 'travel_primary' => array('id' => 'travel_primary', 'name' => __('Primary Post/Zip Code', 'mobile-dj-manager'), mdjm_get_label_singular(), 'desc' => __('When the primary employee has no address in their profile, this post code will be used to calculate the distance to the venue.', 'mobile-dj-manager'), 'type' => 'text', 'std' => mdjm_get_employee_post_code(1)), 'travel_status' => array('id' => 'travel_status', 'name' => sprintf(__('%s Status', 'mobile-dj-manager'), mdjm_get_label_singular()), 'desc' => sprintf(__("CTRL (cmd on MAC) + Click to select which %s status' can have travel costs updated.", 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'multiple_select', 'options' => mdjm_all_event_status(), 'std' => array('mdjm-unattended', 'mdjm-enquiry', 'mdjm-contract')), 'travel_units' => array('id' => 'travel_units', 'name' => __('Calculate in?', 'mobile-dj-manager'), 'desc' => '', 'type' => 'select', 'options' => array('imperial' => __('Miles', 'mobile-dj-manager'), 'metric' => __('Kilometers', 'mobile-dj-manager')), 'std' => 'imperial'), 'cost_per_unit' => array('id' => 'cost_per_unit', 'name' => sprintf(__('Cost per %s', 'mobile-dj-manager'), mdjm_travel_unit_label()), 'desc' => __('Enter the cost per mile that should be calculated. i.e. 0.45', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'small', 'std' => '0.45'), 'travel_cost_round' => array('id' => 'travel_cost_round', 'name' => __('Round Cost', 'mobile-dj-manager'), 'desc' => __('Do you want to round costs up or down?', 'mobile-dj-manager'), 'type' => 'select', 'options' => array(false => __('No', 'mobile-dj-manager'), 'up' => __('Up', 'mobile-dj-manager'), 'down' => __('Down', 'mobile-dj-manager')), 'std' => 'up'), 'travel_round_to' => array('id' => 'travel_round_to', 'name' => __('Round to Nearest', 'mobile-dj-manager'), 'hint' => mdjm_get_currency() . ' i.e. 5', 'type' => 'number', 'size' => 'small', 'std' => '5'), 'travel_min_distance' => array('id' => 'travel_min_distance', 'name' => __("Don't add if below", 'mobile-dj-manager'), 'hint' => mdjm_travel_unit_label(false, true), 'type' => 'number', 'size' => 'small', 'std' => '30')))), 'emails' => apply_filters('mdjm_settings_emails', array('main' => array('email_settings' => array('id' => 'email_settings', 'name' => '<h3>' . __('Email Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'system_email' => array('id' => 'system_email', 'name' => __('Default From Address', 'mobile-dj-manager'), 'desc' => __('The email address you want generic emails from MDJM to come from.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => get_bloginfo('admin_email')), 'comms_show_active_events_only' => array('id' => 'comms_show_active_events_only', 'name' => __('Communicate Active Events Only', 'mobile-dj-manager'), 'desc' => __("Check to only retrieve a client's/employee's active events on the communication page.", 'mobile-dj-manager'), 'type' => 'checkbox'), 'track_client_emails' => array('id' => 'track_client_emails', 'name' => __('Track Client Emails?', 'mobile-dj-manager'), 'desc' => __('Some email clients may not support this feature.', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'bcc_dj_to_client' => array('id' => 'bcc_dj_to_client', 'name' => sprintf(__('Copy %s in Client Emails?', 'mobile-dj-manager'), mdjm_get_option('artist', __('DJ', 'mobile-dj-manager'))), 'desc' => sprintf(__('Send a copy of client emails to the %s primary %s', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_option('artist', __('DJ', 'mobile-dj-manager'))), 'type' => 'checkbox'), 'bcc_admin_to_client' => array('id' => 'bcc_admin_to_client', 'name' => __('Copy Admin in Client Emails?', 'mobile-dj-manager'), 'desc' => sprintf(__('Send a copy of client emails to %sDefault From Address%s', 'mobile-dj-manager'), '<code>', '</code>'), 'type' => 'checkbox', 'std' => '1')), 'templates' => array('quote_templates' => array('id' => 'quote_templates', 'name' => '<h3>' . __('Quote Template Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enquiry' => array('id' => 'enquiry', 'name' => __('Quote Template', 'mobile-dj-manager'), 'desc' => __('This is the default template used when sending quotes via email to clients', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_templates('email_template')), 'online_enquiry' => array('id' => 'online_enquiry', 'name' => __('Online Quote Template', 'mobile-dj-manager'), 'desc' => sprintf(__('This is the default template used for clients viewing quotes online via the %s.', 'mobile-dj-manager'), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager'))), 'type' => 'select', 'options' => mdjm_list_templates('email_template', true)), 'unavailable' => array('id' => 'unavailable', 'name' => __('Unavailability Template', 'mobile-dj-manager'), 'desc' => sprintf(__('This is the default template used when responding to enquiries that you are unavailable for the %s', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => mdjm_list_templates('email_template')), 'enquiry_from' => array('id' => 'enquiry_from', 'name' => __('Emails From?', 'mobile-dj-manager'), 'desc' => __('Who should enquiries and unavailability emails to be sent by?', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('admin' => __('Admin', 'mobile-dj-manager'), 'dj' => mdjm_get_option('artist', __('Primary Employee', 'mobile-dj-manager'))), 'std' => 'admin'), 'contract_templates' => array('id' => 'contract_templates', 'name' => '<h3>' . __('Awaiting Contract Template Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'contract_to_client' => array('id' => 'contract_to_client', 'name' => __('Contract Notification Email?', 'mobile-dj-manager'), 'desc' => sprintf(__('Do you want to auto send an email to the client when their %s changes to the <em>Awaiting Contract<em> status?', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'checkbox', 'std' => '1'), 'contract' => array('id' => 'contract', 'name' => __('Contract Template', 'mobile-dj-manager'), 'desc' => sprintf(__('Only applies if %sContract Notification Email%s is enabled', 'mobile-dj-manager'), '<em>', '</em>'), 'type' => 'select', 'options' => mdjm_list_templates('email_template')), 'contract_from' => array('id' => 'contract_from', 'name' => __('Emails From?', 'mobile-dj-manager'), 'desc' => __('Who should contract notification emails to be sent by?', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('admin' => __('Admin', 'mobile-dj-manager'), 'dj' => mdjm_get_option('artist', __('Primary Employee', 'mobile-dj-manager'))), 'std' => 'admin'), 'booking_conf_templates' => array('id' => 'booking_conf_templates', 'name' => '<h3>' . __('Booking Confirmation Template Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'booking_conf_to_client' => array('id' => 'booking_conf_to_client', 'name' => __('Booking Confirmation to Client', 'mobile-dj-manager'), 'desc' => __('Email client with selected template when booking is confirmed i.e. contract accepted, or status changed to Approved', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'booking_conf_client' => array('id' => 'booking_conf_client', 'name' => __('Client Booking Confirmation Template', 'mobile-dj-manager'), 'desc' => __('Select an email template to be used when sending the Booking Confirmation to Clients', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_templates('email_template')), 'booking_conf_from' => array('id' => 'booking_conf_from', 'name' => __('Emails From?', 'mobile-dj-manager'), 'desc' => __('Who should booking confirmation emails to be sent by?', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('admin' => __('Admin', 'mobile-dj-manager'), 'dj' => mdjm_get_option('artist', __('Primary Employee', 'mobile-dj-manager'))), 'std' => 'admin'), 'booking_conf_to_dj' => array('id' => 'booking_conf_to_dj', 'name' => __('Booking Confirmation to Employee?', 'mobile-dj-manager'), 'desc' => sprintf(__('Email %s primary %s with selected template when booking is confirmed i.e. contract accepted, or status changed to Approved', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_option('artist', __('DJ', 'mobile-dj-manager'))), 'type' => 'checkbox'), 'email_dj_confirm' => array('id' => 'email_dj_confirm', 'name' => sprintf(__('%s Booking Confirmation Template', 'mobile-dj-manager'), mdjm_get_option('artist', __('DJ', 'mobile-dj-manager'))), 'desc' => sprintf(__('Select an email template to be used when sending the Booking Confirmation to %s primary %s', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_option('artist', __('DJ', 'mobile-dj-manager'))), 'type' => 'select', 'options' => mdjm_list_templates('email_template'))))), 'client_zone' => apply_filters('mdjm_settings_client_zone', array('main' => array('client_zone_settings' => array('id' => 'client_zone_settings', 'name' => '<h3>' . sprintf(__('%s Settings', 'mobile-dj-manager'), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager'))) . '</h3>', 'desc' => '', 'type' => 'header'), 'app_name' => array('id' => 'app_name', 'name' => __('Application Name', 'mobile-dj-manager'), 'hint' => sprintf(__('Default is %sClient Zone%s.', 'mobile-dj-manager'), '<code>', '</code>'), 'desc' => __('Choose your own name for the application.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => __('Client Zone', 'mobile-dj-manager')), 'client_settings' => array('id' => 'client_settings', 'name' => '<h3>' . __('Client Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'pass_length' => array('id' => 'pass_length', 'name' => __('Default Password Length', 'mobile-dj-manager'), 'desc' => sprintf(__('If opting to generate or reset a user password during %s creation, how many characters should the password be?', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => array('5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12'), 'std' => '8'), 'complex_passwords' => array('id' => 'complex_passwords', 'name' => __('Use Complex Passwords?', 'mobile-dj-manager'), 'desc' => __('Generated passwords will contain <em>special</em> characters such as <code>!@#$%^&*()</code> as well as letters and numbers', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'notify_profile' => array('id' => 'notify_profile', 'name' => __('Incomplete Profile Warning?', 'mobile-dj-manager'), 'desc' => __('Display notice to Clients when they login if their Profile is incomplete? (i.e. Required field is empty)', 'mobile-dj-manager'), 'type' => 'checkbox'), 'client_zone_event_settings' => array('id' => 'client_zone_event_settings', 'name' => '<h3>' . sprintf(__('%s Settings', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</h3>', 'desc' => '', 'type' => 'header'), 'package_prices' => array('id' => 'package_prices', 'name' => __('Display Package Price?', 'mobile-dj-manager'), 'desc' => sprintf(__('Select to display %s package & Add-on prices within hover text within the %s', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager'))), 'type' => 'checkbox')), 'styles' => array('client_zone_styles' => array('id' => 'client_zone_styles', 'name' => '<h3>' . __('Styling', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'action_button_colour' => array('id' => 'action_button_colour', 'name' => __('Action Button Colour', 'mobile-dj-manager'), 'desc' => sprintf(__('Select your preferred colour for the %s action buttons', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => array('blue' => __('Blue', 'mobile-dj-manager'), 'green' => __('Green', 'mobile-dj-manager'), 'red' => __('Red', 'mobile-dj-manager'), 'turquoise' => __('Turquoise', 'mobile-dj-manager')), 'std' => 'blue')), 'pages' => array('page_settings' => array('id' => 'page_settings', 'name' => '<h3>' . __('Page Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'app_home_page' => array('id' => 'app_home_page', 'name' => mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager')) . ' ' . __('Home Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select the home page for the %s application. Needs to contain the shortcode %s[mdjm-home]%s", 'mobile-dj-manager'), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager')), '<code>', '</code>'), 'type' => 'select', 'options' => mdjm_list_pages()), 'quotes_page' => array('id' => 'quotes_page', 'name' => __('Online Quotes Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select the page to use for online %s quotes. Needs to contain the shortcode <code>[mdjm-quote]</code>", 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'select', 'options' => mdjm_list_pages()), 'contact_page' => array('id' => 'contact_page', 'name' => __('Contact Page', 'mobile-dj-manager'), 'desc' => __("Select your website's contact page so we can correctly direct visitors.", 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_pages()), 'contracts_page' => array('id' => 'contracts_page', 'name' => __('Contracts Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select your website's contracts page. Needs to contain the shortcode %s[mdjm-contract]%s", 'mobile-dj-manager'), '<code>', '</code>'), 'type' => 'select', 'options' => mdjm_list_pages()), 'payments_page' => array('id' => 'payments_page', 'name' => __('Payments Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select your website's payments page. Needs to contain the shortcode %s[mdjm-payments]%s", 'mobile-dj-manager'), '<code>', '</code>'), 'type' => 'select', 'options' => mdjm_list_pages()), 'playlist_page' => array('id' => 'playlist_page', 'name' => __('Playlist Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select your website's playlist page. Needs to contain the shortcode %s[mdjm-playlist]%s", 'mobile-dj-manager'), '<code>', '</code>'), 'type' => 'select', 'options' => mdjm_list_pages()), 'profile_page' => array('id' => 'profile_page', 'name' => __('Profile Page', 'mobile-dj-manager'), 'desc' => sprintf(__("Select your website's profile page. Needs to contain the shortcode %s[mdjm-profile]%s", 'mobile-dj-manager'), '<code>', '</code>'), 'type' => 'select', 'options' => mdjm_list_pages())), 'availability' => array('availability_settings' => array('id' => 'availability_settings', 'name' => '<h3>' . __('Availability Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'availability_status' => array('id' => 'availability_status', 'name' => __('Unavailable Statuses', 'mobile-dj-manager'), 'desc' => sprintf(__("CTRL (cmd on MAC) + Click to select %s status' that you want availability checker to report as unavailable", 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'multiple_select', 'options' => mdjm_all_event_status(), 'std' => mdjm_active_event_statuses()), 'availability_roles' => array('id' => 'availability_roles', 'name' => __('Employee Roles', 'mobile-dj-manager'), 'desc' => __('CTRL (cmd on MAC) + Click to select employee roles that need to be available', 'mobile-dj-manager'), 'type' => 'multiple_select', 'options' => mdjm_get_roles(), 'std' => array('dj')), 'avail_ajax' => array('id' => 'avail_ajax', 'name' => __('Use Ajax?', 'mobile-dj-manager'), 'desc' => __('Perform checks without page refresh', 'mobile-dj-manager'), 'type' => 'checkbox', 'std' => '1'), 'availability_check_pass_page' => array('id' => 'availability_check_pass_page', 'name' => __('Available Redirect Page', 'mobile-dj-manager'), 'desc' => __('Select a page to which users should be directed when an availability check is successful', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_pages(array('text' => __('NO REDIRECT - USE TEXT', 'mobile-dj-manager'))), 'std' => 'text'), 'availability_check_pass_text' => array('id' => 'availability_check_pass_text', 'name' => __('Available Text', 'mobile-dj-manager'), 'desc' => __('Text to be displayed when you are available - Only displayed if <code>NO REDIRECT - USE TEXT</code> is selected above, unless you are redirecting to an MDJM Contact Form. Valid shortcodes <code>{event_date}</code> & <code>{event_date_short}</code>', 'mobile-dj-manager'), 'type' => 'rich_editor', 'std' => __('Good news, we are available on the date you entered. Please contact us now', 'mobile-dj-manager')), 'availability_check_fail_page' => array('id' => 'availability_check_fail_page', 'name' => __('Unavailable Redirect Page', 'mobile-dj-manager'), 'desc' => __('Select a page to which users should be directed when an availability check is not successful', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_pages(array('text' => __('NO REDIRECT - USE TEXT', 'mobile-dj-manager'))), 'std' => 'text'), 'availability_check_fail_text' => array('id' => 'availability_check_fail_text', 'name' => __('Unavailable Text', 'mobile-dj-manager'), 'desc' => __('Text to be displayed when you are not available - Only displayed if <code>NO REDIRECT - USE TEXT</code> is selected above. Valid shortcodes <code>{event_date}</code> & <code>{event_date_short}</code>', 'mobile-dj-manager'), 'type' => 'rich_editor', 'std' => __('Unfortunately we do not appear to be available on the date you selected. Why not try another date below...', 'mobile-dj-manager'))))), 'payments' => apply_filters('mdjm_settings_payments', array('main' => array('gateway_settings' => array('id' => 'gateway_settings', 'name' => '<h3>' . __('Gateway Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'gateways' => array('id' => 'gateways', 'name' => __('Payment Gateways', 'mobile-dj-manager'), 'desc' => __('Choose the payment gateways you want to enable.', 'mobile-dj-manager'), 'type' => 'gateways', 'options' => mdjm_get_payment_gateways()), 'payment_gateway' => array('id' => 'payment_gateway', 'name' => __('Default Gateway', 'mobile-dj-manager'), 'desc' => __('This gateway will be loaded automatically with the payments page.', 'mobile-dj-manager'), 'type' => 'gateway_select', 'options' => mdjm_get_payment_gateways()), 'currency_settings' => array('id' => 'currency_settings', 'name' => '<h3>' . __('Currency Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'currency' => array('id' => 'currency', 'name' => __('Currency', 'mobile-dj-manager'), 'desc' => '', 'type' => 'select', 'options' => mdjm_get_currencies()), 'currency_format' => array('id' => 'currency_format', 'name' => __('Currency Position', 'mobile-dj-manager'), 'desc' => __('Where to display the currency symbol.', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('before' => __('before price', 'mobile-dj-manager'), 'after' => __('after price', 'mobile-dj-manager'), 'before with space' => __('before price with space', 'mobile-dj-manager'), 'after with space' => __('after price with space', 'mobile-dj-manager'))), 'decimal' => array('id' => 'decimal', 'name' => __('Decimal Separator', 'mobile-dj-manager'), 'desc' => __('The symbol to separate decimal points. (Usually . or ,)', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'small', 'std' => '.'), 'thousands_seperator' => array('id' => 'thousands_seperator', 'name' => __('Thousands Separator', 'mobile-dj-manager'), 'desc' => '', 'type' => 'text', 'size' => 'small', 'std' => ','), 'deposit_settings' => array('id' => 'deposit_settings', 'name' => '<h3>' . sprintf(__('%s Settings', 'mobile-dj-manager'), mdjm_get_deposit_label()) . '</h3>', 'desc' => '', 'type' => 'header'), 'deposit_type' => array('id' => 'deposit_type', 'name' => mdjm_get_deposit_label() . "'s " . __('are', 'mobile-dj-manager'), 'desc' => sprintf(__('If you require ' . mdjm_get_deposit_label() . ' payments for your %s, how should they be calculated?', 'mobile-dj-manager'), mdjm_get_label_plural(true)), 'type' => 'select', 'options' => array('0' => 'Not required', 'percentage' => '% ' . sprintf(__('of %s value', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'fixed' => __('Fixed price', 'mobile-dj-manager'))), 'deposit_amount' => array('id' => 'deposit_amount', 'name' => mdjm_get_deposit_label() . ' ' . __('Amount', 'mobile-dj-manager'), 'desc' => sprintf(__("If your %s's are a percentage enter the value (i.e 20). For fixed prices, enter the amount in the format %s", 'mobile-dj-manager'), mdjm_get_deposit_label(), mdjm_format_amount('0')), 'type' => 'text', 'size' => 'small'), 'payment_form_settings' => array('id' => 'payment_form_settings', 'name' => '<h3>' . __('Payment Form Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'payment_label' => array('id' => 'payment_label', 'name' => __('Payment Label', 'mobile-dj-manager'), 'desc' => __('Display name of the label shown to clients to select the payment they wish to make.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => __('Make a Payment Towards', 'mobile-dj-manager')), 'other_amount_label' => array('id' => 'other_amount_label', 'name' => __('Label for Other Amount', 'mobile-dj-manager'), 'desc' => __('Enter your desired label for the other amount radio button.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => __('Other Amount', 'mobile-dj-manager')), 'payment_button' => array('id' => 'payment_button', 'name' => __('Payment Button Text', 'mobile-dj-manager'), 'desc' => __('The text you want to appear on the Payment Form submit button.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'regular', 'std' => __('Pay Now', 'mobile-dj-manager')), 'other_amount_default' => array('id' => 'other_amount_default', 'name' => __('Default', 'mobile-dj-manager') . ' ' . mdjm_get_option('other_amount_label', __('Other Amount', 'mobile-dj-manager')), 'desc' => sprintf(__('Enter the default amount to be used in the %s field.', 'mobile-dj-manager'), mdjm_get_option('other_amount_label', __('Other Amount', 'mobile-dj-manager'))), 'type' => 'text', 'size' => 'small', 'std' => '50.00'), 'tax_settings' => array('id' => 'tax_settings', 'name' => '<h3>' . __('Tax Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enable_tax' => array('id' => 'enable_tax', 'name' => __('Enable Taxes?', 'mobile-dj-manager'), 'desc' => __('Enable if you need to add taxes to online payments', 'mobile-dj-manager'), 'type' => 'checkbox'), 'tax_type' => array('id' => 'tax_type', 'name' => __('Apply Tax As', 'mobile-dj-manager'), 'desc' => __('How do you apply tax?', 'mobile-dj-manager'), 'type' => 'select', 'options' => array('percentage' => __('% of total', 'mobile-dj-manager'), 'fixed' => __('Fixed rate', 'mobile-dj-manager')), 'std' => 'percentage'), 'tax_rate' => array('id' => 'tax_rate', 'name' => __('Tax Rate', 'mobile-dj-manager'), 'desc' => __('If you apply tax based on a fixed percentage (i.e. VAT) enter the value (i.e 20). For fixed rates, enter the amount in the format 0.00. Taxes will only be applied during checkout.', 'mobile-dj-manager'), 'type' => 'text', 'size' => 'small', 'std' => '20'), 'payment_types' => array('id' => 'payment_types', 'name' => '<h3>' . __('Payment Types', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'payment_sources' => array('id' => 'payment_sources', 'name' => __('Payment Types', 'mobile-dj-manager'), 'desc' => __('Enter methods of payment.', 'mobile-dj-manager'), 'type' => 'textarea', 'std' => __('BACS', 'mobile-dj-manager') . "\r\n" . __('Cash', 'mobile-dj-manager') . "\r\n" . __('Cheque', 'mobile-dj-manager') . "\r\n" . __('PayPal', 'mobile-dj-manager') . "\r\n" . __('PayFast', 'mobile-dj-manager') . "\r\n" . __('Stripe', 'mobile-dj-manager') . "\r\n" . __('Other', 'mobile-dj-manager')), 'default_type' => array('id' => 'default_type', 'name' => __('Default Payment Type', 'mobile-dj-manager'), 'desc' => sprintf(__('What is the default method of payment? i.e. if you select an %s %s as paid how should we log it?', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_balance_label()), 'type' => 'select', 'options' => mdjm_list_txn_sources())), 'employee_payments' => array('employee_payment_settings' => array('id' => 'employee_payment_settings', 'name' => '<h3>' . __('Employee Payment Settings', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'enable_employee_payments' => array('id' => 'enable_employee_payments', 'name' => __('Enable Employee Payments', 'mobile-dj-manager'), 'desc' => sprintf(__('Enable this option to be able to record employee wage payments for %s.', 'mobile-dj-manager'), mdjm_get_label_plural()), 'type' => 'checkbox'), 'employee_pay_status' => array('id' => 'employee_pay_status', 'name' => __('Payment Statuses', 'mobile-dj-manager'), 'desc' => sprintf(__("CTRL (cmd on MAC) + Click to select %s status' that an event must be at before employee payments can be made.", 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'type' => 'multiple_select', 'options' => mdjm_all_event_status(), 'std' => array('mdjm-completed')), 'employee_auto_pay_complete' => array('id' => 'employee_auto_pay_complete', 'name' => sprintf(__('Pay when %s Completes', 'mobile-dj-manager'), mdjm_get_label_singular()), 'desc' => sprintf(__('Enable this option to automatically pay employees once an %s completes.', 'mobile-dj-manager'), mdjm_get_label_singular()), 'type' => 'checkbox')), 'receipts' => array('payment_conf_templates' => array('id' => 'payment_conf_templates', 'name' => '<h3>' . __('Payment Receipts', 'mobile-dj-manager') . '</h3>', 'desc' => '', 'type' => 'header'), 'payment_cfm_template' => array('id' => 'payment_cfm_template', 'name' => __('Gateway Payment Receipt', 'mobile-dj-manager'), 'desc' => __('Select an email template to be sent as a receipt to clients when a gateway payment is received.', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_templates('email_template', true)), 'manual_payment_cfm_template' => array('id' => 'manual_payment_cfm_template', 'name' => __('Manual Payment Receipt', 'mobile-dj-manager'), 'desc' => __('Select an email template to be sent as a receipt to clients when you manually log a payment.', 'mobile-dj-manager'), 'type' => 'select', 'options' => mdjm_list_templates('email_template', true))))), 'extensions' => apply_filters('mdjm_settings_extensions', array()), 'licenses' => apply_filters('mdjm_settings_licenses', array())); return apply_filters('mdjm_registered_settings', $mdjm_settings); }