/**
* Sanitize the current title when retrieving or displaying.
*
- * Works like {@link the_title()}, except the parameters can be in a string or
+ * Works like the_title(), except the parameters can be in a string or
* an array. See the function for what can be override in the $args parameter.
*
- * The title before it is displayed will have the tags stripped and {@link
- * esc_attr()} before it is passed to the user or displayed. The default
- * as with {@link the_title()}, is to display the title.
+ * The title before it is displayed will have the tags stripped and esc_attr()
+ * before it is passed to the user or displayed. The default as with the_title(),
+ * is to display the title.
*
* @since 2.3.0
*
if ( ! empty( $post->post_password ) ) {
/**
- * Filter the text prepended to the post title for protected posts.
+ * Filters the text prepended to the post title for protected posts.
*
* The filter is only applied on the front end.
*
} elseif ( isset( $post->post_status ) && 'private' == $post->post_status ) {
/**
- * Filter the text prepended to the post title of private posts.
+ * Filters the text prepended to the post title of private posts.
*
* The filter is only applied on the front end.
*
}
/**
- * Filter the post title.
+ * Filters the post title.
*
* @since 0.71
*
$id = isset( $post->ID ) ? $post->ID : 0;
/**
- * Filter the escaped Global Unique Identifier (guid) of the post.
+ * Filters the escaped Global Unique Identifier (guid) of the post.
*
* @since 4.2.0
*
$id = isset( $post->ID ) ? $post->ID : 0;
/**
- * Filter the Global Unique Identifier (guid) of the post.
+ * Filters the Global Unique Identifier (guid) of the post.
*
* @since 1.5.0
*
$content = get_the_content( $more_link_text, $strip_teaser );
/**
- * Filter the post content.
+ * Filters the post content.
*
* @since 0.71
*
$post = get_post();
- if ( null === $more_link_text )
- $more_link_text = __( '(more…)' );
+ if ( null === $more_link_text ) {
+ $more_link_text = sprintf(
+ '<span aria-label="%1$s">%2$s</span>',
+ sprintf(
+ /* translators: %s: Name of current post */
+ __( 'Continue reading %s' ),
+ the_title_attribute( array( 'echo' => false ) )
+ ),
+ __( '(more…)' )
+ );
+ }
$output = '';
$has_teaser = false;
if ( ! empty( $more_link_text ) )
/**
- * Filter the Read More link text.
+ * Filters the Read More link text.
*
* @since 2.8.0
*
function the_excerpt() {
/**
- * Filter the displayed post excerpt.
+ * Filters the displayed post excerpt.
*
* @since 0.71
*
*/
function get_the_excerpt( $post = null ) {
if ( is_bool( $post ) ) {
- _deprecated_argument( __FUNCTION__, '2.3' );
+ _deprecated_argument( __FUNCTION__, '2.3.0' );
}
$post = get_post( $post );
}
/**
- * Filter the retrieved post excerpt.
+ * Filters the retrieved post excerpt.
*
* @since 1.2.0
* @since 4.5.0 Introduced the `$post` parameter.
}
/**
- * Retrieve the classes for the post div as an array.
+ * Retrieves the classes for the post div as an array.
*
* The class names are many. If the post is a sticky, then the 'sticky'
* class name. The class 'hentry' is always added to each post. If the post has a
* post thumbnail, 'has-post-thumbnail' is added as a class. For each taxonomy that
* the post belongs to, a class will be added of the format '{$taxonomy}-{$slug}' -
- * eg 'category-foo' or 'my_custom_taxonomy-bar'. The 'post_tag' taxonomy is a special
+ * eg 'category-foo' or 'my_custom_taxonomy-bar'.
+ *
+ * The 'post_tag' taxonomy is a special
* case; the class has the 'tag-' prefix instead of 'post_tag-'. All classes are
- * passed through the filter, 'post_class' with the list of classes, followed by
+ * passed through the filter, {@see 'post_class'}, with the list of classes, followed by
* $class parameter value, with the post ID as the last parameter.
*
* @since 2.7.0
$classes = array_map( 'esc_attr', $classes );
/**
- * Filter the list of CSS classes for the current post.
+ * Filters the list of CSS classes for the current post.
*
* @since 2.7.0
*
$classes = array_map( 'esc_attr', $classes );
/**
- * Filter the list of CSS body classes for the current post or page.
+ * Filters the list of CSS body classes for the current post or page.
*
* @since 2.8.0
*
$params = wp_parse_args( $args, $defaults );
/**
- * Filter the arguments used in retrieving page links for paginated posts.
+ * Filters the arguments used in retrieving page links for paginated posts.
*
* @since 3.0.0
*
$link = _wp_link_page( $i ) . $link . '</a>';
}
/**
- * Filter the HTML output of individual page number links.
+ * Filters the HTML output of individual page number links.
*
* @since 3.6.0
*
}
/**
- * Filter the HTML output of page links for paginated posts.
+ * Filters the HTML output of page links for paginated posts.
*
* @since 3.6.0
*
$value = implode($values,', ');
/**
- * Filter the HTML output of the li element in the post custom fields list.
+ * Filters the HTML output of the li element in the post custom fields list.
*
* @since 2.2.0
*
}
/**
- * Filter the HTML output of a list of pages as a drop down.
+ * Filters the HTML output of a list of pages as a drop down.
*
* @since 2.1.0
* @since 4.4.0 `$r` and `$pages` added as arguments.
$exclude_array = ( $r['exclude'] ) ? explode( ',', $r['exclude'] ) : array();
/**
- * Filter the array of pages to exclude from the pages list.
+ * Filters the array of pages to exclude from the pages list.
*
* @since 2.1.0
*
}
/**
- * Filter the HTML output of the pages to list.
+ * Filters the HTML output of the pages to list.
*
* @since 1.5.1
* @since 4.4.0 `$pages` added as arguments.
}
/**
- * Display or retrieve list of pages with optional home link.
+ * Displays or retrieves a list of pages with an optional home link.
*
- * The arguments are listed below and part of the arguments are for {@link
- * wp_list_pages()} function. Check that function for more info on those
- * arguments.
+ * The arguments are listed below and part of the arguments are for wp_list_pages()} function.
+ * Check that function for more info on those arguments.
*
* @since 2.7.0
* @since 4.4.0 Added `menu_id`, `container`, `before`, `after`, and `walker` arguments.
$args = wp_parse_args( $args, $defaults );
/**
- * Filter the arguments used to generate a page-based menu.
+ * Filters the arguments used to generate a page-based menu.
*
* @since 2.7.0
*
$menu = "<{$container}{$attrs}>" . $menu . "</{$container}>\n";
/**
- * Filter the HTML output of a page-based menu.
+ * Filters the HTML output of a page-based menu.
*
* @since 2.7.0
*
*/
function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
if ( !empty( $deprecated ) )
- _deprecated_argument( __FUNCTION__, '2.5' );
+ _deprecated_argument( __FUNCTION__, '2.5.0' );
if ( $fullsize )
echo wp_get_attachment_link($id, 'full', $permalink);
$link_text = $_post->post_title;
/**
- * Filter a retrieved attachment page link.
+ * Filters a retrieved attachment page link.
*
* @since 2.7.0
*
* @param bool $icon Whether to include an icon. Default false.
* @param string|bool $text If string, will be link text. Default false.
*/
- return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
+ return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
}
/**
}
/**
- * Filter the attachment markup to be prepended to the post content.
+ * Filters the attachment markup to be prepended to the post content.
*
* @since 2.0.0
*
';
/**
- * Filter the HTML output for the protected post password form.
+ * Filters the HTML output for the protected post password form.
*
* If modifying the password field, please note that the core database schema
* limits the password field to 20 characters regardless of the value of the
if ( !in_array( $revision->post_type, array( 'post', 'page', 'revision' ) ) )
return false;
- /* translators: revision date format, see http://php.net/date */
+ /* translators: revision date format, see https://secure.php.net/date */
$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
/* translators: 1: date */
$autosavef = _x( '%1$s [Autosave]', 'post revision title extra' );
return false;
$author = get_the_author_meta( 'display_name', $revision->post_author );
- /* translators: revision date format, see http://php.net/date */
+ /* translators: revision date format, see https://secure.php.net/date */
$datef = _x( 'F j, Y @ H:i:s', 'revision date format' );
$gravatar = get_avatar( $revision->post_author, 24 );
$revision_date_author = sprintf( $autosavef, $revision_date_author );
/**
- * Filter the formatted author and date for a revision.
+ * Filters the formatted author and date for a revision.
*
* @since 4.4.0
*
// $args array with (parent, format, right, left, type) deprecated since 3.6
if ( is_array( $type ) ) {
$type = ! empty( $type['type'] ) ? $type['type'] : $type;
- _deprecated_argument( __FUNCTION__, '3.6' );
+ _deprecated_argument( __FUNCTION__, '3.6.0' );
}
if ( ! $revisions = wp_get_post_revisions( $post->ID ) )