// 链接提交的模态框 - 移除LOGO上传功能
function zib_submit_links_modal($args = array())
{
$defaults = array(
'class' => '',
'title' => '申请入驻',
'dec' => '',
'show_title' => true,
'sign' => true,
'cats' => [],
);
$args = wp_parse_args((array) $args, $defaults);
// 构建模态框标题
$title_html = '';
if (!empty($args['title'])) {
$title_html = sprintf(
'
请先登录
登录';
if (!zib_is_close_signup()) {
$content_html .= '注册';
}
$content_html .= '
' . zib_social_login(false) . '
';
} else {
// 获取链接分类
$cats_options = '';
$cats_query_args = array(
'taxonomy' => array('link_category'),
'hide_empty' => false,
);
if (!empty($args['cats'])) {
$cats_query_args['include'] = $args['cats'];
$cats_query_args['orderby'] = 'include';
}
$cats_query = new WP_Term_Query($cats_query_args);
if (!is_wp_error($cats_query) && !empty($cats_query->terms)) {
foreach ($cats_query->terms as $term) {
$cats_options .= sprintf('