WordPress给不同状态的文字添加颜色

add_action('admin_footer','posts_status_color');
function posts_status_color() {
    ?>
        <style>
        .status-draft {
        background: #FCE3F2 !important;
    }
    .status-pending {
        background: #87C5D6 !important;
    }
    .status-publish {
        /* no background keep wp alternating colors */
    }
    .status-future {
        background: #C6EBF5 !important;
    }
    .status-private {
        background:#F2D46F;
    }
    </style>
        <?php
}

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注