WordPress针对不同状态显示不同颜色

// set different colors for pages/posts in different statuses
add_action( 'admin_footer', 'so_posts_status_color' );
function so_posts_status_color() {
    ?>
        <style>
            .status-draft {
        background:lightblue!important;
    }
    .status-future {
        background:lightgreen!important;
    }
    .status-pending {
        background:pink!important;
    }
    .status-private {
        background:lightyellow!important;
    }
    .status-publish {
        background:aqua!important;
    }
    .status-publish.post-password-required {
        background:orange!important;
    }
    .status-publish.status-sticky {
        background-color:deepskyblue!important;
    }
    </style>
        <?php
}

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据