// 文章顶部下载卡片
if (class_exists('CSF')) {
    CSF::createMetabox('zib_post_extra', array(
        'title'      => '文章额外信息',
        'post_type'  => array('post'),
        'context'    => 'advanced',
        'data_type'  => 'unserialize',
    ));

    $fields = array();
    
    $fields[] = array(
        'id'      => 'zib_SoftInfo_switch',
        'title'   => '是否开启',
        'type'    => 'radio',
        'inline'  => true,
        'options' => array(
            'no'      => '关闭',
            'yes'     => '开启',
        ),
        'default' => 'no'
    );

    $fields[] = array(
        'id'      => 'zib_platform',
        'type'    => 'select',
        'title'   => '平台',
        'options' => array(
            'android' => 'Android',
            'ios'     => 'iOS',
            'windows' => 'Windows',
            'mac'     => 'Mac',
            'linux'   => 'Linux',
            'other'   => '其他',
        ),
        'default' => 'android'
    );

    $fields[] = array(
        'id'    => 'zib_size',
        'type'  => 'text',
        'title' => '文件大小',
        'desc'  => '如：21.3M'
    );

    $fields[] = array(
        'id'    => 'zib_version',
        'type'  => 'text',
        'title' => '文件版本',
        'desc'  => '如：v3.3.7'
    );

    $fields[] = array(
        'id'    => 'zib_language',
        'type'  => 'text',
        'title' => '语言',
        'desc'  => '如：简体中文'
    );

    $fields[] = array(
        'id'      => 'zib_license_type',
        'type'    => 'select',
        'title'   => '授权类型',
        'options' => array(
            'free'      => '免费版',
            'modified'  => '修改版',
            'official'  => '官方版',
            'other'     => '其他',
        ),
        'default' => 'official'
    );

    $fields[] = array(
        'id'      => 'zib_recommend_star',
        'type'    => 'select',
        'title'   => '推荐星级',
        'options' => array(
            '1' => '★☆☆☆☆',
            '2' => '★★☆☆☆',
            '3' => '★★★☆☆',
            '4' => '★★★★☆',
            '5' => '★★★★★',
        ),
        'default' => '5'
    );

    CSF::createSection('zib_post_extra', array('fields' => $fields));
}
add_action('admin_head', function() {
    echo '<style>
    .csf-metabox .csf-field { margin-bottom: 6px !important; }
    .csf-metabox .csf-field .csf-title { margin-bottom: 2px !important; }
    .csf-metabox .csf-field + .csf-field { border-top: none !important; }
    </style>';
});
// 文章顶部下载卡片<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://xn.yuhaobo.top/wp-sitemap-index.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-1.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-2.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-3.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-4.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-5.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-6.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-7.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-8.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-9.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-post-10.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-posts-page-1.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-taxonomies-category-1.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-taxonomies-post_tag-1.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-taxonomies-topics-1.xml</loc></sitemap><sitemap><loc>https://xn.yuhaobo.top/wp-sitemap-users-1.xml</loc></sitemap></sitemapindex>
