Version Description
- Added the
FW_WP_List_Table
class - Option type
multi-picker
: added support forshort-select
- Option type
slider
andrange-slider
design fixes - Extension activation fix: Some required extensions were not added for activation
- Fixed wrong
$data['value']
inFW_Option_Type::_render()
when form validation fails #188 - Increase timeout on extensions install #183
Download this release
Release Info
Developer | Unyson |
Plugin | Unyson |
Version | 2.1.18 |
Comparing to | |
See all releases |
Code changes from version 2.1.17 to 2.1.18
- framework/bootstrap.php +1 -0
- framework/core/components/backend.php +9 -3
- framework/core/components/extensions/manager/available-extensions.php +2 -2
- framework/core/components/extensions/manager/class--fw-extensions-manager.php +50 -15
- framework/core/extends/class-fw-option-type.php +4 -4
- framework/helpers/class-fw-wp-list-table.php +968 -0
- framework/helpers/general.php +22 -10
- framework/includes/option-types/multi-picker/class-fw-option-type-multi-picker.php +3 -1
- framework/includes/option-types/multi-picker/static/js/multi-picker.js +3 -0
- framework/includes/option-types/range-slider/static/css/styles.css +38 -18
- framework/includes/option-types/range-slider/static/js/scripts.js +8 -1
- framework/includes/option-types/slider/static/css/styles.css +45 -21
- framework/includes/option-types/slider/static/js/scripts.js +8 -2
- framework/includes/option-types/wp-editor/class-fw-option-type-wp-editor.php +1 -1
- framework/manifest.php +1 -1
- framework/static/css/jquery.jscrollpane.css +0 -115
- readme.txt +9 -1
- unyson.php +1 -1
framework/bootstrap.php
CHANGED
@@ -48,6 +48,7 @@ if (defined('FW')) {
|
|
48 |
'database',
|
49 |
'class-fw-flash-messages',
|
50 |
'class-fw-resize',
|
|
|
51 |
)
|
52 |
as $file
|
53 |
) {
|
48 |
'database',
|
49 |
'class-fw-flash-messages',
|
50 |
'class-fw-resize',
|
51 |
+
'class-fw-wp-list-table'
|
52 |
)
|
53 |
as $file
|
54 |
) {
|
framework/core/components/backend.php
CHANGED
@@ -813,7 +813,13 @@ final class _FW_Component_Backend
|
|
813 |
return $data;
|
814 |
}
|
815 |
|
816 |
-
$values = FW_Request::POST(FW_Option_Type::get_default_name_prefix()
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
|
818 |
echo fw()->backend->render_options($options, $values);
|
819 |
|
@@ -928,8 +934,8 @@ final class _FW_Component_Backend
|
|
928 |
* Render options array and return the generated HTML
|
929 |
*
|
930 |
* @param array $options
|
931 |
-
* @param array $values
|
932 |
-
* @param array $options_data
|
933 |
* @param string $design
|
934 |
*
|
935 |
* @return string HTML
|
813 |
return $data;
|
814 |
}
|
815 |
|
816 |
+
if ($values = FW_Request::POST(FW_Option_Type::get_default_name_prefix())) {
|
817 |
+
// This is form submit, extract correct values from $_POST values
|
818 |
+
$values = fw_get_options_values_from_input($options, $values);
|
819 |
+
} else {
|
820 |
+
// Extract previously saved correct values
|
821 |
+
$values = fw_get_db_settings_option();
|
822 |
+
}
|
823 |
|
824 |
echo fw()->backend->render_options($options, $values);
|
825 |
|
934 |
* Render options array and return the generated HTML
|
935 |
*
|
936 |
* @param array $options
|
937 |
+
* @param array $values Correct values returned by fw_get_options_values_from_input()
|
938 |
+
* @param array $options_data {id_prefix => ..., name_prefix => ...}
|
939 |
* @param string $design
|
940 |
*
|
941 |
* @return string HTML
|
framework/core/components/extensions/manager/available-extensions.php
CHANGED
@@ -81,7 +81,7 @@ $extensions = array(
|
|
81 |
'page-builder' => array(
|
82 |
'display' => true,
|
83 |
'parent' => 'shortcodes',
|
84 |
-
'name' => __( '
|
85 |
'description' => __( "Let's you easily build countless pages with the help of the drag and drop visual page builder that comes with a lot of already created shortcodes.", 'fw' ),
|
86 |
'thumbnail' => $thumbnails_uri . '/page-builder.jpg',
|
87 |
'download' => array(
|
@@ -246,4 +246,4 @@ $extensions = array(
|
|
246 |
),
|
247 |
),
|
248 |
),
|
249 |
-
);
|
81 |
'page-builder' => array(
|
82 |
'display' => true,
|
83 |
'parent' => 'shortcodes',
|
84 |
+
'name' => __( 'Page Builder', 'fw' ),
|
85 |
'description' => __( "Let's you easily build countless pages with the help of the drag and drop visual page builder that comes with a lot of already created shortcodes.", 'fw' ),
|
86 |
'thumbnail' => $thumbnails_uri . '/page-builder.jpg',
|
87 |
'download' => array(
|
246 |
),
|
247 |
),
|
248 |
),
|
249 |
+
);
|
framework/core/components/extensions/manager/class--fw-extensions-manager.php
CHANGED
@@ -794,6 +794,22 @@ final class _FW_Extensions_Manager
|
|
794 |
break;
|
795 |
}
|
796 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
797 |
$available_extensions = $this->get_available_extensions();
|
798 |
|
799 |
$extensions_before_install = array_keys($installed_extensions);
|
@@ -1408,26 +1424,37 @@ final class _FW_Extensions_Manager
|
|
1408 |
|
1409 |
// search required extensions
|
1410 |
{
|
|
|
1411 |
$not_found_required = array();
|
1412 |
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
$this->collect_required_extensions( $extension_name, $installed_extensions, $required_extensions );
|
1417 |
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1423 |
|
1424 |
-
|
1425 |
-
|
1426 |
|
1427 |
-
|
1428 |
-
|
1429 |
-
$db_active_extensions[ $sub_extension_name ] = array();
|
1430 |
-
$activated_extensions[ $sub_extension_name ] = array();
|
1431 |
}
|
1432 |
}
|
1433 |
}
|
@@ -1830,6 +1857,14 @@ final class _FW_Extensions_Manager
|
|
1830 |
$this->get_extension_title( $extension_name ), $response_code
|
1831 |
)
|
1832 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1833 |
} else {
|
1834 |
return new WP_Error(
|
1835 |
$wp_error_id,
|
794 |
break;
|
795 |
}
|
796 |
|
797 |
+
// increase timeout
|
798 |
+
if (
|
799 |
+
function_exists('set_time_limit')
|
800 |
+
&&
|
801 |
+
function_exists('ini_get')
|
802 |
+
&&
|
803 |
+
($timeout = intval(ini_get('max_execution_time')))
|
804 |
+
) {
|
805 |
+
$extensions_count = 0;
|
806 |
+
foreach ($install_data['parents'] as $extension_name => $parent_extensions) {
|
807 |
+
$extensions_count += count($parent_extensions);
|
808 |
+
}
|
809 |
+
|
810 |
+
set_time_limit($timeout + $extensions_count * 10);
|
811 |
+
}
|
812 |
+
|
813 |
$available_extensions = $this->get_available_extensions();
|
814 |
|
815 |
$extensions_before_install = array_keys($installed_extensions);
|
1424 |
|
1425 |
// search required extensions
|
1426 |
{
|
1427 |
+
$pending_required_search = $activated_extensions;
|
1428 |
$not_found_required = array();
|
1429 |
|
1430 |
+
while ($pending_required_search) {
|
1431 |
+
foreach (array_keys($pending_required_search) as $extension_name) {
|
1432 |
+
unset($pending_required_search[$extension_name]);
|
|
|
1433 |
|
1434 |
+
unset($required_extensions); // reset reference
|
1435 |
+
$required_extensions = array();
|
1436 |
+
$this->collect_required_extensions($extension_name, $installed_extensions, $required_extensions);
|
1437 |
+
|
1438 |
+
foreach ($required_extensions as $required_extension_name => $required_extension_data) {
|
1439 |
+
if (!isset($installed_extensions[$required_extension_name])) {
|
1440 |
+
$not_found_required[$required_extension_name] = array();
|
1441 |
+
continue;
|
1442 |
+
}
|
1443 |
+
|
1444 |
+
$db_active_extensions[$required_extension_name] = array();
|
1445 |
+
$activated_extensions[$required_extension_name] = array();
|
1446 |
+
|
1447 |
+
// search sub-extensions
|
1448 |
+
foreach ($this->collect_sub_extensions($required_extension_name, $installed_extensions) as $sub_extension_name => $sub_extension_data) {
|
1449 |
+
if (isset($activated_extensions[$sub_extension_name])) {
|
1450 |
+
continue;
|
1451 |
+
}
|
1452 |
|
1453 |
+
$db_active_extensions[$sub_extension_name] = array();
|
1454 |
+
$activated_extensions[$sub_extension_name] = array();
|
1455 |
|
1456 |
+
$pending_required_search[$sub_extension_name] = array();
|
1457 |
+
}
|
|
|
|
|
1458 |
}
|
1459 |
}
|
1460 |
}
|
1857 |
$this->get_extension_title( $extension_name ), $response_code
|
1858 |
)
|
1859 |
);
|
1860 |
+
} elseif (is_wp_error($response)) {
|
1861 |
+
return new WP_Error(
|
1862 |
+
$wp_error_id,
|
1863 |
+
sprintf( __( 'Cannot download the "%s" extension zip. %s', 'fw' ),
|
1864 |
+
$this->get_extension_title( $extension_name ),
|
1865 |
+
$response->get_error_message()
|
1866 |
+
)
|
1867 |
+
);
|
1868 |
} else {
|
1869 |
return new WP_Error(
|
1870 |
$wp_error_id,
|
framework/core/extends/class-fw-option-type.php
CHANGED
@@ -31,8 +31,8 @@ abstract class FW_Option_Type
|
|
31 |
/**
|
32 |
* Generate option's html from option array
|
33 |
* @param string $id
|
34 |
-
* @param array $option
|
35 |
-
* @param array $data
|
36 |
* @return string HTML
|
37 |
* @internal
|
38 |
*/
|
@@ -41,7 +41,7 @@ abstract class FW_Option_Type
|
|
41 |
/**
|
42 |
* Extract correct value for $option['value'] from input array
|
43 |
* If input value is empty, will be returned $option['value']
|
44 |
-
* @param array
|
45 |
* @param array|string|null $input_value
|
46 |
* @return string|array|int|bool Correct value
|
47 |
* @internal
|
@@ -157,7 +157,7 @@ abstract class FW_Option_Type
|
|
157 |
* Generate option's html from option array
|
158 |
* @param string $id
|
159 |
* @param array $option
|
160 |
-
* @param array $data
|
161 |
* @return string HTML
|
162 |
*/
|
163 |
final public function render($id, $option, $data = array())
|
31 |
/**
|
32 |
* Generate option's html from option array
|
33 |
* @param string $id
|
34 |
+
* @param array $option Option array merged with _get_defaults()
|
35 |
+
* @param array $data {value => _get_value_from_input(), id_prefix => ..., name_prefix => ...}
|
36 |
* @return string HTML
|
37 |
* @internal
|
38 |
*/
|
41 |
/**
|
42 |
* Extract correct value for $option['value'] from input array
|
43 |
* If input value is empty, will be returned $option['value']
|
44 |
+
* @param array $option Option array merged with _get_defaults()
|
45 |
* @param array|string|null $input_value
|
46 |
* @return string|array|int|bool Correct value
|
47 |
* @internal
|
157 |
* Generate option's html from option array
|
158 |
* @param string $id
|
159 |
* @param array $option
|
160 |
+
* @param array $data {value => $this->get_value_from_input()}
|
161 |
* @return string HTML
|
162 |
*/
|
163 |
final public function render($id, $option, $data = array())
|
framework/helpers/class-fw-wp-list-table.php
ADDED
@@ -0,0 +1,968 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if ( ! defined( 'FW' ) ) {
|
2 |
+
die( 'Forbidden' );
|
3 |
+
}
|
4 |
+
/**
|
5 |
+
* Base class for displaying a list of items in an ajaxified HTML table.
|
6 |
+
*
|
7 |
+
* @package WordPress
|
8 |
+
* @subpackage List_Table
|
9 |
+
* @since 3.1.0
|
10 |
+
* @access private
|
11 |
+
*/
|
12 |
+
class FW_WP_List_Table {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* The current list of items
|
16 |
+
*
|
17 |
+
* @since 3.1.0
|
18 |
+
* @var array
|
19 |
+
* @access protected
|
20 |
+
*/
|
21 |
+
var $items;
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Various information about the current table
|
25 |
+
*
|
26 |
+
* @since 3.1.0
|
27 |
+
* @var array
|
28 |
+
* @access private
|
29 |
+
*/
|
30 |
+
var $_args;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Various information needed for displaying the pagination
|
34 |
+
*
|
35 |
+
* @since 3.1.0
|
36 |
+
* @var array
|
37 |
+
* @access private
|
38 |
+
*/
|
39 |
+
var $_pagination_args = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* The current screen
|
43 |
+
*
|
44 |
+
* @since 3.1.0
|
45 |
+
* @var object
|
46 |
+
* @access protected
|
47 |
+
*/
|
48 |
+
var $screen;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Cached bulk actions
|
52 |
+
*
|
53 |
+
* @since 3.1.0
|
54 |
+
* @var array
|
55 |
+
* @access private
|
56 |
+
*/
|
57 |
+
var $_actions;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Cached pagination output
|
61 |
+
*
|
62 |
+
* @since 3.1.0
|
63 |
+
* @var string
|
64 |
+
* @access private
|
65 |
+
*/
|
66 |
+
var $_pagination;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Constructor. The child class should call this constructor from its own constructor
|
70 |
+
*
|
71 |
+
* @param array $args An associative array with information about the current table
|
72 |
+
* @access protected
|
73 |
+
*/
|
74 |
+
function __construct( $args = array() ) {
|
75 |
+
$args = wp_parse_args( $args, array(
|
76 |
+
'plural' => '',
|
77 |
+
'singular' => '',
|
78 |
+
'ajax' => false,
|
79 |
+
'screen' => null,
|
80 |
+
) );
|
81 |
+
|
82 |
+
$this->screen = convert_to_screen( $args['screen'] );
|
83 |
+
|
84 |
+
add_filter( "manage_{$this->screen->id}_columns", array( $this, 'get_columns' ), 0 );
|
85 |
+
|
86 |
+
if ( !$args['plural'] )
|
87 |
+
$args['plural'] = $this->screen->base;
|
88 |
+
|
89 |
+
$args['plural'] = sanitize_key( $args['plural'] );
|
90 |
+
$args['singular'] = sanitize_key( $args['singular'] );
|
91 |
+
|
92 |
+
$this->_args = $args;
|
93 |
+
|
94 |
+
if ( $args['ajax'] ) {
|
95 |
+
// wp_enqueue_script( 'list-table' );
|
96 |
+
add_action( 'admin_footer', array( $this, '_js_vars' ) );
|
97 |
+
}
|
98 |
+
}
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Checks the current user's permissions
|
102 |
+
* @uses wp_die()
|
103 |
+
*
|
104 |
+
* @since 3.1.0
|
105 |
+
* @access public
|
106 |
+
* @abstract
|
107 |
+
*/
|
108 |
+
function ajax_user_can() {
|
109 |
+
die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' );
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Prepares the list of items for displaying.
|
114 |
+
* @uses WP_List_Table::set_pagination_args()
|
115 |
+
*
|
116 |
+
* @since 3.1.0
|
117 |
+
* @access public
|
118 |
+
* @abstract
|
119 |
+
*/
|
120 |
+
function prepare_items() {
|
121 |
+
die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' );
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* An internal method that sets all the necessary pagination arguments
|
126 |
+
*
|
127 |
+
* @param array $args An associative array with information about the pagination
|
128 |
+
* @access protected
|
129 |
+
*/
|
130 |
+
function set_pagination_args( $args ) {
|
131 |
+
$args = wp_parse_args( $args, array(
|
132 |
+
'total_items' => 0,
|
133 |
+
'total_pages' => 0,
|
134 |
+
'per_page' => 0,
|
135 |
+
) );
|
136 |
+
|
137 |
+
if ( !$args['total_pages'] && $args['per_page'] > 0 )
|
138 |
+
$args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] );
|
139 |
+
|
140 |
+
// redirect if page number is invalid and headers are not already sent
|
141 |
+
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
142 |
+
wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
|
143 |
+
exit;
|
144 |
+
}
|
145 |
+
|
146 |
+
$this->_pagination_args = $args;
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Access the pagination args
|
151 |
+
*
|
152 |
+
* @since 3.1.0
|
153 |
+
* @access public
|
154 |
+
*
|
155 |
+
* @param string $key
|
156 |
+
* @return array
|
157 |
+
*/
|
158 |
+
function get_pagination_arg( $key ) {
|
159 |
+
if ( 'page' == $key )
|
160 |
+
return $this->get_pagenum();
|
161 |
+
|
162 |
+
if ( isset( $this->_pagination_args[$key] ) )
|
163 |
+
return $this->_pagination_args[$key];
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Whether the table has items to display or not
|
168 |
+
*
|
169 |
+
* @since 3.1.0
|
170 |
+
* @access public
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
*/
|
174 |
+
function has_items() {
|
175 |
+
return !empty( $this->items );
|
176 |
+
}
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Message to be displayed when there are no items
|
180 |
+
*
|
181 |
+
* @since 3.1.0
|
182 |
+
* @access public
|
183 |
+
*/
|
184 |
+
function no_items() {
|
185 |
+
_e( 'No items found.' );
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Display the search box.
|
190 |
+
*
|
191 |
+
* @since 3.1.0
|
192 |
+
* @access public
|
193 |
+
*
|
194 |
+
* @param string $text The search button text
|
195 |
+
* @param string $input_id The search input id
|
196 |
+
*/
|
197 |
+
function search_box( $text, $input_id ) {
|
198 |
+
if ( empty( $_REQUEST['s'] ) && !$this->has_items() )
|
199 |
+
return;
|
200 |
+
|
201 |
+
$input_id = $input_id . '-search-input';
|
202 |
+
|
203 |
+
if ( ! empty( $_REQUEST['orderby'] ) )
|
204 |
+
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
|
205 |
+
if ( ! empty( $_REQUEST['order'] ) )
|
206 |
+
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
|
207 |
+
if ( ! empty( $_REQUEST['post_mime_type'] ) )
|
208 |
+
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
|
209 |
+
if ( ! empty( $_REQUEST['detached'] ) )
|
210 |
+
echo '<input type="hidden" name="detached" value="' . esc_attr( $_REQUEST['detached'] ) . '" />';
|
211 |
+
?>
|
212 |
+
<p class="search-box">
|
213 |
+
<label class="screen-reader-text" for="<?php echo $input_id ?>"><?php echo $text; ?>:</label>
|
214 |
+
<input type="search" id="<?php echo $input_id ?>" name="s" value="<?php _admin_search_query(); ?>" />
|
215 |
+
<?php submit_button( $text, 'button', false, false, array('id' => 'search-submit') ); ?>
|
216 |
+
</p>
|
217 |
+
<?php
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* Get an associative array ( id => link ) with the list
|
222 |
+
* of views available on this table.
|
223 |
+
*
|
224 |
+
* @since 3.1.0
|
225 |
+
* @access protected
|
226 |
+
*
|
227 |
+
* @return array
|
228 |
+
*/
|
229 |
+
function get_views() {
|
230 |
+
return array();
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* Display the list of views available on this table.
|
235 |
+
*
|
236 |
+
* @since 3.1.0
|
237 |
+
* @access public
|
238 |
+
*/
|
239 |
+
function views() {
|
240 |
+
$views = $this->get_views();
|
241 |
+
/**
|
242 |
+
* Filter the list of available list table views.
|
243 |
+
*
|
244 |
+
* The dynamic portion of the hook name, $this->screen->id, refers
|
245 |
+
* to the ID of the current screen, usually a string.
|
246 |
+
*
|
247 |
+
* @since 3.5.0
|
248 |
+
*
|
249 |
+
* @param array $views An array of available list table views.
|
250 |
+
*/
|
251 |
+
$views = apply_filters( "views_{$this->screen->id}", $views );
|
252 |
+
|
253 |
+
if ( empty( $views ) )
|
254 |
+
return;
|
255 |
+
|
256 |
+
echo "<ul class='subsubsub'>\n";
|
257 |
+
foreach ( $views as $class => $view ) {
|
258 |
+
$views[ $class ] = "\t<li class='$class'>$view";
|
259 |
+
}
|
260 |
+
echo implode( " |</li>\n", $views ) . "</li>\n";
|
261 |
+
echo "</ul>";
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Get an associative array ( option_name => option_title ) with the list
|
266 |
+
* of bulk actions available on this table.
|
267 |
+
*
|
268 |
+
* @since 3.1.0
|
269 |
+
* @access protected
|
270 |
+
*
|
271 |
+
* @return array
|
272 |
+
*/
|
273 |
+
function get_bulk_actions() {
|
274 |
+
return array();
|
275 |
+
}
|
276 |
+
|
277 |
+
/**
|
278 |
+
* Display the bulk actions dropdown.
|
279 |
+
*
|
280 |
+
* @since 3.1.0
|
281 |
+
* @access public
|
282 |
+
*/
|
283 |
+
function bulk_actions() {
|
284 |
+
if ( is_null( $this->_actions ) ) {
|
285 |
+
$no_new_actions = $this->_actions = $this->get_bulk_actions();
|
286 |
+
/**
|
287 |
+
* Filter the list table Bulk Actions drop-down.
|
288 |
+
*
|
289 |
+
* The dynamic portion of the hook name, $this->screen->id, refers
|
290 |
+
* to the ID of the current screen, usually a string.
|
291 |
+
*
|
292 |
+
* This filter can currently only be used to remove bulk actions.
|
293 |
+
*
|
294 |
+
* @since 3.5.0
|
295 |
+
*
|
296 |
+
* @param array $actions An array of the available bulk actions.
|
297 |
+
*/
|
298 |
+
$this->_actions = apply_filters( "bulk_actions-{$this->screen->id}", $this->_actions );
|
299 |
+
$this->_actions = array_intersect_assoc( $this->_actions, $no_new_actions );
|
300 |
+
$two = '';
|
301 |
+
} else {
|
302 |
+
$two = '2';
|
303 |
+
}
|
304 |
+
|
305 |
+
if ( empty( $this->_actions ) )
|
306 |
+
return;
|
307 |
+
|
308 |
+
echo "<select name='action$two'>\n";
|
309 |
+
echo "<option value='-1' selected='selected'>" . __( 'Bulk Actions' ) . "</option>\n";
|
310 |
+
|
311 |
+
foreach ( $this->_actions as $name => $title ) {
|
312 |
+
$class = 'edit' == $name ? ' class="hide-if-no-js"' : '';
|
313 |
+
|
314 |
+
echo "\t<option value='$name'$class>$title</option>\n";
|
315 |
+
}
|
316 |
+
|
317 |
+
echo "</select>\n";
|
318 |
+
|
319 |
+
submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) );
|
320 |
+
echo "\n";
|
321 |
+
}
|
322 |
+
|
323 |
+
/**
|
324 |
+
* Get the current action selected from the bulk actions dropdown.
|
325 |
+
*
|
326 |
+
* @since 3.1.0
|
327 |
+
* @access public
|
328 |
+
*
|
329 |
+
* @return string|bool The action name or False if no action was selected
|
330 |
+
*/
|
331 |
+
function current_action() {
|
332 |
+
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
|
333 |
+
return $_REQUEST['action'];
|
334 |
+
|
335 |
+
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
|
336 |
+
return $_REQUEST['action2'];
|
337 |
+
|
338 |
+
return false;
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Generate row actions div
|
343 |
+
*
|
344 |
+
* @since 3.1.0
|
345 |
+
* @access protected
|
346 |
+
*
|
347 |
+
* @param array $actions The list of actions
|
348 |
+
* @param bool $always_visible Whether the actions should be always visible
|
349 |
+
* @return string
|
350 |
+
*/
|
351 |
+
function row_actions( $actions, $always_visible = false ) {
|
352 |
+
$action_count = count( $actions );
|
353 |
+
$i = 0;
|
354 |
+
|
355 |
+
if ( !$action_count )
|
356 |
+
return '';
|
357 |
+
|
358 |
+
$out = '<div class="' . ( $always_visible ? 'row-actions visible' : 'row-actions' ) . '">';
|
359 |
+
foreach ( $actions as $action => $link ) {
|
360 |
+
++$i;
|
361 |
+
( $i == $action_count ) ? $sep = '' : $sep = ' | ';
|
362 |
+
$out .= "<span class='$action'>$link$sep</span>";
|
363 |
+
}
|
364 |
+
$out .= '</div>';
|
365 |
+
|
366 |
+
return $out;
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Display a monthly dropdown for filtering items
|
371 |
+
*
|
372 |
+
* @since 3.1.0
|
373 |
+
* @access protected
|
374 |
+
*/
|
375 |
+
function months_dropdown( $post_type ) {
|
376 |
+
global $wpdb, $wp_locale;
|
377 |
+
|
378 |
+
$months = $wpdb->get_results( $wpdb->prepare( "
|
379 |
+
SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
|
380 |
+
FROM $wpdb->posts
|
381 |
+
WHERE post_type = %s
|
382 |
+
ORDER BY post_date DESC
|
383 |
+
", $post_type ) );
|
384 |
+
|
385 |
+
/**
|
386 |
+
* Filter the 'Months' drop-down results.
|
387 |
+
*
|
388 |
+
* @since 3.7.0
|
389 |
+
*
|
390 |
+
* @param object $months The months drop-down query results.
|
391 |
+
* @param string $post_type The post type.
|
392 |
+
*/
|
393 |
+
$months = apply_filters( 'months_dropdown_results', $months, $post_type );
|
394 |
+
|
395 |
+
$month_count = count( $months );
|
396 |
+
|
397 |
+
if ( !$month_count || ( 1 == $month_count && 0 == $months[0]->month ) )
|
398 |
+
return;
|
399 |
+
|
400 |
+
$m = isset( $_GET['m'] ) ? (int) $_GET['m'] : 0;
|
401 |
+
?>
|
402 |
+
<select name='m'>
|
403 |
+
<option<?php selected( $m, 0 ); ?> value='0'><?php _e( 'All dates' ); ?></option>
|
404 |
+
<?php
|
405 |
+
foreach ( $months as $arc_row ) {
|
406 |
+
if ( 0 == $arc_row->year )
|
407 |
+
continue;
|
408 |
+
|
409 |
+
$month = zeroise( $arc_row->month, 2 );
|
410 |
+
$year = $arc_row->year;
|
411 |
+
|
412 |
+
printf( "<option %s value='%s'>%s</option>\n",
|
413 |
+
selected( $m, $year . $month, false ),
|
414 |
+
esc_attr( $arc_row->year . $month ),
|
415 |
+
/* translators: 1: month name, 2: 4-digit year */
|
416 |
+
sprintf( __( '%1$s %2$d' ), $wp_locale->get_month( $month ), $year )
|
417 |
+
);
|
418 |
+
}
|
419 |
+
?>
|
420 |
+
</select>
|
421 |
+
<?php
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Display a view switcher
|
426 |
+
*
|
427 |
+
* @since 3.1.0
|
428 |
+
* @access protected
|
429 |
+
*/
|
430 |
+
function view_switcher( $current_mode ) {
|
431 |
+
$modes = array(
|
432 |
+
'list' => __( 'List View' ),
|
433 |
+
'excerpt' => __( 'Excerpt View' )
|
434 |
+
);
|
435 |
+
|
436 |
+
?>
|
437 |
+
<input type="hidden" name="mode" value="<?php echo esc_attr( $current_mode ); ?>" />
|
438 |
+
<div class="view-switch">
|
439 |
+
<?php
|
440 |
+
foreach ( $modes as $mode => $title ) {
|
441 |
+
$class = ( $current_mode == $mode ) ? 'class="current"' : '';
|
442 |
+
echo "<a href='" . esc_url( add_query_arg( 'mode', $mode, $_SERVER['REQUEST_URI'] ) ) . "' $class><img id='view-switch-$mode' src='" . esc_url( includes_url( 'images/blank.gif' ) ) . "' width='20' height='20' title='$title' alt='$title' /></a>\n";
|
443 |
+
}
|
444 |
+
?>
|
445 |
+
</div>
|
446 |
+
<?php
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Display a comment count bubble
|
451 |
+
*
|
452 |
+
* @since 3.1.0
|
453 |
+
* @access protected
|
454 |
+
*
|
455 |
+
* @param int $post_id
|
456 |
+
* @param int $pending_comments
|
457 |
+
*/
|
458 |
+
function comments_bubble( $post_id, $pending_comments ) {
|
459 |
+
$pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) );
|
460 |
+
|
461 |
+
if ( $pending_comments )
|
462 |
+
echo '<strong>';
|
463 |
+
|
464 |
+
echo "<a href='" . esc_url( add_query_arg( 'p', $post_id, admin_url( 'edit-comments.php' ) ) ) . "' title='" . esc_attr( $pending_phrase ) . "' class='post-com-count'><span class='comment-count'>" . number_format_i18n( get_comments_number() ) . "</span></a>";
|
465 |
+
|
466 |
+
if ( $pending_comments )
|
467 |
+
echo '</strong>';
|
468 |
+
}
|
469 |
+
|
470 |
+
/**
|
471 |
+
* Get the current page number
|
472 |
+
*
|
473 |
+
* @since 3.1.0
|
474 |
+
* @access protected
|
475 |
+
*
|
476 |
+
* @return int
|
477 |
+
*/
|
478 |
+
function get_pagenum() {
|
479 |
+
$pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
|
480 |
+
|
481 |
+
if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
|
482 |
+
$pagenum = $this->_pagination_args['total_pages'];
|
483 |
+
|
484 |
+
return max( 1, $pagenum );
|
485 |
+
}
|
486 |
+
|
487 |
+
/**
|
488 |
+
* Get number of items to display on a single page
|
489 |
+
*
|
490 |
+
* @since 3.1.0
|
491 |
+
* @access protected
|
492 |
+
*
|
493 |
+
* @return int
|
494 |
+
*/
|
495 |
+
function get_items_per_page( $option, $default = 20 ) {
|
496 |
+
$per_page = (int) get_user_option( $option );
|
497 |
+
if ( empty( $per_page ) || $per_page < 1 )
|
498 |
+
$per_page = $default;
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Filter the number of items to be displayed on each page of the list table.
|
502 |
+
*
|
503 |
+
* The dynamic hook name, $option, refers to the per page option depending
|
504 |
+
* on the type of list table in use. Possible values may include:
|
505 |
+
* 'edit_comments_per_page', 'sites_network_per_page', 'site_themes_network_per_page',
|
506 |
+
* 'themes_netework_per_page', 'users_network_per_page', 'edit_{$post_type}', etc.
|
507 |
+
*
|
508 |
+
* @since 2.9.0
|
509 |
+
*
|
510 |
+
* @param int $per_page Number of items to be displayed. Default 20.
|
511 |
+
*/
|
512 |
+
return (int) apply_filters( $option, $per_page );
|
513 |
+
}
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Display the pagination.
|
517 |
+
*
|
518 |
+
* @since 3.1.0
|
519 |
+
* @access protected
|
520 |
+
*/
|
521 |
+
function pagination( $which ) {
|
522 |
+
if ( empty( $this->_pagination_args ) )
|
523 |
+
return;
|
524 |
+
|
525 |
+
extract( $this->_pagination_args, EXTR_SKIP );
|
526 |
+
|
527 |
+
$output = '<span class="displaying-num">' . sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) ) . '</span>';
|
528 |
+
|
529 |
+
$current = $this->get_pagenum();
|
530 |
+
|
531 |
+
$current_url = fw_current_url();
|
532 |
+
|
533 |
+
$current_url = remove_query_arg( array( 'hotkeys_highlight_last', 'hotkeys_highlight_first' ), $current_url );
|
534 |
+
|
535 |
+
$page_links = array();
|
536 |
+
|
537 |
+
$disable_first = $disable_last = '';
|
538 |
+
if ( $current == 1 )
|
539 |
+
$disable_first = ' disabled';
|
540 |
+
if ( $current == $total_pages )
|
541 |
+
$disable_last = ' disabled';
|
542 |
+
|
543 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
544 |
+
'first-page' . $disable_first,
|
545 |
+
esc_attr__( 'Go to the first page' ),
|
546 |
+
esc_url( remove_query_arg( 'paged', $current_url ) ),
|
547 |
+
'«'
|
548 |
+
);
|
549 |
+
|
550 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
551 |
+
'prev-page' . $disable_first,
|
552 |
+
esc_attr__( 'Go to the previous page' ),
|
553 |
+
esc_url( add_query_arg( 'paged', max( 1, $current-1 ), $current_url ) ),
|
554 |
+
'‹'
|
555 |
+
);
|
556 |
+
|
557 |
+
if ( 'bottom' == $which )
|
558 |
+
$html_current_page = $current;
|
559 |
+
else
|
560 |
+
$html_current_page = sprintf( "<input class='current-page' title='%s' type='text' name='paged' value='%s' size='%d' />",
|
561 |
+
esc_attr__( 'Current page' ),
|
562 |
+
$current,
|
563 |
+
strlen( $total_pages )
|
564 |
+
);
|
565 |
+
|
566 |
+
$html_total_pages = sprintf( "<span class='total-pages'>%s</span>", number_format_i18n( $total_pages ) );
|
567 |
+
$page_links[] = '<span class="paging-input">' . sprintf( _x( '%1$s of %2$s', 'paging' ), $html_current_page, $html_total_pages ) . '</span>';
|
568 |
+
|
569 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
570 |
+
'next-page' . $disable_last,
|
571 |
+
esc_attr__( 'Go to the next page' ),
|
572 |
+
esc_url( add_query_arg( 'paged', min( $total_pages, $current+1 ), $current_url ) ),
|
573 |
+
'›'
|
574 |
+
);
|
575 |
+
|
576 |
+
$page_links[] = sprintf( "<a class='%s' title='%s' href='%s'>%s</a>",
|
577 |
+
'last-page' . $disable_last,
|
578 |
+
esc_attr__( 'Go to the last page' ),
|
579 |
+
esc_url( add_query_arg( 'paged', $total_pages, $current_url ) ),
|
580 |
+
'»'
|
581 |
+
);
|
582 |
+
|
583 |
+
$pagination_links_class = 'pagination-links';
|
584 |
+
if ( ! empty( $infinite_scroll ) )
|
585 |
+
$pagination_links_class = ' hide-if-js';
|
586 |
+
$output .= "\n<span class='$pagination_links_class'>" . join( "\n", $page_links ) . '</span>';
|
587 |
+
|
588 |
+
if ( $total_pages )
|
589 |
+
$page_class = $total_pages < 2 ? ' one-page' : '';
|
590 |
+
else
|
591 |
+
$page_class = ' no-pages';
|
592 |
+
|
593 |
+
$this->_pagination = "<div class='tablenav-pages{$page_class}'>$output</div>";
|
594 |
+
|
595 |
+
echo $this->_pagination;
|
596 |
+
}
|
597 |
+
|
598 |
+
/**
|
599 |
+
* Get a list of columns. The format is:
|
600 |
+
* 'internal-name' => 'Title'
|
601 |
+
*
|
602 |
+
* @since 3.1.0
|
603 |
+
* @access protected
|
604 |
+
* @abstract
|
605 |
+
*
|
606 |
+
* @return array
|
607 |
+
*/
|
608 |
+
function get_columns() {
|
609 |
+
die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' );
|
610 |
+
}
|
611 |
+
|
612 |
+
/**
|
613 |
+
* Get a list of sortable columns. The format is:
|
614 |
+
* 'internal-name' => 'orderby'
|
615 |
+
* or
|
616 |
+
* 'internal-name' => array( 'orderby', true )
|
617 |
+
*
|
618 |
+
* The second format will make the initial sorting order be descending
|
619 |
+
*
|
620 |
+
* @since 3.1.0
|
621 |
+
* @access protected
|
622 |
+
*
|
623 |
+
* @return array
|
624 |
+
*/
|
625 |
+
function get_sortable_columns() {
|
626 |
+
return array();
|
627 |
+
}
|
628 |
+
|
629 |
+
/**
|
630 |
+
* Get a list of all, hidden and sortable columns, with filter applied
|
631 |
+
*
|
632 |
+
* @since 3.1.0
|
633 |
+
* @access protected
|
634 |
+
*
|
635 |
+
* @return array
|
636 |
+
*/
|
637 |
+
function get_column_info() {
|
638 |
+
if ( isset( $this->_column_headers ) )
|
639 |
+
return $this->_column_headers;
|
640 |
+
|
641 |
+
$columns = get_column_headers( $this->screen );
|
642 |
+
$hidden = get_hidden_columns( $this->screen );
|
643 |
+
|
644 |
+
$sortable_columns = $this->get_sortable_columns();
|
645 |
+
/**
|
646 |
+
* Filter the list table sortable columns for a specific screen.
|
647 |
+
*
|
648 |
+
* The dynamic portion of the hook name, $this->screen->id, refers
|
649 |
+
* to the ID of the current screen, usually a string.
|
650 |
+
*
|
651 |
+
* @since 3.5.0
|
652 |
+
*
|
653 |
+
* @param array $sortable_columns An array of sortable columns.
|
654 |
+
*/
|
655 |
+
$_sortable = apply_filters( "manage_{$this->screen->id}_sortable_columns", $sortable_columns );
|
656 |
+
|
657 |
+
$sortable = array();
|
658 |
+
foreach ( $_sortable as $id => $data ) {
|
659 |
+
if ( empty( $data ) )
|
660 |
+
continue;
|
661 |
+
|
662 |
+
$data = (array) $data;
|
663 |
+
if ( !isset( $data[1] ) )
|
664 |
+
$data[1] = false;
|
665 |
+
|
666 |
+
$sortable[$id] = $data;
|
667 |
+
}
|
668 |
+
|
669 |
+
$this->_column_headers = array( $columns, $hidden, $sortable );
|
670 |
+
|
671 |
+
return $this->_column_headers;
|
672 |
+
}
|
673 |
+
|
674 |
+
/**
|
675 |
+
* Return number of visible columns
|
676 |
+
*
|
677 |
+
* @since 3.1.0
|
678 |
+
* @access public
|
679 |
+
*
|
680 |
+
* @return int
|
681 |
+
*/
|
682 |
+
function get_column_count() {
|
683 |
+
list ( $columns, $hidden ) = $this->get_column_info();
|
684 |
+
$hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) );
|
685 |
+
return count( $columns ) - count( $hidden );
|
686 |
+
}
|
687 |
+
|
688 |
+
/**
|
689 |
+
* Print column headers, accounting for hidden and sortable columns.
|
690 |
+
*
|
691 |
+
* @since 3.1.0
|
692 |
+
* @access protected
|
693 |
+
*
|
694 |
+
* @param bool $with_id Whether to set the id attribute or not
|
695 |
+
*/
|
696 |
+
function print_column_headers( $with_id = true ) {
|
697 |
+
list( $columns, $hidden, $sortable ) = $this->get_column_info();
|
698 |
+
|
699 |
+
$current_url = fw_current_url();
|
700 |
+
$current_url = remove_query_arg( 'paged', $current_url );
|
701 |
+
|
702 |
+
if ( isset( $_GET['orderby'] ) )
|
703 |
+
$current_orderby = $_GET['orderby'];
|
704 |
+
else
|
705 |
+
$current_orderby = '';
|
706 |
+
|
707 |
+
if ( isset( $_GET['order'] ) && 'desc' == $_GET['order'] )
|
708 |
+
$current_order = 'desc';
|
709 |
+
else
|
710 |
+
$current_order = 'asc';
|
711 |
+
|
712 |
+
if ( ! empty( $columns['cb'] ) ) {
|
713 |
+
static $cb_counter = 1;
|
714 |
+
$columns['cb'] = '<label class="screen-reader-text" for="cb-select-all-' . $cb_counter . '">' . __( 'Select All' ) . '</label>'
|
715 |
+
. '<input id="cb-select-all-' . $cb_counter . '" type="checkbox" />';
|
716 |
+
$cb_counter++;
|
717 |
+
}
|
718 |
+
|
719 |
+
foreach ( $columns as $column_key => $column_display_name ) {
|
720 |
+
$class = array( 'manage-column', "column-$column_key" );
|
721 |
+
|
722 |
+
$style = '';
|
723 |
+
if ( in_array( $column_key, $hidden ) )
|
724 |
+
$style = 'display:none;';
|
725 |
+
|
726 |
+
$style = ' style="' . $style . '"';
|
727 |
+
|
728 |
+
if ( 'cb' == $column_key )
|
729 |
+
$class[] = 'check-column';
|
730 |
+
elseif ( in_array( $column_key, array( 'posts', 'comments', 'links' ) ) )
|
731 |
+
$class[] = 'num';
|
732 |
+
|
733 |
+
if ( isset( $sortable[$column_key] ) ) {
|
734 |
+
list( $orderby, $desc_first ) = $sortable[$column_key];
|
735 |
+
|
736 |
+
if ( $current_orderby == $orderby ) {
|
737 |
+
$order = 'asc' == $current_order ? 'desc' : 'asc';
|
738 |
+
$class[] = 'sorted';
|
739 |
+
$class[] = $current_order;
|
740 |
+
} else {
|
741 |
+
$order = $desc_first ? 'desc' : 'asc';
|
742 |
+
$class[] = 'sortable';
|
743 |
+
$class[] = $desc_first ? 'asc' : 'desc';
|
744 |
+
}
|
745 |
+
|
746 |
+
$column_display_name = '<a href="' . esc_url( add_query_arg( compact( 'orderby', 'order' ), $current_url ) ) . '"><span>' . $column_display_name . '</span><span class="sorting-indicator"></span></a>';
|
747 |
+
}
|
748 |
+
|
749 |
+
$id = $with_id ? "id='$column_key'" : '';
|
750 |
+
|
751 |
+
if ( !empty( $class ) )
|
752 |
+
$class = "class='" . join( ' ', $class ) . "'";
|
753 |
+
|
754 |
+
echo "<th scope='col' $id $class $style>$column_display_name</th>";
|
755 |
+
}
|
756 |
+
}
|
757 |
+
|
758 |
+
/**
|
759 |
+
* Display the table
|
760 |
+
*
|
761 |
+
* @since 3.1.0
|
762 |
+
* @access public
|
763 |
+
*/
|
764 |
+
function display() {
|
765 |
+
extract( $this->_args );
|
766 |
+
|
767 |
+
$this->display_tablenav( 'top' );
|
768 |
+
|
769 |
+
?>
|
770 |
+
<table class="wp-list-table <?php echo implode( ' ', $this->get_table_classes() ); ?>">
|
771 |
+
<thead>
|
772 |
+
<tr>
|
773 |
+
<?php $this->print_column_headers(); ?>
|
774 |
+
</tr>
|
775 |
+
</thead>
|
776 |
+
|
777 |
+
<tfoot>
|
778 |
+
<tr>
|
779 |
+
<?php $this->print_column_headers( false ); ?>
|
780 |
+
</tr>
|
781 |
+
</tfoot>
|
782 |
+
|
783 |
+
<tbody id="the-list"<?php if ( $singular ) echo " data-wp-lists='list:$singular'"; ?>>
|
784 |
+
<?php $this->display_rows_or_placeholder(); ?>
|
785 |
+
</tbody>
|
786 |
+
</table>
|
787 |
+
<?php
|
788 |
+
$this->display_tablenav( 'bottom' );
|
789 |
+
}
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Get a list of CSS classes for the <table> tag
|
793 |
+
*
|
794 |
+
* @since 3.1.0
|
795 |
+
* @access protected
|
796 |
+
*
|
797 |
+
* @return array
|
798 |
+
*/
|
799 |
+
function get_table_classes() {
|
800 |
+
return array( 'widefat', 'fixed', $this->_args['plural'] );
|
801 |
+
}
|
802 |
+
|
803 |
+
/**
|
804 |
+
* Generate the table navigation above or below the table
|
805 |
+
*
|
806 |
+
* @since 3.1.0
|
807 |
+
* @access protected
|
808 |
+
*/
|
809 |
+
function display_tablenav( $which ) {
|
810 |
+
if ( 'top' == $which )
|
811 |
+
wp_nonce_field( 'bulk-' . $this->_args['plural'] );
|
812 |
+
?>
|
813 |
+
<div class="tablenav <?php echo esc_attr( $which ); ?>">
|
814 |
+
|
815 |
+
<div class="alignleft actions bulkactions">
|
816 |
+
<?php $this->bulk_actions(); ?>
|
817 |
+
</div>
|
818 |
+
<?php
|
819 |
+
$this->extra_tablenav( $which );
|
820 |
+
$this->pagination( $which );
|
821 |
+
?>
|
822 |
+
|
823 |
+
<br class="clear" />
|
824 |
+
</div>
|
825 |
+
<?php
|
826 |
+
}
|
827 |
+
|
828 |
+
/**
|
829 |
+
* Extra controls to be displayed between bulk actions and pagination
|
830 |
+
*
|
831 |
+
* @since 3.1.0
|
832 |
+
* @access protected
|
833 |
+
*/
|
834 |
+
function extra_tablenav( $which ) {}
|
835 |
+
|
836 |
+
/**
|
837 |
+
* Generate the <tbody> part of the table
|
838 |
+
*
|
839 |
+
* @since 3.1.0
|
840 |
+
* @access protected
|
841 |
+
*/
|
842 |
+
function display_rows_or_placeholder() {
|
843 |
+
if ( $this->has_items() ) {
|
844 |
+
$this->display_rows();
|
845 |
+
} else {
|
846 |
+
list( $columns, $hidden ) = $this->get_column_info();
|
847 |
+
echo '<tr class="no-items"><td class="colspanchange" colspan="' . $this->get_column_count() . '">';
|
848 |
+
$this->no_items();
|
849 |
+
echo '</td></tr>';
|
850 |
+
}
|
851 |
+
}
|
852 |
+
|
853 |
+
/**
|
854 |
+
* Generate the table rows
|
855 |
+
*
|
856 |
+
* @since 3.1.0
|
857 |
+
* @access protected
|
858 |
+
*/
|
859 |
+
function display_rows() {
|
860 |
+
foreach ( $this->items as $item )
|
861 |
+
$this->single_row( $item );
|
862 |
+
}
|
863 |
+
|
864 |
+
/**
|
865 |
+
* Generates content for a single row of the table
|
866 |
+
*
|
867 |
+
* @since 3.1.0
|
868 |
+
* @access protected
|
869 |
+
*
|
870 |
+
* @param object $item The current item
|
871 |
+
*/
|
872 |
+
function single_row( $item ) {
|
873 |
+
static $row_class = '';
|
874 |
+
$row_class = ( $row_class == '' ? ' class="alternate"' : '' );
|
875 |
+
|
876 |
+
echo '<tr' . $row_class . '>';
|
877 |
+
$this->single_row_columns( $item );
|
878 |
+
echo '</tr>';
|
879 |
+
}
|
880 |
+
|
881 |
+
/**
|
882 |
+
* Generates the columns for a single row of the table
|
883 |
+
*
|
884 |
+
* @since 3.1.0
|
885 |
+
* @access protected
|
886 |
+
*
|
887 |
+
* @param object $item The current item
|
888 |
+
*/
|
889 |
+
function single_row_columns( $item ) {
|
890 |
+
list( $columns, $hidden ) = $this->get_column_info();
|
891 |
+
|
892 |
+
foreach ( $columns as $column_name => $column_display_name ) {
|
893 |
+
$class = "class='$column_name column-$column_name'";
|
894 |
+
|
895 |
+
$style = '';
|
896 |
+
if ( in_array( $column_name, $hidden ) )
|
897 |
+
$style = ' style="display:none;"';
|
898 |
+
|
899 |
+
$attributes = "$class$style";
|
900 |
+
|
901 |
+
if ( 'cb' == $column_name ) {
|
902 |
+
echo '<th scope="row" class="check-column">';
|
903 |
+
echo $this->column_cb( $item );
|
904 |
+
echo '</th>';
|
905 |
+
}
|
906 |
+
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
907 |
+
echo "<td $attributes>";
|
908 |
+
echo call_user_func( array( $this, 'column_' . $column_name ), $item );
|
909 |
+
echo "</td>";
|
910 |
+
}
|
911 |
+
else {
|
912 |
+
echo "<td $attributes>";
|
913 |
+
echo $this->column_default( $item, $column_name );
|
914 |
+
echo "</td>";
|
915 |
+
}
|
916 |
+
}
|
917 |
+
}
|
918 |
+
|
919 |
+
/**
|
920 |
+
* Handle an incoming ajax request (called from admin-ajax.php)
|
921 |
+
*
|
922 |
+
* @since 3.1.0
|
923 |
+
* @access public
|
924 |
+
*/
|
925 |
+
function ajax_response() {
|
926 |
+
$this->prepare_items();
|
927 |
+
|
928 |
+
extract( $this->_args );
|
929 |
+
extract( $this->_pagination_args, EXTR_SKIP );
|
930 |
+
|
931 |
+
ob_start();
|
932 |
+
if ( ! empty( $_REQUEST['no_placeholder'] ) )
|
933 |
+
$this->display_rows();
|
934 |
+
else
|
935 |
+
$this->display_rows_or_placeholder();
|
936 |
+
|
937 |
+
$rows = ob_get_clean();
|
938 |
+
|
939 |
+
$response = array( 'rows' => $rows );
|
940 |
+
|
941 |
+
if ( isset( $total_items ) )
|
942 |
+
$response['total_items_i18n'] = sprintf( _n( '1 item', '%s items', $total_items ), number_format_i18n( $total_items ) );
|
943 |
+
|
944 |
+
if ( isset( $total_pages ) ) {
|
945 |
+
$response['total_pages'] = $total_pages;
|
946 |
+
$response['total_pages_i18n'] = number_format_i18n( $total_pages );
|
947 |
+
}
|
948 |
+
|
949 |
+
die( json_encode( $response ) );
|
950 |
+
}
|
951 |
+
|
952 |
+
/**
|
953 |
+
* Send required variables to JavaScript land
|
954 |
+
*
|
955 |
+
* @access private
|
956 |
+
*/
|
957 |
+
function _js_vars() {
|
958 |
+
$args = array(
|
959 |
+
'class' => get_class( $this ),
|
960 |
+
'screen' => array(
|
961 |
+
'id' => $this->screen->id,
|
962 |
+
'base' => $this->screen->base,
|
963 |
+
)
|
964 |
+
);
|
965 |
+
|
966 |
+
printf( "<script type='text/javascript'>list_args = %s;</script>\n", json_encode( $args ) );
|
967 |
+
}
|
968 |
+
}
|
framework/helpers/general.php
CHANGED
@@ -774,22 +774,27 @@ function fw_get_google_fonts() {
|
|
774 |
* @return string Current url
|
775 |
*/
|
776 |
function fw_current_url() {
|
777 |
-
static $
|
778 |
-
if ($cache !== null)
|
779 |
-
return $cache;
|
780 |
|
781 |
-
$
|
|
|
782 |
|
783 |
-
|
784 |
-
|
|
|
|
|
|
|
785 |
|
786 |
-
|
|
|
|
|
787 |
|
788 |
-
|
789 |
|
790 |
-
|
|
|
791 |
|
792 |
-
return $
|
793 |
}
|
794 |
|
795 |
function fw_is_valid_domain_name($domain_name) {
|
@@ -1031,3 +1036,10 @@ function fw_id_to_title($id) {
|
|
1031 |
function fw_ext($extension_name) {
|
1032 |
return fw()->extensions->get($extension_name);
|
1033 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
774 |
* @return string Current url
|
775 |
*/
|
776 |
function fw_current_url() {
|
777 |
+
static $url = null;
|
|
|
|
|
778 |
|
779 |
+
if ($url === null) {
|
780 |
+
$url = 'http://';
|
781 |
|
782 |
+
if ($_SERVER['SERVER_NAME'] === '_') { // https://github.com/ThemeFuse/Unyson/issues/126
|
783 |
+
$url .= $_SERVER['HTTP_HOST'];
|
784 |
+
} else {
|
785 |
+
$url .= $_SERVER['SERVER_NAME'];
|
786 |
+
}
|
787 |
|
788 |
+
if ($_SERVER['SERVER_PORT'] != '80') {
|
789 |
+
$url .= ':'. $_SERVER['SERVER_PORT'];
|
790 |
+
}
|
791 |
|
792 |
+
$url .= $_SERVER['REQUEST_URI'];
|
793 |
|
794 |
+
$url = set_url_scheme($url);
|
795 |
+
}
|
796 |
|
797 |
+
return $url;
|
798 |
}
|
799 |
|
800 |
function fw_is_valid_domain_name($domain_name) {
|
1036 |
function fw_ext($extension_name) {
|
1037 |
return fw()->extensions->get($extension_name);
|
1038 |
}
|
1039 |
+
|
1040 |
+
/*
|
1041 |
+
* Return URI without scheme
|
1042 |
+
*/
|
1043 |
+
function fw_get_url_without_scheme( $url ) {
|
1044 |
+
return preg_replace( '/^[^:]+:\/\//', '//', $url );
|
1045 |
+
}
|
framework/includes/option-types/multi-picker/class-fw-option-type-multi-picker.php
CHANGED
@@ -102,7 +102,7 @@ class FW_Option_Type_Multi_Picker extends FW_Option_Type
|
|
102 |
$picker_key = key($option['picker']);
|
103 |
$picker = $option['picker'][$picker_key];
|
104 |
$picker_type = $picker['type'];
|
105 |
-
$supported_picker_types = array('select', 'radio', 'image-picker', 'switch');
|
106 |
if (!in_array($picker_type, $supported_picker_types)) {
|
107 |
// TODO: think of text for error when incorrect picker type is used
|
108 |
trigger_error(
|
@@ -123,6 +123,7 @@ class FW_Option_Type_Multi_Picker extends FW_Option_Type
|
|
123 |
));
|
124 |
break;
|
125 |
case 'select':
|
|
|
126 |
// we need to treat the case with optgroups
|
127 |
$collected_choices = array();
|
128 |
foreach ($picker['choices'] as $key => $value) {
|
@@ -221,6 +222,7 @@ class FW_Option_Type_Multi_Picker extends FW_Option_Type
|
|
221 |
));
|
222 |
break;
|
223 |
case 'select':
|
|
|
224 |
// we need to treat the case with optgroups
|
225 |
$collected_choices = array();
|
226 |
foreach ($picker['choices'] as $key => $choice_value) {
|
102 |
$picker_key = key($option['picker']);
|
103 |
$picker = $option['picker'][$picker_key];
|
104 |
$picker_type = $picker['type'];
|
105 |
+
$supported_picker_types = array('select', 'short-select', 'radio', 'image-picker', 'switch');
|
106 |
if (!in_array($picker_type, $supported_picker_types)) {
|
107 |
// TODO: think of text for error when incorrect picker type is used
|
108 |
trigger_error(
|
123 |
));
|
124 |
break;
|
125 |
case 'select':
|
126 |
+
case 'short-select':
|
127 |
// we need to treat the case with optgroups
|
128 |
$collected_choices = array();
|
129 |
foreach ($picker['choices'] as $key => $value) {
|
222 |
));
|
223 |
break;
|
224 |
case 'select':
|
225 |
+
case 'short-select':
|
226 |
// we need to treat the case with optgroups
|
227 |
$collected_choices = array();
|
228 |
foreach ($picker['choices'] as $key => $choice_value) {
|
framework/includes/option-types/multi-picker/static/js/multi-picker.js
CHANGED
@@ -34,6 +34,9 @@
|
|
34 |
chooseGroup(this.value);
|
35 |
}).trigger('change');
|
36 |
},
|
|
|
|
|
|
|
37 |
'radio': function() {
|
38 |
elements.$pickerGroup.find(':radio').on('change', function() {
|
39 |
chooseGroup(this.value);
|
34 |
chooseGroup(this.value);
|
35 |
}).trigger('change');
|
36 |
},
|
37 |
+
'short-select': function() {
|
38 |
+
this.select();
|
39 |
+
},
|
40 |
'radio': function() {
|
41 |
elements.$pickerGroup.find(':radio').on('change', function() {
|
42 |
chooseGroup(this.value);
|
framework/includes/option-types/range-slider/static/css/styles.css
CHANGED
@@ -1,18 +1,21 @@
|
|
1 |
.fw-option-type-range-slider .irs {
|
2 |
-
height:
|
3 |
}
|
4 |
|
5 |
.fw-option-type-range-slider .irs-with-grid {
|
6 |
-
height:
|
7 |
}
|
8 |
|
9 |
.fw-option-type-range-slider .irs-line {
|
10 |
height: 5px;
|
11 |
-
top:
|
12 |
background: #ffffff;
|
13 |
-
border:
|
|
|
|
|
14 |
border-radius: 16px;
|
15 |
-moz-border-radius: 16px;
|
|
|
16 |
}
|
17 |
|
18 |
.fw-option-type-range-slider .irs-line-left {
|
@@ -28,19 +31,27 @@
|
|
28 |
}
|
29 |
|
30 |
.fw-option-type-range-slider .irs-bar {
|
31 |
-
height:
|
32 |
-
top:
|
33 |
-
background: #
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
.fw-option-type-range-slider .irs-bar-edge {
|
37 |
-
height:
|
38 |
top: 33px;
|
39 |
-
width:
|
40 |
border-right: 0;
|
41 |
background: #cbcbcb;
|
42 |
border-radius: 16px 0 0 16px;
|
43 |
-moz-border-radius: 16px 0 0 16px;
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
.fw-option-type-range-slider .irs-shadow {
|
@@ -50,6 +61,7 @@
|
|
50 |
opacity: 0.3;
|
51 |
border-radius: 5px;
|
52 |
-moz-border-radius: 5px;
|
|
|
53 |
}
|
54 |
|
55 |
.fw-option-type-range-slider .lt-ie9 .irs-shadow {
|
@@ -57,18 +69,24 @@
|
|
57 |
}
|
58 |
|
59 |
.fw-option-type-range-slider .irs-slider {
|
60 |
-
top:
|
61 |
-
width: 18px;
|
62 |
-
height: 18px;
|
63 |
border: none;
|
64 |
-
|
65 |
-
border-radius:
|
66 |
-
-
|
67 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
.fw-option-type-range-slider #irs-active-slider, .fw-option-type-range-slider .irs-slider:hover {
|
71 |
-
background: #
|
72 |
}
|
73 |
|
74 |
.fw-option-type-range-slider .irs-min, .fw-option-type-range-slider .irs-max {
|
@@ -82,6 +100,7 @@
|
|
82 |
background: rgba(0, 0, 0, 0.1);
|
83 |
border-radius: 3px;
|
84 |
-moz-border-radius: 3px;
|
|
|
85 |
}
|
86 |
|
87 |
.fw-option-type-range-slider .lt-ie9 .irs-min, .fw-option-type-range-slider .lt-ie9 .irs-max {
|
@@ -89,6 +108,7 @@
|
|
89 |
}
|
90 |
|
91 |
.fw-option-type-range-slider .irs-from, .fw-option-type-range-slider .irs-to, .fw-option-type-range-slider .irs-single {
|
|
|
92 |
color: #f1f1f1;
|
93 |
font-size: 14px;
|
94 |
line-height: 1.333;
|
@@ -97,6 +117,7 @@
|
|
97 |
background: #787878;
|
98 |
border-radius: 3px;
|
99 |
-moz-border-radius: 3px;
|
|
|
100 |
}
|
101 |
|
102 |
.fw-option-type-range-slider .lt-ie9 .irs-from, .fw-option-type-range-slider .lt-ie9 .irs-to, .fw-option-type-range-slider .lt-ie9 .irs-single {
|
@@ -104,7 +125,7 @@
|
|
104 |
}
|
105 |
|
106 |
.fw-option-type-range-slider .irs-grid {
|
107 |
-
height:
|
108 |
}
|
109 |
|
110 |
.fw-option-type-range-slider .irs-grid-pol {
|
@@ -117,7 +138,6 @@
|
|
117 |
}
|
118 |
|
119 |
.fw-option-type-range-slider .irs-grid-text {
|
120 |
-
bottom: 5px;
|
121 |
color: #99a4ac;
|
122 |
}
|
123 |
|
1 |
.fw-option-type-range-slider .irs {
|
2 |
+
height: 30px;
|
3 |
}
|
4 |
|
5 |
.fw-option-type-range-slider .irs-with-grid {
|
6 |
+
height: 40px;
|
7 |
}
|
8 |
|
9 |
.fw-option-type-range-slider .irs-line {
|
10 |
height: 5px;
|
11 |
+
top: 5px;
|
12 |
background: #ffffff;
|
13 |
+
border: 1px solid #ddd;
|
14 |
+
-webkit-box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
|
15 |
+
box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
|
16 |
border-radius: 16px;
|
17 |
-moz-border-radius: 16px;
|
18 |
+
-webkit-border-radius: 16px;
|
19 |
}
|
20 |
|
21 |
.fw-option-type-range-slider .irs-line-left {
|
31 |
}
|
32 |
|
33 |
.fw-option-type-range-slider .irs-bar {
|
34 |
+
height: 7px;
|
35 |
+
top: 5px;
|
36 |
+
background: #d9ecf4;
|
37 |
+
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
38 |
+
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
39 |
+
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
40 |
}
|
41 |
|
42 |
.fw-option-type-range-slider .irs-bar-edge {
|
43 |
+
height: 7px;
|
44 |
top: 33px;
|
45 |
+
width: 16px;
|
46 |
border-right: 0;
|
47 |
background: #cbcbcb;
|
48 |
border-radius: 16px 0 0 16px;
|
49 |
-moz-border-radius: 16px 0 0 16px;
|
50 |
+
-webkit-border-radius: 16px 0 0 16px;
|
51 |
+
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
52 |
+
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
53 |
+
box-shadow: inner 0 0 2px 1px #c4d5dc;
|
54 |
+
border-right: none;
|
55 |
}
|
56 |
|
57 |
.fw-option-type-range-slider .irs-shadow {
|
61 |
opacity: 0.3;
|
62 |
border-radius: 5px;
|
63 |
-moz-border-radius: 5px;
|
64 |
+
-webkit-border-radius: 5px;
|
65 |
}
|
66 |
|
67 |
.fw-option-type-range-slider .lt-ie9 .irs-shadow {
|
69 |
}
|
70 |
|
71 |
.fw-option-type-range-slider .irs-slider {
|
72 |
+
top: 0;
|
|
|
|
|
73 |
border: none;
|
74 |
+
border-radius: 10px;
|
75 |
+
-moz-border-radius: 10px;
|
76 |
+
-webkit-border-radius: 10px;
|
77 |
cursor: pointer;
|
78 |
+
background-color: #00709f;
|
79 |
+
color: #ffffff;
|
80 |
+
text-align: center;
|
81 |
+
font-size: 11px;
|
82 |
+
padding: 5px;
|
83 |
+
min-width: 16px;
|
84 |
+
height: 8px;
|
85 |
+
line-height: 8px;
|
86 |
}
|
87 |
|
88 |
.fw-option-type-range-slider #irs-active-slider, .fw-option-type-range-slider .irs-slider:hover {
|
89 |
+
background: #00709f;
|
90 |
}
|
91 |
|
92 |
.fw-option-type-range-slider .irs-min, .fw-option-type-range-slider .irs-max {
|
100 |
background: rgba(0, 0, 0, 0.1);
|
101 |
border-radius: 3px;
|
102 |
-moz-border-radius: 3px;
|
103 |
+
-webkit-border-radius: 3px;
|
104 |
}
|
105 |
|
106 |
.fw-option-type-range-slider .lt-ie9 .irs-min, .fw-option-type-range-slider .lt-ie9 .irs-max {
|
108 |
}
|
109 |
|
110 |
.fw-option-type-range-slider .irs-from, .fw-option-type-range-slider .irs-to, .fw-option-type-range-slider .irs-single {
|
111 |
+
display: none;
|
112 |
color: #f1f1f1;
|
113 |
font-size: 14px;
|
114 |
line-height: 1.333;
|
117 |
background: #787878;
|
118 |
border-radius: 3px;
|
119 |
-moz-border-radius: 3px;
|
120 |
+
-webkit-border-radius: 3px;
|
121 |
}
|
122 |
|
123 |
.fw-option-type-range-slider .lt-ie9 .irs-from, .fw-option-type-range-slider .lt-ie9 .irs-to, .fw-option-type-range-slider .lt-ie9 .irs-single {
|
125 |
}
|
126 |
|
127 |
.fw-option-type-range-slider .irs-grid {
|
128 |
+
height: 19px;
|
129 |
}
|
130 |
|
131 |
.fw-option-type-range-slider .irs-grid-pol {
|
138 |
}
|
139 |
|
140 |
.fw-option-type-range-slider .irs-grid-text {
|
|
|
141 |
color: #99a4ac;
|
142 |
}
|
143 |
|
framework/includes/option-types/range-slider/static/js/scripts.js
CHANGED
@@ -2,7 +2,14 @@
|
|
2 |
var defaults = {
|
3 |
onChange: function (data) {
|
4 |
data.input.next('.fw-irs-range-slider-hidden-input').val(data.from + ';' + data.to);
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
};
|
7 |
|
8 |
fwEvents.on('fw:options:init', function (data) {
|
2 |
var defaults = {
|
3 |
onChange: function (data) {
|
4 |
data.input.next('.fw-irs-range-slider-hidden-input').val(data.from + ';' + data.to);
|
5 |
+
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.from').html(data.from);
|
6 |
+
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.to').html(data.to);
|
7 |
+
},
|
8 |
+
onStart: function (data) {
|
9 |
+
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.from').html(data.from);
|
10 |
+
data.input.closest('.fw-option-type-range-slider').find('span.irs-slider.to').html(data.to);
|
11 |
+
},
|
12 |
+
grid: true
|
13 |
};
|
14 |
|
15 |
fwEvents.on('fw:options:init', function (data) {
|
framework/includes/option-types/slider/static/css/styles.css
CHANGED
@@ -1,18 +1,21 @@
|
|
1 |
.fw-option-type-slider .irs {
|
2 |
-
height:
|
3 |
}
|
4 |
|
5 |
.fw-option-type-slider .irs-with-grid {
|
6 |
-
height:
|
7 |
}
|
8 |
|
9 |
.fw-option-type-slider .irs-line {
|
10 |
height: 5px;
|
11 |
-
top:
|
12 |
background: #ffffff;
|
13 |
-
border:
|
|
|
|
|
14 |
border-radius: 16px;
|
15 |
-moz-border-radius: 16px;
|
|
|
16 |
}
|
17 |
|
18 |
.fw-option-type-slider .irs-line-left {
|
@@ -28,19 +31,31 @@
|
|
28 |
}
|
29 |
|
30 |
.fw-option-type-slider .irs-bar {
|
31 |
-
height:
|
32 |
-
top:
|
33 |
-
background: #
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
}
|
35 |
|
36 |
.fw-option-type-slider .irs-bar-edge {
|
37 |
-
height:
|
38 |
top: 33px;
|
39 |
-
width:
|
40 |
-
|
41 |
-
background: #cbcbcb;
|
42 |
border-radius: 16px 0 0 16px;
|
43 |
-moz-border-radius: 16px 0 0 16px;
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
.fw-option-type-slider .irs-shadow {
|
@@ -50,6 +65,7 @@
|
|
50 |
opacity: 0.3;
|
51 |
border-radius: 5px;
|
52 |
-moz-border-radius: 5px;
|
|
|
53 |
}
|
54 |
|
55 |
.fw-option-type-slider .lt-ie9 .irs-shadow {
|
@@ -57,18 +73,24 @@
|
|
57 |
}
|
58 |
|
59 |
.fw-option-type-slider .irs-slider {
|
60 |
-
top:
|
61 |
-
width: 18px;
|
62 |
-
height: 18px;
|
63 |
border: none;
|
64 |
-
|
65 |
-
border-radius:
|
66 |
-
-
|
67 |
cursor: pointer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
.fw-option-type-slider #irs-active-slider, .fw-option-type-slider .irs-slider:hover {
|
71 |
-
background: #
|
72 |
}
|
73 |
|
74 |
.fw-option-type-slider .irs-min, .fw-option-type-slider .irs-max {
|
@@ -82,6 +104,7 @@
|
|
82 |
background: rgba(0, 0, 0, 0.1);
|
83 |
border-radius: 3px;
|
84 |
-moz-border-radius: 3px;
|
|
|
85 |
}
|
86 |
|
87 |
.fw-option-type-slider .lt-ie9 .irs-min, .fw-option-type-slider .lt-ie9 .irs-max {
|
@@ -89,6 +112,7 @@
|
|
89 |
}
|
90 |
|
91 |
.fw-option-type-slider .irs-from, .fw-option-type-slider .irs-to, .fw-option-type-slider .irs-single {
|
|
|
92 |
color: #f1f1f1;
|
93 |
font-size: 14px;
|
94 |
line-height: 1.333;
|
@@ -97,6 +121,7 @@
|
|
97 |
background: #787878;
|
98 |
border-radius: 3px;
|
99 |
-moz-border-radius: 3px;
|
|
|
100 |
}
|
101 |
|
102 |
.fw-option-type-slider .lt-ie9 .irs-from, .fw-option-type-slider .lt-ie9 .irs-to, .fw-option-type-slider .lt-ie9 .irs-single {
|
@@ -104,7 +129,7 @@
|
|
104 |
}
|
105 |
|
106 |
.fw-option-type-slider .irs-grid {
|
107 |
-
height:
|
108 |
}
|
109 |
|
110 |
.fw-option-type-slider .irs-grid-pol {
|
@@ -117,9 +142,8 @@
|
|
117 |
}
|
118 |
|
119 |
.fw-option-type-slider .irs-grid-text {
|
120 |
-
bottom: 5px;
|
121 |
color: #99a4ac;
|
122 |
}
|
123 |
|
124 |
.fw-option-type-slider .irs-disabled {
|
125 |
-
}
|
1 |
.fw-option-type-slider .irs {
|
2 |
+
height: 30px;
|
3 |
}
|
4 |
|
5 |
.fw-option-type-slider .irs-with-grid {
|
6 |
+
height: 40px;
|
7 |
}
|
8 |
|
9 |
.fw-option-type-slider .irs-line {
|
10 |
height: 5px;
|
11 |
+
top: 5px;
|
12 |
background: #ffffff;
|
13 |
+
border: 1px solid #ddd;
|
14 |
+
-webkit-box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
|
15 |
+
box-shadow: inset 0 1px 2px rgba( 0, 0, 0, 0.07 );
|
16 |
border-radius: 16px;
|
17 |
-moz-border-radius: 16px;
|
18 |
+
-webkit-border-radius: 16px;
|
19 |
}
|
20 |
|
21 |
.fw-option-type-slider .irs-line-left {
|
31 |
}
|
32 |
|
33 |
.fw-option-type-slider .irs-bar {
|
34 |
+
height: 7px;
|
35 |
+
top: 5px;
|
36 |
+
background: #d9ecf4;
|
37 |
+
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
38 |
+
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
39 |
+
box-shadow: inner 0 0 1px 2px #c4d5dc;
|
40 |
+
|
41 |
+
left: 0 !important;
|
42 |
+
border-radius: 16px 0 0 16px;
|
43 |
+
-moz-border-radius: 16px 0 0 16px;
|
44 |
+
-webkit-border-radius: 16px 0 0 16px;
|
45 |
}
|
46 |
|
47 |
.fw-option-type-slider .irs-bar-edge {
|
48 |
+
height: 7px;
|
49 |
top: 33px;
|
50 |
+
width: 16px;
|
51 |
+
background: #d9ecf4;
|
|
|
52 |
border-radius: 16px 0 0 16px;
|
53 |
-moz-border-radius: 16px 0 0 16px;
|
54 |
+
-webkit-border-radius: 16px 0 0 16px;
|
55 |
+
-moz-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
56 |
+
-webkit-box-shadow: inset 0 0 2px 1px #c4d5dc;
|
57 |
+
box-shadow: inner 0 0 2px 1px #c4d5dc;
|
58 |
+
border-right: none;
|
59 |
}
|
60 |
|
61 |
.fw-option-type-slider .irs-shadow {
|
65 |
opacity: 0.3;
|
66 |
border-radius: 5px;
|
67 |
-moz-border-radius: 5px;
|
68 |
+
-webkit-border-radius: 5px;
|
69 |
}
|
70 |
|
71 |
.fw-option-type-slider .lt-ie9 .irs-shadow {
|
73 |
}
|
74 |
|
75 |
.fw-option-type-slider .irs-slider {
|
76 |
+
top: 0;
|
|
|
|
|
77 |
border: none;
|
78 |
+
border-radius: 10px;
|
79 |
+
-moz-border-radius: 10px;
|
80 |
+
-webkit-border-radius: 10px;
|
81 |
cursor: pointer;
|
82 |
+
background-color: #00709f;
|
83 |
+
color: #ffffff;
|
84 |
+
text-align: center;
|
85 |
+
font-size: 11px;
|
86 |
+
padding: 5px;
|
87 |
+
min-width: 16px;
|
88 |
+
height: 8px;
|
89 |
+
line-height: 8px;
|
90 |
}
|
91 |
|
92 |
.fw-option-type-slider #irs-active-slider, .fw-option-type-slider .irs-slider:hover {
|
93 |
+
background: #00709f;
|
94 |
}
|
95 |
|
96 |
.fw-option-type-slider .irs-min, .fw-option-type-slider .irs-max {
|
104 |
background: rgba(0, 0, 0, 0.1);
|
105 |
border-radius: 3px;
|
106 |
-moz-border-radius: 3px;
|
107 |
+
-webkit-border-radius: 3px;
|
108 |
}
|
109 |
|
110 |
.fw-option-type-slider .lt-ie9 .irs-min, .fw-option-type-slider .lt-ie9 .irs-max {
|
112 |
}
|
113 |
|
114 |
.fw-option-type-slider .irs-from, .fw-option-type-slider .irs-to, .fw-option-type-slider .irs-single {
|
115 |
+
display: none;
|
116 |
color: #f1f1f1;
|
117 |
font-size: 14px;
|
118 |
line-height: 1.333;
|
121 |
background: #787878;
|
122 |
border-radius: 3px;
|
123 |
-moz-border-radius: 3px;
|
124 |
+
-webkit-border-radius: 3px;
|
125 |
}
|
126 |
|
127 |
.fw-option-type-slider .lt-ie9 .irs-from, .fw-option-type-slider .lt-ie9 .irs-to, .fw-option-type-slider .lt-ie9 .irs-single {
|
129 |
}
|
130 |
|
131 |
.fw-option-type-slider .irs-grid {
|
132 |
+
height: 19px;
|
133 |
}
|
134 |
|
135 |
.fw-option-type-slider .irs-grid-pol {
|
142 |
}
|
143 |
|
144 |
.fw-option-type-slider .irs-grid-text {
|
|
|
145 |
color: #99a4ac;
|
146 |
}
|
147 |
|
148 |
.fw-option-type-slider .irs-disabled {
|
149 |
+
}
|
framework/includes/option-types/slider/static/js/scripts.js
CHANGED
@@ -2,13 +2,19 @@
|
|
2 |
var defaults = {
|
3 |
onChange: function (data) {
|
4 |
data.input.next('.fw-irs-range-slider-hidden-input').val(data.from + ';' + data.to);
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
};
|
7 |
|
8 |
fwEvents.on('fw:options:init', function (data) {
|
9 |
data.$elements.find('.fw-option-type-slider').each(function () {
|
10 |
var options = JSON.parse($(this).attr('data-fw-irs-options'));
|
11 |
-
$(this).find('.fw-irs-range-slider').ionRangeSlider(_.defaults(options, defaults));
|
12 |
});
|
13 |
});
|
14 |
|
2 |
var defaults = {
|
3 |
onChange: function (data) {
|
4 |
data.input.next('.fw-irs-range-slider-hidden-input').val(data.from + ';' + data.to);
|
5 |
+
data.input.closest('.fw-option-type-slider').find('span span.irs-slider.single').html(data.from);
|
6 |
+
},
|
7 |
+
onStart: function (data) {
|
8 |
+
data.input.closest('.fw-option-type-slider').find('span span.irs-slider.single').html(data.from);
|
9 |
+
data.input.closest('.fw-option-type-slider').find('.irs-bar-edge').remove();
|
10 |
+
},
|
11 |
+
grid: true
|
12 |
};
|
13 |
|
14 |
fwEvents.on('fw:options:init', function (data) {
|
15 |
data.$elements.find('.fw-option-type-slider').each(function () {
|
16 |
var options = JSON.parse($(this).attr('data-fw-irs-options'));
|
17 |
+
var slider = $(this).find('.fw-irs-range-slider').ionRangeSlider(_.defaults(options, defaults));
|
18 |
});
|
19 |
});
|
20 |
|
framework/includes/option-types/wp-editor/class-fw-option-type-wp-editor.php
CHANGED
@@ -173,7 +173,7 @@ class FW_Option_Type_Wp_Editor extends FW_Option_Type
|
|
173 |
|
174 |
echo '<div ' . fw_attr_to_html($wrapper_attr) . ' >';
|
175 |
|
176 |
-
$option['editor_css'] .=
|
177 |
|
178 |
wp_editor( $value, $textarea_id, array(
|
179 |
'teeny' => $option['teeny'],
|
173 |
|
174 |
echo '<div ' . fw_attr_to_html($wrapper_attr) . ' >';
|
175 |
|
176 |
+
$option['editor_css'] .= '<style>#wp-link-wrap{z-index: 160105} #wp-link-backdrop{z-index: 160100} .mce-container.mce-panel.mce-floatpanel.mce-menu, .mce-container.mce-panel.mce-floatpanel.mce-popover, .mce-container.mce-panel.mce-floatpanel.mce-window {z-index: 160105 !important;}</style>';
|
177 |
|
178 |
wp_editor( $value, $textarea_id, array(
|
179 |
'teeny' => $option['teeny'],
|
framework/manifest.php
CHANGED
@@ -4,4 +4,4 @@ $manifest = array();
|
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
-
$manifest['version'] = '2.1.
|
4 |
|
5 |
$manifest['name'] = __('Unyson', 'fw');
|
6 |
|
7 |
+
$manifest['version'] = '2.1.18';
|
framework/static/css/jquery.jscrollpane.css
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* CSS Styles that are needed by jScrollPane for it to operate correctly.
|
3 |
-
*
|
4 |
-
* Include this stylesheet in your site or copy and paste the styles below into your stylesheet - jScrollPane
|
5 |
-
* may not operate correctly without them.
|
6 |
-
*/
|
7 |
-
|
8 |
-
.jspContainer
|
9 |
-
{
|
10 |
-
overflow: hidden;
|
11 |
-
position: relative;
|
12 |
-
}
|
13 |
-
|
14 |
-
.jspPane
|
15 |
-
{
|
16 |
-
position: absolute;
|
17 |
-
}
|
18 |
-
|
19 |
-
.jspVerticalBar
|
20 |
-
{
|
21 |
-
position: absolute;
|
22 |
-
top: 0;
|
23 |
-
right: 0;
|
24 |
-
width: 16px;
|
25 |
-
height: 100%;
|
26 |
-
background: red;
|
27 |
-
}
|
28 |
-
|
29 |
-
.jspHorizontalBar
|
30 |
-
{
|
31 |
-
position: absolute;
|
32 |
-
bottom: 0;
|
33 |
-
left: 0;
|
34 |
-
width: 100%;
|
35 |
-
height: 16px;
|
36 |
-
background: red;
|
37 |
-
}
|
38 |
-
|
39 |
-
.jspCap
|
40 |
-
{
|
41 |
-
display: none;
|
42 |
-
}
|
43 |
-
|
44 |
-
.jspHorizontalBar .jspCap
|
45 |
-
{
|
46 |
-
float: left;
|
47 |
-
}
|
48 |
-
|
49 |
-
.jspTrack
|
50 |
-
{
|
51 |
-
background: #dde;
|
52 |
-
position: relative;
|
53 |
-
}
|
54 |
-
|
55 |
-
.jspDrag
|
56 |
-
{
|
57 |
-
background: #bbd;
|
58 |
-
position: relative;
|
59 |
-
top: 0;
|
60 |
-
left: 0;
|
61 |
-
cursor: pointer;
|
62 |
-
}
|
63 |
-
|
64 |
-
.jspHorizontalBar .jspTrack,
|
65 |
-
.jspHorizontalBar .jspDrag
|
66 |
-
{
|
67 |
-
float: left;
|
68 |
-
height: 100%;
|
69 |
-
}
|
70 |
-
|
71 |
-
.jspArrow
|
72 |
-
{
|
73 |
-
background: #50506d;
|
74 |
-
text-indent: -20000px;
|
75 |
-
display: block;
|
76 |
-
cursor: pointer;
|
77 |
-
padding: 0;
|
78 |
-
margin: 0;
|
79 |
-
}
|
80 |
-
|
81 |
-
.jspArrow.jspDisabled
|
82 |
-
{
|
83 |
-
cursor: default;
|
84 |
-
background: #80808d;
|
85 |
-
}
|
86 |
-
|
87 |
-
.jspVerticalBar .jspArrow
|
88 |
-
{
|
89 |
-
height: 16px;
|
90 |
-
}
|
91 |
-
|
92 |
-
.jspHorizontalBar .jspArrow
|
93 |
-
{
|
94 |
-
width: 16px;
|
95 |
-
float: left;
|
96 |
-
height: 100%;
|
97 |
-
}
|
98 |
-
|
99 |
-
.jspVerticalBar .jspArrow:focus
|
100 |
-
{
|
101 |
-
outline: none;
|
102 |
-
}
|
103 |
-
|
104 |
-
.jspCorner
|
105 |
-
{
|
106 |
-
background: #eeeef4;
|
107 |
-
float: left;
|
108 |
-
height: 100%;
|
109 |
-
}
|
110 |
-
|
111 |
-
/* Yuk! CSS Hack for IE6 3 pixel bug :( */
|
112 |
-
* html .jspCorner
|
113 |
-
{
|
114 |
-
margin: 0 -3px 0 0;
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: unyson, themefusecom
|
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 2.1.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -86,6 +86,14 @@ Yes; Unyson will work with any theme.
|
|
86 |
|
87 |
== Changelog ==
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
= 2.1.17 =
|
90 |
* Added the possibility to create a link to an extension settings page `fw()->extensions->manager->get_extension_link('{extension-name}')`
|
91 |
|
3 |
Tags: page builder, cms, grid, layout, responsive, back up, backup, db backup, dump, migrate, schedule, search engine optimization, seo, media, slideshow, shortcode, slide, slideshare, slideshow, google sitemaps, sitemaps, analytics, google analytics, calendar, event, events, google maps, learning, lessons, sidebars, breadcrumbs, review, portfolio
|
4 |
Requires at least: 4.0.0
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 2.1.18
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
86 |
|
87 |
== Changelog ==
|
88 |
|
89 |
+
= 2.1.18 =
|
90 |
+
* Added the `FW_WP_List_Table` class
|
91 |
+
* Option type `multi-picker`: added support for `short-select`
|
92 |
+
* Option type `slider` and `range-slider` design fixes
|
93 |
+
* Extension activation fix: Some required extensions were not added for activation
|
94 |
+
* Fixed wrong `$data['value']` in `FW_Option_Type::_render()` when form validation fails [#188](https://github.com/ThemeFuse/Unyson/issues/188)
|
95 |
+
* Increase timeout on extensions install [#183](https://github.com/ThemeFuse/Unyson/issues/183)
|
96 |
+
|
97 |
= 2.1.17 =
|
98 |
* Added the possibility to create a link to an extension settings page `fw()->extensions->manager->get_extension_link('{extension-name}')`
|
99 |
|
unyson.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
-
* Version: 2.1.
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|
3 |
* Plugin Name: Unyson
|
4 |
* Plugin URI: http://unyson.themefuse.com/
|
5 |
* Description: A free drag & drop framework that comes with a bunch of built in extensions that will help you develop premium themes fast & easy.
|
6 |
+
* Version: 2.1.18
|
7 |
* Author: ThemeFuse
|
8 |
* Author URI: http://themefuse.com
|
9 |
* License: GPL2+
|