• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mdjm_get_label_singular函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中mdjm_get_label_singular函数的典型用法代码示例。如果您正苦于以下问题:PHP mdjm_get_label_singular函数的具体用法?PHP mdjm_get_label_singular怎么用?PHP mdjm_get_label_singular使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了mdjm_get_label_singular函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: mdjm_display_event_playlist_page

/**
 * Display the event playlist page.
 *
 * @since	1.3
 * @param	
 * @return	str		The event playlist page content.
 */
function mdjm_display_event_playlist_page()
{
    if (!mdjm_employee_can('read_events') && !mdjm_employee_working_event($_GET['event_id'])) {
        wp_die('<h1>' . __('Cheatin&#8217; uh?') . '</h1>' . '<p>' . __('You do not have permission to view this playlist.', 'mobile-dj-manager') . '</p>', 403);
    }
    if (!class_exists('MDJM_PlayList_Table')) {
        require_once MDJM_PLUGIN_DIR . '/includes/admin/events/class-mdjm-playlist-table.php';
    }
    $playlist_obj = new MDJM_PlayList_Table();
    ?>
	<div class="wrap">
		<h1><?php 
    printf(__('Playlist for %s %s', 'mobile-dj-manager'), mdjm_get_label_singular(), mdjm_get_event_contract_id($_GET['event_id']));
    ?>
</h1>

        <form method="post">
            <?php 
    $playlist_obj->prepare_items();
    $playlist_obj->display_header();
    if (count($playlist_obj->items) > 0) {
        $playlist_obj->views();
    }
    $playlist_obj->display();
    $playlist_obj->entry_form();
    ?>
        </form>
        <br class="clear">
	</div>
	<?php 
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:38,代码来源:playlist-page.php


示例2: mdjm_show_upgrade_notice

/**
 * Display a notice if an upgrade is required.
 *
 * @since	1.4
 */
function mdjm_show_upgrade_notice()
{
    if (isset($_GET['page']) && $_GET['page'] == 'mdjm-upgrades') {
        return;
    }
    $mdjm_version = get_option('mdjm_version');
    $mdjm_version = preg_replace('/[^0-9.].*/', '', $mdjm_version);
    // Check if there is an incomplete upgrade routine.
    $resume_upgrade = mdjm_maybe_resume_upgrade();
    if (!empty($resume_upgrade)) {
        $resume_url = add_query_arg($resume_upgrade, admin_url('index.php'));
        printf('<div class="notice notice-error"><p>' . __('MDJM Event Management needs to complete an upgrade that was previously started. Click <a href="%s">here</a> to resume the upgrade.', 'mobile-dj-manager') . '</p></div>', esc_url($resume_url));
    } else {
        if (version_compare($mdjm_version, '1.4', '<') || !mdjm_has_upgrade_completed('upgrade_event_packages')) {
            printf('<div class="notice notice-error"><p>' . __('MDJM Event Management needs to perform an upgrade to %s Packages and Add-ons. Click <a href="%s">here</a> to start the upgrade.', 'mobile-dj-manager') . '</p></div>', mdjm_get_label_singular(true), esc_url(admin_url('index.php?page=mdjm-upgrades&mdjm-upgrade=upgrade_event_packages&message=1&redirect=' . mdjm_get_current_page_url())));
        }
        /*
         *  NOTICE:
         *
         *  When adding new upgrade notices, please be sure to put the action into the upgrades array during install:
         *  /includes/install.php @ Appox Line 783
         *
         */
    }
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:30,代码来源:upgrade-functions.php


示例3: mdjm_transaction_post_columns

/**
 * Define the columns to be displayed for transaction posts
 *
 * @since	0.5
 * @param	arr		$columns	Array of column names
 * @return	arr		$columns	Filtered array of column names
 */
function mdjm_transaction_post_columns($columns)
{
    $columns = array('cb' => '<input type="checkbox" />', 'title' => __('ID', 'mobile-dj-manager'), 'txn_date' => __('Date', 'mobile-dj-manager'), 'direction' => __('In/Out', 'mobile-dj-manager'), 'payee' => __('To/From', 'mobile-dj-manager'), 'txn_status' => __('Status', 'mobile-dj-manager'), 'detail' => __('Details', 'mobile-dj-manager'), 'event' => sprintf(__('%s', 'mobile-dj-manager'), mdjm_get_label_singular()), 'txn_value' => __('Value', 'mobile-dj-manager'));
    if (!mdjm_employee_can('edit_txns') && isset($columns['cb'])) {
        unset($columns['cb']);
    }
    return $columns;
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:15,代码来源:txns.php


示例4: __construct

 /**
  * Get things started
  *
  * @since	1.4
  * @see WP_List_Table::__construct()
  */
 public function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => mdjm_get_label_singular(), 'plural' => mdjm_get_label_plural(), 'ajax' => false));
     $this->label_single = mdjm_get_label_singular();
     $this->label_plural = mdjm_get_label_plural();
 }
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:14,代码来源:class-mdjm-employees-reports-table.php


