Make WordPress Core

Changeset 53792


Ignore:
Timestamp:
07/29/2022 08:12:27 AM (2 years ago)
Author:
audrasjb
Message:

Docs: Various docblock improvements in Export Administration API, as per docs standards.

See #55646.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/export.php

    r53455 r53792  
    3232 *     Optional. Arguments for generating the WXR export file for download. Default empty array.
    3333 *
    34  *     @type string $content        Type of content to export. If set, only the post content of this post type
    35  *                                  will be exported. Accepts 'all', 'post', 'page', 'attachment', or a defined
    36  *                                  custom post. If an invalid custom post type is supplied, every post type for
    37  *                                  which `can_export` is enabled will be exported instead. If a valid custom post
    38  *                                  type is supplied but `can_export` is disabled, then 'posts' will be exported
    39  *                                  instead. When 'all' is supplied, only post types with `can_export` enabled will
    40  *                                  be exported. Default 'all'.
    41  *     @type string $author         Author to export content for. Only used when `$content` is 'post', 'page', or
    42  *                                  'attachment'. Accepts false (all) or a specific author ID. Default false (all).
    43  *     @type string $category       Category (slug) to export content for. Used only when `$content` is 'post'. If
    44  *                                  set, only post content assigned to `$category` will be exported. Accepts false
    45  *                                  or a specific category slug. Default is false (all categories).
    46  *     @type string $start_date     Start date to export content from. Expected date format is 'Y-m-d'. Used only
    47  *                                  when `$content` is 'post', 'page' or 'attachment'. Default false (since the
    48  *                                  beginning of time).
    49  *     @type string $end_date       End date to export content to. Expected date format is 'Y-m-d'. Used only when
    50  *                                  `$content` is 'post', 'page' or 'attachment'. Default false (latest publish date).
    51  *     @type string $status         Post status to export posts for. Used only when `$content` is 'post' or 'page'.
    52  *                                  Accepts false (all statuses except 'auto-draft'), or a specific status, i.e.
    53  *                                  'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', or
    54  *                                  'trash'. Default false (all statuses except 'auto-draft').
     34 *     @type string $content    Type of content to export. If set, only the post content of this post type
     35 *                              will be exported. Accepts 'all', 'post', 'page', 'attachment', or a defined
     36 *                              custom post. If an invalid custom post type is supplied, every post type for
     37 *                              which `can_export` is enabled will be exported instead. If a valid custom post
     38 *                              type is supplied but `can_export` is disabled, then 'posts' will be exported
     39 *                              instead. When 'all' is supplied, only post types with `can_export` enabled will
     40 *                              be exported. Default 'all'.
     41 *     @type string $author     Author to export content for. Only used when `$content` is 'post', 'page', or
     42 *                              'attachment'. Accepts false (all) or a specific author ID. Default false (all).
     43 *     @type string $category   Category (slug) to export content for. Used only when `$content` is 'post'. If
     44 *                              set, only post content assigned to `$category` will be exported. Accepts false
     45 *                              or a specific category slug. Default is false (all categories).
     46 *     @type string $start_date Start date to export content from. Expected date format is 'Y-m-d'. Used only
     47 *                              when `$content` is 'post', 'page' or 'attachment'. Default false (since the
     48 *                              beginning of time).
     49 *     @type string $end_date   End date to export content to. Expected date format is 'Y-m-d'. Used only when
     50 *                              `$content` is 'post', 'page' or 'attachment'. Default false (latest publish date).
     51 *     @type string $status     Post status to export posts for. Used only when `$content` is 'post' or 'page'.
     52 *                              Accepts false (all statuses except 'auto-draft'), or a specific status, i.e.
     53 *                              'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', or
     54 *                              'trash'. Default false (all statuses except 'auto-draft').
    5555 * }
    5656 */
     
    190190
    191191    /**
    192      * Wrap given string in XML CDATA tag.
     192     * Wraps given string in XML CDATA tag.
    193193     *
    194194     * @since 2.1.0
     
    208208
    209209    /**
    210      * Return the URL of the site
     210     * Returns the URL of the site.
    211211     *
    212212     * @since 2.5.0
     
    225225
    226226    /**
    227      * Output a cat_name XML tag from a given category object
     227     * Outputs a cat_name XML tag from a given category object.
    228228     *
    229229     * @since 2.1.0
    230230     *
    231      * @param WP_Term $category Category Object
     231     * @param WP_Term $category Category Object.
    232232     */
    233233    function wxr_cat_name( $category ) {
     
    240240
    241241    /**
    242      * Output a category_description XML tag from a given category object
     242     * Outputs a category_description XML tag from a given category object.
    243243     *
    244244     * @since 2.1.0
    245245     *
    246      * @param WP_Term $category Category Object
     246     * @param WP_Term $category Category Object.
    247247     */
    248248    function wxr_category_description( $category ) {
     
    255255
    256256    /**
    257      * Output a tag_name XML tag from a given tag object
     257     * Outputs a tag_name XML tag from a given tag object.
    258258     *
    259259     * @since 2.3.0
    260260     *
    261      * @param WP_Term $tag Tag Object
     261     * @param WP_Term $tag Tag Object.
    262262     */
    263263    function wxr_tag_name( $tag ) {
     
    270270
    271271    /**
    272      * Output a tag_description XML tag from a given tag object
     272     * Outputs a tag_description XML tag from a given tag object.
    273273     *
    274274     * @since 2.3.0
    275275     *
    276      * @param WP_Term $tag Tag Object
     276     * @param WP_Term $tag Tag Object.
    277277     */
    278278    function wxr_tag_description( $tag ) {
     
    285285
    286286    /**
    287      * Output a term_name XML tag from a given term object
     287     * Outputs a term_name XML tag from a given term object.
    288288     *
    289289     * @since 2.9.0
    290290     *
    291      * @param WP_Term $term Term Object
     291     * @param WP_Term $term Term Object.
    292292     */
    293293    function wxr_term_name( $term ) {
     
    300300
    301301    /**
    302      * Output a term_description XML tag from a given term object
     302     * Outputs a term_description XML tag from a given term object.
    303303     *
    304304     * @since 2.9.0
    305305     *
    306      * @param WP_Term $term Term Object
     306     * @param WP_Term $term Term Object.
    307307     */
    308308    function wxr_term_description( $term ) {
     
    315315
    316316    /**
    317      * Output term meta XML tags for a given term object.
     317     * Outputs term meta XML tags for a given term object.
    318318     *
    319319     * @since 4.6.0
     
    346346
    347347    /**
    348      * Output list of authors with posts
     348     * Outputs list of authors with posts.
    349349     *
    350350     * @since 3.1.0
     
    385385
    386386    /**
    387      * Output all navigation menu terms
     387     * Outputs all navigation menu terms.
    388388     *
    389389     * @since 3.1.0
     
    406406
    407407    /**
    408      * Output list of taxonomy terms, in XML tag format, associated with a post
     408     * Outputs list of taxonomy terms, in XML tag format, associated with a post.
    409409     *
    410410     * @since 2.3.0
     
    425425
    426426    /**
    427      * @param bool   $return_me
    428      * @param string $meta_key
     427     * Determines whether to selectively skip post meta used for WXR exports.
     428     *
     429     * @since 3.3.0
     430     *
     431     * @param bool   $return_me Whether to skip the current post meta. Default false.
     432     * @param string $meta_key  Meta key.
    429433     * @return bool
    430434     */
Note: See TracChangeset for help on using the changeset viewer.