{$atts['title']}

"; } $html = '
' . $title . '
' . do_shortcode($content) . '
'; return $html; } add_shortcode('start-plane', 'post_short_start_plane'); function post_short_start_plane($atts, $content = null, $code = "") { $html = '
' . do_shortcode($content) . '
'; return $html; } add_shortcode('icon-url', 'post_short_icon_url'); function post_short_icon_url($atts, $content = null, $code = "") { $wporg_atts = shortcode_atts([ 'target' => '', 'href' => '', ], $atts); if ($content == null) { $content = $wporg_atts['href']; } $html = '' . do_shortcode($content) . ''; return $html; } add_shortcode('zd-plane', 'post_short_zd_plane'); function post_short_zd_plane($atts, $content = null, $code = "") { if (isset($atts['title'])) { $title = $atts['title']; } else { $title = "折叠内容,点击展开"; } $html = '
' . $title . '
' . do_shortcode($content) . '
'; return $html; } add_shortcode('zd-plane', 'post_short_zd_plane'); add_shortcode('loginshow', 'post_short_loginshow'); function post_short_loginshow($atts, $content = null) { if (islogin()) { return do_shortcode($content); } else { return '
本内容需要登录后才能查看
'; } } add_shortcode('clickshow', 'post_short_clickshow'); function post_short_clickshow($atts, $content = null) { $wporg_atts = shortcode_atts([ 'type' => '1', ], $atts); if ($wporg_atts['type'] == 1) { return '' . do_shortcode($content) . ''; } else { return '
' . do_shortcode($content) . '
'; } } add_shortcode('c-alert', 'post_short_alert'); function post_short_alert($atts, $content = null) { $wporg_atts = shortcode_atts([ 'type' => 'info', ], $atts); if ($wporg_atts['type'] == 'warning') { return '
' . do_shortcode($content) . '
'; } elseif ($wporg_atts['type'] == 'success') { return '
' . do_shortcode($content) . '
'; } elseif ($wporg_atts['type'] == 'error') { return '
' . do_shortcode($content) . '
'; } else { return '
' . do_shortcode($content) . '
'; } } add_shortcode('c-downbtn', 'post_short_c_downbtn'); function post_short_c_downbtn($atts, $content = '资源文件') { $wporg_atts = shortcode_atts([ 'type' => 'default', 'pwd' => '', 'url' => '', ], $atts); if ($wporg_atts['type'] == 'bd') { $icons = ''; $source = '百度网盘'; } elseif ($wporg_atts['type'] == 'ty') { $icons = ''; $source = '天翼网盘'; } elseif ($wporg_atts['type'] == 'al') { $icons = ''; $source = '阿里云盘'; } elseif ($wporg_atts['type'] == '360') { $icons = ''; $source = '360网盘'; } elseif ($wporg_atts['type'] == 'ct') { $icons = ''; $source = '诚通网盘'; } elseif ($wporg_atts['type'] == 'lz') { $icons = ''; $source = '蓝奏网盘'; } elseif ($wporg_atts['type'] == 'wy') { $icons = ''; $source = '微云网盘'; } elseif ($wporg_atts['type'] == 'github') { $icons = ''; $source = 'Github'; } elseif ($wporg_atts['type'] == 'xl') { $icons = ''; $source = '迅雷云盘'; } else { $icons = ''; $source = '默认网盘'; } if ($wporg_atts['pwd'] != null) { $pwd = ' | 提取码:' . $wporg_atts['pwd'] . ' '; } else { $pwd = ''; } return '
' . $icons . '
来源:' . $source . $pwd . '
'; } add_shortcode('pwdshow', 'post_short_pwdshow'); function post_short_pwdshow($atts, $content = '') { $parameter = shortcode_atts([ 'pwd' => '' ], $atts); if (isset($_POST['pwd']) && $_POST['pwd'] == $parameter['pwd']) { return '
' . do_shortcode($content) . '
'; } else { return '
本内容需要输入密码才能查看
'; } } function post_short_selectbox($atts, $content = '') { $parameter = shortcode_atts([ 'type' => '' ], $atts); if ($parameter['type'] == 1) { return '' . file_get_svg('selectbox.svg') . ''; } else { return '' . file_get_svg('selectbox-not.svg') . ''; } } add_shortcode('selectbox', 'post_short_selectbox'); function post_short_version_note($atts, $content = '') { $parameter = shortcode_atts([ 't' => '', 'v' => '' ], $atts); $time = '
' . $parameter['v'] . '
' . $parameter['t'] . '
'; $content = '
' . $content . '
'; return $time . $content; } add_shortcode('new_li', 'post_short_version_note'); /*回复可见Functions*/ function corepress_reply_to_read($atts, $content = null) { extract(shortcode_atts(array("notice" => '

此处内容需要回复后才能查看

'), $atts)); $email = null; $user_ID = (int)wp_get_current_user()->ID; if ($user_ID > 0) { if (isadmin($user_ID)) { return '

以下是回复可见内容

' . do_shortcode($content). '
'; }else{ global $wpdb; $post_id = get_the_ID(); $query = "SELECT `comment_ID` FROM {$wpdb->comments} WHERE `comment_post_ID`={$post_id} and `comment_approved`='1' and `user_ID`='{$user_ID}' LIMIT 1"; if ($wpdb->get_results($query)) { return '

以下是回复可见内容

' . do_shortcode($content) . '
'; } else { return $notice; } } } else if (isset($_COOKIE['comment_author_email_' . COOKIEHASH])) { $email = str_replace('%40', '@', $_COOKIE['comment_author_email_' . COOKIEHASH]); } else { return $notice; } if (empty($email)) { return $notice; } global $wpdb; $post_id = get_the_ID(); $query = "SELECT `comment_ID` FROM {$wpdb->comments} WHERE `comment_post_ID`={$post_id} and `comment_approved`='1' and `comment_author_email`='{$email}' LIMIT 1"; if ($wpdb->get_results($query)) { return '

以下是回复可见内容

' . do_shortcode($content) . '
'; } else { return $notice; } } add_shortcode('reply', 'corepress_reply_to_read'); function corepress_bvideo($atts, $content = '') { $parameter = shortcode_atts([ 'bv' => 'BV1Ya411F7eP' ], $atts); $html = '
'; return $html; } add_shortcode('bvideo', 'corepress_bvideo'); add_shortcode('c-video', 'corepress_cvideo'); function corepress_cvideo($atts, $content = '') { $parameter = shortcode_atts([ 'url' => '', 'img' => '', 'type' => '' ], $atts); $html = ''; return $html; } add_shortcode('dh', 'corepress_url_dh'); function corepress_url_dh($atts, $content = '') { $parameter = shortcode_atts([ 'url' => '', 'icon' => '', 'des' => '' ], $atts); $colors = ['#E57373', '#F06292', '#BA68C8', '#9575CD', '#7986CB', '#64B5F6', '#4DD0E1', '#4DB6AC', '#81C784', '#FFD54F', '#FF8A65', '#A1887F', '#90A4AE']; if ($atts['icon'] == null) { if ($content == '') { $content = '网址'; } $imghtml = '' . corepress_msubstr($content, 0, 1) . ''; } else { $imghtml = ' '; } $html = '
' . $imghtml . '

' . $content . '

' . $atts['des'] . '
'; return $html; }