diff --git a/lib/class-option-color.php b/lib/class-option-color.php
index 6216b9ef..8b1c33ed 100644
--- a/lib/class-option-color.php
+++ b/lib/class-option-color.php
@@ -59,7 +59,7 @@ public function display() {
public function enqueueColorPickerScript() {
wp_enqueue_script( 'wp-color-picker' );
wp_enqueue_style( 'wp-color-picker' );
- wp_enqueue_script( 'wp-color-picker-alpha', TitanFramework::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), TF_VERSION );
+ //wp_enqueue_script( 'wp-color-picker-alpha', TitanFramework::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), TF_VERSION );
}
@@ -123,7 +123,7 @@ function __construct( $manager, $id, $args = array() ) {
public function enqueue() {
parent::enqueue();
- wp_enqueue_script( 'wp-color-picker-alpha', TitanFramework::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), TF_VERSION );
+ //wp_enqueue_script( 'wp-color-picker-alpha', TitanFramework::getURL( '../js/min/wp-color-picker-alpha-min.js', __FILE__ ), array( 'wp-color-picker' ), TF_VERSION );
}
public function to_json() {
diff --git a/lib/class-option-date.php b/lib/class-option-date.php
index 582f3553..bba8a2f4 100644
--- a/lib/class-option-date.php
+++ b/lib/class-option-date.php
@@ -138,6 +138,25 @@ public static function createCalendarScript() {
getValue() ) ) {
+ return '';
+ }
+
+ $pos = strpos($this->getValue(), '-');
+ if ($pos !== false) {
+ return strtotime($this->getValue());
+ }
+
+ return $this->getValue();
+ }
/**
@@ -164,7 +183,7 @@ public function display() {
$this->getID(),
$placeholder,
$this->getID(),
- esc_attr( ($this->getValue() > 0) ? date( $dateFormat, $this->getValue() ) : '' ),
+ esc_attr( ($this->getValue() > 0) ? date( $dateFormat, $this->getDateValueInTime() ) : '' ),
$this->settings['desc']
);
$this->echoOptionFooter( false );
diff --git a/lib/class-option-gallery.php b/lib/class-option-gallery.php
index 127c808b..e8ddae90 100644
--- a/lib/class-option-gallery.php
+++ b/lib/class-option-gallery.php
@@ -1,203 +1,253 @@
'full', // The size of the image to use in the generated CSS.
- 'placeholder' => '', // Show this when blank.
- );
-
-
- /**
- * Constructor.
- *
- * @return void
- * @since 1.5
- */
- function __construct( $settings, $owner ) {
- parent::__construct( $settings, $owner );
- }
-
-
- /*
- * Display for options and meta.
- */
- public function display() {
- self::createUploaderScript();
-
- $this->echoOptionHeader();
-
- // Display the preview image.
- $value = $this->getValue();
-
- if ( is_numeric( $value ) ) {
- // Gives us an array with the first element as the src or false on fail.
- $value = wp_get_attachment_image_src( $value, array( 150, 150 ) );
- }
- if ( ! is_array( $value ) ) {
- $value = $this->getValue();
- } else {
- $value = $value[0];
- }
-
- // $value = '101,96';.
- $value_arr = explode( ',', $value );
-
- foreach ( $value_arr as $k => $v ) {
- $previewImage = '';
- $value = $v;
- if ( ! empty( $v ) ) {
- $size = ! empty( $option->settings['size'] ) ? $option->settings['size'] : 'thumbnail';
-
- if ( is_numeric( $v ) ) {
- $attachment = wp_get_attachment_image_src( $v, $size );
- $v = $attachment[0];
- }
-
- $previewImage = "";
- echo "