Version Description
- Fixed multiple sliders issue
Download this release
Release Info
Developer | valendesigns |
Plugin | OptionTree |
Version | 1.1.5 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.1.5
- assets/js/jquery.option.tree.js +17 -14
- functions/admin/slider.php +1 -1
- index.php +2 -2
- readme.txt +7 -1
assets/js/jquery.option.tree.js
CHANGED
@@ -794,17 +794,20 @@
|
|
794 |
event.preventDefault();
|
795 |
ImageSlider.add_slider($(this).attr('id'));
|
796 |
});
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
|
|
|
|
|
|
808 |
},
|
809 |
update_slider_title: function(e) {
|
810 |
var element = e;
|
@@ -820,7 +823,7 @@
|
|
820 |
var self = this;
|
821 |
if ( this.processing === false ) {
|
822 |
this.processing = true;
|
823 |
-
var image_count = parseInt($( '
|
824 |
$.ajax({
|
825 |
url: ajaxurl,
|
826 |
type: 'get',
|
@@ -830,8 +833,8 @@
|
|
830 |
count: image_count
|
831 |
},
|
832 |
complete: function( data ) {
|
833 |
-
$('
|
834 |
-
$('li:last .option-tree-slider .edit').toggleClass('down');
|
835 |
self.processing = false;
|
836 |
}
|
837 |
});
|
794 |
event.preventDefault();
|
795 |
ImageSlider.add_slider($(this).attr('id'));
|
796 |
});
|
797 |
+
|
798 |
+
$('.option-tree-slider-wrap').each( function() {
|
799 |
+
var id = $(this).attr('id');
|
800 |
+
if ( $('#'+id).length ) {
|
801 |
+
$('#'+id).sortable({
|
802 |
+
update: function(event,ui){
|
803 |
+
$('#'+id).find('li:not(.ui-sortable-helper)').each(function(inc){
|
804 |
+
var target = $(this).find('a.open').attr('href').split("#")[1];
|
805 |
+
$('#' + target).find('input.option-tree-slider-order').val(inc + 1);
|
806 |
+
});
|
807 |
+
}
|
808 |
+
});
|
809 |
+
}
|
810 |
+
});
|
811 |
},
|
812 |
update_slider_title: function(e) {
|
813 |
var element = e;
|
823 |
var self = this;
|
824 |
if ( this.processing === false ) {
|
825 |
this.processing = true;
|
826 |
+
var image_count = parseInt($( '#'+id+'_list li' ).length) - 1;
|
827 |
$.ajax({
|
828 |
url: ajaxurl,
|
829 |
type: 'get',
|
833 |
count: image_count
|
834 |
},
|
835 |
complete: function( data ) {
|
836 |
+
$('#'+id+'_list').append( '<li>' + data.responseText + '</li>' );
|
837 |
+
$('#'+id+'_list li:last .option-tree-slider .edit').toggleClass('down');
|
838 |
self.processing = false;
|
839 |
}
|
840 |
});
|
functions/admin/slider.php
CHANGED
@@ -19,7 +19,7 @@ function option_tree_slider( $value, $settings, $int )
|
|
19 |
<div class="section">
|
20 |
<div class="element">
|
21 |
<?php $count = 0; ?>
|
22 |
-
<ul class="ui-sortable option-tree-slider-wrap">
|
23 |
<?php
|
24 |
if ( !empty( $settings[$value->item_id] ) ) {
|
25 |
foreach( $settings[$value->item_id] as $image ) { ?>
|
19 |
<div class="section">
|
20 |
<div class="element">
|
21 |
<?php $count = 0; ?>
|
22 |
+
<ul class="ui-sortable option-tree-slider-wrap" id="<?php echo $value->item_id; ?>_list">
|
23 |
<?php
|
24 |
if ( !empty( $settings[$value->item_id] ) ) {
|
25 |
foreach( $settings[$value->item_id] as $image ) { ?>
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: OptionTree
|
4 |
Plugin URI: http://wp.envato.com
|
5 |
Description: Customizable WordPress Theme Options Admin Interface
|
6 |
-
Version: 1.1.
|
7 |
Author: Derek Herman
|
8 |
Author URI: http://valendesigns.com
|
9 |
*/
|
@@ -13,7 +13,7 @@ Author URI: http://valendesigns.com
|
|
13 |
*
|
14 |
* @since 1.0.0
|
15 |
*/
|
16 |
-
define( 'OT_VERSION', '1.1.
|
17 |
define( 'OT_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
|
18 |
define( 'OT_PLUGIN_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
|
19 |
|
3 |
Plugin Name: OptionTree
|
4 |
Plugin URI: http://wp.envato.com
|
5 |
Description: Customizable WordPress Theme Options Admin Interface
|
6 |
+
Version: 1.1.5
|
7 |
Author: Derek Herman
|
8 |
Author URI: http://valendesigns.com
|
9 |
*/
|
13 |
*
|
14 |
* @since 1.0.0
|
15 |
*/
|
16 |
+
define( 'OT_VERSION', '1.1.5' );
|
17 |
define( 'OT_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
|
18 |
define( 'OT_PLUGIN_URL', WP_PLUGIN_URL . '/' . dirname( plugin_basename( __FILE__ ) ) );
|
19 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link:
|
|
4 |
Tags: admin, theme options, options, admin interface, ajax
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.1
|
7 |
-
Stable tag: 1.1.
|
8 |
|
9 |
Customizable WordPress Theme Options Admin Interface
|
10 |
|
@@ -39,6 +39,9 @@ Sorry, but yes. OptionTree requires PHP5 to work correctly.
|
|
39 |
|
40 |
== Changelog ==
|
41 |
|
|
|
|
|
|
|
42 |
= 1.1.4 =
|
43 |
* Patch for get_option_tree() $is_array being false and still returning an array
|
44 |
|
@@ -66,5 +69,8 @@ Sorry, but yes. OptionTree requires PHP5 to work correctly.
|
|
66 |
|
67 |
== Upgrade Notice ==
|
68 |
|
|
|
|
|
|
|
69 |
= 1.1.4 =
|
70 |
Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
|
4 |
Tags: admin, theme options, options, admin interface, ajax
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 3.1
|
7 |
+
Stable tag: 1.1.5
|
8 |
|
9 |
Customizable WordPress Theme Options Admin Interface
|
10 |
|
39 |
|
40 |
== Changelog ==
|
41 |
|
42 |
+
= 1.1.5 =
|
43 |
+
* Fixed multiple sliders issue
|
44 |
+
|
45 |
= 1.1.4 =
|
46 |
* Patch for get_option_tree() $is_array being false and still returning an array
|
47 |
|
69 |
|
70 |
== Upgrade Notice ==
|
71 |
|
72 |
+
= 1.1.5 =
|
73 |
+
Having multiple sliders caused a naming collision in the JavaScript and is now fixed. Upgrade ASAP to have multiple sliders available in the UI.
|
74 |
+
|
75 |
= 1.1.4 =
|
76 |
Fixed the returned value of the get_option_tree() function when $is_array is set to false. If you have created any slider or measurement option types please read the updated documentation for examples on how to use them in your theme.
|