Plugin Directory

Changeset 640660


Ignore:
Timestamp:
12/17/2012 04:29:10 PM (13 years ago)
Author:
hunk
Message:

tag 1.6

Location:
magic-fields/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • magic-fields/trunk/Main.php

    r508916 r640660  
    44Plugin URI: http://magicfields.org
    55Description: Create custom write panels and easily retrieve their values in your templates.
    6 Author: Hunk and Gnuget
    7 Version: 1.5.8.3
     6Author: @hunk and @gnuget
     7Version: 1.6
    88Author URI: http://magicfields.org
    99*/
     
    312312
    313313function charge_link_after_upload_image($fields){
    314    printf("
    315       <script type=\"text/javascript\">
    316       //<![CDATA[
    317         load_link_in_media_upload();
    318       //]]>
    319       </script>");
     314    $wp_version = floatval(get_bloginfo('version'));
     315
     316    if(
     317        $wp_version < 3.5 ||
     318        (( isset($_REQUEST['fetch']) && $_REQUEST['fetch'] ) ||
     319        ( isset($_REQUEST['tab']) && $_REQUEST['tab'] == 'library' ))
     320      ){
     321        printf("
     322            <script type=\"text/javascript\">
     323            //<![CDATA[
     324            load_link_in_media_upload();
     325            //]]>
     326            </script>");
     327        }
    320328      return $fields;
    321329}
  • magic-fields/trunk/RCCWP_Application.php

    r394087 r640660  
    287287       
    288288        //delete post_meta WP and WP MF
    289         $sql = "delete a.* from $wpdb->postmeta as a, ".wp_mf_post_meta." as b where b.id = a.meta_id";
     289        $sql = "delete a.* from $wpdb->postmeta as a, {$wpdb->prefix}mf_post_meta as b where b.id = a.meta_id";
    290290        $wpdb->query($sql);
    291291
  • magic-fields/trunk/RCCWP_removeFiles.php

    r279514 r640660  
    1919       
    2020        if(!empty($exists->meta_id)){
    21             $wpdb->query("DELETE FROM  wp_postmeta where meta_id = {$exists->meta_id}");
     21            $wpdb->query("DELETE FROM {$wpdb->postmeta} where meta_id = {$exists->meta_id}");
    2222        }
    2323       
  • magic-fields/trunk/get-custom.php

    r498304 r640660  
    146146   
    147147    if($fieldType == $FIELD_TYPES['image']){
    148         $results = split('&',$results);
     148        $results = preg_split("/&/",$results);
    149149        $results = $results[0];
    150150    }
  • magic-fields/trunk/js/custom_fields/datepicker.js

    r314766 r640660  
    1 jQuery(document).ready(function(){
    2    
    3     //Adding the datepicker event to the fields
    4     jQuery('.datebotton_mf').live('click',function(){
    5                
     1jQuery(document).ready(function($){
     2        jQuery('.datebotton_mf').live('click',function(){
    63        the_id = jQuery(this).attr('id');
    74        picker = the_id.replace(/pick_/,'');
    85        format = jQuery('#format_date_field_'+picker).text();
    96        format = switch_formats(format);
    10                
    117        picker = 'display_date_field_' + picker;
    12        
    13         jQuery('#'+picker).datepicker({
    14             showAnim: 'fadeIn',
    15             changeYear: true,
    16             dateFormat: format,
    17             altFormat: "yy-mm-dd",
    18             altField: '#' + the_id.replace(/pick_/,'date_field_'),
     8
     9         jQuery('#'+picker).datepicker({
     10           showAnim: 'fadeIn',
     11           changeYear: true,
     12           dateFormat: format,
     13           altFormat: "yy-mm-dd",
     14           altField: '#' + the_id.replace(/pick_/,'date_field_'),
    1915            showOn:'focus',
    2016            onClose: function(){
    2117                input = jQuery(this);
    2218                date = input.val();
    23                 //id = input.attr('id').replace(/display_/,'');
    24                 //jQuery('#'+id).val(date);
    25                
    2619                //unbind the event
    2720                jQuery(this).datepicker('destroy');
    2821            }
    2922        }).focus();
    30     });
    31    
    32     //TODAY Botton
     23
     24        });
     25       
     26        //TODAY Botton
    3327    jQuery('.todaybotton_mf').live('click',function(){
    3428        the_id = jQuery(this).attr('id');
    3529        picker = the_id.replace(/today_/,'');
    36         today = 'tt_' + picker;   
    37         today = jQuery('#'+today);
    38         today_raw = jQuery('#tt_raw_' + picker);
    39         date = today.val();
    40         date_raw = today_raw.val();
     30        today = jQuery(this).attr('alt');
     31            today_raw = jQuery(this).attr('rel');
    4132       
    42       jQuery('#display_date_field_'+picker).val(date);
    43             jQuery('#date_field_'+picker).val(date_raw);
     33        jQuery('#display_date_field_'+picker).val(today);
     34            jQuery('#date_field_'+picker).val(today_raw);
    4435    });
    45    
    46     //BLANK Botton
     36
     37        //BLANK Botton
    4738    jQuery('.blankBotton_mf').live('click',function(){
    4839        the_id = jQuery(this).attr('id');
    4940        picker = the_id.replace(/blank_/,'');       
    50       jQuery('#display_date_field_'+picker).val("");
    51             jQuery('#date_field_'+picker).val("");
     41            jQuery('#display_date_field_'+picker).val("");
     42        jQuery('#date_field_'+picker).val("");
    5243    });
    53    
    5444});
    5545
     
    9282        return "mm.dd.y";
    9383    }
     84   
     85    if(date == "d.m.Y"){
     86      return "dd.mm.yy";
     87    }
    9488}
  • magic-fields/trunk/readme.txt

    r508924 r640660  
    11=== Magic Fields ===
    2 Contributors: hunk, Gnuget, [Astrata Software](http://astrata.mx), [Travis Hensgen](http://traversal.com.au)
     2Contributors: hunk, Gnuget
    33Tags: custom write panel, custom, write panel, cms, magic fields
    4 Tested up to: Wordpress 3.3.1
     4Tested up to: Wordpress 3.5
    55Requires at least: 2.9
    66Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=edgar%40programador%2ecom&lc=GB&item_name=Donation%20Magic%20Fields&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest
    7 Stable tag: 1.5.8.3
     7Stable tag: 1.6
    88Description: Magic Fields  is a feature rich WordPress CMS plugin.
    99
     
    2828
    2929== Changelog ==
     30
     31= 1.6 =
     32    * Update the Datepicker Plugin
     33    * fixes for Wordpress 3.5 new media uploader conflict
     34    * Corrected the removal of data from the mf_post_meta table on deletion (@doublesharp)
     35    * use variable for postmeta table in case it doesn't have the standard  (@doublesharp)
     36    * fixed: split deprecated in php 5.3
     37    * And much more bugfixes
    3038
    3139= 1.5.8.3 =
Note: See TracChangeset for help on using the changeset viewer.