Permalink
Browse files

resolve bug with internal links in wp 3.1

add new slider.js for wp 3.1
  • Loading branch information...
1 parent cebaf42 commit 5674236f693fd937a13c53295026c669e299ddcb @hunk hunk committed Feb 24, 2011
Showing with 702 additions and 6 deletions.
  1. +10 −0 MF_Constant.php
  2. +8 −4 RCCWP_WritePostPage.php
  3. +682 −0 js/jquery.ui.slider.js
  4. +2 −2 js/jquery.validate.pack.js
View
@@ -304,3 +304,13 @@ function is_wp30(){
return FALSE;
}
+
+//return TRUE is WP version >= 3.1
+function is_wp31(){
+ global $wp_version;
+
+ if(substr($wp_version, 0, 3) >= 3.1)
+ return TRUE;
+
+ return FALSE;
+}
@@ -109,17 +109,20 @@ function CustomFieldsJavascript(){
MF_URI.'js/custom_fields/datepicker.js'
);
+ $slider_js = MF_URI.'js/ui.slider.js';
+ //load slider for wp31
+ if(is_wp31()) $slider_js = MF_URI.'js/jquery.ui.slider.js';
//loading jquery ui slider
wp_enqueue_script( 'slider',
- MF_URI.'js/ui.slider.js',
+ $slider_js,
array('jquery','jquery-ui-core')
+ ,NULL,true
);
//loading the code for delete images
wp_enqueue_script( 'mf_colorpicker',
MF_URI.'js/custom_fields/colorpicker.js'
- )
- ;
+ );
//loading the code for delete images
wp_enqueue_script( 'mf_image',
MF_URI.'js/custom_fields/image.js'
@@ -134,10 +137,11 @@ function CustomFieldsJavascript(){
wp_enqueue_script( 'mf_metadata',
MF_URI.'js/jquery.metadata.js'
);
+
///loading handler for validate
wp_enqueue_script( 'mf_validate',
MF_URI.'js/jquery.validate.pack.js'
- );
+ );
//loading the code for validation
wp_enqueue_script( 'mf_validate_fields',
MF_URI.'js/custom_fields/validate.js'
Oops, something went wrong.

0 comments on commit 5674236

Please sign in to comment.