X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-includes/author-template.php
diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php
index 1e65baa1..2a894989 100644
--- a/wp-includes/author-template.php
+++ b/wp-includes/author-template.php
@@ -134,7 +134,7 @@ function the_author_meta($field = '', $user_id = false) {
*/
function get_the_author_link() {
if ( get_the_author_meta('url') ) {
- return '' . get_the_author() . '';
+ return '' . get_the_author() . '';
} else {
return get_the_author();
}
@@ -200,7 +200,7 @@ function the_author_posts_link($deprecated = '') {
return false;
$link = sprintf(
'%3$s',
- get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
+ esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
get_the_author()
);
@@ -244,7 +244,7 @@ function get_author_posts_url($author_id, $author_nicename = '') {
*
optioncount (boolean) (false): Show the count in parenthesis next to the
* author's name.
* exclude_admin (boolean) (true): Exclude the 'admin' user that is
- * installed bydefault.
+ * installed by default.
* show_fullname (boolean) (false): Show their full names.
* hide_empty (boolean) (true): Don't show authors without any posts.
* feed (string) (''): If isn't empty, show links to author's feeds.
@@ -372,10 +372,10 @@ function wp_list_authors($args = '') {
function is_multi_author() {
global $wpdb;
- if ( false === ( $is_multi_author = wp_cache_get('is_multi_author', 'posts') ) ) {
+ if ( false === ( $is_multi_author = get_transient( 'is_multi_author' ) ) ) {
$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");
$is_multi_author = 1 < count( $rows ) ? 1 : 0;
- wp_cache_set('is_multi_author', $is_multi_author, 'posts');
+ set_transient( 'is_multi_author', $is_multi_author );
}
return apply_filters( 'is_multi_author', (bool) $is_multi_author );
@@ -387,6 +387,6 @@ function is_multi_author() {
* @private
*/
function __clear_multi_author_cache() {
- wp_cache_delete('is_multi_author', 'posts');
+ delete_transient( 'is_multi_author' );
}
add_action('transition_post_status', '__clear_multi_author_cache');