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

PHP wp_post_revision_title函数代码示例

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

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



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

示例1: task_updated_messages

function task_updated_messages($messages)
{
    global $post, $post_ID;
    $titlewarning = "";
    // check for 'ing' in the first word
    if (strpos(get_the_title($post_ID), "ing ") != 0 && strpos(get_the_title($post_ID), " ") > strpos(get_the_title($post_ID), "ing ") || strpos(strtolower(get_the_title($post_ID)), "ing ") === 0) {
        $titlewarning .= "<br><span class='dashicons dashicons-info' style='color: red;'></span> <strong>Could you shorten your title by removing 'ing'? e.g. instead of 'Writing a speech' change to 'Write a speech'</strong>";
    }
    // check for 'how to' at the start
    if (strpos(strtolower(get_the_title($post_ID)), "how to") === 0) {
        $titlewarning .= "<br><span class='dashicons dashicons-info' style='color: red;'></span> <strong>Could you shorten your title by removing 'how to'?</strong>";
    }
    // check for 'my' at the start
    if (strpos(strtolower(get_the_title($post_ID)), "my") === 0) {
        $titlewarning .= "<br><span class='dashicons dashicons-info' style='color: red;'></span> <strong>Are you talking to your reader? Could you use 'your' instead of 'my'?</strong>";
    }
    if (strpos(strtolower(get_the_title($post_ID)), " my ") != 0) {
        $titlewarning .= "<br><span class='dashicons dashicons-info' style='color: red;'></span> <strong>Are you talking to your reader? Could you use 'your' instead of 'my'?</strong>";
    }
    if (!get_the_terms($id, 'category')) {
        $titlewarning .= "<br><span class='dashicons dashicons-info' style='color: red;'></span> <strong>Remember to assign a category.</strong>";
    }
    $messages['task'] = array(0 => '', 1 => sprintf(__('Task updated. <a href="%s">View task</a>%s'), esc_url(get_permalink($post_ID)), $titlewarning), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Task updated.'), 5 => isset($_GET['revision']) ? sprintf(__('Task restored to revision from %s'), wp_post_revision_title((int) $_GET['revision'], false), $titlewarning) : false, 6 => sprintf(__('Task published. <a href="%s">View task</a>%s'), esc_url(get_permalink($post_ID)), $titlewarning), 7 => __('Task saved.'), 8 => sprintf(__('Task submitted. <a target="_blank" href="%s">Preview task</a>%s'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $titlewarning), 9 => sprintf(__('Task scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview task</a>%s'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post_ID)), $titlewarning), 10 => sprintf(__('Task draft updated. <a target="_blank" href="%s">Preview task</a>%s'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $titlewarning));
    return $messages;
}
开发者ID:openterengganu,项目名称:govintranet,代码行数:25,代码来源:ht_content_assistant.php


示例2: updated_messages

 public function updated_messages($messages)
 {
     global $post, $post_ID;
     $instagrate_messages = array(0 => '', 1 => __('Account updated.', 'instagrate-pro'), 2 => __('Custom field updated.', 'instagrate-pro'), 3 => __('Custom field deleted.', 'instagrate-pro'), 4 => __('Account updated.', 'instagrate-pro'), 5 => isset($_GET['revision']) ? sprintf(__('Account restored to revision from %s', 'instagrate-pro'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Account published.', 'instagrate-pro'), 7 => __('Account saved.', 'instagrate-pro'), 8 => __('Account submitted.', 'instagrate-pro'), 9 => sprintf(__('Account scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Account</a>', 'instagrate-pro'), date_i18n(__('M j, Y @ G:i', 'instagrate-pro'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))), 10 => __('Account draft updated.', 'instagrate-pro'), 11 => __('Instagram account connected.', 'instagrate-pro'), 12 => __('Instagram account disconnected.', 'instagrate-pro'), 13 => __('You did not authorise your Instagram account with this plugin.', 'instagrate-pro'), 14 => __('Account duplicated.', 'instagrate-pro'), 15 => __('Likes have been synced for this account successfully.', 'instagrate-pro'), 16 => __('Comments have been synced for this account successfully.', 'instagrate-pro'));
     $messages[$this->post_type] = $instagrate_messages;
     return $messages;
 }
开发者ID:VizualAbstract,项目名称:Marilyn,代码行数:7,代码来源:class-post-types.php


示例3: cpt_updated_messages

 function cpt_updated_messages($messages)
 {
     global $post, $post_ID;
     $name = $this->args['ctp_args']['labels']['singular_name'];
     $messages[$this->args['name']] = array(0 => '', 1 => sprintf(__('%s updated. <a href="%s">View %s</a>'), $name, esc_url(get_permalink($post_ID)), $name), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => sprintf(__('$s updated.'), $name), 5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s'), $name, wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('%s published. <a href="%s">Preview %s</a>'), $name, esc_url(get_permalink($post_ID)), $name), 7 => sprintf(__('%s saved.'), $name), 8 => sprintf(__('%s submitted. <a target="_blank" href="%s">Preview %s</a>'), $name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $name), 9 => sprintf(__('%s scheduled for: <strong>%s</strong>. <a target="_blank" href="%s">Preview %s</a>'), $name, date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post_ID)), $name), 10 => sprintf(__('%s draft updated. <a target="_blank" href="%s">Preview %s</a>'), $name, esc_url(add_query_arg('preview', 'true', get_permalink($post_ID))), $name));
     return $messages;
 }
开发者ID:srolland,项目名称:dev,代码行数:7,代码来源:qqp_cpt.php


示例4: glossary_updated_messages

function glossary_updated_messages($messages)
{
    global $post;
    $permalink = get_permalink($post);
    $messages['glossary-term'] = array(0 => '', 1 => sprintf(__('Glossary term updated. <a target="_blank" href="%s">View Glossary term</a>', 'claire-jacquinod-plugin'), esc_url($permalink)), 2 => __('Custom field updated.', 'claire-jacquinod-plugin'), 3 => __('Custom field deleted.', 'claire-jacquinod-plugin'), 4 => __('Glossary term updated.', 'claire-jacquinod-plugin'), 5 => isset($_GET['revision']) ? sprintf(__('Glossary term restored to revision from %s', 'claire-jacquinod-plugin'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Glossary term published. <a href="%s">View Glossary term</a>', 'claire-jacquinod-plugin'), esc_url($permalink)), 7 => __('Glossary term saved.', 'claire-jacquinod-plugin'), 8 => sprintf(__('Glossary term submitted. <a target="_blank" href="%s">Preview Glossary term</a>', 'claire-jacquinod-plugin'), esc_url(add_query_arg('preview', 'true', $permalink))), 9 => sprintf(__('Glossary term scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Glossary term</a>', 'claire-jacquinod-plugin'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url($permalink)), 10 => sprintf(__('Glossary term draft updated. <a target="_blank" href="%s">Preview Glossary term</a>', 'claire-jacquinod-plugin'), esc_url(add_query_arg('preview', 'true', $permalink))));
    return $messages;
}
开发者ID:ArnaudBan,项目名称:claire-jacquinod-plugin,代码行数:7,代码来源:glossary.php


示例5: audiotheme_discography_post_updated_messages

/**
 * Discography update messages.
 *
 * @since 1.0.0
 * @see /wp-admin/edit-form-advanced.php
 *
 * @param array $messages The array of existing post update messages.
 * @return array
 */
function audiotheme_discography_post_updated_messages($messages)
{
    global $post;
    $messages['audiotheme_record'] = array(0 => '', 1 => sprintf(__('Record updated. <a href="%s">View Record</a>', 'audiotheme'), esc_url(get_permalink($post->ID))), 2 => __('Custom field updated.', 'audiotheme'), 3 => __('Custom field deleted.', 'audiotheme'), 4 => __('Record updated.', 'audiotheme'), 5 => isset($_GET['revision']) ? sprintf(__('Record restored to revision from %s', 'audiotheme'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Record published. <a href="%s">View Record</a>', 'audiotheme'), esc_url(get_permalink($post->ID))), 7 => __('Record saved.', 'audiotheme'), 8 => sprintf(__('Record submitted. <a target="_blank" href="%s">Preview Record</a>', 'audiotheme'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))), 9 => sprintf(__('Record scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Record</a>', 'audiotheme'), date_i18n(__('M j, Y @ G:i', 'audiotheme'), strtotime($post->post_date)), esc_url(get_permalink($post->ID))), 10 => sprintf(__('Record draft updated. <a target="_blank" href="%s">Preview Record</a>', 'audiotheme'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))));
    $messages['audiotheme_track'] = array(0 => '', 1 => sprintf(__('Track updated. <a href="%s">View Track</a>', 'audiotheme'), esc_url(get_permalink($post->ID))), 2 => __('Custom field updated.', 'audiotheme'), 3 => __('Custom field deleted.', 'audiotheme'), 4 => __('Track updated.', 'audiotheme'), 5 => isset($_GET['revision']) ? sprintf(__('Track restored to revision from %s', 'audiotheme'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Track published. <a href="%s">View Track</a>', 'audiotheme'), esc_url(get_permalink($post->ID))), 7 => __('Track saved.', 'audiotheme'), 8 => sprintf(__('Track submitted. <a target="_blank" href="%s">Preview Track</a>', 'audiotheme'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))), 9 => sprintf(__('Track scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Track</a>', 'audiotheme'), date_i18n(__('M j, Y @ G:i', 'audiotheme'), strtotime($post->post_date)), esc_url(get_permalink($post->ID))), 10 => sprintf(__('Track draft updated. <a target="_blank" href="%s">Preview Track</a>', 'audiotheme'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))));
    return $messages;
}
开发者ID:sewmyheadon,项目名称:audiotheme,代码行数:16,代码来源:discography.php


示例6: cpt_updated_messages

 /**
  * Customize post type updated messages.
  * @param $messages
  * @return mixed
  */
 function cpt_updated_messages($messages)
 {
     global $post, $post_ID;
     $view = get_permalink($post_ID);
     $messages[$this->slug] = array(0 => '', 1 => sprintf(__('%s updated. <a href="%s">View %s</a>.', 'themify'), $this->name, esc_url($view), $this->name), 2 => __('Custom field updated.', 'themify'), 3 => __('Custom field deleted.', 'themify'), 4 => sprintf(__('%s updated.', 'themify'), $this->name), 5 => isset($_GET['revision']) ? sprintf(__('%s restored to revision from %s', 'themify'), $this->name, wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('%s published.', 'themify'), $this->name), 7 => sprintf(__('%s saved.', 'themify'), $this->name), 8 => sprintf(__('%s submitted.', 'themify'), $this->name), 9 => sprintf(__('%s scheduled for: <strong>%s</strong>.', 'themify'), $this->name, date_i18n(__('M j, Y @ G:i', 'themify'), strtotime($post->post_date))), 10 => sprintf(__('%s draft updated.', 'themify'), $this->name));
     return $messages;
 }
开发者ID:rgrasiano,项目名称:viabasica-hering,代码行数:12,代码来源:class-themify-builder-module.php


示例7: wpes_updated_messages

 /**
  * カスタム投稿タイプのメッセージ設定
  */
 public function wpes_updated_messages($messages)
 {
     global $post;
     $setting = $this->setting;
     $messages[$setting['post_type']] = array(0 => "", 1 => sprintf(__('%sを更新しました <a href="%s">記事を見る</a>'), $setting['name'], esc_url(get_permalink($post->ID))), 2 => __('カスタムフィールドを更新しました'), 3 => __('カスタムフィールドを削除しました'), 4 => sprintf(__('%s更新'), $setting['name']), 5 => isset($_GET['revision']) ? sprintf(__(' %s 前に%sを保存しました'), wp_post_revision_title((int) $_GET['revision'], false), $setting['name']) : false, 6 => sprintf(__('%sが公開されました <a href="%s">記事を見る</a>'), $setting['name'], esc_url(get_permalink($post->ID))), 7 => sprintf(__('%s記事を保存'), $setting['name']), 8 => sprintf(__('%s記事を送信 <a target="_blank" href="%s">プレビュー</a>'), $setting['name'], esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))), 9 => sprintf(__('%sを予約投稿しました: <strong>%s</strong>. <a target="_blank" href="%s">プレビュー</a>'), $setting['name'], date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post->ID))), 10 => sprintf(__('%sの下書きを更新しました <a target="_blank" href="%s">プレビュー</a>'), $setting['name'], esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))));
     return $messages;
 }
开发者ID:rnsk,项目名称:wp-event-schedule,代码行数:10,代码来源:wpes-posttype.class.php


示例8: updated_messages

 /**
  * TODO: This is just generic from the wp-cli scaffold, make it work
  *
  * @author caseypatrickdriscoll
  *
  * @created 2015-07-18 15:07:07
  *
  * @param $messages
  *
  * @return mixed
  */
 public static function updated_messages($messages)
 {
     global $post;
     $permalink = get_permalink($post);
     $messages['patchchat'] = array(0 => '', 1 => sprintf(__('Patchchat updated. <a target="_blank" href="%s">View patchchat</a>', 'patchworks'), esc_url($permalink)), 2 => __('Custom field updated.', 'patchworks'), 3 => __('Custom field deleted.', 'patchworks'), 4 => __('Patchchat updated.', 'patchworks'), 5 => isset($_GET['revision']) ? sprintf(__('Patchchat restored to revision from %s', 'patchworks'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Patchchat published. <a href="%s">View patchchat</a>', 'patchworks'), esc_url($permalink)), 7 => __('Patchchat saved.', 'patchworks'), 8 => sprintf(__('Patchchat submitted. <a target="_blank" href="%s">Preview patchchat</a>', 'patchworks'), esc_url(add_query_arg('preview', 'true', $permalink))), 9 => sprintf(__('Patchchat scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview patchchat</a>', 'patchworks'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url($permalink)), 10 => sprintf(__('Patchchat draft updated. <a target="_blank" href="%s">Preview patchchat</a>', 'patchworks'), esc_url(add_query_arg('preview', 'true', $permalink))));
     return $messages;
 }
开发者ID:patchdotworks,项目名称:patchchat,代码行数:18,代码来源:class-patchchat-post-type.php


示例9: portfolio_messages

function portfolio_messages($messages)
{
    global $post;
    $post_ID = $post->ID;
    $messages[__('portfolio')] = array(0 => '', 1 => sprintf(__('Portfolio Updated. <a href="%s">View portfolio</a>'), esc_url(get_permalink($post_ID))), 2 => __('Custom Field Updated.'), 3 => __('Custom Field Deleted.'), 4 => __('Portfolio Updated.'), 5 => isset($_GET['revision']) ? sprintf(__('Portfolio Restored To Revision From %s'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Portfolio Published. <a href="%s">View Portfolio</a>'), esc_url(get_permalink($post_ID))), 7 => __('Portfolio Saved.'), 8 => sprintf(__('Portfolio Submitted. <a target="_blank" href="%s">Preview Portfolio</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))), 9 => sprintf(__('Portfolio Scheduled For: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Portfolio</a>'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))), 10 => sprintf(__('Portfolio Draft Updated. <a target="_blank" href="%s">Preview Portfolio</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))));
    return $messages;
}
开发者ID:duongnguyen92,项目名称:tvd12v2,代码行数:7,代码来源:portfolio-post-type.php


示例10: updated_messages

 /**
  * Customizing the messages for control post type.
  *
  * @since    1.0
  * @access   public
  */
 public function updated_messages($messages)
 {
     $post = get_post();
     $post_type = get_post_type($post);
     $messages['awf_font_control'] = array(0 => '', 1 => __('Control updated. Please visit the Customizer to manage this control.', $this->plugin_name), 2 => __('Control updated.', $this->plugin_name), 3 => __('Control deleted.', $this->plugin_name), 4 => __('Control updated. Please visit the Customizer to manage this control.', $this->plugin_name), 5 => isset($_GET['revision']) ? sprintf('Control restored to revision from %s', wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Control published. Please visit the Customizer to manage this control.', $this->plugin_name), 7 => __('Control saved. Please visit the Customizer to manage this control.', $this->plugin_name), 8 => __('Control submitted. Please visit the Customizer to manage this control.', $this->plugin_name), 9 => sprintf('Control scheduled for: <strong>%1$s</strong>.', date_i18n('M j, Y @ G:i', strtotime($post->post_date))), 10 => 'Control draft updated.');
     return $messages;
 }
开发者ID:jozoor,项目名称:Arabic-Webfonts,代码行数:13,代码来源:class-arabic-webfonts-post-type.php


示例11: portfolio_updated_messages

function portfolio_updated_messages($messages)
{
    $post_ID = "";
    $post = "";
    $messages['portfolio'] = array(0 => '', 1 => sprintf(__('Portfolio Item updated. <a href="%s">View portfolio item</a>'), esc_url(get_permalink($post_ID))), 2 => __('Custom field updated.', 'ocmx'), 3 => __('Custom field deleted.', 'ocmx'), 4 => __('Product updated.', 'ocmx'), 5 => isset($_GET['revision']) ? sprintf(__('Product restored to revision from %s', 'ocmx'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Portfolio Item published. <a href="%s">View portfolio item</a>', 'ocmx'), esc_url(get_permalink($post_ID))), 7 => __('Product saved.'), 8 => sprintf(__('Portfolio Item submitted. <a target="_blank" href="%s">Preview portfolio item</a>', 'ocmx'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))), 9 => sprintf(__('Portfolio Item draft updated. <a target="_blank" href="%s">Preview portfolio item</a>', 'ocmx'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))));
    return $messages;
}
开发者ID:shimion,项目名称:git,代码行数:7,代码来源:portfolio-post-type.php


示例12: new_accordion_menu_messages

function new_accordion_menu_messages($messages)
{
    global $post, $post_ID;
    add_action('wp_before_admin_bar_render', 'nextend_remove_custompost_type_view_admin_bar');
    $messages['accordion_menu'] = array(0 => '', 1 => __('Accordion Menu configuration updated.'), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Accordion Menu configuration updated.'), 5 => isset($_GET['revision']) ? sprintf(__('Accordion Menu configuration restored to revision from %s'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Accordion Menu published.'), 7 => __('Accordion Menu configuration saved.'), 8 => __('Accordion Menu submitted.'), 9 => sprintf(__('Accordion Menu scheduled for: <strong>%1$s</strong>.'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date))), 10 => __('Accordion Menu configuration draft updated.'));
    return $messages;
}
开发者ID:yarylo,项目名称:cerkva.pp.ua,代码行数:7,代码来源:admin.php


示例13: team_members_updated_messages

function team_members_updated_messages($messages)
{
    global $post;
    $permalink = get_permalink($post);
    $messages['team-members'] = array(0 => '', 1 => sprintf(__('Team members updated. <a target="_blank" href="%s">View team members</a>', 'greenwichmarketinggroup'), esc_url($permalink)), 2 => __('Custom field updated.', 'greenwichmarketinggroup'), 3 => __('Custom field deleted.', 'greenwichmarketinggroup'), 4 => __('Team members updated.', 'greenwichmarketinggroup'), 5 => isset($_GET['revision']) ? sprintf(__('Team member restored to revision from %s', 'greenwichmarketinggroup'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Team members published. <a href="%s">View team members</a>', 'greenwichmarketinggroup'), esc_url($permalink)), 7 => __('Team member saved.', 'greenwichmarketinggroup'), 8 => sprintf(__('Team member submitted. <a target="_blank" href="%s">Preview team members</a>', 'greenwichmarketinggroup'), esc_url(add_query_arg('preview', 'true', $permalink))), 9 => sprintf(__('Team member scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview team member</a>', 'greenwichmarketinggroup'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url($permalink)), 10 => sprintf(__('Team member draft updated. <a target="_blank" href="%s">Preview team member</a>', 'greenwichmarketinggroup'), esc_url(add_query_arg('preview', 'true', $permalink))));
    return $messages;
}
开发者ID:esdader,项目名称:gmg-bugfree-octo-spice,代码行数:7,代码来源:team-members.php


示例14: updated_messages

 public function updated_messages($messages)
 {
     global $post, $post_ID;
     //************** change name here*********************
     $messages['TYPE_NAME'] = array(0 => '', 1 => sprintf(__('TYPE_NAME updated. <a href="%s">View TYPE_NAME</a>'), esc_url(get_permalink($post_ID))), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('TYPE_NAME updated.'), 5 => isset($_GET['revision']) ? sprintf(__('TYPE_NAME restored to revision from %s'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('TYPE_NAME published. <a href="%s">View TYPE_NAME</a>'), esc_url(get_permalink($post_ID))), 7 => __('TYPE_NAME saved.'), 8 => sprintf(__('TYPE_NAME submitted. <a target="_blank" href="%s">Preview TYPE_NAME</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))), 9 => sprintf(__('TYPE_NAME scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview TYPE_NAME</a>'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))), 10 => sprintf(__('TYPE_NAME draft updated. <a target="_blank" href="%s">Preview TYPE_NAME</a>'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))));
     return $messages;
 }
开发者ID:repo-storage,项目名称:core-wp,代码行数:7,代码来源:sample_post_type.php


示例15: update_messages

 /**
  * Customize the update messages for a gallery
  *
  * @global object $post     The current post object.
  *
  * @param array   $messages Array of default post updated messages.
  *
  * @return array $messages Amended array of post updated messages.
  */
 public function update_messages($messages)
 {
     global $post;
     // Add our gallery messages
     $messages[FOOGALLERY_CPT_GALLERY] = apply_filters('foogallery_gallery_posttype_update_messages', array(0 => '', 1 => __('Gallery updated.', 'foogallery'), 2 => __('Gallery custom field updated.', 'foogallery'), 3 => __('Gallery custom field deleted.', 'foogallery'), 4 => __('Gallery updated.', 'foogallery'), 5 => isset($_GET['revision']) ? sprintf(__('Gallery restored to revision from %s.', 'foogallery'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Gallery published.', 'foogallery'), 7 => __('Gallery saved.', 'foogallery'), 8 => __('Gallery submitted.', 'foogallery'), 9 => sprintf(__('Gallery scheduled for: <strong>%1$s</strong>.', 'foogallery'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date))), 10 => __('Gallery draft updated.', 'foogallery')));
     return $messages;
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:16,代码来源:class-posttypes.php


示例16: cpt_savedsearch_messages

function cpt_savedsearch_messages($messages)
{
    //http://codex.wordpress.org/Function_Reference/register_post_type
    global $post, $post_ID;
    $messages['savedsearch'] = array(0 => '', 1 => sprintf(__('Saved search Post updated.', 'your_text_domain'), esc_url(get_permalink($post_ID))), 2 => __('Saved searche updated.', 'your_text_domain'), 3 => __('Saved search deleted.', 'your_text_domain'), 4 => __('Saved search Post updated.', 'your_text_domain'), 5 => isset($_GET['revision']) ? sprintf(__('Saved search Post restored to revision from %s', 'your_text_domain'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Saved search Post published. <a href="%s">View Saved search Post</a>', 'your_text_domain'), esc_url(get_permalink($post_ID))), 7 => __('Saved search Post saved.', 'your_text_domain'), 8 => sprintf(__('Saved search Post submitted. <a target="_blank" href="%s">Preview Saved search Post</a>', 'your_text_domain'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))), 9 => sprintf(__('Saved search Post scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Saved search Post</a>', 'your_text_domain'), date_i18n(__('M j, Y @ G:i', 'tn_'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))), 10 => sprintf(__('Saved search Post draft updated. <a target="_blank" href="%s">Preview Saved search Post</a>', 'your_text_domain'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))));
    return $messages;
}
开发者ID:whatthefork,项目名称:bbconnect,代码行数:7,代码来源:bbconnect-savedsearch.php


示例17: anno_post_updated_messages

/**
 * Display custom messages for articles. Based on WP high 3.1.2
 */
function anno_post_updated_messages($messages)
{
    global $post;
    // Based on message code in WP high 3.2
    $messages['article'] = array(0 => '', 1 => sprintf(_x('Article updated. <a href="%s">View article</a>', 'Article updated message', 'anno'), esc_url(get_permalink($post->ID))), 2 => _x('Custom field updated.', 'Article updated message', 'anno'), 3 => _x('Custom field deleted.', 'Article updated message', 'anno'), 4 => _x('Article updated.', 'Article updated message', 'anno'), 5 => isset($_GET['revision']) ? sprintf(_x('Article restored to revision from %s', 'Article updated message', 'anno'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(_x('Article published. <a href="%s">View article</a>', 'Article updated message', 'anno'), esc_url(get_permalink($post->ID))), 7 => _x('Article saved.', 'Article updated message', 'anno'), 8 => sprintf(_x('Article submitted. <a target="_blank" href="%s">Preview article</a>', 'Article updated message', 'anno'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))), 9 => sprintf(_x('Article scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview article</a>', 'Article updated message', 'anno'), date_i18n(_x('M j, Y @ G:i', 'Article updated future time format', 'anno'), strtotime($post->post_date)), esc_url(get_permalink($post->ID))), 10 => sprintf(_x('Article draft updated. <a target="_blank" href="%s">Preview article</a>', 'Article updated message', 'anno'), esc_url(add_query_arg('preview', 'true', get_permalink($post->ID)))), 11 => _x('Article successfully cloned.', 'Article updated message', 'anno'), 12 => _x('Unable to clone article.', 'Article updated message', 'anno'), 13 => _x('Article unpublished; there was an error in validation.', 'Article updated message', 'anno'));
    return $messages;
}
开发者ID:dregula,项目名称:Annotum,代码行数:10,代码来源:article-post-type.php


示例18: post_updated_messages

 /**
  * Change messages when a post type is updated.
  * @param  array $messages
  * @return array
  */
 public function post_updated_messages($messages)
 {
     global $post, $post_ID;
     $messages['food_menu'] = array(0 => '', 1 => sprintf(__('Menu Item updated. <a href="%s">View Menu Item</a>', 'restaurantpress'), esc_url(get_permalink($post_ID))), 2 => __('Custom field updated.', 'restaurantpress'), 3 => __('Custom field deleted.', 'restaurantpress'), 4 => __('Menu Item updated.', 'restaurantpress'), 5 => isset($_GET['revision']) ? sprintf(__('Menu Item restored to revision from %s', 'restaurantpress'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => sprintf(__('Menu Item published. <a href="%s">View Menu Item</a>', 'restaurantpress'), esc_url(get_permalink($post_ID))), 7 => __('Menu Item saved.', 'restaurantpress'), 8 => sprintf(__('Menu Item submitted. <a target="_blank" href="%s">Preview Menu Item</a>', 'restaurantpress'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))), 9 => sprintf(__('Menu Item scheduled for: <strong>%1$s</strong>. <a target="_blank" href="%2$s">Preview Menu Item</a>', 'restaurantpress'), date_i18n(__('M j, Y @ G:i', 'restaurantpress'), strtotime($post->post_date)), esc_url(get_permalink($post_ID))), 10 => sprintf(__('Menu Item draft updated. <a target="_blank" href="%s">Preview Menu Item</a>', 'restaurantpress'), esc_url(add_query_arg('preview', 'true', get_permalink($post_ID)))));
     $messages['food_group'] = array(0 => '', 1 => __('Group updated.', 'restaurantpress'), 2 => __('Custom field updated.', 'restaurantpress'), 3 => __('Custom field deleted.', 'restaurantpress'), 4 => __('Group updated.', 'restaurantpress'), 5 => isset($_GET['revision']) ? sprintf(__('Group restored to revision from %s', 'restaurantpress'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Group updated.', 'restaurantpress'), 7 => __('Group saved.', 'restaurantpress'), 8 => __('Group submitted.', 'restaurantpress'), 9 => sprintf(__('Group scheduled for: <strong>%1$s</strong>.', 'restaurantpress'), date_i18n(__('M j, Y @ G:i', 'restaurantpress'), strtotime($post->post_date))), 10 => __('Group draft updated.', 'restaurantpress'));
     return $messages;
 }
开发者ID:themegrill,项目名称:restaurantpress,代码行数:12,代码来源:class-rp-admin-post-types.php


示例19: __construct

 public function __construct($base)
 {
     $this->base = $base;
     $this->admin = $base->admin;
     $this->orig_referer = wp_get_original_referer();
     if (isset($_GET['message'])) {
         $this->message = intval($_GET['message']);
         if ($this->message == 1 && !$this->orig_referer) {
             $this->message = 4;
         }
     }
     $this->messages[1] = sprintf(__('Page updated. Continue editing below or <a href="%s">go back</a>.', 'ktai_style'), esc_attr($this->orig_referer));
     $this->messages[2] = __('Custom field updated.', 'ktai_style');
     $this->messages[3] = __('Custom field deleted.', 'ktai_style');
     $this->messages[4] = __('Page updated.', 'ktai_style');
     $this->messages[5] = __('Page published.', 'ktai_style');
     $this->messages[6] = __('Page submitted.', 'ktai_style');
     if (isset($_GET['revision'])) {
         $this->messages[5] = sprintf(__('Page restored to revision from %s'), wp_post_revision_title((int) $_GET['revision'], false));
     }
     $this->notices[1] = __('There is an autosave of this page that is more recent than the version below.  <a href="%s">View the autosave</a>.');
     global $post_ID, $temp_ID;
     $post_ID = isset($post_ID) ? intval($post_ID) : 0;
     $temp_ID = isset($temp_ID) ? intval($temp_ID) : 0;
 }
开发者ID:masayukiando,项目名称:wordpress-event-search,代码行数:25,代码来源:edit-page-form.php


示例20: wpv_post_updated_messages_filter

function wpv_post_updated_messages_filter($messages)
{
    global $post;
    $post_type = get_post_type();
    // DEPRECATED
    // We have now our own edit pages, so this is not fired anymore
    // Commented out in 1.7
    /*
    if ( $post_type == 'view' ) {
    	$messages['view'] = array(
    		0 => '', // Unused. Messages start at index 1.
    		1 => __('View updated.', 'wpv-views'),
    		2 => __('Custom field updated.'),
    		3 => __('Custom field deleted.'),
    		4 => __('View updated.', 'wpv-views'),
    		5 => isset($_GET['revision']) ? sprintf( __('View restored to revision from %s', 'wpv-views'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false,
    		6 => __('View published.', 'wpv-views'),
    		7 => __('View saved.', 'wpv-views'),
    		8 => __('View submitted.', 'wpv-views'),
    		9 => sprintf( __('View scheduled for: <strong>%1$s</strong>.', 'wpv-views'),
    			// translators: Publish box date format, see http://php.net/date
    			date_i18n( __( 'M j, Y @ G:i' ), strtotime( $post->post_date ) ) ),
    		10 => __('View draft updated', 'wpv-views'),
    		);
    }
    */
    if ($post_type == 'view-template') {
        $messages['view-template'] = array(0 => '', 1 => __('Content template updated.', 'wpv-views'), 2 => __('Custom field updated.'), 3 => __('Custom field deleted.'), 4 => __('Content template updated.', 'wpv-views'), 5 => isset($_GET['revision']) ? sprintf(__('Content template restored to revision from %s', 'wpv-views'), wp_post_revision_title((int) $_GET['revision'], false)) : false, 6 => __('Content template published.', 'wpv-views'), 7 => __('Content template saved.', 'wpv-views'), 8 => __('Content template submitted.', 'wpv-views'), 9 => sprintf(__('Content template scheduled for: <strong>%1$s</strong>.', 'wpv-views'), date_i18n(__('M j, Y @ G:i'), strtotime($post->post_date))), 10 => __('Content template draft updated', 'wpv-views'));
    }
    return $messages;
}
开发者ID:supahseppe,项目名称:path-of-gaming,代码行数:31,代码来源:functions-core.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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