]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/post-template.php
Wordpress 4.6
[autoinstalls/wordpress.git] / wp-includes / post-template.php
index 8085745199b330d807deaf73bbeef81a19f2d91e..be152523f0615a97e815fdc062a16fb1fd187dc9 100644 (file)
@@ -56,12 +56,12 @@ function the_title( $before = '', $after = '', $echo = true ) {
 /**
  * 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
  *
@@ -117,7 +117,7 @@ function get_the_title( $post = 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.
                         *
@@ -132,7 +132,7 @@ function get_the_title( $post = 0 ) {
                } 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.
                         *
@@ -148,7 +148,7 @@ function get_the_title( $post = 0 ) {
        }
 
        /**
-        * Filter the post title.
+        * Filters the post title.
         *
         * @since 0.71
         *
@@ -178,7 +178,7 @@ function the_guid( $post = 0 ) {
        $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
         *
@@ -209,7 +209,7 @@ function get_the_guid( $post = 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
         *
@@ -231,7 +231,7 @@ function the_content( $more_link_text = null, $strip_teaser = false) {
        $content = get_the_content( $more_link_text, $strip_teaser );
 
        /**
-        * Filter the post content.
+        * Filters the post content.
         *
         * @since 0.71
         *
@@ -262,8 +262,17 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
 
        $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&hellip;)' )
+               );
+       }
 
        $output = '';
        $has_teaser = false;
@@ -303,7 +312,7 @@ function get_the_content( $more_link_text = null, $strip_teaser = false ) {
                        if ( ! empty( $more_link_text ) )
 
                                /**
-                                * Filter the Read More link text.
+                                * Filters the Read More link text.
                                 *
                                 * @since 2.8.0
                                 *
@@ -342,7 +351,7 @@ function _convert_urlencoded_to_entities( $match ) {
 function the_excerpt() {
 
        /**
-        * Filter the displayed post excerpt.
+        * Filters the displayed post excerpt.
         *
         * @since 0.71
         *
@@ -364,7 +373,7 @@ function the_excerpt() {
  */
 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 );
@@ -377,7 +386,7 @@ function get_the_excerpt( $post = null ) {
        }
 
        /**
-        * Filter the retrieved post excerpt.
+        * Filters the retrieved post excerpt.
         *
         * @since 1.2.0
         * @since 4.5.0 Introduced the `$post` parameter.
@@ -415,15 +424,17 @@ function post_class( $class = '', $post_id = null ) {
 }
 
 /**
- * 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
@@ -521,7 +532,7 @@ function get_post_class( $class = '', $post_id = null ) {
        $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
         *
@@ -745,7 +756,7 @@ function get_body_class( $class = '' ) {
        $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
         *
@@ -841,7 +852,7 @@ function wp_link_pages( $args = '' ) {
        $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
         *
@@ -859,7 +870,7 @@ function wp_link_pages( $args = '' ) {
                                        $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
                                 *
@@ -897,7 +908,7 @@ function wp_link_pages( $args = '' ) {
        }
 
        /**
-        * Filter the HTML output of page links for paginated posts.
+        * Filters the HTML output of page links for paginated posts.
         *
         * @since 3.6.0
         *
@@ -994,7 +1005,7 @@ function the_meta() {
                        $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
                         *
@@ -1078,7 +1089,7 @@ function wp_dropdown_pages( $args = '' ) {
        }
 
        /**
-        * 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.
@@ -1154,7 +1165,7 @@ function wp_list_pages( $args = '' ) {
        $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
         *
@@ -1188,7 +1199,7 @@ function wp_list_pages( $args = '' ) {
        }
 
        /**
-        * 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.
@@ -1209,11 +1220,10 @@ function wp_list_pages( $args = '' ) {
 }
 
 /**
- * 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.
@@ -1254,7 +1264,7 @@ function wp_page_menu( $args = array() ) {
        $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
         *
@@ -1325,7 +1335,7 @@ function wp_page_menu( $args = array() ) {
        $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
         *
@@ -1407,7 +1417,7 @@ function walk_page_dropdown_tree() {
  */
 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);
@@ -1453,7 +1463,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
                $link_text = $_post->post_title;
 
        /**
-        * Filter a retrieved attachment page link.
+        * Filters a retrieved attachment page link.
         *
         * @since 2.7.0
         *
@@ -1503,7 +1513,7 @@ function prepend_attachment($content) {
        }
 
        /**
-        * 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
         *
@@ -1537,7 +1547,7 @@ function get_the_password_form( $post = 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
@@ -1621,7 +1631,7 @@ function wp_post_revision_title( $revision, $link = true ) {
        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' );
@@ -1657,7 +1667,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
                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 );
@@ -1684,7 +1694,7 @@ function wp_post_revision_title_expanded( $revision, $link = true ) {
                $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
         *
@@ -1714,7 +1724,7 @@ function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
        // $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 ) )