Make WordPress Core

Changeset 27240


Ignore:
Timestamp:
02/24/2014 07:41:24 PM (11 years ago)
Author:
DrewAPicture
Message:

Inline documentation improvements for wp_get_playlist().

  • Adds a missing @param description in the PHPDoc.
  • Adds hook documentation for the post_playlist filter.
  • Other comment cleanup.
File:
1 edited

Legend:

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

    r27239 r27240  
    942942 * @since 3.9.0
    943943 *
    944  * @param array $attr Attributes of the shortcode.
    945  * @return string $type Type of playlist. Defaults to audio, video is also supported
     944 * @param array  $attr Attributes of the shortcode.
     945 * @param string $type Type of playlist. Accepts 'audio' and 'video'.
     946 * @return string Playlist output. Empty string if the passed type is unsupported.
    946947 */
    947948function wp_get_playlist( $attr, $type ) {
     
    964965    }
    965966
    966     // Allow plugins/themes to override the default gallery template.
     967    /**
     968     * Filter the playlist output.
     969     *
     970     * Passing a non-empty value to the filter will short-circuit generation
     971     * of the default playlist output, returning the passed value instead.
     972     *
     973     * @since 3.9.0
     974     *
     975     * @param string $output Playlist output. Default empty.
     976     * @param array  $attr   Array of shortcode attributes.
     977     * @param string $type   Type of playlist to generate output for.
     978     */
    967979    $output = apply_filters( 'post_playlist', '', $attr, $type );
    968980    if ( $output != '' ) {
     
    970982    }
    971983
    972     // We're trusting author input, so let's at least make sure it looks like a valid orderby statement
     984    /*
     985     * We're trusting author input, so let's at least make sure it looks
     986     * like a valid orderby statement.
     987     */
    973988    if ( isset( $attr['orderby'] ) ) {
    974989        $attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );
Note: See TracChangeset for help on using the changeset viewer.