PluginProbe
Timed Content / 2.7
Timed Content v2.7
2.99 trunk 1.0 1.1 1.2 2.0 2.1 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.10 2.11 2.12 2.15 2.2 2.3 2.3.1 2.4 2.5 2.5.1 2.50 2.51 2.52 All 67 releases
← All changes | lib/customFieldsInterface.php +18 -20 2.22.7 View file →
@@ -93,27 +93,24 @@
93 93 || ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == $a_postType ) ) {
94 94
95 95 wp_enqueue_style( 'wp-color-picker' );
96 96 wp_enqueue_script( 'wp-color-picker' );
97 - wp_enqueue_style( 'timed-content-jquery-ui-css', TIMED_CONTENT_JQUERY_UI_CSS, false, TIMED_CONTENT_VERSION );
98 - wp_enqueue_script( 'jquery-ui-datepicker' );
99 - if( !( wp_script_is( 'timed-content-jquery-ui-datepicker-i18n-js', 'registered' ) ) ) {
100 - wp_register_script( 'timed-content-jquery-ui-datepicker-i18n-js', TIMED_CONTENT_PLUGIN_URL . "/js/timed-content-datepicker-i18n.js", array( 'jquery', 'jquery-ui-datepicker' ), TIMED_CONTENT_VERSION );
101 - wp_enqueue_script( 'timed-content-jquery-ui-datepicker-i18n-js' );
102 - wp_localize_script( 'timed-content-jquery-ui-datepicker-i18n-js', 'TimedContentJQDatepickerI18n', $jquery_ui_datetime_datepicker_i18n );
103 - }
104 -
105 - wp_enqueue_script( 'jquery-ui-spinner' );
106 - wp_register_style( 'timed-content-jquery-ui-timepicker-css', TIMED_CONTENT_JQUERY_UI_TIMEPICKER_CSS, array( TIMED_CONTENT_JQUERY_UI_CSS ), TIMED_CONTENT_VERSION );
107 - wp_enqueue_style( 'timed-content-jquery-ui-timepicker-css' );
108 - wp_register_script( 'timed-content-jquery-ui-timepicker-js', TIMED_CONTENT_JQUERY_UI_TIMEPICKER_JS, array('jquery', 'jquery-ui-datepicker'), TIMED_CONTENT_VERSION );
109 - wp_enqueue_script( 'timed-content-jquery-ui-timepicker-js' );
110 - if( !( wp_script_is( 'timed-content-jquery-ui-timepicker-i18n-js', 'registered' ) ) ) {
111 - wp_register_script( 'timed-content-jquery-ui-timepicker-i18n-js', TIMED_CONTENT_PLUGIN_URL . "/js/timed-content-timepicker-i18n.js", array( 'jquery', 'jquery-ui-datepicker', 'timed-content-jquery-ui-timepicker-js' ), TIMED_CONTENT_VERSION );
112 - wp_enqueue_script( 'timed-content-jquery-ui-timepicker-i18n-js' );
113 - wp_localize_script( 'timed-content-jquery-ui-timepicker-i18n-js', 'TimedContentJQTimepickerI18n', $jquery_ui_datetime_timepicker_i18n );
114 - }
115 - if ( function_exists( 'add_meta_box' ) )
97 + wp_enqueue_script( 'jquery-ui-spinner' );
98 +
99 + wp_enqueue_style(TIMED_CONTENT_SLUG . '-jquery-ui-css', TIMED_CONTENT_JQUERY_UI_CSS);
100 + wp_enqueue_script('jquery-ui-datepicker');
101 + wp_register_style(TIMED_CONTENT_SLUG . '-jquery-ui-timepicker-css', TIMED_CONTENT_JQUERY_UI_TIMEPICKER_CSS);
102 + wp_enqueue_style(TIMED_CONTENT_SLUG . '-jquery-ui-timepicker-css');
103 + wp_register_script(TIMED_CONTENT_SLUG . '-jquery-ui-timepicker-js', TIMED_CONTENT_JQUERY_UI_TIMEPICKER_JS, array('jquery', 'jquery-ui-datepicker'), TIMED_CONTENT_VERSION);
104 + wp_enqueue_script(TIMED_CONTENT_SLUG . '-jquery-ui-timepicker-js');
105 + if (!(wp_script_is(TIMED_CONTENT_SLUG . '-jquery-ui-datetime-i18n-js', 'registered'))) {
106 + wp_register_script(TIMED_CONTENT_SLUG . '-jquery-ui-datetime-i18n-js', TIMED_CONTENT_PLUGIN_URL . "/js/content-protector-datetime-i18n.js", array('jquery', 'jquery-ui-datepicker', TIMED_CONTENT_SLUG . '-jquery-ui-timepicker-js'), TIMED_CONTENT_VERSION);
107 + wp_enqueue_script(TIMED_CONTENT_SLUG . '-jquery-ui-datetime-i18n-js');
108 + wp_localize_script(TIMED_CONTENT_SLUG . '-jquery-ui-datetime-i18n-js', 'TimedContentJQDatepickerI18n', $jquery_ui_datetime_datepicker_i18n);
109 + wp_localize_script(TIMED_CONTENT_SLUG . '-jquery-ui-datetime-i18n-js', 'TimedContentJQTimepickerI18n', $jquery_ui_datetime_timepicker_i18n);
110 + }
111 +
112 + if ( function_exists( 'add_meta_box' ) )
116 113 add_meta_box( $this->handle, $this->label, array( &$this, 'displayCustomFields' ), $a_postType, 'normal', 'high' );
117 114 }
118 115 }
119 116 }
@@ -167,9 +164,9 @@
167 164 if ( sizeof ( $customField['values'] ) == 0 )
168 165 echo "<em>" . __( "This menu is empty.", "timed-content" ) . "</em>\n";
169 166 else {
170 167 $selected_value = ( "" === get_post_meta( $post->ID, $this->prefix . $customField['name'], true ) ? $customField['default'] : get_post_meta( $post->ID, $this->prefix . $customField['name'], true ) );
171 - echo "<select name=\"" . $this->prefix . $customField['name'] . "\" id=\"" . $this->prefix . $customField['name'] . "\" style=\"width: auto; height: auto; padding: 3px;\" size=\"" . $customField['size'] . "\" multiple=\"multiple\">\n";
168 + echo "<select name=\"" . $this->prefix . $customField['name'] . "[]\" id=\"" . $this->prefix . $customField['name'] . "\" style=\"width: auto; height: auto; padding: 3px;\" size=\"" . $customField['size'] . "\" multiple=\"multiple\">\n";
172 169 foreach ( $customField['values'] as $value => $label ) {
173 170 echo "\t<option value=\"" . $value . "\"";
174 171 if ( $selected_value == $value )
175 172 echo " selected=\"selected\"";
@@ -286,8 +283,9 @@
286 283 //<![CDATA[
287 284 jQuery(document).ready(function() {
288 285 jQuery( "#<?php echo $this->prefix . $customField[ 'name' ]; ?>" ).datepicker(
289 286 {
287 + <?php if( isset( $customField[ 'custom_functions' ] ) ) echo $customField[ 'custom_functions' ]; ?>
290 288 changeMonth: true,
291 289 changeYear: true
292 290 }
293 291 );