/** * add the blog post meta footer content * @since 3.1.3 */ function cp_blog_post_meta_footer() { global $post, $cp_options; if (!is_singular(array('post', APP_POST_TYPE))) { return; } ?> <div class="prdetails"> <?php if (is_singular('post')) { ?> <p class="tags"><?php if (get_the_tags()) { echo the_tags('', ' ', ''); } else { _e('No Tags', APP_TD); } ?> </p> <?php } else { ?> <p class="tags"><?php if (get_the_term_list($post->ID, APP_TAX_TAG)) { echo get_the_term_list($post->ID, APP_TAX_TAG, '', ' ', ''); } else { _e('No Tags', APP_TD); } ?> </p> <?php } ?> <?php if ($cp_options->ad_stats_all && current_theme_supports('app-stats')) { ?> <p class="stats"><?php appthemes_stats_counter($post->ID); ?> </p> <?php } ?> <p class="print"><?php if (function_exists('wp_email')) { email_link(); } ?> <?php if (function_exists('wp_print')) { print_link(); } ?> </p> <?php cp_edit_ad_link(); ?> </div> <?php }
the_title(); ?> </a></h3> <div class="post_meta"> By <?php the_author_posts_link(); ?> <span class="dot">⋅</span> <?php the_time('F j, Y'); ?> <span class="dot">⋅</span> <?php if (function_exists('wp_email')) { ?> <?php email_link(); ?> <span class="dot">⋅</span> <?php } ?> <?php if (function_exists('wp_print')) { ?> <?php print_link(); ?> <span class="dot">⋅</span> <?php } ?> <a href="#comments">Post a comment</a> </div>
/** * add the blog post meta footer content * @since 3.1.3 */ function cp_blog_post_meta_footer() { if (!is_singular(array('post', APP_POST_TYPE))) { return; } global $post; ?> <div class="prdetails"> <?php if (is_singular('post')) { ?> <p class="tags"><?php if (get_the_tags()) { echo the_tags('', ' ', ''); } else { _e('No Tags', APP_TD); } ?> </p> <?php } else { ?> <p class="tags"><?php if (get_the_term_list($post->ID, APP_TAX_TAG)) { echo get_the_term_list($post->ID, APP_TAX_TAG, '', ' ', ''); } else { _e('No Tags', APP_TD); } ?> </p> <?php } ?> <?php if (get_option('cp_ad_stats_all') == 'yes') { ?> <p class="stats"><?php appthemes_stats_counter($post->ID); ?> </p> <?php } ?> <p class="print"><?php if (function_exists('wp_email')) { email_link(); } ?> <?php if (function_exists('wp_print')) { print_link(); } ?> </p> <?php cp_edit_ad_link(); ?> </div> <?php if (function_exists('selfserv_sexy')) { selfserv_sexy(); } }
function email_link_shortcode($atts) { if (!is_feed()) { return email_link('', '', false); } else { return __('Note: There is an email link embedded within this post, please visit this post to email it.', 'wp-email'); } }
function setesm_postdisplay($postid = 0, $ast = 0, $astc = 0, $useragent = '0') { global $page; $noreg = get_post_meta($postid, 'No Registration', $single = true); if ($noreg != null) { $bypassreg = 1; } // if (preg_match("/Googlebot|Yahoo|msnbot|bingbot/i", $useragent) > 0){ $bypassreg = 1;} if (isset($_COOKIE['esmpass'])) { $bypassreg = 1; } /* Check if the user is on page gt 1 and not logged in */ global $page; //wp ecn 3591 6336 4361 //wp esn 7084 6274 //sr 139 127 //webinar 163 166 167 if ($bypassreg == 1 or is_user_logged_in()) { $showpagecontent = 1; } else { if (in_category(array(139, 127)) and !$bypassreg == 1 or in_category(array(139, 127)) and !is_user_logged_in()) { $showpagecontent = 0; } else { if (in_category(array(163, 166, 167)) and $page > 1) { $showpagecontent = 0; } else { if ($astused > 1) { $showpagecontent = 0; } else { //let them in $showpagecontent = 1; } } } } ?> <div style="clear:both; padding-bottom:5px;"></div> <?php if (function_exists('wp_socializer')) { echo '<div class="wp-socializer-buttons" style="height:20px; margin-top:5px;">'; echo '<span class="wpsr-btn">' . wp_socializer(facebook, 'style=button_count&type=send') . '</span>'; $blog_id = get_current_blog_id(); if ($blog_id == '2') { echo '<span class="wpsr-btn">' . wp_socializer(retweet, 'type=compact&username=eschoolnews') . '</span>'; } elseif ($blog_id == '3') { echo '<span class="wpsr-btn">' . wp_socializer(retweet, 'type=compact&username=ecampusnews') . '</span>'; } elseif ($blog_id == '4') { echo '<span class="wpsr-btn">' . wp_socializer(retweet, 'type=compact&username=eclassroomnews') . '</span>'; } else { echo '<span class="wpsr-btn">' . wp_socializer(retweet, 'type=compact') . '</span>'; } echo '<span class="wpsr-btn">' . wp_socializer(plusone, 'type=medium') . '</span>'; if (function_exists('wp_email')) { echo '<span class="wpsr-btn">'; email_link(); echo '</span>'; } if (function_exists('wp_print')) { echo '<span class="wpsr-btn">'; print_link(); echo '</span>'; } echo '</div>'; } ?> <div id="post-<?php the_ID(); ?> " <?php post_class('entry'); ?> > <div class="entry_title"> <div style="float:left; width:475px;"> <h2 style="color:#000 !important; font-size:24px;"><?php if (in_category(array(19, 20, 21))) { echo 'Press Release: '; } the_title(); ?> </h2> <?php $SubTitle = get_post_meta($postid, 'Sub Title', $single = true); if ($SubTitle != null) { echo '<h3>' . $SubTitle . '</h3>'; } if (get_the_author_meta('user_level') > 3) { if (function_exists('gkl_postavatar')) { echo '<style type="text/css">img.postavatar {height: 45px; width: auto;}</style>'; gkl_postavatar(postavatar); } } ?> <?php $PageByLine = get_post_meta($postid, 'Byline', $single = true); if ($PageByLine != null) { echo '<span class="byline">' . $PageByLine . '<br/>'; } else { echo '<span class="byline">'; } if (in_category(29)) { echo '<a href="' . get_category_link(29) . '">' . 'Read more news from Around the Web </a><br/>' . the_time('F jS, Y') . '</span>'; } elseif (in_category(126)) { echo '<a href="' . get_category_link(126) . '">' . 'View more Sites of the Week </a><br/>' . the_time('F jS, Y') . '</span>'; } elseif (in_category(19)) { echo '<a href="' . get_category_link(19) . '">' . 'View more Press Releases </a><br/>' . the_time('F jS, Y') . '</span>'; } elseif (in_category(20)) { echo '<a href="' . get_category_link(20) . '">' . 'View more Partner Press Releases</a><br/>' . the_time('F jS, Y') . '</span>'; } elseif (in_category(21)) { echo '<a href="' . get_category_link(21) . '">' . 'View more Press Releases from Technology Providers</a><br/>' . the_time('F jS, Y') . '</span>'; } else { $AltAuthorName = get_post_meta($postid, 'Alt Author Read More Name', $single = true); $AltAuthorLink = get_post_meta($postid, 'Alt Author Read More Link', $single = true); $AltDate = get_post_meta($postid, 'Alt Date', $single = true); if ($AltAuthorName != null) { if ($AltAuthorName == 'hide' or $AltAuthorName == '0') { //delete the line } else { if ($AltAuthorLink != null) { echo '<a href="' . $AuthorLink . '" title="' . $AltAuthorName . '" rel="author">' . $AltAuthorName . '</a><br />'; } else { echo $AltAuthorName; echo '<br />'; } } } else { ?> Read more by <?php the_author_posts_link(); echo '<br />'; } ?> <?php if ($AltDate != null) { if ($AltDate == 'hide' or $AltDate == '0') { //delete the line } else { echo $AltDate; //display custom date } } else { echo the_time('F jS, Y'); } } ?> </span> </div> <div style="clear:both"></div> <?php if (in_category(array(10223))) { echo '<div style="clear:both"></div><div style="display:block; float:right; font-size:9px; color:#333333; background-color:#FFFFFF;">(ADVERTISEMENT)</div>'; } ?> </div> <!--start slider dependents--> <!--end slider dependents--> <?php if ($showpagecontent == 1) { // Theme innerpage slider if (get_option('of_an_inslider') == 'Site Wide') { require_once GABFIRE_INC_PATH . '/theme-gallery.php'; } elseif (get_option('of_an_inslider') == 'Tag-based' && has_tag(get_option('of_an_inslider_tag')) or term_exists(get_option('of_an_inslider_tag', 'gallery-tag', ''))) { require_once GABFIRE_INC_PATH . '/theme-gallery.php'; } elseif (get_option('of_an_inslider') == 'Disable') { // do nothing } // If there is a video, display it gab_media(array('name' => 'gab-fea', 'enable_video' => 'true', 'video_id' => 'archive', 'catch_image' => 'false', 'enable_thumb' => 'false', 'media_width' => '483', 'media_height' => '300', 'thumb_align' => 'aligncenter', 'enable_default' => 'false')); // Display content the_content(); $ContactName = get_post_meta($postid, 'Contact Name', $single = true); $ContactEmail = get_post_meta($postid, 'Contact Email', $single = true); $ContactPhone = get_post_meta($postid, 'Contact Phone', $single = true); $ContactURL = get_post_meta($postid, 'Contact URL', $single = true); if ($ContactURL != null) { if (!preg_match("#^http://www\\.[a-z0-9-_.]+\\.[a-z]{2,4}\$#i", $ContactURL)) { $ContactURL = 'http://' . $ContactURL; } } $GrantOrg = get_post_meta($postid, 'Grant Org', $single = true); if ($ContactName != null || $ContactEmail != null || $ContactPhone != null || $ContactURL != null || $GrantOrg != null) { ?> <blockquote> <strong>Contact Information</strong><hr /> <ul> <?php $Eligibility = get_post_meta($postid, 'Eligibility', $single = true); $GrantDeadline = get_post_meta($postid, 'Grant Deadline', $single = true); $GrantHeadline = get_post_meta($postid, 'Grant Headline', $single = true); $GrantValue = get_post_meta($postid, 'Grant Value', $single = true); if ($GrantOrg != null) { echo '<li><strong>Grant Organization: </strong>' . $GrantOrg . '</li>'; } if ($ContactName != null) { echo '<li><strong>Contact Name: </strong>' . $ContactName . '</li>'; } if ($ContactPhone != null) { echo '<li><strong>Contact Phone: </strong>' . $ContactPhone . '</li>'; } if ($ContactEmail != null) { echo '<li><strong>Contact Email: </strong>' . $ContactEmail . '</li>'; } if ($ContactURL != null) { echo '<li><strong>Contact URL: </strong><a href="' . $ContactURL . '" target="_blank" alt="Grant Link">' . substr($ContactURL, 0, 30) . '</a>...</li>'; } if ($Eligibility != null) { echo '<li><strong>Eligibility: </strong>' . $Eligibility . '</li>'; } if ($GrantDeadline != null) { $grantdatetime = date_create($GrantDeadline); echo '<li><strong>Grant Deadline: </strong>' . $grantdatetime->format('l F jS, Y') . '</li>'; } if ($GrantValue != null) { echo '<li><strong>Grant Value: </strong>' . $GrantValue . '</li>'; } echo '</ul></blockquote>'; } // make sure any advanceded content gets cleared echo '<div class="clear"></div>'; // Display pagination echo '<div align="left" style="border-top: 1px solid #ccc; width:100%; float:left; font-size:20px; font-weight:bold; line-height:30px;">'; if ($astused > 1) { enhanced_link_pages(array('blink' => '', 'alink' => ' ', 'before' => '', 'after' => '', 'next_or_number' => 'both', 'afterhref' => 'ast=' . $astused . '&astc=' . $astc)); } else { enhanced_link_pages(array('blink' => '', 'alink' => ' ', 'before' => '', 'after' => '', 'next_or_number' => 'both')); } echo '</div>'; ?> <div style="clear:both"></div> <?php // Post Widget gab_dynamic_sidebar('PostWidget'); ?> <?php } else { ?> <p><?php print string_limit_words(get_the_excerpt(), 350); ?> ...</p> <div style="border:#CCCCCC solid 1px; padding:10px;"> <form action="<?php echo get_option('home'); ?> /wp-login.php" method="post"> <table style="width:100%;"> <tr><td colspan="2"><p><strong>Free registration required to continue reading this article.</strong></p></td></tr> <tr><td style="width:45%; padding-right:10px; border-right:1px solid #666"> Register today and receive free access to all our news and resources and the ability to customize your news by topic with My eSchool News.<br /><br /> <a href="<?php echo get_option('home'); ?> /wp-login.php?action=register&redirect_to=?redirect_to=<?php echo urlencode(get_permalink()); ?> " style="text-decoration:underline;"><strong>Register now.</strong></a> </td> <td style="width:55%; padding-left:10px"> Already a member? Log in <div>Username: <input type="text" name="log" id="log" value="" /></div> <div>Password:  <input name="pwd" id="pwd" type="password" value="" /></div> <input type="submit" name="submit" value="Login" class="button"> <input name="rememberme" id="rememberme" type="hidden" checked="checked" value="forever"> <input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?> "> <br /> <a href="<?php echo get_option('home'); ?> /wp-login.php?action=lostpassword" target="_blank">Lost Password?</a> </td></tr></table> </form> </div> <?php } //end showpagecontent check ?> </div><!-- .entry --> <?php }
function bfa_postinfo($postinfo_string) { // one theme option needed below for nofollow trackback / RSS links yes/no global $bfa_ata, $post; /* replace date format escape placeholders(#) with the actual escpae character (=backslashes). This function removes all backslashes from post info strings to avoid issues with hosts that have magic_quotes_gpc ON. But we want to keep the backslashes inside date items, because they are needed to escape literal strings inside dates */ $postinfo_string = str_replace("#", "\\", $postinfo_string); $postinfo = $postinfo_string; // Author public name if (strpos($postinfo_string, '%author%') !== FALSE) { ob_start(); the_author(); $author = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author%", $author, $postinfo); } // Public name of Author who last modified a post, since WordPress 2.8. // Check first if function is available (= if this is WP 2.8+) if (function_exists('the_modified_author')) { if (strpos($postinfo_string, '%modified-author%') !== FALSE) { ob_start(); the_modified_author(); $modified_author = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%modified-author%", $modified_author, $postinfo); } } // Author about yourself if (strpos($postinfo_string, '%author-description%') !== FALSE) { ob_start(); the_author_meta('description'); $author_description = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-description%", $author_description, $postinfo); } // Author login name if (strpos($postinfo_string, '%author-login%') !== FALSE) { ob_start(); the_author_meta('user_login'); $author_login = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-login%", $author_login, $postinfo); } // Author first name if (strpos($postinfo_string, '%author-firstname%') !== FALSE) { ob_start(); the_author_meta('first_name'); $author_firstname = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-firstname%", $author_firstname, $postinfo); } // Author last name if (strpos($postinfo_string, '%author-lastname%') !== FALSE) { ob_start(); the_author_meta('last_name'); $author_lastname = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-lastname%", $author_lastname, $postinfo); } // Author nickname if (strpos($postinfo_string, '%author-nickname%') !== FALSE) { ob_start(); the_author_meta('nickname'); $author_nickname = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-nickname%", $author_nickname, $postinfo); } // Author ID if (strpos($postinfo_string, '%author-id%') !== FALSE) { ob_start(); the_author_meta('ID'); $author_ID = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-id%", $author_ID, $postinfo); } // Author email address, clear text in HTML source code if (strpos($postinfo_string, '%author-email-clear%') !== FALSE) { ob_start(); the_author_meta('email'); $author_email_clear = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-email-clear%", $author_email_clear, $postinfo); } // Author email address obfuscated if (strpos($postinfo_string, '%author-email%') !== FALSE) { $postinfo = str_replace("%author-email%", antispambot(get_the_author_email()), $postinfo); } // Author website URL if (strpos($postinfo_string, '%author-url%') !== FALSE) { ob_start(); the_author_meta('url'); $author_url = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-url%", $author_url, $postinfo); } // Author website link if (strpos($postinfo_string, '%author-link%') !== FALSE) { ob_start(); the_author_link(); $author_link = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-link%", $author_link, $postinfo); } // Author posts archive link if (strpos($postinfo_string, '%author-posts-link%') !== FALSE) { ob_start(); the_author_posts_link(); $author_posts_link = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-posts-link%", $author_posts_link, $postinfo); } // LEGACY: %author-linked% replaced by %author-posts-link% in 3.3.2, but displays the same: Author posts archive link if (strpos($postinfo_string, '%author-linked%') !== FALSE) { ob_start(); the_author_posts_link(); $author_posts_link = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-linked%", $author_posts_link, $postinfo); } // Author post count if (strpos($postinfo_string, '%author-post-count%') !== FALSE) { ob_start(); the_author_posts(); $author_post_count = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-post-count%", $author_post_count, $postinfo); } // Author AOL Instant Messenger screenname if (strpos($postinfo_string, '%author-aim%') !== FALSE) { ob_start(); the_author_meta('aim'); $author_aim = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-aim%", $author_aim, $postinfo); } // Author Yahoo IM ID if (strpos($postinfo_string, '%author-yim%') !== FALSE) { ob_start(); the_author_meta('yim'); $author_yim = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%author-yim%", $author_yim, $postinfo); } // Date & Time if (strpos($postinfo_string, '%date(') !== FALSE) { $postinfo = preg_replace_callback("/%date\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_callback", $postinfo); } // Date & Time, last modified if (strpos($postinfo_string, '%date-modified(') !== FALSE) { $postinfo = preg_replace_callback("/%date-modified\\((.*?)'(.*?)'(.*?)\\)%/is", "bfa_parse_date_modified_callback", $postinfo); } // Tags, linked - since WP 2.3 if (strpos($postinfo_string, '%tags-linked') !== FALSE) { while (strpos($postinfo, '%tags-linked') !== FALSE) { $tag_link_options = preg_match("/(.*)%tags-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches); $tags_linked = get_the_tag_list($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]); $postinfo = preg_replace("/(.*)%tags-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_linked . "\${3}", $postinfo); } } // Tags, linked. If post has no tags, categories are displayed instead - since WP 2.3 if (strpos($postinfo_string, '%tags-cats-linked') !== FALSE) { while (strpos($postinfo, '%tags-cats-linked') !== FALSE) { $tag_link_options = preg_match("/(.*)%tags-cats-linked\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_link_matches); ob_start(); the_tags($tag_link_matches[2], $tag_link_matches[4], $tag_link_matches[6]); $tags_cats_linked = ob_get_contents(); ob_end_clean(); $postinfo = preg_replace("/(.*)%tags-cats-linked\\((.*?)\\)%(.*)/i", "\${1}" . $tags_cats_linked . "\${3}", $postinfo); } } // Tags, not linked - since WP 2.3 if (strpos($postinfo_string, '%tags(') !== FALSE) { while (strpos($postinfo, '%tags(') !== FALSE) { $tag_options = preg_match("/(.*)%tags\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $tag_matches); $posttags = get_the_tags(); if ($posttags) { foreach ($posttags as $tag) { $tag_list .= $tag->name . $tag_matches[4]; } // remove last separator $tag_list = preg_replace("/" . $tag_matches[4] . "\$/mi", "", $tag_list); $tags = $tag_matches[2] . $tag_list . $tag_matches[6]; } else { $tags = ""; } $postinfo = preg_replace("/(.*)%tags\\((.*?)\\)%(.*)/i", "\${1}" . $tags . "\${3}", $postinfo); } } // 1st category if (strpos($postinfo_string, '%category%') !== FALSE) { $all_categories = get_the_category(); $category = $all_categories[0]->cat_name; $category_notlinked = $category; $postinfo = str_replace("%category%", $category_notlinked, $postinfo); } // 1st category, linked if (strpos($postinfo_string, '%category-linked%') !== FALSE) { $all_categories = get_the_category(); $category = $all_categories[0]->cat_name; $category_linked = '<a class="' . $category . '" href="' . get_category_link($all_categories[0]->cat_ID) . '">' . $category . '</a>'; $postinfo = str_replace("%category-linked%", $category_linked, $postinfo); } // Categories, linked with class name added $categories_linked = ''; if (strpos($postinfo_string, '%categories-linked') !== FALSE) { while (strpos($postinfo, '%categories-linked') !== FALSE) { $category_linked_separator = preg_match("/(.*)%categories-linked\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_linked_matches); ob_start(); $categories = get_the_category(); $items_in_categories = count($categories); $output = ''; $categories_count = $items_in_categories; if ($categories) { foreach ($categories as $category) { $categories_count -= 1; if ($categories_count) { $seperator = $category_linked_matches[2]; } else { $seperator = ''; } $categories_linked .= '<a class="' . $category->slug . '" href="' . get_category_link($category->term_id) . '" title="' . esc_attr(sprintf(__("View all posts in %s"), $category->name)) . '">' . $category->cat_name . $seperator . '</a>'; } } ob_end_clean(); $postinfo = preg_replace("/(.*)%categories-linked\\((.*?)\\)%(.*)/i", "\${1}" . $categories_linked . "\${3}", $postinfo); } } // Categories, not linked if (strpos($postinfo_string, '%categories(') !== FALSE) { while (strpos($postinfo, '%categories(') !== FALSE) { $category_separator = preg_match("/(.*)%categories\\('(.*?)'\\)(.*)/i", $postinfo_string, $category_matches); $categories = ""; foreach (get_the_category() as $category) { $categories .= $category->cat_name . $category_matches[2]; } // remove last separator $categories = preg_replace("/" . $category_matches[2] . "\$/mi", "", $categories); $postinfo = preg_replace("/(.*)%categories\\((.*?)\\)%(.*)/i", "\${1}" . $categories . "\${3}", $postinfo); } } // Comment link if (strpos($postinfo_string, '%comments(') !== FALSE) { while (strpos($postinfo, '%comments(') !== FALSE) { $comment_options = preg_match("/(.*)%comments\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $comment_matches); if (!comments_open() and $comment_matches[8] == "dontshow") { $comment_link = ''; } else { ob_start(); comments_popup_link($comment_matches[2], $comment_matches[4], $comment_matches[6], 'comments-link', $comment_matches[8]); $comment_link = ob_get_contents(); ob_end_clean(); } if (!comments_open()) { if ($post->comment_count == 0) { $comment_link = '<strong>' . $comment_matches[8] . '</strong>'; } else { $comment_link = $comment_link . ' - <strong>(' . $comment_matches[8] . ')</strong>'; } } if (!comments_open() and $comment_matches[8] == "dontshow") { $comment_link = ''; } $postinfo = preg_replace("/(.*)%comments\\((.*?)\\)%(.*)/i", "\${1}" . $comment_link . "\${3}", $postinfo); } } // Comments Feed link if (strpos($postinfo_string, '%comments-rss') !== FALSE) { while (strpos($postinfo, '%comments-rss') !== FALSE) { $comments_rss_link_text = preg_match("/(.*)%comments-rss\\('(.*?)'(.*)/i", $postinfo_string, $comments_rss_matches); ob_start(); post_comments_feed_link($comments_rss_matches[2]); $comments_rss_link = ob_get_contents(); ob_end_clean(); // make link nofollow if set in theme options if ($bfa_ata['nofollow'] == "Yes") { $comments_rss_link = str_replace('href=', 'rel="nofollow" href=', $comments_rss_link); } $postinfo = preg_replace("/(.*)%comments-rss\\((.*?)\\)%(.*)/i", "\${1}" . $comments_rss_link . "\${3}", $postinfo); } } // Trackback URL if (strpos($postinfo_string, '%trackback%') !== FALSE) { $trackback_url = trackback_url(FALSE); $postinfo = str_replace("%trackback%", $trackback_url, $postinfo); } // Trackback Link if (strpos($postinfo_string, '%trackback-linked(') !== FALSE) { while (strpos($postinfo, '%trackback-linked(') !== FALSE) { $trackback_url = trackback_url(FALSE); $trackback_link_text = preg_match("/(.*)%trackback-linked\\('(.*?)'(.*)/i", $postinfo_string, $trackback_matches); $trackback_link = '<a href="' . $trackback_url . '">' . $trackback_matches[2] . '</a>'; // make link nofollow if set in theme options if ($bfa_ata['nofollow'] == "Yes") { $trackback_link = str_replace('href=', 'rel="nofollow" href=', $trackback_link); } $postinfo = preg_replace("/(.*)%trackback-linked\\((.*?)\\)%(.*)/i", "\${1}" . $trackback_link . "\${3}", $postinfo); } } // Trackback RDF if (strpos($postinfo_string, '%trackback-rdf%') !== FALSE) { ob_start(); trackback_rdf(); $trackback_rdf = "<!-- " . ob_get_contents() . " -->"; ob_end_clean(); $postinfo = str_replace("%trackback-rdf%", $trackback_rdf, $postinfo); } // Permalink if (strpos($postinfo_string, '%permalink%') !== FALSE) { ob_start(); the_permalink(); $permalink = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%permalink%", $permalink, $postinfo); } // Post ID if (strpos($postinfo_string, '%post-id%') !== FALSE) { ob_start(); the_ID(); $post_id = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%post-id%", $post_id, $postinfo); } // Post Title if (strpos($postinfo_string, '%post-title%') !== FALSE) { ob_start(); the_title(); $post_title = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%post-title%", $post_title, $postinfo); } // Edit post if (strpos($postinfo_string, '%edit(') !== FALSE) { while (strpos($postinfo, '%edit(') !== FALSE) { $edit_options = preg_match("/(.*)%edit\\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i", $postinfo_string, $edit_matches); ob_start(); edit_post_link($edit_matches[4], $edit_matches[2], $edit_matches[6]); $edit_link = ob_get_contents(); ob_end_clean(); $postinfo = preg_replace("/(.*)%edit\\((.*?)\\)%(.*)/i", "\${1}" . $edit_link . "\${3}", $postinfo); } } // Print if (strpos($postinfo_string, '%print(') !== FALSE) { while (strpos($postinfo, '%print(') !== FALSE) { $print_text = preg_match("/(.*)%print\\('(.*?)'(.*)/i", $postinfo_string, $print_text_matches); $print_link = '<a href="javascript:window.print()">' . $print_text_matches[2] . '</a>'; $postinfo = preg_replace("/(.*)%print\\((.*?)\\)%(.*)/i", "\${1}" . $print_link . "\${3}", $postinfo); } } // For the "WP-Email" plugin if (strpos($postinfo_string, '%wp-email%') !== FALSE) { $wp_email = function_exists('wp_email') ? email_link($email_post_text = '', $email_page_text = '', $echo = FALSE) : ""; $postinfo = str_replace("%wp-email%", $wp_email, $postinfo); } // For the "WP-Print" plugin if (strpos($postinfo_string, '%wp-print%') !== FALSE) { $wp_print = function_exists('wp_print') ? print_link($print_post_text = '', $print_page_text = '', $echo = FALSE) : ""; $postinfo = str_replace("%wp-print%", $wp_print, $postinfo); } // For the "WP-PostViews" plugin if (strpos($postinfo_string, '%wp-postviews%') !== FALSE) { $wp_postviews = function_exists('the_views') ? the_views($display = FALSE) : ""; $postinfo = str_replace("%wp-postviews%", $wp_postviews, $postinfo); } // For the "WP-PostRatings" plugin if (strpos($postinfo_string, '%wp-postratings%') !== FALSE) { $wp_postratings = function_exists('the_ratings') ? the_ratings($start_tag = 'span', $custom_id = 0, $display = FALSE) : ""; $postinfo = str_replace("%wp-postratings%", $wp_postratings, $postinfo); } // For the "Sociable" plugin if (strpos($postinfo_string, '%sociable%') !== FALSE) { ob_start(); $sociable = (function_exists('sociable_html2') and function_exists(do_sociable())) ? do_sociable() : ""; $sociable = ob_get_contents(); ob_end_clean(); $postinfo = str_replace("%sociable%", $sociable, $postinfo); } // For the "Share This" plugin if (strpos($postinfo_string, '%share-this%') !== FALSE) { ob_start(); if (function_exists('sharethis_button')) { sharethis_button(); $share_this = ob_get_contents(); } else { $share_this = ""; } ob_end_clean(); $postinfo = str_replace("%share-this%", $share_this, $postinfo); } // Images if (strpos($postinfo_string, '<image(') !== FALSE) { $postinfo = preg_replace_callback("|<image\\((.*?)\\)>|", "bfa_image_files", $postinfo); } /* The meta = ALL custom fields:values, formatted by Wordpress as unordered list <ul><li>..</li><li>..</li></ul> */ if (strpos($postinfo_string, '%meta%') !== FALSE) { ob_start(); the_meta(); $the_meta = ob_get_contents(); ob_end_clean(); // 3.4.3.: remove bfa_ata metas */ $the_meta = preg_replace("/<li>(.*)bfa_ata(.*)<\\/li>/i", "", $the_meta); $postinfo = str_replace("%meta%", $the_meta, $postinfo); } // Single post meta values, not formatted if (strpos($postinfo_string, '%meta(') !== FALSE) { $postinfo = preg_replace_callback("|%meta\\('(.*?)'\\)%|", "bfa_meta_value", $postinfo); } // Since 3.6.7, parse widget areas $postinfo = bfa_parse_widget_areas($postinfo); return $postinfo; }
function place_emaillink($content) { if (!is_feed()) { $content = str_replace("[email_link]", email_link('', '', false), $content); } else { $content = str_replace("[email_link]", __('Note: There is an email link embedded within this post, please visit this post to email it.', 'wp-email'), $content); } return $content; }
the_permalink(); ?> " rel="bookmark" title="<?php _e('Permalink a'); ?> <?php the_title(); ?> " class="permalink"><?php _e('Permalink'); ?> </a> <?php // add support for wp-email if (function_exists('wp_email')) { email_link('E-Mail to a friend', 'E-Mail to a friend', ' class="permalink"'); } ?> </p> </div> <?php comments_template(); ?> <?php } } else { ?> <h2><?php
/** * Called to display important links for single posts * @since 1.3.3 */ function arras_postbar($echo = false) { global $post; $postbar .= '<ul class="postbar clearfix">'; $postbar .= '<li><a href="' . get_comments_link() . '">' . __('Comments', 'arras') . ' [' . get_comments_number() . ']</a></li>'; if (function_exists('wp_print')) { $postbar .= '<li>' . print_link('', '', false) . '</li>'; } if (function_exists('wp_email')) { $postbar .= '<li>' . email_link('', '', false) . '</li>'; } // Add social bookmarking buttons $postbar .= '<li><a href="http://digg.com/submit?phase=2&url=' . get_permalink() . '&title=' . get_the_title() . '">' . __('Digg it!', 'arras') . '</a></li>'; $postbar .= '<li><a href="http://www.facebook.com/share.php?u=' . get_permalink() . '&t=' . get_the_title() . '">' . __('Facebook', 'arras') . '</a></li>'; if (current_user_can('edit_post')) { $postbar .= '<li><a href="' . get_bloginfo('wpurl') . '/wp-admin/post.php?action=edit&post=' . $post->ID . '">' . __('Edit Post', 'arras') . '</a></li>'; } $postbar .= '</ul>'; if ($echo) { echo apply_filters('arras_postbar', $postbar); } else { return apply_filters('arras_postbar', $postbar); } }
function place_emaillink($content) { if (!is_feed()) { $content = str_replace("[email_link]", email_link('', '', false), $content); } else { $content = str_replace("[email_link]", __('Note: You can email this post by visiting the site.', 'wp-email'), $content); } return $content; }
function essays_post_metadata() { ?> <!-- START POST METADATA AND SHARING --> <div style="text-align: center;"> <span class="entry-meta"> <br> <em>If you enjoyed this, please share it with others:<br> Share on <a href="https://twitter.com/share?url=<?php the_permalink(); ?> &text=RT%20@RaamDev%20<?php the_title(); ?> " target="_new">Twitter</a>, <a href="https://www.facebook.com/sharer.php?u=<?php the_permalink(); ?> &t=<?php the_title(); ?> " target="_new">Facebook</a>, <a href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php the_permalink(); ?> " target="_new">Google+</a><?php if (function_exists('wp_email') && 'post' == get_post_type()) { echo ', or '; email_link(); } ?> <!-- <a href="#" target="_new">Send via Email</a>--></em> <!-- <?php if (get_post_type() == 'post') { ?> <br />Filed in <?php the_category(', '); } if (has_tag()) { ?> , and tagged <?php the_tags('', ', ', ''); ?> <?php } ?> --> </span> </div> <!-- END POST METADATA AND SHARING --> <?php }