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

PHP wp_list_post_revisions函数代码示例

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

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



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

示例1: post_revisions_meta_box

/**
 * Display list of revisions.
 *
 * @since 2.6.0
 *
 * @param object $post
 */
function post_revisions_meta_box($post)
{
    wp_list_post_revisions($post);
}
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:11,代码来源:meta-boxes.php


示例2: ame_custom_column_page_actions

/**
 * Adds content to the new 'Actions' column on the page management view
 *
 * @since 0.7
 * @author [email protected]
 *
 * @param string $ame_column_name
 * @param int $ame_id
 */
function ame_custom_column_page_actions($ame_column_name, $ame_id)
{
    global $wpdb, $locale;
    if ($ame_column_name == 'ame_page_actions') {
        $post_status = get_post_status($ame_id);
        $q_post = get_post($ame_id);
        echo '<div style="width:105px;" class="ame_options">';
        // Visibility icon
        $visstatus = $post_status == 'publish' ? 'draft' : 'publish';
        echo '<div id="visicon' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" onclick="ame_ajax_set_visibility(' . $ame_id . ', \'' . $visstatus . '\', \'post\');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . $visstatus . '.png" border="0" alt="' . __('Toggle visibility', 'admin-management-xtended') . '" title="' . __('Toggle visibility', 'admin-management-xtended') . '" /></a></div>';
        // Date icon
        echo '<div id="date' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" class="date-pick" id="datepicker' . $ame_id . '"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'date.png" border="0" alt="' . __('Change Publication Date', 'admin-management-xtended') . '" title="' . __('Change Publication Date', 'admin-management-xtended') . '" /></a></div> ';
        // Slug edit icon
        echo '<div id="slug' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" id="slugedit' . $ame_id . '" onclick="ame_slug_edit(' . $ame_id . ', \'post\');"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'slug_edit.png" border="0" alt="' . __('Edit Page Slug', 'admin-management-xtended') . '" title="' . __('Edit Page Slug', 'admin-management-xtended') . '" /></a></div>';
        // Comment open/closed status icon
        $comment_status = $q_post->comment_status;
        if ($comment_status == 'open') {
            $c_status = 0;
            $c_img = '_open';
        } else {
            $c_status = 1;
            $c_img = '_closed';
        }
        echo '<div id="commentstatus' . $ame_id . '" style="padding:1px;float:left;"><a tip="' . __('Toggle comment status open/closed', 'admin-management-xtended') . '" href="javascript:void(0);" onclick="ame_ajax_set_commentstatus(' . $ame_id . ', ' . $c_status . ', \'post\');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'comments' . $c_img . '.png" border="0" alt="' . __('Toggle comment status open/closed', 'admin-management-xtended') . '" title="' . __('Toggle comment status open/closed', 'admin-management-xtended') . '" /></a></div> ';
        // Plugin: Exclude Pages
        if (is_plugin_active('exclude-pages/exclude_pages.php')) {
            $excluded_pages = ep_get_excluded_ids();
            if (in_array($ame_id, $excluded_pages)) {
                $e_status = 0;
                $e_img = '';
            } else {
                $e_status = 1;
                $e_img = '_off';
            }
            echo '<div id="excludepagewrap' . $ame_id . '" style="padding:1px;float:left;"><a tip="' . __('Plugin: Exclude Pages - Exclude page from navigation', 'admin-management-xtended') . '" href="javascript:void(0);" onclick="ame_ajax_set_excludestatus(' . $ame_id . ', ' . $e_status . ');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'excludepages' . $e_img . '.gif" border="0" alt="' . __('Plugin: Exclude Pages - Exclude page from navigation', 'admin-management-xtended') . '" title="' . __('Plugin: Exclude Pages - Exclude page from navigation', 'admin-management-xtended') . '" /></a></div>';
        }
        // Post revisions
        if (function_exists('wp_list_post_revisions') && wp_get_post_revisions($ame_id)) {
            echo '<div class="amehasrev" id="amerevisionwrap' . $ame_id . '" style="width:300px;height:165px;overflow:auto;display:none;">';
            wp_list_post_revisions($ame_id);
            echo '</div>';
        }
        echo '</div>';
    }
}
开发者ID:sashadt,项目名称:wp-deploy-test,代码行数:54,代码来源:page-functions.php


示例3: _e

	<tr><td colspan="2"><div class="updated"><p><?php 
    _e('These revisions are identical.');
    ?>
</p></div></td></tr>

	<?php 
}
?>

</table>

<br class="clear" />

<h3><?php 
echo $title;
?>
</h3>

<?php 
$args = array('format' => 'form-table', 'parent' => true, 'right' => $right, 'left' => $left);
if (!WP_POST_REVISIONS || !post_type_supports($post->post_type, 'revisions')) {
    $args['type'] = 'autosave';
}
wp_list_post_revisions($post, $args);
?>

</div>

<?php 
require_once './admin-footer.php';
开发者ID:batruji,项目名称:metareading,代码行数:30,代码来源:revision.php


示例4: post_revisions_meta_box

 function post_revisions_meta_box($safecss_post)
 {
     // Specify numberposts and ordering args
     $args = array('numberposts' => 5, 'orderby' => 'ID', 'order' => 'DESC');
     // Remove numberposts from args if show_all_rev is specified
     if (isset($_GET['show_all_rev'])) {
         unset($args['numberposts']);
     }
     wp_list_post_revisions($safecss_post['ID'], $args);
 }
开发者ID:kosir,项目名称:thatcamp-org,代码行数:10,代码来源:safecss.php


示例5: ame_custom_column_post_actions

/**
 * Adds content to the new 'Actions' column on the post management view
 *
 * @since 0.7
 * @author [email protected]
 *
 * @param string
 * @param int
 */
function ame_custom_column_post_actions($ame_column_name, $ame_id)
{
    global $wpdb, $locale;
    if ($ame_column_name == 'ame_post_actions' && current_user_can('edit_post', $ame_id)) {
        $post_status = get_post_status($ame_id);
        $q_post = get_post($ame_id);
        echo '<div style="width:90px;" class="ame_options">';
        // Visibility icon
        $visstatus = $post_status == 'publish' ? 'draft' : 'publish';
        echo '<div id="visicon' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" onclick="ame_ajax_set_visibility(' . $ame_id . ', \'' . $visstatus . '\', \'post\');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . $visstatus . '.png" border="0" alt="' . __('Toggle visibility', 'admin-management-xtended') . '" title="' . __('Toggle visibility', 'admin-management-xtended') . '" /></a></div>';
        // Sticky icon
        $stickyimg = is_sticky($ame_id) ? 'sticky.png' : 'nosticky.png';
        echo '<div id="stickyicon' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" onclick="ame_ajax_set_sticky(' . $ame_id . ');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . $stickyimg . '" border="0" alt="' . __('Stick this post to the front page') . '" title="' . __('Stick this post to the front page') . '" /></a></div>';
        // Date icon
        echo '<div id="date' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" class="date-pick" id="datepicker' . $ame_id . '"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'date.png" border="0" alt="' . __('Change Publication Date', 'admin-management-xtended') . '" title="' . __('Change Publication Date', 'admin-management-xtended') . '" /></a></div>';
        // Slug edit icon
        echo '<div id="slug' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" id="slugedit' . $ame_id . '" onclick="ame_slug_edit(' . $ame_id . ', \'post\');"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'slug_edit.png" border="0" alt="' . __('Edit Post Slug', 'admin-management-xtended') . '" title="' . __('Edit Post Slug', 'admin-management-xtended') . '" /></a></div>';
        // Comment open/closed status icon
        $comment_status = $q_post->comment_status;
        if ($comment_status == 'open') {
            $c_status = 0;
            $c_img = '_open';
        } else {
            $c_status = 1;
            $c_img = '_closed';
        }
        echo '<div id="commentstatus' . $ame_id . '" style="padding:1px;float:left;"><a href="javascript:void(0);" onclick="ame_ajax_set_commentstatus(' . $ame_id . ', ' . $c_status . ', \'post\');return false;"><img src="' . AME_PLUGINFULLURL . 'img/' . AME_IMGSET . 'comments' . $c_img . '.png" border="0" alt="' . __('Toggle comment status open/closed', 'admin-management-xtended') . '" title="' . __('Toggle comment status open/closed', 'admin-management-xtended') . '" /></a></div> ';
        // Post revisions
        if (function_exists('wp_list_post_revisions') && wp_get_post_revisions($ame_id)) {
            echo '<div class="amehasrev" id="amerevisionwrap' . $ame_id . '" style="width:300px;height:165px;overflow:auto;display:none;">';
            wp_list_post_revisions($ame_id);
            echo '</div>';
        }
        echo '</div>';
    }
}
开发者ID:rongandat,项目名称:best-picture,代码行数:45,代码来源:post-functions.php


示例6: revisions_meta_box

 function revisions_meta_box()
 {
     $post = $this->get_js_post();
     $args = array('numberposts' => 5, 'orderby' => 'ID', 'order' => 'DESC');
     if (isset($_GET['show_all_rev'])) {
         unset($args['numberposts']);
     }
     wp_list_post_revisions($post['ID'], $args);
 }
开发者ID:hwasawoo,项目名称:Custom-Javascript-Editor,代码行数:9,代码来源:custom-javascript-editor.php


示例7: revisions_meta_box

 /**
  * post_revisions_meta_box function.
  * 
  * @access public
  * @param mixed $safecss_post
  * @return void
  */
 public static function revisions_meta_box($post)
 {
     wp_list_post_revisions($post->ID);
 }
开发者ID:webdotunc,项目名称:unc-custom-css,代码行数:11,代码来源:unc-custom-css.php


示例8: revisions_meta_box

 /**
  * post_revisions_meta_box function.
  * 
  * @access public
  * @param mixed $safecss_post
  * @return void
  */
 function revisions_meta_box($post)
 {
     // Specify numberposts and ordering args
     $args = array('format' => 'list', 'type' => 'revision');
     // Remove numberposts from args if show_all_rev is specified
     if (isset($_GET['show_all_rev'])) {
         unset($args['numberposts']);
     }
     wp_list_post_revisions($post->ID, $args);
 }
开发者ID:ubc,项目名称:simpler-css,代码行数:17,代码来源:simpler-css.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP wp_list_widget_controls函数代码示例发布时间:2022-05-23
下一篇:
PHP wp_list_pluck函数代码示例发布时间: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