当前位置: 首页>>代码示例>>PHP>>正文


PHP enqueue_comment_hotkeys_js函数代码示例

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


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

示例1: wp_enqueue_script

}
$parent_file = 'edit-pages.php';
wp_enqueue_script('inline-edit-post');
$post_stati = array('publish' => array(__('Published|page'), __('Published pages'), _n_noop('Published <span class="count">(%s)</span>|page', 'Published <span class="count">(%s)</span>')), 'future' => array(__('Scheduled|page'), __('Scheduled pages'), _n_noop('Scheduled <span class="count">(%s)</span>|page', 'Scheduled <span class="count">(%s)</span>')), 'pending' => array(__('Pending Review|page'), __('Pending pages'), _n_noop('Pending Review <span class="count">(%s)</span>|page', 'Pending Review <span class="count">(%s)</span>')), 'draft' => array(__('Draft|page'), _c('Drafts|manage posts header'), _n_noop('Draft <span class="count">(%s)</span>|page', 'Drafts <span class="count">(%s)</span>')), 'private' => array(__('Private|page'), __('Private pages'), _n_noop('Private <span class="count">(%s)</span>|page', 'Private <span class="count">(%s)</span>')));
$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts', 'posts_per_page' => -1, 'posts_per_archive_page' => -1, 'order' => 'asc');
$post_status_label = __('Pages');
if (isset($_GET['post_status']) && in_array($_GET['post_status'], array_keys($post_stati))) {
    $post_status_label = $post_stati[$_GET['post_status']][1];
    $query['post_status'] = $_GET['post_status'];
    $query['perm'] = 'readable';
}
$query = apply_filters('manage_pages_query', $query);
wp($query);
if (is_singular()) {
    wp_enqueue_script('admin-comments');
    enqueue_comment_hotkeys_js();
}
require_once 'admin-header.php';
?>

<div class="wrap">
<?php 
screen_icon();
?>
<h2><?php 
echo wp_specialchars($title);
if (isset($_GET['s']) && $_GET['s']) {
    printf('<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', wp_specialchars(get_search_query()));
}
?>
</h2>
开发者ID:staylor,项目名称:develop.svn.wordpress.org,代码行数:31,代码来源:edit-pages.php

示例2: _edit_cpt_item

 /**
  * default method for the 'edit' route for cpt admin pages
  *
  * For reference on what to put in here, refer to wp-admin/post.php
  *
  * @access protected
  * @return string   template for edit cpt form
  */
 protected function _edit_cpt_item()
 {
     global $post, $title, $is_IE;
     $post_id = isset($this->_req_data['post']) ? $this->_req_data['post'] : NULL;
     $post = !empty($post_id) ? get_post($post_id, OBJECT, 'edit') : NULL;
     if (empty($post)) {
         wp_die(__('You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?'));
     }
     if (!empty($_GET['get-post-lock'])) {
         $test = wp_set_post_lock($post_id);
         wp_redirect(get_edit_post_link($post_id, 'url'));
         exit;
     }
     $this->_template_args['editing'] = TRUE;
     $this->_template_args['post_ID'] = $post_id;
     $this->_template_args['post'] = $post;
     $this->_template_args['post_type'] = $this->_cpt_routes[$this->_req_action];
     $this->_template_args['post_type_object'] = $this->_cpt_object;
     $this->_template_args['is_IE'] = $is_IE;
     if ($last = wp_check_post_lock($post->ID)) {
         add_action('admin_notices', '_admin_notice_post_locked');
     } else {
         $this->_template_args['active_post_lock'] = wp_set_post_lock($post->ID);
         wp_enqueue_script('autosave');
     }
     $title = $this->_cpt_object->labels->edit_item;
     if (isset($this->_cpt_routes[$this->_req_data['action']]) && !isset($this->_labels['hide_add_button_on_cpt_route']['edit_attendee'])) {
         $this->_template_args['post_new_file'] = EE_Admin_Page::add_query_args_and_nonce(array('action' => 'create_new', 'page' => $this->page_slug), 'admin.php');
     }
     if (post_type_supports($this->_cpt_routes[$this->_req_action], 'comments')) {
         wp_enqueue_script('admin-comments');
         enqueue_comment_hotkeys_js();
     }
     add_action('admin_print_styles', array($this, 'add_new_admin_page_global'));
     $template = WP_ADMIN_PATH . 'edit-form-advanced.php';
     EEH_Template::display_template($template, $this->_template_args);
 }
