/** * Shortcode function for displaying the current post author AIM * Uses the get_the_author_aim() function * @link http://codex.wordpress.org/Template_Tags/the_author_aim * * @since 0.1 */ function shortcode_the_author_aim() { return get_the_author_aim(); }
function pstl_the_content($content) { global $post, $pstl_comments_number; if (is_feed()) { return $content; } $options = get_option('pstl'); if (isset($options['home_excerpt'])) { return $content; } $pstl_disabled = get_post_meta($post->ID, 'pstl_disabled', true); if ($pstl_disabled) { return $content; } $pstl_before_disabled = get_post_meta($post->ID, 'pstl_before_disabled', true); $pstl_after_disabled = get_post_meta($post->ID, 'pstl_after_disabled', true); $user_options = array(); if ($options['multiauthor']) { $user_options = get_option('pstl' . $post->post_author); if (is_array($user_options)) { $options = array_merge($options, $user_options); } } $title = get_the_title(); $title_encoded = urlencode($title); $link = get_permalink(); $link_encoded = urlencode($link); $mobile = pstl_mobile_type(); $suffix = ''; if ($mobile != '') { $suffix = '_mobile'; } $before = ''; $after = ''; $more = ''; if (is_single()) { $pstl_comments_number = get_comments_number(); $list = get_the_category(); if (!$pstl_before_disabled) { $before = trim($options['post_before' . $suffix . $list[0]->cat_ID]); if ($before == '') { $before = $options['post_before' . $suffix]; } else { $before = str_replace('[default]', $options['post_before' . $suffix], $before); } } if (!$pstl_after_disabled) { $after = trim($options['post_after' . $suffix . $list[0]->cat_ID]); if ($after == '') { $after = $options['post_after' . $suffix]; } else { $after = str_replace('[default]', $options['post_after' . $suffix], $after); } } if ($options['post_more_size'] > 0) { $length = strlen(strip_tags($content)); if ($length >= $options['post_more_size']) { $more = trim($options['post_more' . $suffix . $list[0]->cat_ID]); if ($more == '') { $more = $options['post_more' . $suffix]; } else { $more = str_replace('[default]', $options['post_more' . $suffix], $more); } } } else { $more = trim($options['post_more' . $suffix . $list[0]->cat_ID]); if ($more == '') { $more = $options['post_more' . $suffix]; } else { $more = str_replace('[default]', $options['post_more' . $suffix], $more); } } } else { if (is_page()) { $options['comments_number'] = get_comments_number(); if (!$pstl_before_disabled) { $before = $options['page_before' . $suffix]; } if (!$pstl_after_disabled) { $after = $options['page_after' . $suffix]; } } else { $before = $options['home_before' . $suffix]; $after = $options['home_after' . $suffix]; } } $before = pstl_insert_blocks($before); $after = pstl_insert_blocks($after); $more = pstl_insert_blocks($more); if (strpos($before, '<' . '?') !== false) { ob_start(); eval('?' . '>' . $before); $before = ob_get_contents(); ob_end_clean(); } $before = str_replace('[title]', $title, $before); $before = str_replace('[title_encoded]', $title_encoded, $before); $before = str_replace('[link]', $link, $before); $before = str_replace('[link_encoded]', $link_encoded, $before); $before = str_replace('[author_aim]', get_the_author_aim(), $before); if (strpos($after, '<' . '?') !== false) { ob_start(); eval('?' . '>' . $after); $after = ob_get_contents(); ob_end_clean(); } $after = str_replace('[title]', $title, $after); $after = str_replace('[title_encoded]', $title_encoded, $after); $after = str_replace('[link]', $link, $after); $after = str_replace('[link_encoded]', $link_encoded, $after); $after = str_replace('[author_aim]', get_the_author_aim(), $after); $x = strpos($content, 'id="more'); if ($x !== false) { // span end $x = strpos($content, '>', $x); if ($x !== false) { if (strpos($more, '<' . '?') !== false) { ob_start(); eval('?' . '>' . $more); $more = ob_get_contents(); ob_end_clean(); } $more = str_replace('[title]', $title, $more); $more = str_replace('[title_encoded]', $title_encoded, $more); $more = str_replace('[link]', $link, $more); $more = str_replace('[link_encoded]', $link_encoded, $more); $more = str_replace('[author_aim]', get_the_author_aim(), $more); $content = substr($content, 0, $x + 1) . $more . substr($content, $x + 1); } } return $before . $content . $after; }
/** * Display the AIM name of the author of the current post. * * @link http://codex.wordpress.org/Template_Tags/the_author_aim * @since 0.71 * @see get_the_author_aim() */ function the_author_aim() { echo get_the_author_aim(); }
?> " class="c5" target="_blank" rel="external nofollow"><i class="icon-pinterest-sign"></i> 腾讯微博</a><?php } if ($curauth->sinaweibo) { ?> <a href="<?php echo $curauth->sinaweibo; ?> " class="c6" target="_blank" rel="external nofollow"><i class="icon-linkedin-sign"></i> 新浪微博</a><?php } ?> </div></div> <div class="cls"></div> </div> <?php if (get_the_author_aim() || get_option('themes_fo2_zhifu_url')) { ?> <div class="j_zeng"> <a href="<?php if (get_option('themes_fo2_author_jz')) { the_author_aim(); } else { echo get_option('themes_fo2_zhifu_url'); } ?> " target="_blank" class="jz_bt" rel="external nofollow">捐 赠</a><span><?php if ($curauth->juanzeng) { echo $curauth->juanzeng; } else { if (get_option('themes_fo2_juankuan')) { echo get_option('themes_fo2_juankuan');