當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wp_dashboard_quick_press函數代碼示例

本文整理匯總了PHP中wp_dashboard_quick_press函數的典型用法代碼示例。如果您正苦於以下問題:PHP wp_dashboard_quick_press函數的具體用法?PHP wp_dashboard_quick_press怎麽用?PHP wp_dashboard_quick_press使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了wp_dashboard_quick_press函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wp_dashboard_quick_press_output

/**
 * Output the QuickPress dashboard widget.
 *
 * @since 3.0.0
 * @deprecated 3.2.0
 * @deprecated Use wp_dashboard_quick_press()
 * @see wp_dashboard_quick_press()
 */
function wp_dashboard_quick_press_output()
{
    _deprecated_function(__FUNCTION__, '3.2', 'wp_dashboard_quick_press()');
    wp_dashboard_quick_press();
}
開發者ID:valiror,項目名稱:sharingdais_demo1,代碼行數:13,代碼來源:deprecated.php

示例2: __

     require_once ABSPATH . 'wp-admin/includes/dashboard.php';
     if (!wp_verify_nonce($nonce, 'add-post')) {
         $error_msg = __('Unable to submit this form, please refresh and try again.');
     }
     if (!current_user_can(get_post_type_object('post')->cap->create_posts)) {
         exit;
     }
     if ($error_msg) {
         return wp_dashboard_quick_press($error_msg);
     }
     $post = get_post($_REQUEST['post_ID']);
     check_admin_referer('add-' . $post->post_type);
     $_POST['comment_status'] = get_default_comment_status($post->post_type);
     $_POST['ping_status'] = get_default_comment_status($post->post_type, 'pingback');
     edit_post();
     wp_dashboard_quick_press();
     exit;
 case 'postajaxpost':
 case 'post':
     check_admin_referer('add-' . $post_type);
     $post_id = 'postajaxpost' == $action ? edit_post() : write_post();
     redirect_post($post_id);
     exit;
 case 'edit':
     $editing = true;
     if (empty($post_id)) {
         wp_redirect(admin_url('post.php'));
         exit;
     }
     if (!$post) {
         wp_die(__('You attempted to edit an item that doesn’t exist. Perhaps it was deleted?'));
開發者ID:pbearne,項目名稱:contrib2core,代碼行數:31,代碼來源:post.php


注:本文中的wp_dashboard_quick_press函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。