WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/09/2014 11:36:57 PM (6 years ago)
Author:
wonderboymusic
Message:

Add a filter and document it: playlist_styles. Allows users to roll their own playlist themes.

Props DrewAPicture for the docs.
See #26631.

File:
1 edited

Legend:

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

    r27486 r27488  
    11241124    }
    11251125
    1126     if ( ! in_array( $style, array( 'light', 'dark' ), true ) ) {
     1126    $playlist_styles = array(
     1127        'light' => _x( 'Light', 'light playlist theme' ),
     1128        'dark'  => _x( 'Dark', 'dark playlist theme' )
     1129    );
     1130
     1131    /**
     1132     * Filter the available playlist styles.
     1133     *
     1134     * @since 3.9.0
     1135     *
     1136     * @param array $playlist_styles Array of playlist styles. Defaults are 'light' and 'dark'.
     1137     */
     1138    $styles = apply_filters( 'playlist_styles', $playlist_styles );
     1139
     1140    if ( ! in_array( $style, array_keys( $styles ), true ) ) {
    11271141        $style = 'light';
    11281142    }
Note: See TracChangeset for help on using the changeset viewer.