MP3-jPlayer - Version 2.4.1

Version Description

  • Compatibility update for WordPress 4.3, see (this thread)[https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/] for more info.
  • Fixed the settings page php notices that could occur in some scenarios.
Download this release

Release Info

Developer simon.ward
Plugin Icon 128x128 MP3-jPlayer
Version 2.4.1
Comparing to
See all releases

Code changes from version 2.4.0 to 2.4.1

admin-settings.php CHANGED
@@ -1,5 +1,12 @@
1
  <?php
2
 
 
 
 
 
 
 
 
3
  function mp3j_print_admin_page()
4
  {
5
 
@@ -399,8 +406,13 @@ function mp3j_print_admin_page()
399
  foreach ( $library['filenames'] as $i => $file )
400
  {
401
  $id3data = wp_get_attachment_metadata( $library['postIDs'][ $i ], true );
 
 
 
 
402
  $id3data['artist'] = ( empty( $id3data['artist'] ) ) ? $blank : $id3data['artist'];
403
  $id3data['album'] = ( empty( $id3data['album'] ) ) ? $blank : $id3data['album'];
 
404
  $niceDate = date( 'jS F Y', strtotime($library['postDates'][$i]) );
405
  $rowClass = ( $rowClass === 'even' ) ? 'odd' : 'even';
406
 
@@ -452,10 +464,14 @@ function mp3j_print_admin_page()
452
  $folderHtml .= '<th>&nbsp;</th>';
453
  $folderHtml .= '<th>Uploaded</th>';
454
  $folderHtml .= '</tr>';
 
 
455
  foreach ( $files as $i => $val )
456
  {
 
 
457
  $niceDate = date( 'jS F Y', $uploadDates[$i] );
458
- $folderHtml .= '<tr>';
459
  $folderHtml .= '<td><span style="color:#aaa;font-size:11px;">' . $n . '</span></td>';
460
  $folderHtml .= '<td>' . $val . '</td>';
461
  $folderHtml .= '<td>&nbsp;</td>';
@@ -495,35 +511,39 @@ function mp3j_print_admin_page()
495
 
496
  <table>
497
  <tr>
498
- <td colspan="2"></td>
499
  </tr>
500
  <tr>
501
- <td style="width:100px;"><label>Player Titles</label></td>
502
- <td style="width:350px;">Show &nbsp;<select name="playerTitle1" id="playerTitle1">
 
 
503
  <option value="titles"<?php if ( 'titles' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Title</option>
504
  <option value="artist"<?php if ( 'artist' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Artist</option>
505
  <option value="album"<?php if ( 'album' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Album</option>
506
  <option value="excerpts"<?php if ( 'excerpts' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Caption</option>
507
  <option value="postDates"<?php if ( 'postDates' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Upload Date</option>
508
- </select>&nbsp; for player main title.</td>
509
  </tr>
510
  <tr>
 
511
  <td></td>
512
- <td>Show &nbsp;<select name="playerTitle2" id="playerTitle2">
 
513
  <option value=""<?php if ( '' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>- None -</option>
514
  <option value="titles"<?php if ( 'titles' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Title</option>
515
  <option value="artist"<?php if ( 'artist' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Artist</option>
516
  <option value="album"<?php if ( 'album' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Album</option>
517
  <option value="excerpts"<?php if ( 'excerpts' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Caption</option>
518
  <option value="postDates"<?php if ( 'postDates' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Upload Date</option>
519
- </select>&nbsp; for player sub title.</td>
520
  </tr>
521
  </table>
522
  <?php
523
  }
524
  ?>
525
- <hr />
526
-
527
  <table>
528
  <tr>
529
  <td style="width:100px;"><strong>Default Folder</strong>&nbsp;&nbsp;</td>
@@ -542,6 +562,7 @@ function mp3j_print_admin_page()
542
  <p class="description">You can specify a default folder path (local or remote) to play audio from, eg. <code>/my/music</code> or <code>www.anothersite.com/music</code>.
543
  You can then just write filenames in playlists to play from here (you don't need a full url).</p>
544
  </div>
 
545
  <hr /><br>
546
 
547
 
1
  <?php
2
 
3
+
4
+ function drawSplashScreen_mp3j ()
5
+ {
6
+ echo '<br><br><br><p>Thanks for updating!</p><br><br>';
7
+ }
8
+
9
+
10
  function mp3j_print_admin_page()
11
  {
12
 
406
  foreach ( $library['filenames'] as $i => $file )
407
  {
408
  $id3data = wp_get_attachment_metadata( $library['postIDs'][ $i ], true );
409
+
410
+ if ( ! is_array( $id3data ) ) {
411
+ $id3data = array();
412
+ }
413
  $id3data['artist'] = ( empty( $id3data['artist'] ) ) ? $blank : $id3data['artist'];
414
  $id3data['album'] = ( empty( $id3data['album'] ) ) ? $blank : $id3data['album'];
415
+
416
  $niceDate = date( 'jS F Y', strtotime($library['postDates'][$i]) );
417
  $rowClass = ( $rowClass === 'even' ) ? 'odd' : 'even';
418
 
464
  $folderHtml .= '<th>&nbsp;</th>';
465
  $folderHtml .= '<th>Uploaded</th>';
466
  $folderHtml .= '</tr>';
467
+
468
+ $rowClass = 'even';
469
  foreach ( $files as $i => $val )
470
  {
471
+ $rowClass = ( $rowClass === 'even' ) ? 'odd' : 'even';
472
+
473
  $niceDate = date( 'jS F Y', $uploadDates[$i] );
474
+ $folderHtml .= '<tr class="' . $rowClass . '">';
475
  $folderHtml .= '<td><span style="color:#aaa;font-size:11px;">' . $n . '</span></td>';
476
  $folderHtml .= '<td>' . $val . '</td>';
477
  $folderHtml .= '<td>&nbsp;</td>';
511
 
512
  <table>
513
  <tr>
514
+ <td colspan="4"></td>
515
  </tr>
516
  <tr>
517
+ <td style="width:100px;"></td>
518
+ <td style="width:100px; height:40px;"><strong>Player Titles</strong></td>
519
+ <td style="width:50px; height:40px;">Display</td>
520
+ <td style="width:350px; height:40px;"><select name="playerTitle1" id="playerTitle1">
521
  <option value="titles"<?php if ( 'titles' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Title</option>
522
  <option value="artist"<?php if ( 'artist' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Artist</option>
523
  <option value="album"<?php if ( 'album' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Album</option>
524
  <option value="excerpts"<?php if ( 'excerpts' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Caption</option>
525
  <option value="postDates"<?php if ( 'postDates' == $O['playerTitle1'] ) { echo ' selected="selected"'; } ?>>Upload Date</option>
526
+ </select>&nbsp; for player Main title.</td>
527
  </tr>
528
  <tr>
529
+ <td style="width:105px;"></td>
530
  <td></td>
531
+ <td style="width:50px;">Display</td>
532
+ <td><select name="playerTitle2" id="playerTitle2">
533
  <option value=""<?php if ( '' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>- None -</option>
534
  <option value="titles"<?php if ( 'titles' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Title</option>
535
  <option value="artist"<?php if ( 'artist' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Artist</option>
536
  <option value="album"<?php if ( 'album' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Album</option>
537
  <option value="excerpts"<?php if ( 'excerpts' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Caption</option>
538
  <option value="postDates"<?php if ( 'postDates' == $O['playerTitle2'] ) { echo ' selected="selected"'; } ?>>Upload Date</option>
539
+ </select>&nbsp; for player Sub title.</td>
540
  </tr>
541
  </table>
542
  <?php
543
  }
544
  ?>
545
+ <hr>
546
+ <br>
547
  <table>
548
  <tr>
549
  <td style="width:100px;"><strong>Default Folder</strong>&nbsp;&nbsp;</td>
562
  <p class="description">You can specify a default folder path (local or remote) to play audio from, eg. <code>/my/music</code> or <code>www.anothersite.com/music</code>.
563
  You can then just write filenames in playlists to play from here (you don't need a full url).</p>
564
  </div>
565
+ <br>
566
  <hr /><br>
567
 
568
 
css/admin/admin-settings.css CHANGED
@@ -108,7 +108,8 @@ table.fileList td * {
108
  }
109
  table.fileList th {
110
  text-align:left;
111
- padding:0 5px;
 
112
  }
113
  table.fileList tr.odd {
114
  background-color: transparent;
@@ -118,7 +119,7 @@ table.fileList tr.even {
118
  }
119
 
120
  td.files-edit { padding-right:5px; }
121
- td.files-number { padding-right:5px; }
122
  td.files-title {}
123
  td.files-artist { font-size: 12px; color: #999; }
124
  td.files-album { font-size: 12px; color: #999; }
108
  }
109
  table.fileList th {
110
  text-align:left;
111
+ padding:10px 5px;
112
+ border-bottom: 1px solid #999;
113
  }
114
  table.fileList tr.odd {
115
  background-color: transparent;
119
  }
120
 
121
  td.files-edit { padding-right:5px; }
122
+ td.files-number { padding-right:5px; color:#aaa; font-size:11px; }
123
  td.files-title {}
124
  td.files-artist { font-size: 12px; color: #999; }
125
  td.files-album { font-size: 12px; color: #999; }
css/dark.css CHANGED
@@ -573,9 +573,11 @@ div.wrap-mjp.noplayer { display:none; }
573
  .flip .transport-MI { left: 2px; right: auto; }
574
  .flip .transport-MI .play-mjp,
575
  .flip .transport-MI .pause-mjp,
576
- .flip .transport-MI .stop-mjp { float:left; }
577
- .flip .buttons-wrap-mjp { right: 2px; left: auto; }
578
- .flip .buttons-wrap-mjp div { float:right }
 
 
579
 
580
  div.bigger1 span { font-size:18px !important; }
581
  div.bigger2 span { font-size:23px !important; }
573
  .flip .transport-MI { left: 2px; right: auto; }
574
  .flip .transport-MI .play-mjp,
575
  .flip .transport-MI .pause-mjp,
576
+ .flip .transport-MI .stop-mjp { float:left; margin-right:2px; margin-left:0px; }
577
+ .flip .transport-MI .prev-mjp,
578
+ .flip .transport-MI .next-mjp { margin-right:2px; margin-left:0px; }
579
+ .flip .buttons-wrap-mjp { right: 0px; left: auto; }
580
+ .flip .buttons-wrap-mjp div { float:right; }
581
 
582
  div.bigger1 span { font-size:18px !important; }
583
  div.bigger2 span { font-size:23px !important; }
css/light.css CHANGED
@@ -542,8 +542,10 @@ div.wrap-mjp.noplayer { display:none; }
542
  .flip .transport-MI { left: 2px; right: auto; }
543
  .flip .transport-MI .play-mjp,
544
  .flip .transport-MI .pause-mjp,
545
- .flip .transport-MI .stop-mjp { float:left; }
546
- .flip .buttons-wrap-mjp { right: 2px; left: auto; }
 
 
547
  .flip .buttons-wrap-mjp div { float:right }
548
 
549
  .fullbars div.bars_holder { left:0px; right:0px; height:auto; top:0px; bottom:41px; }
542
  .flip .transport-MI { left: 2px; right: auto; }
543
  .flip .transport-MI .play-mjp,
544
  .flip .transport-MI .pause-mjp,
545
+ .flip .transport-MI .stop-mjp { float:left; margin-right:2px; margin-left:0px; }
546
+ .flip .transport-MI .prev-mjp,
547
+ .flip .transport-MI .next-mjp { margin-right:2px; margin-left:0px; }
548
+ .flip .buttons-wrap-mjp { right: 0px; left: auto; }
549
  .flip .buttons-wrap-mjp div { float:right }
550
 
551
  .fullbars div.bars_holder { left:0px; right:0px; height:auto; top:0px; bottom:41px; }
css/text.css CHANGED
@@ -525,7 +525,9 @@ div.wrap-mjp.noplayer { display:none; }
525
  .flip .transport-MI div { margin-right:6px; margin-left:0; }
526
  .flip .transport-MI .play-mjp,
527
  .flip .transport-MI .pause-mjp,
528
- .flip .transport-MI .stop-mjp { float:left; }
 
 
529
  .flip .buttons-wrap-mjp { right: 2px; left: auto; }
530
  .flip .buttons-wrap-mjp div { float:right; margin-right:0; margin-left:10px; }
531
  .flip div.jp-play-time { right:2px; left:auto; text-align:right; }
525
  .flip .transport-MI div { margin-right:6px; margin-left:0; }
526
  .flip .transport-MI .play-mjp,
527
  .flip .transport-MI .pause-mjp,
528
+ .flip .transport-MI .stop-mjp { float:left; margin-right:6px; margin-left:0px; }
529
+ .flip .transport-MI .prev-mjp,
530
+ .flip .transport-MI .next-mjp { margin-right:6px; margin-left:0px; }
531
  .flip .buttons-wrap-mjp { right: 2px; left: auto; }
532
  .flip .buttons-wrap-mjp div { float:right; margin-right:0; margin-left:10px; }
533
  .flip div.jp-play-time { right:2px; left:auto; text-align:right; }
frontend.php CHANGED
@@ -7,7 +7,13 @@ class MP3j_Front extends MP3j_Main {
7
  $this->SKINS = $this->getSkinData();
8
  }
9
 
 
 
 
 
 
10
 
 
11
  function deactivate () {
12
  $O = get_option( $this->adminOptionsName );
13
  if ( $O['remember_settings'] == "false" ) {
@@ -15,6 +21,36 @@ class MP3j_Front extends MP3j_Main {
15
  }
16
  }
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  function addPluginListLink( $links, $file ) {
20
  if ( $file == 'mp3-jplayer/mp3jplayer.php' ) {
@@ -181,6 +217,17 @@ class MP3j_Front extends MP3j_Main {
181
  }
182
 
183
  add_filter( 'plugin_action_links', array( $this, 'addPluginListLink' ), 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
184
  }
185
 
186
 
7
  $this->SKINS = $this->getSkinData();
8
  }
9
 
10
+ function onAdminInit () {
11
+ if ( $this->showSplash ) {
12
+ $this->checkSplashRedirect();
13
+ }
14
+ }
15
 
16
+
17
  function deactivate () {
18
  $O = get_option( $this->adminOptionsName );
19
  if ( $O['remember_settings'] == "false" ) {
21
  }
22
  }
23
 
24
+
25
+ function activate () {
26
+ if ( $this->showSplash ) {
27
+ set_transient( 'mp3jplayer_activation_flag', 'true', 10 );
28
+ }
29
+ }
30
+
31
+ function checkSplashRedirect ()
32
+ {
33
+ if ( get_transient( 'mp3jplayer_activation_flag' ) !== 'true' ) {
34
+ return;
35
+ }
36
+ delete_transient( 'mp3jplayer_activation_flag' );
37
+
38
+ if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { //bail if activating from network or bulk
39
+ return;
40
+ }
41
+ wp_safe_redirect( add_query_arg( array( 'page' => 'mp3-jplayer-welcome' ), admin_url( 'admin.php' ) ) );
42
+ exit;
43
+ }
44
+
45
+ function removeSplashMenuItem () {
46
+ remove_submenu_page( 'mp3-jplayer', 'mp3-jplayer-welcome' );
47
+ }
48
+
49
+
50
+
51
+
52
+
53
+
54
 
55
  function addPluginListLink( $links, $file ) {
56
  if ( $file == 'mp3-jplayer/mp3jplayer.php' ) {
217
  }
218
 
219
  add_filter( 'plugin_action_links', array( $this, 'addPluginListLink' ), 10, 2 );
220
+
221
+ //splash
222
+ add_submenu_page(
223
+ 'mp3-jplayer',
224
+ 'Welcome to MP3-jPlayer',
225
+ 'Welcome',
226
+ 'manage_options',
227
+ 'mp3-jplayer-welcome',
228
+ 'drawSplashScreen_mp3j'
229
+ );
230
+
231
  }
232
 
233
 
js/admin/{admin-settings.js → settings.2.4.js} RENAMED
File without changes
main.php CHANGED
@@ -1,8 +1,11 @@
1
  <?php
2
  class MP3j_Main {
3
 
4
- // ---------------------- Update Me
5
- var $version_of_plugin = "2.4";
 
 
 
6
  var $M_no = 0;
7
  var $F_no = 0;
8
  var $S_no = 0;
@@ -65,7 +68,7 @@ class MP3j_Main {
65
  * Sets some vars and makes stored
66
  * options compatible.
67
  */
68
- function MP3j_Main ()
69
  {
70
  $this->WPinstallpath = get_bloginfo('wpurl');
71
  $this->Rooturl = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);
@@ -1784,7 +1787,7 @@ class MP3j_Main {
1784
  function mp3j_admin_header ()
1785
  {
1786
  wp_enqueue_script('jquery');
1787
- wp_enqueue_script('mp3jp-settings-js', $this->PluginFolder .'/js/admin/admin-settings.js' );
1788
  wp_enqueue_script('spectrum-CP-js', $this->PluginFolder .'/js/spectrum/spectrum.js' );
1789
 
1790
  wp_enqueue_style( 'spectrum-css', plugins_url( '/css/admin/spectrum-custom.css', __FILE__ ) );
@@ -2093,7 +2096,7 @@ class MP3j_Main {
2093
  'listAlign' => 'left',
2094
  'imageAlign' => 'right',
2095
  'imgOverflow' => 'false',
2096
- 'userClasses' => 'flip',
2097
  'indicator' => 'colour',
2098
  'adminBG' => '#f6f6f6',
2099
  'adminCheckerIMG' => 'false',
1
  <?php
2
  class MP3j_Main {
3
 
4
+ // --------- Update Me ------------
5
+ var $version_of_plugin = "2.4.1";
6
+ var $showSplash = false;
7
+ // --------------------------------
8
+
9
  var $M_no = 0;
10
  var $F_no = 0;
11
  var $S_no = 0;
68
  * Sets some vars and makes stored
69
  * options compatible.
70
  */
71
+ function __construct ()
72
  {
73
  $this->WPinstallpath = get_bloginfo('wpurl');
74
  $this->Rooturl = preg_replace("/^www\./i", "", $_SERVER['HTTP_HOST']);
1787
  function mp3j_admin_header ()
1788
  {
1789
  wp_enqueue_script('jquery');
1790
+ wp_enqueue_script('mp3jp-settings-js', $this->PluginFolder .'/js/admin/settings.2.4.js' );
1791
  wp_enqueue_script('spectrum-CP-js', $this->PluginFolder .'/js/spectrum/spectrum.js' );
1792
 
1793
  wp_enqueue_style( 'spectrum-css', plugins_url( '/css/admin/spectrum-custom.css', __FILE__ ) );
2096
  'listAlign' => 'left',
2097
  'imageAlign' => 'right',
2098
  'imgOverflow' => 'false',
2099
+ 'userClasses' => 'nostop',
2100
  'indicator' => 'colour',
2101
  'adminBG' => '#f6f6f6',
2102
  'adminCheckerIMG' => 'false',
mp3jplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://mp3-jplayer.com
5
  Description: Easy, Flexible Audio for WordPress.
6
- Version: 2.4
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
@@ -26,7 +26,6 @@ include_once( $path . '/template-functions.php' );
26
  include_once( $path . '/main.php' );
27
  include_once( $path . '/frontend.php' );
28
 
29
-
30
  if ( class_exists( 'MP3j_Front' ) ) {
31
  $MP3JP = new MP3j_Front();
32
  }
@@ -34,13 +33,17 @@ if ( class_exists( 'MP3j_Front' ) ) {
34
  if ( isset( $MP3JP ) ) {
35
 
36
  add_action( 'init', array( &$MP3JP, 'onInit' ), 100 );
 
37
  add_action( 'widgets_init', array( &$MP3JP, 'registerWidgets' ) );
38
 
39
  if ( is_admin() ) {
40
  include_once( $path . '/admin-settings.php');
41
  include_once( $path . '/admin-colours.php');
 
42
  add_action( 'admin_menu', array( &$MP3JP, 'createAdminPages' ), 100 );
43
  add_action( 'deactivate_mp3-jplayer/mp3jplayer.php', array( &$MP3JP, 'deactivate' ) );
 
 
44
  }
45
 
46
 
3
  Plugin Name: MP3-jPlayer
4
  Plugin URI: http://mp3-jplayer.com
5
  Description: Easy, Flexible Audio for WordPress.
6
+ Version: 2.4.1
7
  Author: Simon Ward
8
  Author URI: http://www.sjward.org
9
  License: GPL2
26
  include_once( $path . '/main.php' );
27
  include_once( $path . '/frontend.php' );
28
 
 
29
  if ( class_exists( 'MP3j_Front' ) ) {
30
  $MP3JP = new MP3j_Front();
31
  }
33
  if ( isset( $MP3JP ) ) {
34
 
35
  add_action( 'init', array( &$MP3JP, 'onInit' ), 100 );
36
+ add_action( 'admin_init', array( &$MP3JP, 'onAdminInit' ) );
37
  add_action( 'widgets_init', array( &$MP3JP, 'registerWidgets' ) );
38
 
39
  if ( is_admin() ) {
40
  include_once( $path . '/admin-settings.php');
41
  include_once( $path . '/admin-colours.php');
42
+
43
  add_action( 'admin_menu', array( &$MP3JP, 'createAdminPages' ), 100 );
44
  add_action( 'deactivate_mp3-jplayer/mp3jplayer.php', array( &$MP3JP, 'deactivate' ) );
45
+ add_action( 'activate_mp3-jplayer/mp3jplayer.php', array(&$MP3JP, 'activate'));
46
+ add_action( 'admin_head', array(&$MP3JP, 'removeSplashMenuItem') );
47
  }
48
 
49
 
readme.txt CHANGED
@@ -6,8 +6,8 @@ Donate link: http://www.sjward.org/jplayer-for-wordpress
6
  Tags: audio, audio player, audio playlist, mp3 player, music player, media, mobile, iphone, ipad, integration, multisite, playlist player, media player, audio widget, audio download, html5 audio, music player, mp3, music, html5, flash, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html 5
7
  License: GPLv2 or later
8
  Requires at least: 2.9
9
- Tested up to: 4.2
10
- Stable tag: 2.4.0
11
 
12
  Easy, Flexible Audio for WordPress.
13
 
@@ -108,6 +108,10 @@ Either on the [forum at Wordpress](https://wordpress.org/support/plugin/mp3-jpla
108
 
109
  == Changelog ==
110
 
 
 
 
 
111
  = 2.4 =
112
  * Added a simple colour scheme setting for the single file players that allows very easy theming.
113
  * Added new track title and captioning settings, allowing you to choose which ID3 data to display for your media library files. Choose from title, artist, album, caption, and upload date.
6
  Tags: audio, audio player, audio playlist, mp3 player, music player, media, mobile, iphone, ipad, integration, multisite, playlist player, media player, audio widget, audio download, html5 audio, music player, mp3, music, html5, flash, jplayer, playlist, jquery, shortcode, widget, css, post, page, sidebar, html 5
7
  License: GPLv2 or later
8
  Requires at least: 2.9
9
+ Tested up to: 4.3
10
+ Stable tag: 2.4.1
11
 
12
  Easy, Flexible Audio for WordPress.
13
 
108
 
109
  == Changelog ==
110
 
111
+ = 2.4.1 =
112
+ * Compatibility update for WordPress 4.3, see (this thread)[https://make.wordpress.org/core/2015/07/02/deprecating-php4-style-constructors-in-wordpress-4-3/] for more info.
113
+ * Fixed the settings page php notices that could occur in some scenarios.
114
+
115
  = 2.4 =
116
  * Added a simple colour scheme setting for the single file players that allows very easy theming.
117
  * Added new track title and captioning settings, allowing you to choose which ID3 data to display for your media library files. Choose from title, artist, album, caption, and upload date.
widget-sh.php CHANGED
@@ -10,8 +10,8 @@ if ( class_exists("WP_Widget") ) {
10
 
11
  class MP3j_single extends WP_Widget {
12
 
13
- /* Constructor (required by api) */
14
- function MP3j_single() {
15
  $widget_ops = array(
16
  'classname' => 'mp3jplayerwidget2',
17
  'description' => __('Add audio players by writing shortcodes.',
@@ -20,7 +20,7 @@ if ( class_exists("WP_Widget") ) {
20
  $control_ops = array(
21
  'id_base' => 'mp3mi-widget'
22
  );
23
- $this->WP_Widget( 'mp3mi-widget', __('MP3-jPlayer|Shortcodes', 'mp3jplayerwidget2'), $widget_ops, $control_ops );
24
  }
25
 
26
 
@@ -58,8 +58,8 @@ if ( class_exists("WP_Widget") ) {
58
 
59
 
60
  /* Updates the widget settings (required by api) */
61
- function update( $new_instance, $old_instance ) {
62
-
63
  global $MP3JP;
64
 
65
  $instance = $old_instance;
@@ -72,8 +72,8 @@ if ( class_exists("WP_Widget") ) {
72
 
73
 
74
  /* Creates defaults and writes widget panel (required by api) */
75
- function form( $instance ) {
76
-
77
  global $MP3JP;
78
 
79
  $defaultvalues = array(
10
 
11
  class MP3j_single extends WP_Widget {
12
 
13
+ function __construct ()
14
+ {
15
  $widget_ops = array(
16
  'classname' => 'mp3jplayerwidget2',
17
  'description' => __('Add audio players by writing shortcodes.',
20
  $control_ops = array(
21
  'id_base' => 'mp3mi-widget'
22
  );
23
+ parent::__construct( 'mp3mi-widget', __('MP3-jPlayer|Shortcodes', 'mp3jplayerwidget2'), $widget_ops, $control_ops );
24
  }
25
 
26
 
58
 
59
 
60
  /* Updates the widget settings (required by api) */
61
+ function update( $new_instance, $old_instance )
62
+ {
63
  global $MP3JP;
64
 
65
  $instance = $old_instance;
72
 
73
 
74
  /* Creates defaults and writes widget panel (required by api) */
75
+ function form( $instance )
76
+ {
77
  global $MP3JP;
78
 
79
  $defaultvalues = array(
widget-ui.php CHANGED
@@ -10,9 +10,8 @@ if ( class_exists("WP_Widget") ) {
10
 
11
  class MP3_jPlayer extends WP_Widget {
12
 
13
- /* Constructor (required by api) */
14
- function MP3_jPlayer() {
15
-
16
  $widget_ops = array(
17
  'classname' => 'mp3jplayerwidget',
18
  'description' => __('Adds a playlist player. Choose playback mode and options.',
@@ -21,13 +20,13 @@ if ( class_exists("WP_Widget") ) {
21
  $control_ops = array(
22
  'id_base' => 'mp3-jplayer-widget'
23
  );
24
- $this->WP_Widget( 'mp3-jplayer-widget', __('MP3-jPlayer|Playlister', 'mp3jplayerwidget'), $widget_ops, $control_ops );
25
  }
26
 
27
 
28
  /* Sets up widget playlist and writes player (required by api) */
29
- function widget( $args, $instance ) {
30
-
31
  global $MP3JP;
32
 
33
  $MP3JP->dbug['str'] .= "\n### Checking UI widget...";
@@ -135,8 +134,8 @@ if ( class_exists("WP_Widget") ) {
135
 
136
 
137
  /* Updates the widget settings (required by api) */
138
- function update( $new_instance, $old_instance ) {
139
-
140
  global $MP3JP;
141
 
142
  $instance = $old_instance;
@@ -189,8 +188,8 @@ if ( class_exists("WP_Widget") ) {
189
 
190
 
191
  /* Creates defaults and writes widget panel (required by api) */
192
- function form( $instance ) {
193
-
194
  global $MP3JP;
195
  $MP3JP->theSettings = get_option('mp3FoxAdminOptions');
196
 
10
 
11
  class MP3_jPlayer extends WP_Widget {
12
 
13
+ function __construct ()
14
+ {
 
15
  $widget_ops = array(
16
  'classname' => 'mp3jplayerwidget',
17
  'description' => __('Adds a playlist player. Choose playback mode and options.',
20
  $control_ops = array(
21
  'id_base' => 'mp3-jplayer-widget'
22
  );
23
+ parent::__construct( 'mp3-jplayer-widget', __('MP3-jPlayer|Playlister', 'mp3jplayerwidget'), $widget_ops, $control_ops );
24
  }
25
 
26
 
27
  /* Sets up widget playlist and writes player (required by api) */
28
+ function widget( $args, $instance )
29
+ {
30
  global $MP3JP;
31
 
32
  $MP3JP->dbug['str'] .= "\n### Checking UI widget...";
134
 
135
 
136
  /* Updates the widget settings (required by api) */
137
+ function update( $new_instance, $old_instance )
138
+ {
139
  global $MP3JP;
140
 
141
  $instance = $old_instance;
188
 
189
 
190
  /* Creates defaults and writes widget panel (required by api) */
191
+ function form( $instance )
192
+ {
193
  global $MP3JP;
194
  $MP3JP->theSettings = get_option('mp3FoxAdminOptions');
195