开发者ID:antares-ff,项目名称:ANTARES-Test,代码行数:45,代码来源:EE_Admin_Page_CPT.core.php

示例3: _edit_cpt_item

 /**
  * default method for the 'edit' route for cpt admin pages
  *
  * For reference on what to put in here, refer to wp-admin/post.php
  *
  * @access protected
  * @return string   template for edit cpt form
  */
 protected function _edit_cpt_item()
 {
     global $post, $title, $is_IE, $post_type, $post_type_object;
     $post_id = isset($this->_req_data['post']) ? $this->_req_data['post'] : NULL;
     $post = !empty($post_id) ? get_post($post_id, OBJECT, 'edit') : NULL;
     if (empty($post)) {
         wp_die(__('You attempted to edit an item that doesn&#8217;t exist. Perhaps it was deleted?'));
     }
     if (!empty($_GET['get-post-lock'])) {
         wp_set_post_lock($post_id);
         wp_redirect(get_edit_post_link($post_id, 'url'));
         exit;
     }
     $editing = TRUE;
     $post_ID = $post_id;
     $post = $post;
     $post_type = $this->_cpt_routes[$this->_req_action];
     $post_type_object = $this->_cpt_object;
     $is_IE = $is_IE;
     if (!wp_check_post_lock($post->ID)) {
         $active_post_lock = wp_set_post_lock($post->ID);
         //wp_enqueue_script('autosave');
     }
     $title = $this->_cpt_object->labels->edit_item;
     add_action('admin_footer', '_admin_notice_post_locked');
     if (isset($this->_cpt_routes[$this->_req_data['action']]) && !isset($this->_labels['hide_add_button_on_cpt_route'][$this->_req_data['action']])) {
         $create_new_action = apply_filters('FHEE__EE_Admin_Page_CPT___edit_cpt_item__create_new_action', 'create_new', $this);
         $post_new_file = EE_Admin_Page::add_query_args_and_nonce(array('action' => $create_new_action, 'page' => $this->page_slug), 'admin.php');
     }
     if (post_type_supports($this->_cpt_routes[$this->_req_action], 'comments')) {
         wp_enqueue_script('admin-comments');
         enqueue_comment_hotkeys_js();
     }
     add_action('admin_print_styles', array($this, 'add_new_admin_page_global'));
     //modify the default editor title field with default title.
     add_filter('enter_title_here', array($this, 'add_custom_editor_default_title'), 10);
     include_once WP_ADMIN_PATH . 'edit-form-advanced.php';
 }
开发者ID:kaffiemetsuker,项目名称:event-espresso-core,代码行数:46,代码来源:EE_Admin_Page_CPT.core.php

示例4: load_reviews_screen

 /**
  * Load reviews screen
  */
 public function load_reviews_screen()
 {
     // Enquque edit-comments.js
     wp_enqueue_script('admin-comments');
     enqueue_comment_hotkeys_js();
     // Load & instantiate the reviews list table class
     require_once 'class-wc-reviews-list-table.php';
     // Supplying the screen name allows using many built-in
     // filters, such as `manage_{$screen}_columns`, etc.
     $this->reviews_list_table = new WC_Reviews_List_Table(array('screen' => $this->reviews_page_hook));
     // Process bulk actions
     $this->reviews_list_table->process_bulk_action();
     // Add screen options
     $this->add_reviews_screen_options();
 }
开发者ID:brian3t,项目名称:orchidmate,代码行数:18,代码来源:class-wc-reviews.php


注:本文中的enqueue_comment_hotkeys_js函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。