当前位置: 首页>>代码示例>>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;未经允许,请勿转载。