Plugin Directory

Changeset 646109


Ignore:
Timestamp:
12/30/2012 05:28:33 PM (13 years ago)
Author:
two7s_clash
Message:

list mode added

Location:
jetpack-easy-playlists/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • jetpack-easy-playlists/trunk/jetpack_easy_playlists.php

    r566171 r646109  
    128128        $urls = $titles = $artists = array();
    129129        $pidset = false;
     130        $list = "";
    130131       
    131132       
     
    175176        $comma_separated_artists = implode(",", $artists);
    176177       
     178        // output song info?
     179       
     180        if ( isset($atts['print']) ) {
     181            foreach ($titles as $key => $value) {
     182                $list .= "<li>" .$value ." &mdash; ".$artists[$key] ."</li>";
     183            }
     184            if ($atts['print'] == 'ol') {
     185                $list = '<ol>'.$list.'</ol>';
     186            }
     187            else {
     188                $list = '<ul>'.$list.'</ul>';
     189            }
     190        }
     191       
     192       
     193       
    177194        //give data to jetpack
    178195        $playlist = do_shortcode('[audio '.$comma_separated_urls.'|titles='.$comma_separated_titles.'|artists='.$comma_separated_artists.'|'.$results.']');
    179196        //write generated shortcode to comment, in case you need to put it somewhere else
    180197        $shortcode = '<!-- audio shortcode is [audio '.$comma_separated_urls.'|titles='.$comma_separated_titles.'|artists='.$comma_separated_artists.'|'.$results.'] -->';
    181         return $playlist.PHP_EOL.$shortcode;
     198        return $playlist.PHP_EOL.$list;
    182199        }
    183200       
  • jetpack-easy-playlists/trunk/readme.txt

    r566171 r646109  
    44Tags: playlists, jetpack, audio, mp3, player
    55Requires at least: 3.4
    6 Tested up to: 3.4.1
    7 Stable tag: 2.2
     6Tested up to: 3.5
     7Stable tag: 2.3
    88
    99Generate playlists automatically from mp3s attached to your post/page. Requires Jetpack.
     
    1313Audio support in Wordpress makes me cry. No native player, the fields in the Media library seem wrong for audio, and let's not get into ID3 tag reading. The audio shortcode and player provided by Jetpack is a step in the right direction. However, the ability to directly create a player or playlist on a post/page from attached mp3s makes me sad again. Writing that shortcode is nasty business for anything beyond a file or two.
    1414
    15 And what about the [gallery] shortcode for images? So easy to round up all your attached pictures and display them all automagically. Why no love for [audio[?
     15And what about the [gallery] shortcode for images? So easy to round up all your attached pictures and display them all automagically. Why no love for [audio]?
    1616
    1717This plugin acts as a wrapper for Jetpack's [audio] shortcode. It rounds up all the mp3s attached to your post/page and adds them as a playlist in the Jetpack player. Simply attach your mp3s to your post/page and use the shortcode "[jplaylist]" where you want your playlist
    1818
    19 JEP supports all the options that [audio] does, and now allows you to call up attachments from other pages/posts.
     19JEP supports all the options that [audio] does, and now allows you to call up attachments from other pages/posts. You can also turn on "list mode" to output all the tracks in an HTML list.
    2020
    2121Requires [Jetpack](http://jetpack.me/).
     
    29291. Upload `jetpack_easy_playlists.php` to the `/wp-content/plugins/` directory
    30301. Activate the plugin through the 'Plugins' menu in WordPress
    31 1. Use the [jplaylist] shortcode to display a playist of all the mp3s attached to your post
     311. Use the [jplaylist] shortcode to display a playlist of all the mp3s attached to your post
    3232
    3333== Frequently Asked Questions ==
     
    6868[More details](http://jamesfishwick.com/2012/jetpack-easy-playlists-update/)
    6969
     70= How do I turn on "list mode"
     71
     72Use [jplaylist print="ol"] for an ordered list,  [jplaylist print="ul"] for an unordered one.
     73
    7074= Can you support my favorite player WordPess player plugin xyz? =
    7175
     
    7781
    7882== Changelog ==
     83
     84= 2.3 =
     85* Added list mode param
    7986
    8087= 2.2 =
Note: See TracChangeset for help on using the changeset viewer.