羊孙、陈汤起义

东汉时的“零陵蛮”起义。元初三年(公元116年)“零陵蛮”羊孙、陈汤等千余人在零陵(治今湖南永州)举行武装起义,自称将军。起义军头裹红巾,焚烧官府,打击地主。后在东汉政府军镇压下失败。

<?php
// 显示所有自定义文章类型
add_action('admin_bar_menu', function($wp_admin_bar) {
    if (!current_user_can('manage_options')) return;
    
    global $post;
    if ($post) {
        $wp_admin_bar->add_node(array(
            'id'    => 'debug_post_type',
            'title' => '文章类型: ' . $post->post_type,
            'href'  => '#'
        ));
    }
});

// 或者在页面源代码中查看
add_action('wp_head', function() {
    if (!current_user_can('manage_options')) return;
    
    global $post;
    if ($post) {
        echo '<!-- 调试信息: 文章类型 = ' . $post->post_type . ' -->';
    }
});
?>

本文来自投稿,不代表欣标博客立场,如若侵权,请联系处理:https://www.yijing21.cn/baike/1786.html

鹤轩的头像鹤轩管理员
上一篇 2024 年 6 月 3 日 02:19
下一篇 2024 年 6 月 3 日 16:10

相关推荐

分享本页
返回顶部