示例5: mdjm_communication_post_columns

/**
 * Define the columns to be displayed for communication posts
 *
 * @since	0.5
 * @param	arr		$columns	Array of column names
 * @return	arr		$columns	Filtered array of column names
 */
function mdjm_communication_post_columns($columns)
{
    $columns = array('cb' => '<input type="checkbox" />', 'date_sent' => __('Date Sent', 'mobile-dj-manager'), 'title' => __('Email Subject', 'mobile-dj-manager'), 'from' => __('From', 'mobile-dj-manager'), 'recipient' => __('Recipient', 'mobile-dj-manager'), 'event' => sprintf(__('%s', 'mobile-dj-manager'), mdjm_get_label_singular()), 'current_status' => __('Status', 'mobile-dj-manager'), 'source' => __('Source', 'mobile-dj-manager'));
    if (!mdjm_is_admin() && isset($columns['cb'])) {
        unset($columns['cb']);
    }
    return $columns;
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:15,代码来源:comms.php


示例6: mdjm_event_add_journal_after_status_change

/**
 * Fires after an event's status is updated.
 *
 * Add journal entry.
 *
 * @since	1.3
 * @param	int|bool	$result			The result of the status change function. False is an unsuccessful status update.
 * @param	int			$event_id		The event ID.
 * @param	str			$new_status		The new event status.
 * @param	str			$old_status		The old event status.
 * @param	arr			$args			Arguments passed to the mdjm_update_event_status function
 * @return	void
 */
function mdjm_event_add_journal_after_status_change($result, $event_id, $new_status, $old_status, $args)
{
    if (empty($result)) {
        return;
    }
    $reject_reason = $new_status == 'mdjm-rejected' && !empty($args['reject_reason']) ? '<br />' . $args['reject_reason'] : '';
    $comment_args = array('user_id' => is_user_logged_in() ? get_current_user_id() : 1, 'event_id' => $event_id, 'comment_content' => sprintf(__('%s status updated to %s.%s', 'mobile-dj-manager'), mdjm_get_label_singular(), mdjm_get_event_status($event_id), $reject_reason));
    mdjm_add_journal($comment_args);
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:22,代码来源:event-actions.php


示例7: __construct

 /**
  * Get things started
  *
  * @since	1.4
  * @see WP_List_Table::__construct()
  */
 public function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => __('Transaction', 'mobile-dj-manager'), 'plural' => __('Transactions', 'mobile-dj-manager'), 'ajax' => false));
     $this->label_single = mdjm_get_label_singular();
     $this->label_plural = mdjm_get_label_plural();
     add_action('mdjm_reports_txn_types_additional_stats', array($this, 'graph_totals'));
 }
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:15,代码来源:class-mdjm-transaction-types-reports-table.php


示例8: __construct

 /**
  * Get things started
  *
  * @since	1.4
  * @see WP_List_Table::__construct()
  */
 public function __construct()
 {
     global $status, $page;
     // Set parent defaults
     parent::__construct(array('singular' => mdjm_get_label_singular(), 'plural' => mdjm_get_label_plural(), 'ajax' => false));
     $this->label_single = mdjm_get_label_singular();
     $this->label_plural = mdjm_get_label_plural();
     add_action('mdjm_reports_conversions_graph_additional_stats', array($this, 'graph_totals'));
 }
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:15,代码来源:class-mdjm-conversions-reports-table.php


示例9: mdjm_register_post_types

/**
 * Registers and sets up the MDJM Event Management custom post types
 *
 * @since	1.3
 * @return	void
 */
