コード例 #1
0
/**
 * Events contextual help.
 *
 * @since       1.3
 * @return      void
 */
function mdjm_events_contextual_help()
{
    $screen = get_current_screen();
    if ($screen->id != 'mdjm-event') {
        return;
    }
    $screen->set_help_sidebar('<p><strong>' . __('For more information:', 'mobile-dj-manager') . '</strong></p>' . '<p>' . sprintf(__('Visit the <a href="%s">documentation</a> on the MDJM Event Management website.', 'mobile-dj-manager'), esc_url('http://mdjm.co.uk/support/')) . '</p>' . '<p>' . sprintf(__('Join our <a href="%s">Facebook Group</a>.', 'mobile-dj-manager'), esc_url('https://www.facebook.com/groups/mobiledjmanager/')) . '</p>' . '<p>' . sprintf(__('<a href="%s">Post an issue</a> on <a href="%s">GitHub</a>.', 'mobile-dj-manager'), esc_url('https://github.com/mdjm/mobile-dj-manager/issues'), esc_url('https://github.com/mdjm/mobile-dj-manager/')) . '</p>' . '<p>' . sprintf(__('View <a href="%s">add-ons</a>.', 'mobile-dj-manager'), esc_url('http://mdjm.co.uk/add-ons/')) . '</p>');
    $screen->add_help_tab(array('id' => 'mdjm-event-options', 'title' => sprintf(__('%s Options', 'mobile-dj-manager'), mdjm_get_label_singular()), 'content' => '<p>' . sprintf(__('<strong>%1$s Status</strong> - Set the status of this %1$s. An description of each status can be found <a href="%2$s" target="_blank">here</a>', 'mobile-dj-manager'), mdjm_get_label_singular(), 'http://mdjm.co.uk/docs/event-statuses/') . '</p>' . '<p>' . sprintf(__('<strong>%1$s Status</strong> - Set the type of %1$s <em>i.e. Wedding or 40th Birthday</em>. You can define the types <a href="%s">here</a>.', 'mobile-dj-manager'), mdjm_get_label_singular(), admin_url('edit-tags.php?taxonomy=event-types&post_type=mdjm-event')) . '</p>' . '<p>' . sprintf(__('<strong>%1$s Contract</strong> - Select the contract associated with this %1$s.', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</p>' . '<p>' . __('<strong>Disable Client Update Emails?</strong> - Selecting this option will stop any emails being sent to the client during update.', 'mobile-dj-manager') . '</p>' . '<p>' . __("<strong>Reset Client Password</strong> - If selected whilst transitioning to enquiry status, the client's password will be reset. If you insert the <code>{client_password}</code> content tag into your email template, the password will be inserted.", 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Email Quote Template</strong> - During transition to Enquiry status, select which quote email template should be sent to the client.', 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Online Quote Template</strong> - During transition to Enquiry status, select which quote template should be used to generate the page that displays the online quote.', 'mobile-dj-manager') . '</p>' . '<p>' . sprintf(__('<strong>%1$s Paid?</strong> - Select this option if the client has paid their %1$s.', 'mobile-dj-manager'), mdjm_get_deposit_label()) . '</p>' . '<p>' . sprintf(__('<strong>%1$s Paid?</strong> - Select this option if the client has paid their %1$s.', 'mobile-dj-manager'), mdjm_get_balance_label()) . '</p>' . '<p>' . sprintf(__('<strong>Enable %1$s Playlist?</strong> - Toggle whether or not the client can manage the playlist for this %1$s.', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-settings-client-details', 'title' => __('Client Details', 'mobile-dj-manager'), 'content' => '<p>' . sprintf(__("Select a client for this %s. If the client does not exist, you can select <em>Add New Client</em>. In doing so, additional fields will be displayed enabling you to enter the new client's details.", 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-event-details', 'title' => sprintf(__('%s Details', 'mobile-dj-manager'), mdjm_get_label_singular()), 'content' => '<p>' . sprintf(__('<strong>%1$s Name</strong> - Assign a name for this %1$s. Can be viewed and adjusted by the client.', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</p>' . '<p>' . sprintf(__('<strong>Select Primary Employee</strong> - Select the primary employee for this %s.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>%1$s Date</strong> - Use the datepicker to set the date for this %1s$s.', 'mobile-dj-manager'), mdjm_get_label_singular()) . '</p>' . '<p>' . sprintf(__('<strong>Start Time</strong> - Set the start time of the %s', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>End Time</strong> - Set the end time of the %', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>Total Cost</strong> - Enter the total cost of the %s. If using equipment packages and add-ons, selecting these will automatically set this cost.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>%1$s</strong> - Enter the %1$s that needs to be collected for this %2$s upon contract signing. This field can be auto populated depending on your settings and equipment packages and add-on selections', 'mobile-dj-manager'), mdjm_get_deposit_label(), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>Select an %1$s Package</strong> - If packages are enabled and defined you can assign one to the %1$s here. Doing so will auto update the <em>Total Cost</em> and <em>%2$s</em> fields. Additionally, the <em>Select Add-ons</em> options will be updated to exclude add-ons included within the selected package.', 'mobile-dj-manager'), mdjm_get_label_singular(), mdjm_get_deposit_label()) . '</p>' . '<p>' . sprintf(__('<strong>Select Add-ons</strong> - If packages are enabled you can assign add-ons to your %s here. The <em>Total Cost</em> and <em>%s</em> fields will be updated automatically to reflect the new costs.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_deposit_label()) . '</p>' . '<p>' . __('<strong>Notes</strong> - Information entered here will be visible to the client and all event employees.', 'mobile-dj-manager') . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-event-employees', 'title' => sprintf(__('%s Employees', 'mobile-dj-manager'), mdjm_get_label_singular()), 'content' => '<p>' . sprintf(__('Employees that are assigned to the %1$s are listed here together with their role and wage. You can add additional employees to the %1$s, select their %1$s role and allocate their wages.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-event-venue-details', 'title' => __('Venue Details', 'mobile-dj-manager'), 'content' => '<p>' . __('Select the venue from the drop down. If the venue does not exist, you can specify it manually by selecting <em>Enter Manually</em> and completing the additional fields that are then displayed.', 'mobile-dj-manager') . '</p>' . '<p>' . __('Check the <em>Save this Venue</em> option to save the venue.', 'mobile-dj-manager') . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-event-transactions', 'title' => __('Transactions', 'mobile-dj-manager'), 'content' => '<p>' . sprintf(__('This section allows you to add transactions associated with the %1$s as well as listing existing associated transactions.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('If transactions already exist, the total amount of income and expenditure is displayed as well as the total overall earnings so far for the %1$s.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-event-administration', 'title' => __('Administration', 'mobile-dj-manager'), 'content' => '<p>' . __('<strong>Enquiry Source</strong> - Select how the client heard about your business', 'mobile-dj-manager') . '</p>' . '<p>' . sprintf(__('<strong>Setup Date</strong> - Use the datepicker to select the date that you need to setup for this %s.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . sprintf(__('<strong>Setup Time</strong> - Select the time that you need to setup for this %s.', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>' . '<p>' . __('<strong>Employee Notes</strong> - Enter notes that are only visible by employees. Clients will not see these notes', 'mobile-dj-manager') . '</p>' . '<p>' . sprintf(__('<strong>Admin Notes</strong> - Enter notes that are only visible by admins. Employees and clients will not see these notes', 'mobile-dj-manager'), mdjm_get_label_singular(true)) . '</p>'));
    do_action('mdjm_events_contextual_help', $screen);
}
コード例 #2
0
ファイル: mdjm-home.php プロジェクト: mdjm/mobile-dj-manager
 public function single_event()
 {
     global $clientzone, $mdjm, $my_mdjm, $mdjm_settings, $post;
     if (isset($_POST['submit']) && $_POST['submit'] == 'Submit Changes') {
         $this->update_event();
     }
     $event = isset($_GET['event_id']) ? get_post($_GET['event_id']) : $my_mdjm['next'][0];
     $post = $event;
     if (!MDJM()->events->is_my_event($event->ID)) {
         if (MDJM_DEBUG == true) {
             MDJM()->debug->log_it('ERROR: ' . get_current_user_id() . ' is attempting to access event ID ' . $event->ID . ' which is not theirs. In ' . __METHOD__, true);
         }
         wp_die($clientzone->display_message(9, 5), 'Event Ownership Error');
     }
     $eventinfo = MDJM()->events->event_detail($event->ID);
     $expired = array('mdjm-failed', 'mdjm-cancelled', 'mdjm-completed');
     // Event not active
     if (in_array($event->post_status, $expired)) {
         echo $clientzone->__text('home_notactive', '<p>The selected event is no longer active. <a href="' . mdjm_get_formatted_url(MDJM_CONTACT_PAGE, false) . '" title="Begin planning your next event with us">Contact us now</a> begin planning your next event.</p>');
     } else {
         echo '<div id="mdjm_event_updated"></div>';
         echo '<p>' . __('Below are the details of your upcoming event on ' . date('l, jS F Y', $eventinfo['date']) . '.') . '</p>' . "\r\n";
         echo '<p>If any of the event details are incorrect, please <a href="mailto:' . $mdjm_settings['email']['system_email'] . '">contact me now</a>.</p>' . "\r\n";
         // Incomplete Profile warning
         if (!$clientzone->client_profile_complete($my_mdjm['me']->ID) && $clientzone->warn_profile()) {
             $clientzone->display_notice(3, 'Your <a href="' . mdjm_get_formatted_url(MDJM_PROFILE_PAGE, false) . '">profile</a> appears to be incomplete. Please <a href="' . mdjm_get_formatted_url(MDJM_PROFILE_PAGE, false) . '">click here</a> to update it now. Incorrect <a href="' . mdjm_get_formatted_url(MDJM_PROFILE_PAGE, false) . '">profile</a> information can cause problems with your booking.');
         }
         // Display the event details
         echo '<form name="mdjm_event" id="mdjm_event" method="post">' . "\r\n";
         echo '<input type="hidden" name="event_id" id="event_id" value="' . $event->ID . '" />' . "\r\n";
         wp_nonce_field('manage_client_event', '__mdjm_event');
         $this->display_action_buttons($event->ID, $event->post_status);
         echo '<div id="mdjm-event-container">' . "\r\n";
         echo '<div id="mdjm-event-table">' . "\r\n";
         echo '<table id="mdjm-event-listing">' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th colspan="4"><span style="text-decoration: underline;">' . __('Event Details') . '</span>&nbsp;&nbsp;&nbsp;' . $this->edit_event_link('edit', $event->ID) . '</th>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 20%;">' . __('Event Name:') . '</th>' . "\r\n";
         echo '<td colspan="3">' . (!empty($eventinfo['name']) ? esc_attr($eventinfo['name']) : $eventinfo['type']) . '</span>&nbsp;&nbsp;&nbsp;' . $this->edit_event_link('change', $event->ID) . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Status:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . __(get_post_status_object($event->post_status)->label) . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Your ' . MDJM_DJ . ':') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . (!empty($eventinfo['dj']->display_name) ? $eventinfo['dj']->display_name : $eventinfo['dj']) . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Event Date:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . date(MDJM_SHORTDATE_FORMAT, $eventinfo['date']) . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Event Type:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . __($eventinfo['type']) . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Start Time:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $eventinfo['start'] . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('End Time:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $eventinfo['finish'] . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         if (MDJM_PACKAGES == true) {
             echo '<tr>' . "\r\n";
             echo '<th style="width: 15%;">' . __('Package:') . '</th>' . "\r\n";
             echo '<td style="width: 35%;">';
             if (!empty($eventinfo['package'])) {
                 $eventinfo['package'] = get_package_details($eventinfo['package']);
                 echo !empty($eventinfo['package']) ? '<a title="' . (!empty($eventinfo['package']['desc']) ? $eventinfo['package']['desc'] : '') . (!empty($mdjm_settings['clientzone']['package_prices']) ? ' - ' . mdjm_currency_filter(mdjm_sanitize_amount($eventinfo['package']['cost'])) : '') . '">' . $eventinfo['package']['name'] . '</a>' : 'None';
             } else {
                 echo 'None';
             }
             echo '</td>' . "\r\n";
             echo '<th style="width: 15%;">' . __('Addons:') . '</th>' . "\r\n";
             echo '<td style="width: 35%;">';
             $eventinfo['addons'] = get_post_meta($event->ID, '_mdjm_event_addons', true);
             if (!empty($eventinfo['addons'])) {
                 $i = 1;
                 foreach ($eventinfo['addons'] as $addon) {
                     $item = get_addon_details($addon);
                     echo '<a title="' . (!empty($item['desc']) ? $item['desc'] : '') . (!empty($mdjm_settings['clientzone']['package_prices']) ? ' - ' . mdjm_currency_filter(mdjm_sanitize_amount($item['cost'])) : '') . '">' . $item['name'] . '</a>';
                     echo $i < count($eventinfo['addons']) ? '<br />' : '';
                     $i++;
                 }
             } else {
                 echo 'None';
             }
             '</td>' . "\r\n";
             echo '</tr>' . "\r\n";
         }
         // if( MDJM_PACKAGES == true )
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Total Cost:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $eventinfo['cost'] . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __(mdjm_get_deposit_label()) . ':</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $eventinfo['deposit'] . ' (' . __($eventinfo['deposit_status']) . ')</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __(mdjm_get_balance_label()) . ':</th>' . "\r\n";
         echo '<td colspan="3">' . $eventinfo['balance'] . ' (' . __($eventinfo['balance_status']) . ')</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         if (!empty($eventinfo['notes'])) {
             echo '<tr>' . "\r\n";
             echo '<th style="width: 15%;">' . __('Information:') . '</th>' . "\r\n";
             echo '<td colspan="3">' . stripslashes($eventinfo['notes']) . '</td>' . "\r\n";
             echo '</tr>' . "\r\n";
         }
         echo '<tr>' . "\r\n";
         echo '<td colspan="4">&nbsp;</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th colspan="4"><span style="text-decoration: underline;">' . __('Your Contact Details') . '</span>&nbsp;&nbsp;&nbsp;<a href="' . mdjm_get_formatted_url(MDJM_PROFILE_PAGE, false) . '">' . __('edit') . '</a></th>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Name:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $my_mdjm['me']->display_name . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Phone:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $my_mdjm['me']->phone1 . ' ' . (!empty($my_mdjm['me']->phone2) ? $my_mdjm['me']->phone2 : '') . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Email:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $my_mdjm['me']->user_email . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Address:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . $clientzone->get_client_address() . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<td colspan="4">&nbsp;</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '<tr>' . "\r\n";
         echo '<th colspan="4"><span style="text-decoration: underline;">' . __('Venue Details') . '</span></th>' . "\r\n";
         echo '</tr>' . "\r\n";
         $venue_details = MDJM()->events->mdjm_get_venue_details(get_post_meta($event->ID, '_mdjm_event_venue_id', true), $event->ID);
         echo '<tr>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Venue:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . stripslashes($venue_details['name']) . '</td>' . "\r\n";
         echo '<th style="width: 15%;">' . __('Address:') . '</th>' . "\r\n";
         echo '<td style="width: 35%;">' . implode('<br />', $venue_details['full_address']) . '</td>' . "\r\n";
         echo '</tr>' . "\r\n";
         echo '</table>' . "\r\n";
         echo '</div>' . "\r\n";
         // End div mdjm-event-table
         echo '</div>' . "\r\n";
         // End div mdjm-event-container
         echo '</form>' . "\r\n";
     }
     // foreach( $posts as $post )
 }
コード例 #3
0
ファイル: metaboxes.php プロジェクト: mdjm/mobile-dj-manager
/**
 * Output the event options payments row
 *
 * @since	1.3.7
 * @global	obj		$mdjm_event			MDJM_Event class object
 * @global	bool	$mdjm_event_update	True if this event is being updated, false if new.
 * @param	int		$event_id			The event ID.
 * @return	str
 */
function mdjm_event_metabox_options_payments_row($event_id)
{
    global $mdjm_event, $mdjm_event_update;
    if (!mdjm_employee_can('edit_txns')) {
        return;
    }
    $deposit_status = __('Due', 'mobile-dj-manager');
    $balance_status = __('Due', 'mobile-dj-manager');
    if ($mdjm_event_update && 'mdjm-unattended' != $mdjm_event->post_status) {
        $deposit_status = $mdjm_event->get_deposit_status();
        $balance_status = $mdjm_event->get_balance_status();
    }
    ?>

	<p><strong><?php 
    _e('Payments', 'mobile-dj-manager');
    ?>
</strong></p>

    <p><?php 
    echo MDJM()->html->checkbox(array('name' => 'deposit_paid', 'value' => 'Paid', 'current' => $deposit_status));
    ?>
 <?php 
    printf(__('%s Paid?', 'mobile-dj-manager'), mdjm_get_deposit_label());
    ?>
</p>

	<p><?php 
    echo MDJM()->html->checkbox(array('name' => 'balance_paid', 'value' => 'Paid', 'current' => $balance_status));
    ?>
 <?php 
    printf(__('%s Paid?', 'mobile-dj-manager'), mdjm_get_balance_label());
    ?>
</p>

    <?php 
}
コード例 #4
0
ファイル: payments.php プロジェクト: mdjm/mobile-dj-manager
/**
 * Updates an event once a payment is completed.
 *
 * @since	1.3.8
 * @param	arr		$txn_data	Transaction data from gateway.
 * @return	void
 */
function mdjm_update_event_after_payment($txn_data)
{
    $type = mdjm_get_txn_type($txn_data['txn_id']);
    if ($type == mdjm_get_deposit_label()) {
        $meta['_mdjm_event_deposit_status'] = 'Paid';
    } else {
        if ($type == mdjm_get_balance_label()) {
            $meta['_mdjm_event_deposit_status'] = 'Paid';
            $meta['_mdjm_event_balance_status'] = 'Paid';
        } else {
            if (mdjm_get_event_remaining_deposit($txn_data['event_id']) < 1) {
                $meta['_mdjm_event_deposit_status'] = 'Paid';
            }
            if (mdjm_get_event_balance($txn_data['event_id']) < 1) {
                $meta['_mdjm_event_deposit_status'] = 'Paid';
                $meta['_mdjm_event_balance_status'] = 'Paid';
            }
        }
    }
    mdjm_update_event_meta($txn_data['event_id'], $meta);
    // Update the journal
    mdjm_add_journal(array('user_id' => $txn_data['client_id'], 'event_id' => $txn_data['event_id'], 'comment_content' => sprintf(__('%s of %s received via %s', 'mobile-dj-manager'), $type, mdjm_currency_filter(mdjm_format_amount($txn_data['total'])), mdjm_get_gateway_admin_label($txn_data['gateway']))));
}
コード例 #5
0
/**
 * Payment form total price.
 *
 * @since	1.3.8
 * @return	str
 */
function mdjm_get_payment_total()
{
    $event_id = $_POST['event_id'];
    $type = $_POST['mdjm_payment_amount'];
    $total = false;
    $mdjm_event = new MDJM_Event($event_id);
    if ('deposit' == $type) {
        $type = mdjm_get_deposit_label();
        $total = $mdjm_event->get_remaining_deposit();
    } elseif ('balance' == $type) {
        $type = mdjm_get_balance_label();
        $total = $mdjm_event->get_balance();
    } else {
        $type = mdjm_get_other_amount_label();
        $total = !empty($_POST['part_payment']) ? $_POST['part_payment'] : false;
    }
    return $total;
}
コード例 #6
0
 public function notification_content($task)
 {
     global $mdjm, $mdjm_settings;
     if (empty($task)) {
         if (MDJM_DEBUG == true) {
             MDJM()->debug->log_it('ERROR: No task was parsed ' . __METHOD__);
         }
     } else {
         if (MDJM_DEBUG == true) {
             MDJM()->debug->log_it('Creating notification content for ' . $task['taskinfo']['name']);
         }
     }
     /* -- Start the email content -- */
     $content = 'The ' . $task['taskinfo']['name'] . ' scheduled task from ' . MDJM_COMPANY . ' has completed. ' . "\r\n" . "\r\n" . 'Task Start time: ' . date('H:i:s l, jS F Y', $task['start']) . "\r\n" . "\r\n";
     /* Build the email content relating to the current task */
     switch ($task['taskinfo']['slug']) {
         case 'complete-events':
             // Notification content for Complete Events task
             $content .= $task['total'] . ' event(s) have been marked as completed...' . "\r\n" . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             /* -- List each event -- */
             foreach ($task['data'] as $eventinfo) {
                 $content .= 'Event ID: ' . $eventinfo['id'] . "\r\n" . 'Date: ' . $eventinfo['date'] . "\r\n" . 'Venue: ' . $eventinfo['venue'] . "\r\n" . 'Client: ' . $eventinfo['client'] . "\r\n" . 'DJ: ' . $eventinfo['djinfo']->display_name . "\r\n" . 'Link: ' . get_edit_post_link($eventinfo['id'], '') . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             }
             // End Foreach
             break;
         case 'fail-enquiry':
             $content .= $task['total'] . ' enquiry(s) have been marked as lost...' . "\r\n" . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             foreach ($task['data'] as $eventinfo) {
                 $content .= 'Event ID: ' . $eventinfo['id'] . "\r\n" . 'Date: ' . $eventinfo['date'] . "\r\n" . 'Client: ' . $eventinfo['client'] . "\r\n" . 'DJ: ' . $eventinfo['djinfo']->display_name . "\r\n" . 'Link: ' . get_edit_post_link($eventinfo['id'], '') . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             }
             // End Foreach
             break;
         case 'request-deposit':
             $content .= $task['total'] . ' deposit requests ' . (!empty($task['taskinfo']['options']['email_client']) && $task['taskinfo']['options']['email_client'] == 'Y' ? ' have been sent' : ' need to be requested') . "\r\n" . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             foreach ($task['data'] as $eventinfo) {
                 $content .= 'Event ID: ' . $eventinfo['id'] . "\r\n" . 'Date: ' . $eventinfo['date'] . "\r\n" . 'Client: ' . $eventinfo['client'] . "\r\n" . 'DJ: ' . $eventinfo['djinfo']->display_name . "\r\n" . mdjm_get_deposit_label() . ': ' . mdjm_currency_filter(mdjm_sanitize_amount($eventinfo['deposit'])) . "\r\n" . 'Link: ' . get_edit_post_link($eventinfo['id'], '') . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             }
             // End Foreach
             break;
         case 'balance-reminder':
             $content .= $task['total'] . ' balance requests have been sent' . "\r\n" . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             foreach ($task['data'] as $eventinfo) {
                 $content .= 'Event ID: ' . $eventinfo['id'] . "\r\n" . 'Date: ' . $eventinfo['date'] . "\r\n" . 'Client: ' . $eventinfo['client'] . "\r\n" . 'DJ: ' . $eventinfo['djinfo']->display_name . "\r\n" . mdjm_get_balance_label() . ' Due: ' . mdjm_currency_filter(mdjm_sanitize_amount($eventinfo['cost'] - $eventinfo['deposit'])) . "\r\n" . 'Link: ' . get_edit_post_link($eventinfo['id'], '') . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             }
             // End Foreach
             break;
         case 'client-feedback':
             $content .= $task['total'] . ' client feedback requests have been sent' . "\r\n" . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             foreach ($task['data'] as $eventinfo) {
                 $content .= 'Event ID: ' . $eventinfo['id'] . "\r\n" . 'Date: ' . $eventinfo['date'] . "\r\n" . 'Client: ' . $eventinfo['client'] . "\r\n" . 'DJ: ' . $eventinfo['djinfo']->display_name . "\r\n" . '----------------------------------------' . '----------------------------------------' . "\r\n";
             }
             break;
     }
     // Switch
     /* -- Complete the email content -- */
     $content .= 'Task End time: ' . date('H:i:s l, jS F Y', $task['end']) . "\r\n" . "\r\n" . 'This email was generated by the MDJM Event Management for WordPress plugin - http://mdjm.co.uk';
     /* -- Return the content -- */
     return $content;
 }
コード例 #7
0
checked($selected, 'deposit');
?>
 /> <?php 
echo esc_html(mdjm_get_deposit_label());
?>
 &ndash; <?php 
echo mdjm_currency_filter(mdjm_format_amount($mdjm_event->get_remaining_deposit()));
?>
<br />
    
        <input type="radio" name="mdjm_payment_amount" id="mdjm-payment-balance" value="balance"<?php 
echo $balance_disabled;
checked($selected, 'balance');
?>
 /> <?php 
echo esc_html(mdjm_get_balance_label());
?>
 &ndash; <?php 
echo mdjm_currency_filter(mdjm_format_amount($mdjm_event->get_balance()));
?>
<br />
    
        <input type="radio" name="mdjm_payment_amount" id="mdjm-payment-part" value="part_payment"<?php 
checked($selected, 'part_payment');
?>
 /> <?php 
echo mdjm_get_other_amount_label();
?>
 <span id="mdjm-payment-custom"<?php 
echo $other_amount_style;
?>
コード例 #8
0
ファイル: welcome.php プロジェクト: mdjm/mobile-dj-manager
    /**
     * Render Getting Started Screen
     *
     * @access public
     * @since 1.9
     * @return void
     */
    public function getting_started_screen()
    {
        ?>
		<div class="wrap about-wrap mdjm-about-wrap">
			<?php 
        // load welcome message and content tabs
        $this->welcome_message();
        $this->tabs();
        ?>
			<p class="about-description"><?php 
        _e("Now that MDJM Event Management is installed, you're ready to get started. It works out of the box, but there are some customisations you can configure to match your business needs.", 'mobile-dj-manager');
        ?>
</p>

			<div class="changelog">
				<h3><?php 
        printf(__('Creating Your First %s', 'mobile-dj-manager'), mdjm_get_label_singular());
        ?>
</h3>
				<div class="feature-section">
					<div class="feature-section-media">
						<img src="<?php 
        echo MDJM_PLUGIN_URL . '/assets/images/screenshots/mdjm-first-event.png';
        ?>
" class="mdjm-welcome-screenshots"/>
					</div>
					<div class="feature-section-content">
						<h4><a href="<?php 
        echo admin_url('post-new.php?post_type=mdjm-event');
        ?>
"><?php 
        printf(__('MDJM %s &rarr; Create %s', 'mobile-dj-manager'), mdjm_get_label_plural(), mdjm_get_label_singular());
        ?>
</a></h4>
						<p><?php 
        printf(__('The MDJM %1$s menu is your access point to all aspects of your %2$s creation and setup. To create your first %2$s, simply click Add New and then fill out the %2$s details.', 'mobile-dj-manager'), mdjm_get_label_plural(), mdjm_get_label_singular(true));
        ?>
</p>

						<h4><?php 
        _e('Create a Client', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Create clients directly from the %s screen by selected <strong>Add New Client</strong> from the <em>Select Client</em> dropdown to reveal a few additional fields', 'mobile-dj-manager'), mdjm_get_label_singular());
        ?>

						<h4><?php 
        printf(__('Add %s Types', 'mobile-dj-manager'), mdjm_get_label_singular());
        ?>
</h4>
						<p><?php 
        printf(__('If the %1$s type does not exist for the %1$s you are creating, click the <em>Add New</em> link next to the %2$s Type dropdown, enter the %2$s Type name in the text box that is revealed and click <em>Add</em>.<br />To manage all %2$s Types, go to <a href="%4$s">MDJM %3$s &rarr; %2$s Types</a>.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_label_singular(), mdjm_get_label_plural(), admin_url('edit-tags.php?taxonomy=event-types&post_type=mdjm-event'));
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        _e('Setup Templates for Complete Automation', 'mobile-dj-manager');
        ?>
</h3>
				<div class="feature-section">
					<div class="feature-section-media">
						<img src="<?php 
        echo MDJM_PLUGIN_URL . '/assets/images/screenshots/mdjm-edit-template.png';
        ?>
"/>
					</div>
					<div class="feature-section-content">
						<h4><?php 
        _e('Email Templates', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Email templates can be configured to be sent automatically during an %1$s status change. Supporting our vast collection of <a href="%2$s" target="_blank">content tags</a> each email can be completley customised and tailored to the %1$s and client details.', 'mobile-dj-manager'), mdjm_get_label_singular(true), 'http://mdjm.co.uk/docs/content-tags/');
        ?>
</p>
                        <p><?php 
        _e('With email tracking enabled, you can even be sure that your client received your email and know when they have read it.', 'mobile-dj-manager');
        ?>
</p>

						<h4><?php 
        _e('Contract Templates', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Create contract templates that be assigned to your %s. Clients will be able to review and <strong>Digitally Sign</strong> the contract via the %2$s.', 'mobile-dj-manager'), mdjm_get_label_singular(), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager')));
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        printf(__('Create %s Packages &amp; Add-ons', 'mobile-dj-manager'), mdjm_get_label_singular());
        ?>
</h3>
				<div class="feature-section">
					<div class="feature-section-media">
						<img src="<?php 
        echo MDJM_PLUGIN_URL . '/assets/images/screenshots/14-package-options.png';
        ?>
"/>
					</div>
					<div class="feature-section-content">
						<h4><?php 
        printf(__('%1$s Packages', 'mobile-dj-manager'), mdjm_get_label_singular());
        ?>
</h4>
						<p><?php 
        printf(__('Packages are a pre-defined collection of add-ons that you can offer to your clients for their %s. Define a price for the package and upon selection, the %1$s %2$s and %3$s will be automatically and dynamically re-calculated. Add-ons included within the package, will no longer be available for selection within the add-ons list for this %2$s.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_balance_label(), mdjm_get_deposit_label());
        ?>
</p>

						<h4><?php 
        _e('Add-ons', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Add-ons are additional equipment items that can be selected for an %1$s. Each add-on is assigned an individual price and when selected the %1$s %2$s and %3$s are automatically and dynamically re-calculated.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_balance_label(), mdjm_get_deposit_label());
        ?>
</p>
                        <p><?php 
        printf(__('Once you have enabled %1$s Packages &amp; Add-ons within the <a href="%3$s">MDJM %2$s Settings page</a>, manage them within <a href="%4$s">MDJM %2$s &rarr; Equipment Packages</a> and a href="%5$s">MDJM %2$s &rarr; Equipment Add-ons</a>.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_label_plural(), admin_url('admin.php?page=mdjm-settings&tab=events'), admin_url('edit.php?post_type=mdjm-package'), admin_url('edit.php?post_type=mdjm-addon'));
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        _e('Even More Features', 'mobile-dj-manager');
        ?>
</h3>
				<div class="feature-section two-col">
					<div class="col">
						<h4><?php 
        _e('Integrated Client Portal', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Known as the <em>Client Zone</em> by default, a password protected portal is available to your clients where they can review their %1$s, view and accept your quote, digitally sign their contract, and manage their %1$s playlist. All %2$s pages use a template system and are fully customisable.', 'mobile-dj-manager'), mdjm_get_label_singular(true), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager')));
        ?>
</p>
					</div>
					<div class="col">
						<h4><?php 
        _e('Digitally Sign Contracts', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Via the %s, clients are able to review and digitally sign their %s contract. Signing requires confirmation of their name and password for verification to maintain security.', 'mobile-dj-manager'), mdjm_get_option('app_name', __('Client Zone', 'mobile-dj-manager')), mdjm_get_label_singular());
        ?>
</p>
					</div>
				</div>
                <div class="feature-section two-col">
					<div class="col">
						<h4><?php 
        _e('Transaction Logging', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('Log all payments your business receives and all expenses you have with the MDJM Event Management Transactions system. Instantly know how profitable your %s are as well as how much money your company has made over differing periods of time.', 'mobile-dj-manager'), mdjm_get_label_plural());
        ?>
</p>
					</div>
					<div class="col">
						<h4><?php 
        _e('Multi Employee Aware', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('MDJM Event Management supports as many employees as you need at no additional cost. Easily create new employees, set permissions for them to ensure they only have access to what they need, and then assign as many employees to an %s as you need.', 'mobile-dj-manager'), mdjm_get_label_singular(true));
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        _e('Need Help?', 'mobile-dj-manager');
        ?>
</h3>
				<div class="feature-section two-col">
					<div class="col">
						<h4><?php 
        _e('Excellent Support', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        _e('We pride ourselves on our level of support and excellent response times. If you are experiencing an issue, submit a support ticket and we will respond quickly.', 'mobile-dj-manager');
        ?>
</p>
					</div>
					<div class="col">
						<h4><?php 
        _e('Join our Facebook User Group', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        _e('Our <a href="https://www.facebook.com/groups/mobile-dj-manager/" target="_blank">MDJM Facebook User Group</a> is a great way to exchange knowledge with other users and gain tips for use.', 'mobile-dj-manager');
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        _e('Stay Up to Date', 'mobile-dj-manager');
        ?>
</h3>
				<div class="feature-section two-col">
					<div class="col">
						<h4><?php 
        _e('Get Notified of Add-on Releases', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        _e('New add-ons make MDJM Event Management even more powerful. Subscribe to the newsletter to stay up to date with our latest releases. <a href="http://eepurl.com/bTRkZj" target="_blank">Sign up now</a> to ensure you do not miss a release!', 'mobile-dj-manager');
        ?>
</p>
					</div>
					<div class="col">
						<h4><?php 
        _e('Get Alerted About New Tutorials', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        _e('<a href="http://eepurl.com/bTRkZj" target="_blank">Sign up now</a> to hear about the latest tutorial releases that explain how to take MDJM Event Management further.', 'mobile-dj-manager');
        ?>
</p>
					</div>
				</div>
			</div>

			<div class="changelog">
				<h3><?php 
        _e('Extensions', 'mobile-dj-manager');
        ?>
</h3>
				<div class="feature-section two-col">
					<div class="col">
						<h4><?php 
        _e('A Growing List of Add-ons', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        _e('Add-on plugins are available that greatly extend the default functionality of MDJM Event Management. There are extensions to further automate MDJM Event Management, payment processing and calendar syncronisation.', 'mobile-dj-manager');
        ?>
</p>
					</div>
					<div class="col">
						<h4><?php 
        _e('Visit the Add-ons Store', 'mobile-dj-manager');
        ?>
</h4>
						<p><?php 
        printf(__('<a href="%s" target="_blank">The Add-ons store</a> has a list of all available extensions, including convenient category filters so you can find exactly what you are looking for.', 'mobile-dj-manager'), 'http://mdjm.co.uk/add-ons');
        ?>
</p>
					</div>
				</div>
			</div>
		</div>
		<?php 
    }
コード例 #9
0
 public function migrate_transaction_types_1_2()
 {
     global $mdjm, $mdjm_settings, $upgrade_error;
     if (!get_option('mdjm_migrate_transaction_types')) {
         return;
     }
     /* -- Get the existing event types from our settings -- */
     $trans_types = explode("\n", $mdjm_settings['payments']['pp_transaction_types']);
     asort($trans_types);
     /* -- Import each type as a term -- */
     foreach ($trans_types as $trans_type) {
         wp_insert_term($trans_type, 'transaction-types');
         if (is_wp_error($form_error)) {
             foreach ($upgrade_error->get_error_messages() as $error) {
                 MDJM()->debug->log_it('ERROR: ' . $error);
             }
         } else {
             MDJM()->debug->log_it('SUCCESS: ' . $trans_type . ' term created');
         }
     }
     wp_insert_term(mdjm_get_deposit_label(), 'transaction-types');
     wp_insert_term(mdjm_get_balance_label(), 'transaction-types');
     delete_option('mdjm_migrate_transaction_types');
 }
コード例 #10
0
/**
 * Content tag: balance_label.
 * The label used for the balance label term.
 *
 * @param
 * @param
 *
 * @return	str		The label for balances.
 */
function mdjm_content_tag_balance_label()
{
    return mdjm_get_balance_label();
}
コード例 #11
0
/**
 * Retrieve a readable name for the meta key.
 *
 * @since	1.3
 * @param	str		$key	The meta key.
 * @return	str		The readable label
 */
function mdjm_event_get_meta_label($key)
{
    $keys = array('_mdjm_event_addons' => __('Add-ons', 'mobile-dj-manager'), '_mdjm_event_admin_notes' => __('Admin Notes', 'mobile-dj-manager'), '_mdjm_event_balance_status' => sprintf(__('%s Status', 'mobile-dj-manager'), mdjm_get_balance_label()), '_mdjm_event_client' => __('Client', 'mobile-dj-manager'), '_mdjm_event_contract' => sprintf(__('%s Contract', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_contract_approved' => __('Contract Approved Date', 'mobile-dj-manager'), '_mdjm_event_contract_approver' => __('Contract Approved By', 'mobile-dj-manager'), '_mdjm_event_cost' => __('Total Cost', 'mobile-dj-manager'), '_mdjm_event_date' => sprintf(__('%s Date', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_deposit' => mdjm_get_deposit_label(), '_mdjm_event_deposit_status' => sprintf(__('%s Status', 'mobile-dj-manager'), mdjm_get_deposit_label()), '_mdjm_event_dj' => sprintf(__('%s Contract', 'mobile-dj-manager'), mdjm_get_option('artist')), '_mdjm_event_dj_notes' => __('Employee Notes', 'mobile-dj-manager'), '_mdjm_event_dj_payment_status' => sprintf(__('Primary Employee %s Payment Details', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_djsetup_date' => sprintf(__('%s Setup Date', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_djsetup_time' => sprintf(__('%s Setup Time', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_dj_wage' => sprintf(__('Primary Employee %s Wage', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_employees' => __('Employees', 'mobile-dj-manager'), '_mdjm_event_employees_data' => __('Employees Payment Data', 'mobile-dj-manager'), '_mdjm_event_enquiry_source' => __('Enquiry Source', 'mobile-dj-manager'), '_mdjm_event_finish' => __('End Time', 'mobile-dj-manager'), '_mdjm_event_last_updated_by' => __('Last Updated By', 'mobile-dj-manager'), '_mdjm_event_name' => sprintf(__('%s Name', 'mobile-dj-manager'), mdjm_get_label_singular()), '_mdjm_event_notes' => __('Description', 'mobile-dj-manager'), '_mdjm_event_package' => __('Package', 'mobile-dj-manager'), '_mdjm_event_playlist' => __('Playlist Enabled', 'mobile-dj-manager'), '_mdjm_event_playlist_access' => __('Playlist Guest Access Code', 'mobile-dj-manager'), '_mdjm_event_start' => __('Start Time', 'mobile-dj-manager'), '_mdjm_event_travel_data' => __('Travel Data', 'mobile-dj-manager'), '_mdjm_event_venue_address1' => __('Venue Address Line 1', 'mobile-dj-manager'), '_mdjm_event_venue_address2' => __('Venue Address Line 2', 'mobile-dj-manager'), '_mdjm_event_venue_contact' => __('Venue Contact', 'mobile-dj-manager'), '_mdjm_event_venue_county' => __('Venue County', 'mobile-dj-manager'), '_mdjm_event_venue_email' => __('Venue Email Address', 'mobile-dj-manager'), '_mdjm_event_venue_id' => __('Venue ID', 'mobile-dj-manager'), '_mdjm_event_venue_name' => __('Venue Name', 'mobile-dj-manager'), '_mdjm_event_venue_phone' => __('Venue Phone Number', 'mobile-dj-manager'), '_mdjm_event_venue_postcode' => __('Venue Post Code', 'mobile-dj-manager'), '_mdjm_event_venue_town' => __('Venue Post Town', 'mobile-dj-manager'));
    $keys = apply_filters('mdjm_event_meta_labels', $keys);
    if (array_key_exists($key, $keys)) {
        return $keys[$key];
    } else {
        return $key;
    }
}
コード例 #12
0
/**
 * 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 &amp; %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 &amp; 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&section=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 &amp; 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> &amp; <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> &amp; <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);
}