function mdjm_register_post_types()
{
    // Event Post Type
    $event_labels = apply_filters('mdjm_event_labels', array('name' => _x('%2$s', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('%1$s', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('MDJM %2$s', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('%1$s', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Create %1$s', 'mobile-dj-manager'), 'add_new_item' => __('Create New %1$s', 'mobile-dj-manager'), 'new_item' => __('New %1$s', 'mobile-dj-manager'), 'edit_item' => __('Edit %1$s', 'mobile-dj-manager'), 'view_item' => __('View %1$s', 'mobile-dj-manager'), 'all_items' => __('All %2$s', 'mobile-dj-manager'), 'search_items' => __('Search %2$s', 'mobile-dj-manager'), 'not_found' => __('No %3$s found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No %3$s found in Trash.', 'mobile-dj-manager')));
    foreach ($event_labels as $key => $value) {
        $event_labels[$key] = sprintf($value, mdjm_get_label_singular(), mdjm_get_label_plural(), mdjm_get_label_plural(true));
    }
    $event_args = array('labels' => $event_labels, 'description' => __('MDJM Events', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => true, 'menu_position' => defined('MDJM_MENU_POS') ? MDJM_MENU_POS : 58.4, 'show_in_admin_bar' => true, 'capability_type' => 'mdjm_event', 'capabilities' => apply_filters('mdjm_event_caps', array('publish_posts' => 'publish_mdjm_events', 'edit_posts' => 'edit_mdjm_events', 'edit_others_posts' => 'edit_others_mdjm_events', 'delete_posts' => 'delete_mdjm_events', 'delete_others_posts' => 'delete_others_mdjm_events', 'read_private_posts' => 'read_private_mdjm_events', 'edit_post' => 'edit_mdjm_event', 'delete_post' => 'delete_mdjm_event', 'read_post' => 'read_mdjm_event')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_event_supports', array('title')), 'menu_icon' => plugins_url('mobile-dj-manager/assets/images/mdjm-menu-16x16.jpg'), 'taxonomies' => array('mdjm-event'));
    register_post_type('mdjm-event', apply_filters('mdjm_event_post_type_args', $event_args));
    if (mdjm_packages_enabled()) {
        // Packages Post Type
        $package_labels = apply_filters('mdjm_package_labels', array('name' => _x('Packages', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Package', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Packages', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Package', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Package', 'mobile-dj-manager'), 'add_new_item' => __('Add New Package', 'mobile-dj-manager'), 'new_item' => __('New Package', 'mobile-dj-manager'), 'edit_item' => __('Edit Package', 'mobile-dj-manager'), 'view_item' => __('View Package', 'mobile-dj-manager'), 'all_items' => __('All Packages', 'mobile-dj-manager'), 'search_items' => __('Search Packages', 'mobile-dj-manager'), 'not_found' => __('No packages found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No packages found in Trash.', 'mobile-dj-manager')));
        $package_args = array('labels' => $package_labels, 'description' => __('Equipment Packages for the MDJM Event Management plugin', 'mobile-dj-manager'), 'public' => true, 'show_in_menu' => 'edit.php?post_type=mdjm-package', 'has_archive' => true, 'rewrite' => array('slug' => 'packages'), 'supports' => apply_filters('mdjm_package_supports', array('title', 'editor', 'revisions', 'excerpt', 'thumbnail')));
        register_post_type('mdjm-package', apply_filters('mdjm_package_post_type_args', $package_args));
        // Addons Post Type
        $addon_labels = apply_filters('mdjm_addon_labels', array('name' => _x('Addons', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Addon', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Addons', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Addon', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Addon', 'mobile-dj-manager'), 'add_new_item' => __('Add New Addon', 'mobile-dj-manager'), 'new_item' => __('New Addon', 'mobile-dj-manager'), 'edit_item' => __('Edit Addon', 'mobile-dj-manager'), 'view_item' => __('View Addon', 'mobile-dj-manager'), 'all_items' => __('All Addons', 'mobile-dj-manager'), 'search_items' => __('Search Addons', 'mobile-dj-manager'), 'not_found' => __('No addons found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No addons found in Trash.', 'mobile-dj-manager')));
        $addon_args = array('labels' => $addon_labels, 'description' => __('Equipment Addons for the MDJM Event Management plugin', 'mobile-dj-manager'), 'public' => true, 'show_in_menu' => 'edit.php?post_type=mdjm-addon', 'has_archive' => true, 'rewrite' => array('slug' => 'addons'), 'supports' => apply_filters('mdjm_addon_supports', array('title', 'editor', 'revisions', 'excerpt', 'thumbnail')));
        register_post_type('mdjm-addon', apply_filters('mdjm_addon_post_type_args', $addon_args));
    }
    // Communication History Post Type
    $email_history_labels = apply_filters('mdjm_email_history_labels', array('name' => _x('Email History', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Email History', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Email History', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Email History', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Communication', 'mobile-dj-manager'), 'add_new_item' => __('Add New Communication', 'mobile-dj-manager'), 'new_item' => __('New Communication', 'mobile-dj-manager'), 'edit_item' => __('Review Email', 'mobile-dj-manager'), 'view_item' => __('View Email', 'mobile-dj-manager'), 'all_items' => __('All Emails', 'mobile-dj-manager'), 'search_items' => __('Search Emails', 'mobile-dj-manager'), 'not_found' => __('No Emails found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No Emails found in Trash.', 'mobile-dj-manager')));
    $email_history_args = array('labels' => $email_history_labels, 'description' => __('Communication used by the MDJM Event Management for WordPress plugin', 'mobile-dj-manager'), 'exclude_from_search' => true, 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=mdjm_communication', 'show_in_admin_bar' => false, 'rewrite' => array('slug' => 'mdjm-communications'), 'capability_type' => 'mdjm_comm', 'capabilities' => apply_filters('mdjm_communications_caps', array('edit_post' => 'edit_mdjm_comm', 'read_post' => 'read_mdjm_comm', 'delete_post' => 'delete_mdjm_comm', 'edit_posts' => 'edit_mdjm_comms', 'edit_others_posts' => 'edit_others_mdjm_comms', 'publish_posts' => 'publish_mdjm_comms', 'read_private_posts' => 'read_private_mdjm_comms')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_email_history_supports', array('title')));
    register_post_type('mdjm_communication', apply_filters('mdjm_email_history_post_type_args', $email_history_args));
    // Contract Post Type
    $contract_labels = apply_filters('mdjm_contract_labels', array('name' => _x('Contract Templates', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Contract Template', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Contract Templates', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Contract Template', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Contract Template', 'mobile-dj-manager'), 'add_new_item' => __('Add New Contract Template', 'mobile-dj-manager'), 'new_item' => __('New Contract Template', 'mobile-dj-manager'), 'edit_item' => __('Edit Contract Template', 'mobile-dj-manager'), 'view_item' => __('View Contract Template', 'mobile-dj-manager'), 'all_items' => __('All Contract Templates', 'mobile-dj-manager'), 'search_items' => __('Search Contract Templates', 'mobile-dj-manager'), 'not_found' => __('No contract templates found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No contract templates found in Trash.', 'mobile-dj-manager')));
    $contract_args = array('labels' => $contract_labels, 'description' => __('Contracts used by the MDJM plugin', 'mobile-dj-manager'), 'exclude_from_search' => true, 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=contract', 'rewrite' => array('slug' => 'contract-templates'), 'capability_type' => array('mdjm_template', 'mdjm_templates'), 'capabilities' => apply_filters('mdjm_contract_caps', array('edit_post' => 'edit_mdjm_template', 'read_post' => 'read_mdjm_template', 'delete_post' => 'delete_mdjm_template', 'edit_posts' => 'edit_mdjm_templates', 'edit_others_posts' => 'edit_others_mdjm_templates', 'publish_posts' => 'publish_mdjm_templates', 'read_private_posts' => 'read_private_mdjm_templates')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_contract_supports', array('title', 'editor', 'revisions')));
    register_post_type('contract', apply_filters('mdjm_contract_post_type_args', $contract_args));
    // Signed Contract Post Type
    $signed_contract_labels = apply_filters('mdjm_signed_contract_labels', array('name' => _x('Signed Contracts', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Signed Contract', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Signed Contracts', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Signed Contract', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Signed Contract', 'mobile-dj-manager'), 'add_new_item' => __('Add New Signed Contract', 'mobile-dj-manager'), 'new_item' => __('New Signed Contract', 'mobile-dj-manager'), 'edit_item' => __('Edit Signed Contract', 'mobile-dj-manager'), 'view_item' => __('View Signed Contract', 'mobile-dj-manager'), 'all_items' => __('All Signed Contracts', 'mobile-dj-manager'), 'search_items' => __('Search Signed Contracts', 'mobile-dj-manager'), 'not_found' => __('No signed contracts found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No signed contracts found in Trash.', 'mobile-dj-manager')));
    $signed_contract_args = array('labels' => $signed_contract_labels, 'description' => __('Signed Contracts used by the MDJM plugin', 'mobile-dj-manager'), 'rewrite' => array('slug' => 'mdjm-signed-contract'), 'capability_type' => array('mdjm_signed_contract', 'mdjm_signed_contracts'), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => array(''));
    register_post_type('mdjm-signed-contract', apply_filters('mdjm_signed_contract_post_type_args', $signed_contract_args));
    // Custom Field Post Type
    $custom_field_labels = apply_filters('mdjm_custom_field_contract_labels', array('name' => _x('Custom Event Fields', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Custom Event Field', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Custom Event Fields', 'admin menu', 'mobile-dj-manager'), 'add_new' => _x('Add Custom Event Field', 'add new on admin bar', 'mobile-dj-manager'), 'add_new_item' => __('Add New Custom Event Field'), 'edit' => __('Edit Custom Event Field'), 'edit_item' => __('Edit Custom Event Field'), 'new_item' => __('New Hosted Plugin'), 'view' => __('View Custom Event Field'), 'view_item' => __('View Custom Event Field'), 'search_items' => __('Search Custom Event Field'), 'not_found' => __('No Custom Event Fields found'), 'not_found_in_trash' => __('No Custom Event Fields found in trash')));
    $custom_field_args = array('labels' => $custom_field_labels, 'description' => __('This is where you can add Custom Event Fields for use in the event screen.', 'mobile-dj-manager'), 'rewrite' => array('slug' => 'mdjm-custom-fields'), 'supports' => array('title'));
    register_post_type('mdjm-custom-field', apply_filters('mdjm_custom_field_post_type_args', $custom_field_args));
    // Email Template Post Type
    $email_template_labels = apply_filters('mdjm_email_template_labels', array('name' => _x('Email Templates', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Email Template', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Email Templates', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Email Template', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Template', 'mobile-dj-manager'), 'add_new_item' => __('Add New Template', 'mobile-dj-manager'), 'new_item' => __('New Template', 'mobile-dj-manager'), 'edit_item' => __('Edit Template', 'mobile-dj-manager'), 'view_item' => __('View Template', 'mobile-dj-manager'), 'all_items' => __('All Templates', 'mobile-dj-manager'), 'search_items' => __('Search Templates', 'mobile-dj-manager'), 'not_found' => __('No templates found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No templates found in Trash.', 'mobile-dj-manager')));
    $email_template_args = array('labels' => $email_template_labels, 'description' => __('Email Templates for the MDJM Event Management plugin', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=email_template', 'show_in_admin_bar' => true, 'rewrite' => array('slug' => 'email-template'), 'capability_type' => 'mdjm_template', 'capabilities' => apply_filters('mdjm_email_template_caps', array('publish_posts' => 'publish_mdjm_templates', 'edit_posts' => 'edit_mdjm_templates', 'edit_others_posts' => 'edit_others_mdjm_templates', 'delete_posts' => 'delete_mdjm_templates', 'delete_others_posts' => 'delete_others_mdjm_templates', 'read_private_posts' => 'read_private_mdjm_templates', 'edit_post' => 'edit_mdjm_template', 'delete_post' => 'delete_mdjm_template', 'read_post' => 'read_mdjm_template')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_email_template_supports', array('title', 'editor', 'revisions')));
    register_post_type('email_template', apply_filters('mdjm_email_template_post_type_args', $email_template_args));
    // Playlist Post Type
    $playlist_labels = apply_filters('mdjm_playlist_labels', array('name' => _x('Playlist Entries', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Playlist Entry', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Playlist Entries', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Playlist Entry', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Playlist Entry', 'mobile-dj-manager'), 'add_new_item' => __('Add New Playlist Entry', 'mobile-dj-manager'), 'new_item' => __('New Entry', 'mobile-dj-manager'), 'edit_item' => __('Edit Entry', 'mobile-dj-manager'), 'view_item' => __('View Entry', 'mobile-dj-manager'), 'all_items' => __('All Entries', 'mobile-dj-manager'), 'search_items' => __('Search Entries', 'mobile-dj-manager'), 'not_found' => __('No entries found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No entries found in Trash.', 'mobile-dj-manager')));
    $playlist_args = array('labels' => $playlist_labels, 'description' => __('MDJM Event Management Playlist Entries', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => false, 'capability_type' => 'mdjm_playlist', 'capabilities' => apply_filters('mdjm_playlist_caps', array('edit_post' => 'edit_mdjm_playlist', 'read_post' => 'read_mdjm_playlist', 'delete_post' => 'delete_mdjm_playlist', 'edit_posts' => 'edit_mdjm_playlists', 'edit_others_posts' => 'edit_others_mdjm_playlists', 'publish_posts' => 'publish_mdjm_playlists', 'read_private_posts' => 'read_private_mdjm_playlists')), 'map_meta_cap' => true, 'supports' => apply_filters('mdjm_playlist_supports', array('title')), 'taxonomies' => array('mdjm-playlist'));
    register_post_type('mdjm-playlist', apply_filters('mdjm_playlist_post_type_args', $playlist_args));
    // Quote Post Type
    $quote_labels = apply_filters('mdjm_quote_labels', array('name' => _x('Quotes', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Quote', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Quotes', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Quote', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Create Quote', 'mobile-dj-manager'), 'add_new_item' => __('Create New Quote', 'mobile-dj-manager'), 'new_item' => __('New Quote', 'mobile-dj-manager'), 'edit_item' => __('Edit Quote', 'mobile-dj-manager'), 'view_item' => __('View Quote', 'mobile-dj-manager'), 'all_items' => __('All Quotes', 'mobile-dj-manager'), 'search_items' => __('Search Quotes', 'mobile-dj-manager'), 'not_found' => __('No quotes found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No quotes found in Trash.', 'mobile-dj-manager')));
    $quote_args = array('labels' => $quote_labels, 'description' => __('MDJM Event Management Quotes', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=mdjm-quotes', 'show_in_admin_bar' => false, 'rewrite' => array('slug' => 'mdjm-quotes'), 'capability_type' => 'mdjm_quote', 'capabilities' => apply_filters('mdjm_quote_caps', array('edit_post' => 'edit_mdjm_quote', 'read_post' => 'read_mdjm_quote', 'delete_post' => 'delete_mdjm_quote', 'edit_posts' => 'edit_mdjm_quotes', 'edit_others_posts' => 'edit_others_mdjm_quotes', 'publish_posts' => 'publish_mdjm_quotes', 'read_private_posts' => 'read_private_mdjm_quotes')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_quote_supports', array('title')));
    register_post_type('mdjm-quotes', apply_filters('mdjm_quotes_post_type_args', $quote_args));
    // Transaction Post Type
    $txn_labels = apply_filters('mdjm_txn_labels', array('name' => _x('Transactions', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Transaction', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Transactions', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Transaction', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Transaction', 'mobile-dj-manager'), 'add_new_item' => __('Add New Transaction', 'mobile-dj-manager'), 'new_item' => __('New Transaction', 'mobile-dj-manager'), 'edit_item' => __('Edit Transaction', 'mobile-dj-manager'), 'view_item' => __('View Transaction', 'mobile-dj-manager'), 'all_items' => __('All Transactions', 'mobile-dj-manager'), 'search_items' => __('Search Transactions', 'mobile-dj-manager'), 'not_found' => __('No Transactions found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No Transactions found in Trash.')));
    $txn_args = array('labels' => $txn_labels, 'description' => __('Transactions for the MDJM Event Management plugin', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=mdjm-transaction', 'show_in_admin_bar' => true, 'rewrite' => array('slug' => 'mdjm-transaction'), 'capability_type' => 'mdjm_txn', 'capabilities' => apply_filters('mdjm_transaction_caps', array('edit_post' => 'edit_mdjm_txn', 'read_post' => 'read_mdjm_txn', 'delete_post' => 'delete_mdjm_txn', 'edit_posts' => 'edit_mdjm_txns', 'edit_others_posts' => 'edit_others_mdjm_txns', 'publish_posts' => 'publish_mdjm_txns', 'read_private_posts' => 'read_private_mdjm_txns')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_transaction_supports', array('title')), 'taxonomies' => array('mdjm-transaction'));
    register_post_type('mdjm-transaction', apply_filters('mdjm_transaction_post_type_args', $txn_args));
    // Venue Post Type
    $venue_labels = apply_filters('mdjm_txn_labels', array('name' => _x('Venues', 'post type general name', 'mobile-dj-manager'), 'singular_name' => _x('Venue', 'post type singular name', 'mobile-dj-manager'), 'menu_name' => _x('Venues', 'admin menu', 'mobile-dj-manager'), 'name_admin_bar' => _x('Venue', 'add new on admin bar', 'mobile-dj-manager'), 'add_new' => __('Add Venue', 'mobile-dj-manager'), 'add_new_item' => __('Add New Venue', 'mobile-dj-manager'), 'new_item' => __('New Venue', 'mobile-dj-manager'), 'edit_item' => __('Edit Venue', 'mobile-dj-manager'), 'view_item' => __('View Venue', 'mobile-dj-manager'), 'all_items' => __('All Venues', 'mobile-dj-manager'), 'search_items' => __('Search Venues', 'mobile-dj-manager'), 'not_found' => __('No Venues found.', 'mobile-dj-manager'), 'not_found_in_trash' => __('No Venues found in Trash.', 'mobile-dj-manager')));
    $venue_args = array('labels' => $venue_labels, 'description' => __('Venues stored for the MDJM Event Management plugin', 'mobile-dj-manager'), 'show_ui' => true, 'show_in_menu' => 'edit.php?post_type=mdjm-venue', 'show_in_admin_bar' => true, 'rewrite' => array('slug' => 'mdjm-venue'), 'capability_type' => 'mdjm_venue', 'capabilities' => apply_filters('mdjm_venue_caps', array('edit_post' => 'edit_mdjm_venue', 'read_post' => 'read_mdjm_venue', 'delete_post' => 'delete_mdjm_venue', 'edit_posts' => 'edit_mdjm_venues', 'edit_others_posts' => 'edit_others_mdjm_venues', 'publish_posts' => 'publish_mdjm_venues', 'read_private_posts' => 'read_private_mdjm_venues')), 'map_meta_cap' => true, 'has_archive' => true, 'supports' => apply_filters('mdjm_venue_supports', array('title')), 'taxonomies' => array('mdjm-venue'));
    register_post_type('mdjm-venue', apply_filters('mdjm_venue_post_type_args', $venue_args));
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:62,代码来源:post-types.php


示例10: mdjm_comms_email_contextual_help

/**
 * Communications contextual help.
 *
 * @since       1.3
 * @return      void
 */
function mdjm_comms_email_contextual_help()
{
    $screen = get_current_screen();
    if ($screen->id != 'mdjm-event_page_mdjm-comms') {
        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>');
    do_action('mdjm_pre_comms_email_contextual_help', $screen);
    $screen->add_help_tab(array('id' => 'mdjm-comm-email', 'title' => __('Communications', 'mobile-dj-manager'), 'content' => '<p>' . sprintf(__('<strong>Select a Recipient</strong> - Choose from the dropdown list who your email is to. Users are grouped into Clients and Employees. Once you have selected a recipient the Associated %s list will be updated with their active %s. This is a required field.', 'mobile-dj-manager'), mdjm_get_label_plural(), mdjm_get_label_plural(true)) . '</p>' . '<p>' . __('<strong>Subject</strong> - Enter the subject of your email. If you select a template the subject will be updated to the title of the template. This is a required field.', 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Copy Yourself?</strong> - Select this option if you wish to receive a copy of the email. If the settings options have been enabled to copy Admin and/or Employee into Client emails, you may receive a copy regardless of whether or not this option is selected.', 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Select a Template</strong> - Choose a pre-defined email or contract template to populate the content field. Anything you have already entered into the content field will be overwritten. If you do not select a template, you will need to manually enter content into the content field.', 'mobile-dj-manager') . '</p>' . '<p>' . sprintf(__('<strong>Associated %s</strong> - If the Client or Employee you have selected within the <strong>Select a Recipient</strong> field has active %s it is displayed here. Select it to tell MDJM that the email you are sending is associated to this %s and %1$s content tags can be used within the email content.', 'mobile-dj-manager'), mdjm_get_label_singular(), mdjm_get_label_plural(true), mdjm_get_label_singular(true)) . '</p>' . '<p>' . __('<strong>Attach a File</strong> - Enables you to select a file from your computer to the email.', 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Content</strong> - If you have selected a template within the <strong>Select a Template</strong> field, this field will be populated with that templates content. You can adjust this content as required. Alternatively, if no template is selected, use this as a free text field for your email content. Content tags are supported and can be entered via the <strong>MDJM</strong> button on the text editor toolbar. Remember this field is resizeable. Drag from the bottom right hand corner to make bigger if necessary. This is a required field.', 'mobile-dj-manager') . '</p>'));
    do_action('mdjm_post_comms_email_contextual_help', $screen);
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:17,代码来源:contextual-help.php


示例11: create_tasks

 public function create_tasks()
 {
     global $mdjm_options;
     $time = current_time('timestamp');
     if (isset($mdjm_options['upload_playlists'])) {
         $playlist_nextrun = strtotime('+1 day', $time);
     } else {
         $playlist_nextrun = 'N/A';
     }
     $mdjm_schedules = array('complete-events' => array('slug' => 'complete-events', 'name' => 'Complete Events', 'active' => 'Y', 'desc' => sprintf(__('Mark %s as completed once the %s date has passed', 'mobile-dj-manager'), mdjm_get_label_plural(true), mdjm_get_label_singular(true)), 'frequency' => 'Daily', 'nextrun' => $time, 'lastran' => 'Never', 'options' => array('email_client' => 'N', 'email_template' => '0', 'email_subject' => sprintf(__('Task Complete %s has finished', 'mobile-dj-manager'), mdjm_get_label_plural()), 'email_from' => 'admin', 'run_when' => 'after_event', 'age' => '1 HOUR', 'notify_admin' => 'Y', 'notify_dj' => 'N'), 'function' => 'complete_event', 'totalruns' => '0', 'default' => 'Y'), 'request-deposit' => array('slug' => 'request-deposit', 'name' => 'Request Deposit', 'active' => 'N', 'desc' => sprintf(__('Send reminder email to client requesting deposit payment if %s status is Approved and deposit has not been received', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'frequency' => 'Daily', 'nextrun' => 'N/A', 'lastran' => 'Never', 'options' => array('email_client' => 'Y', 'email_template' => '0', 'email_subject' => __('Request Deposit Task Complete', 'mobile-dj-manager'), 'email_from' => 'admin', 'run_when' => 'after_approval', 'age' => '3 DAY', 'notify_admin' => 'Y', 'notify_dj' => 'N'), 'function' => 'request_deposit', 'totalruns' => '0', 'default' => 'Y'), 'balance-reminder' => array('slug' => 'balance-reminder', 'name' => __('Balance Reminder', 'mobile-dj-manager'), 'active' => 'N', 'desc' => sprintf(__('Send email to client requesting they pay remaining balance for %s', 'mobile-dj-manager'), mdjm_get_label_singular(true)), 'frequency' => 'Daily', 'nextrun' => 'N/A', 'lastran' => 'Never', 'options' => array('email_client' => 'Y', 'email_template' => '0', 'email_subject' => __('Balance Reminder Task Complete', 'mobile-dj-manager'), 'email_from' => 'admin', 'run_when' => 'before_event', 'age' => '2 WEEK', 'notify_admin' => 'Y', 'notify_dj' => 'N'), 'function' => 'balance_reminder', 'totalruns' => '0', 'default' => 'Y'), 'fail-enquiry' => array('slug' => 'fail-enquiry', 'name' => __('Fail Enquiry', 'mobile-dj-manager'), 'active' => 'N', 'desc' => __('Automatically fail enquiries that have not been updated within the specified amount of time', 'mobile-dj-manager'), 'frequency' => 'Daily', 'nextrun' => 'N/A', 'lastran' => 'Never', 'options' => array('email_client' => 'N', 'email_template' => '0', 'email_subject' => __('Fail Enquiry Task Complete', 'mobile-dj-manager'), 'email_from' => 'admin', 'run_when' => 'event_created', 'age' => '2 WEEK', 'notify_admin' => 'Y', 'notify_dj' => 'N'), 'function' => 'fail_enquiry', 'totalruns' => '0', 'default' => 'Y'), 'upload-playlists' => array('slug' => 'upload-playlists', 'name' => __('Upload Playlists', 'mobile-dj-manager'), 'active' => 'Y', 'desc' => __('Transmit playlist information back to the MDJM servers to help build an information library. This option is updated the MDJM Settings pages.', 'mobile-dj-manager'), 'frequency' => 'Twice Daily', 'nextrun' => $playlist_nextrun, 'lastran' => 'Never', 'options' => array('email_client' => 'N', 'email_template' => '0', 'email_subject' => '0', 'email_from' => '0', 'run_when' => 'after_event', 'age' => '1 HOUR', 'notify_admin' => 'N', 'notify_dj' => 'N'), 'function' => 'submit_playlist', 'totalruns' => '0', 'default' => 'Y'));
     update_option('mdjm_schedules', $mdjm_schedules);
 }
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:12,代码来源:class-mdjm-cron.php


示例12: mdjm_contract_contextual_help

/**
 * Contracts contextual help.
 *
 * @since       1.3
 * @return      void
 */
function mdjm_contract_contextual_help()
{
    $screen = get_current_screen();
    if ($screen->id != 'contract') {
        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>');
    do_action('mdjm_pre_contract_contextual_help', $screen);
    $screen->add_help_tab(array('id' => 'mdjm-contract-add', 'title' => __('Add New Template', 'mobile-dj-manager'), 'content' => '<p>' . __('<strong>Title</strong> - Enter a title for your contract. A good title is short but descriptive of the type of contract.', 'mobile-dj-manager') . '</p>' . '<p>' . __('<strong>Content</strong> - Enter the content for your template. HTML, images, and MDJM content tags are supported. Use the MDJM button on the content editor toolbar for easy access to the content tags.', 'mobile-dj-manager') . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-contract-save', 'title' => __('Save Contract', 'mobile-dj-manager'), 'content' => '<p>' . __("Save a draft if you've still got content to add, click preview to see what your contract looks like when formatted and click Save Contract when you are ready to publish.", 'mobile-dj-manager') . '</p>'));
    $screen->add_help_tab(array('id' => 'mdjm-contract-details', 'title' => sprintf(__('%s Details', 'mobile-dj-manager'), mdjm_get_label_singular()), 'content' => '<p>' . sprintf(__('Displays general information regarding this contract such as Author, whether it is the default contract used for %1$s, and the number of %1$s it is assigned to. Enter a description if necessary to describe the type of contract and for which type of %1$s it should be used. The description will not be seen by clients.', 'mobile-dj-manager'), mdjm_get_label_plural(true)) . '</p>'));
    do_action('mdjm_post_contract_contextual_help', $screen);
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:19,代码来源:contextual-help.php


示例13: mdjm_contract_details_metabox

/**
 * Output for the Contract Details meta box.
 *
 * @since	1.3
 * @param	obj		$post		The post object (WP_Post).
 * @return
 */
function mdjm_contract_details_metabox($post)
{
    do_action('mdjm_pre_contract_details_metabox', $post);
    wp_nonce_field(basename(__FILE__), 'mdjm-contract' . '_nonce');
    $contract_events = get_posts(array('post_type' => 'mdjm-event', 'posts_per_page' => -1, 'meta_key' => '_mdjm_event_contract', 'meta_value_num' => $post->ID, 'post_status' => 'any'));
    $event_count = count($contract_events);
    $total_events = sprintf(_n(' %s', ' %s', $event_count), mdjm_get_label_singular(), mdjm_get_label_plural());
    $default_contract = mdjm_get_option('default_contract') == $post->ID ? __('Yes') : __('No');
    ?>
	<script type="text/javascript">
	document.getElementById("title").className += " required";
	document.getElementById("content").className += " required";
	</script>
	
	<p><?php 
    printf(__('<strong>Author</strong>: <a href="%s">%s</a>', 'mobile-dj-manager'), admin_url("user-edit.php?user_id={$post->post_author}"), get_the_author_meta('display_name', $post->post_author));
    ?>
	</p>
	
	<p><?php 
    _e('<strong>Default</strong>?', 'mobile-dj-manager');
    echo ' ' . $default_contract;
    ?>
    </p>
	
	<p><?php 
    _e('<strong>Assigned To</strong>: ', 'mobile-dj-manager');
    printf(_n($event_count . ' %1$s', $event_count . ' %2$s', $event_count), mdjm_get_label_singular(), mdjm_get_label_plural());
    ?>
    </p>
	
	<p><?php 
    _e('<strong>Description</strong>: <span class="description">(optional)</span>', 'mobile-dj-manager');
    ?>
    	<br />
        <input type="hidden" name="mdjm_update_custom_post" id="mdjm_update_custom_post" value="mdjm_update" />
        <textarea name="contract_description" id="contract_description" class="widefat" rows="5" placeholder="<?php 
    _e('i.e To be used for Pubs/Clubs', 'mobile-dj-manager');
    ?>
"><?php 
    echo esc_attr(get_post_meta($post->ID, '_contract_description', true));
    ?>
</textarea>
    </p>
	
	<?php 
    do_action('mdjm_post_contract_details_metabox', $post);
}
开发者ID:mdjm,项目名称:mobile-dj-manager,代码行数:55,代码来源:metaboxes.php


示例14: mdjm_events_contextual_help

/**
 * 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- 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP mdjm_get_option函数代码示例发布时间:2022-05-15
下一篇:
PHP mdeleteIndex函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap