Plugin Directory

Changeset 1708392


Ignore:
Timestamp:
08/04/2017 12:41:11 PM (9 years ago)
Author:
funkjedi
Message:

Syncing with Github

Location:
acf-qtranslate/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • acf-qtranslate/trunk/acf-qtranslate.php

    r1585592 r1708392  
    44Plugin URI: http://github.com/funkjedi/acf-qtranslate
    55Description: Provides multilingual versions of the text, text area, and wysiwyg fields.
    6 Version: 1.7.22
     6Version: 1.7.23
    77Author: funkjedi
    88Author URI: http://funkjedi.com
  • acf-qtranslate/trunk/readme.txt

    r1585592 r1708392  
    44Requires at least: 3.5.0
    55Tested up to: 4.7.2
    6 Version: 1.7.22
    7 Stable tag: 1.7.22
     6Version: 1.7.23
     7Stable tag: 1.7.23
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5454
    5555== Changelog ==
     56
     57= 1.7.23 =
     58* Bug Fix: Added ACF 5.6 compatibility
    5659
    5760= 1.7.22 =
  • acf-qtranslate/trunk/src/acf_5/fields/file.php

    r1584671 r1708392  
    2525        $this->plugin = $plugin;
    2626
     27        if (version_compare($plugin->acf_version(), '5.6.0') < 0) {
     28            $this->initialize();
     29        }
     30
     31        acf_field::__construct();
     32    }
     33
     34    /*
     35     *  __construct
     36     *
     37     *  This function will setup the field type data
     38     *
     39     *  @type   function
     40     *  @date   5/03/2014
     41     *  @since  5.0.0
     42     *
     43     *  @param  n/a
     44     *  @return n/a
     45     */
     46    function initialize() {
     47
     48        // vars
    2749        $this->name = 'qtranslate_file';
    28         $this->label = __("File", 'acf');
     50        $this->label = __("File",'acf');
    2951        $this->category = __("qTranslate", 'acf');
    3052        $this->defaults = array(
    31             'return_format' => 'array',
    32             'library'       => 'all',
    33             'min_size'      => 0,
    34             'max_size'      => 0,
    35             'mime_types'    => ''
    36         );
    37         $this->l10n  = array(
    38             'select'     => __("Select File",'acf'),
    39             'edit'       => __("Edit File",'acf'),
    40             'update'     => __("Update File",'acf'),
    41             'uploadedTo' => __("uploaded to this post",'acf'),
     53            'return_format' => 'array',
     54            'library'       => 'all',
     55            'min_size'      => 0,
     56            'max_size'      => 0,
     57            'mime_types'    => ''
     58        );
     59        $this->l10n = array(
     60            'select'        => __("Select File",'acf'),
     61            'edit'          => __("Edit File",'acf'),
     62            'update'        => __("Update File",'acf'),
     63            'uploadedTo'    => __("Uploaded to this post",'acf'),
    4264        );
    4365
     
    4668        add_filter('get_media_item_args',           array($this, 'get_media_item_args'));
    4769
    48         acf_field::__construct();
    4970    }
    5071
  • acf-qtranslate/trunk/src/acf_5/fields/image.php

    r1584640 r1708392  
    2424        $this->plugin = $plugin;
    2525
     26        if (version_compare($plugin->acf_version(), '5.6.0') < 0) {
     27            $this->initialize();
     28        }
     29
     30        acf_field::__construct();
     31    }
     32
     33    /*
     34    *  __construct
     35    *
     36    *  This function will setup the field type data
     37    *
     38    *  @type    function
     39    *  @date    5/03/2014
     40    *  @since   5.0.0
     41    *
     42    *  @param   n/a
     43    *  @return  n/a
     44    */
     45
     46    function initialize() {
     47
     48        // vars
    2649        $this->name = 'qtranslate_image';
    27         $this->label = __("Image", 'acf');
     50        $this->label = __("Image",'acf');
    2851        $this->category = __("qTranslate", 'acf');
    2952        $this->defaults = array(
    30             'return_format' => 'array',
    31             'preview_size'  => 'thumbnail',
    32             'library'       => 'all',
    33             'min_width'     => 0,
    34             'min_height'    => 0,
    35             'min_size'      => 0,
    36             'max_width'     => 0,
    37             'max_height'    => 0,
    38             'max_size'      => 0,
    39             'mime_types'    => ''
     53            'return_format' => 'array',
     54            'preview_size'  => 'thumbnail',
     55            'library'       => 'all',
     56            'min_width'     => 0,
     57            'min_height'    => 0,
     58            'min_size'      => 0,
     59            'max_width'     => 0,
     60            'max_height'    => 0,
     61            'max_size'      => 0,
     62            'mime_types'    => ''
    4063        );
    4164        $this->l10n = array(
    42             'select'     => __("Select Image",'acf'),
    43             'edit'       => __("Edit Image",'acf'),
    44             'update'     => __("Update Image",'acf'),
    45             'uploadedTo' => __("Uploaded to this post",'acf'),
    46             'all'        => __("All images",'acf'),
     65            'select'        => __("Select Image",'acf'),
     66            'edit'          => __("Edit Image",'acf'),
     67            'update'        => __("Update Image",'acf'),
     68            'uploadedTo'    => __("Uploaded to this post",'acf'),
     69            'all'           => __("All images",'acf'),
    4770        );
    4871
    4972
    5073        // filters
    51         add_filter('get_media_item_args',           array($this, 'get_media_item_args'));
    52         add_filter('wp_prepare_attachment_for_js',  array($this, 'wp_prepare_attachment_for_js'), 10, 3);
    53 
    54         acf_field::__construct();
     74        add_filter('get_media_item_args',               array($this, 'get_media_item_args'));
     75        add_filter('wp_prepare_attachment_for_js',      array($this, 'wp_prepare_attachment_for_js'), 10, 3);
     76
    5577    }
    5678
  • acf-qtranslate/trunk/src/acf_5/fields/text.php

    r1102077 r1708392  
    2525        $this->plugin = $plugin;
    2626
     27        if (version_compare($plugin->acf_version(), '5.6.0') < 0) {
     28            $this->initialize();
     29        }
     30
     31        acf_field::__construct();
     32    }
     33
     34    /*
     35     *  initialize
     36     *
     37     *  This function will setup the field type data
     38     *
     39     *  @type   function
     40     *  @date   5/03/2014
     41     *  @since  5.0.0
     42     *
     43     *  @param  n/a
     44     *  @return n/a
     45     */
     46    function initialize() {
     47
     48        // vars
    2749        $this->name = 'qtranslate_text';
    2850        $this->label = __("Text",'acf');
    2951        $this->category = __("qTranslate",'acf');
    3052        $this->defaults = array(
    31             'default_value' => '',
    32             'maxlength'     => '',
    33             'placeholder'   => '',
    34             'prepend'       => '',
    35             'append'        => '',
    36             'readonly'      => 0,
    37             'disabled'      => 0,
     53            'default_value' => '',
     54            'maxlength'     => '',
     55            'placeholder'   => '',
     56            'prepend'       => '',
     57            'append'        => ''
    3858        );
    3959
    40         acf_field::__construct();
    4160    }
    4261
  • acf-qtranslate/trunk/src/acf_5/fields/textarea.php

    r1102077 r1708392  
    2525        $this->plugin = $plugin;
    2626
     27        if (version_compare($plugin->acf_version(), '5.6.0') < 0) {
     28            $this->initialize();
     29        }
     30
     31        acf_field::__construct();
     32    }
     33
     34    /*
     35     *  initialize
     36     *
     37     *  This function will setup the field type data
     38     *
     39     *  @type   function
     40     *  @date   5/03/2014
     41     *  @since  5.0.0
     42     *
     43     *  @param  n/a
     44     *  @return n/a
     45     */
     46    function initialize() {
     47
     48        // vars
    2749        $this->name = 'qtranslate_textarea';
    2850        $this->label = __("Text Area",'acf');
    2951        $this->category = __("qTranslate",'acf');
    3052        $this->defaults = array(
    31             'default_value' => '',
    32             'new_lines'     => '',
    33             'maxlength'     => '',
    34             'placeholder'   => '',
    35             'readonly'      => 0,
    36             'disabled'      => 0,
    37             'rows'          => ''
     53            'default_value' => '',
     54            'new_lines'     => '',
     55            'maxlength'     => '',
     56            'placeholder'   => '',
     57            'rows'          => ''
    3858        );
    3959
    40         acf_field::__construct();
    4160    }
    4261
  • acf-qtranslate/trunk/src/acf_5/fields/wysiwyg.php

    r1577412 r1708392  
    2525        $this->plugin = $plugin;
    2626
     27        if (version_compare($plugin->acf_version(), '5.6.0') < 0) {
     28            $this->initialize();
     29        }
     30
     31        // actions
     32        add_action('acf/input/admin_footer',    array($this, 'input_admin_footer'));
     33
     34        acf_field::__construct();
     35    }
     36
     37    /*
     38     *  initialize
     39     *
     40     *  This function will setup the field type data
     41     *
     42     *  @type   function
     43     *  @date   5/03/2014
     44     *  @since  5.0.0
     45     *
     46     *  @param  n/a
     47     *  @return n/a
     48     */
     49    function initialize() {
     50
     51        // vars
    2752        $this->name = 'qtranslate_wysiwyg';
    2853        $this->label = __("Wysiwyg Editor",'acf');
     
    3358            'media_upload'  => 1,
    3459            'default_value' => '',
     60            'delay'         => 0
    3561        );
    3662
     
    4066        }
    4167
    42         // actions
    43         add_action('acf/input/admin_footer',    array($this, 'input_admin_footer'));
    44 
    45         acf_field::__construct();
    4668    }
    4769
  • acf-qtranslate/trunk/src/plugin.php

    r1585592 r1708392  
    7171     * @return int
    7272     */
     73    public function acf_version() {
     74        return acf()->settings['version'];
     75    }
     76
     77    /**
     78     * Return the major version number for Advanced Custom Fields.
     79     * @return int
     80     */
    7381    public function acf_major_version() {
    74         return (int) acf()->settings['version'][0];
     82        return (int) $this->acf_version();
    7583    }
    7684
     
    142150    {
    143151        $pages = array(
    144             'post.php' => '',
     152            //'post.php' => '',
    145153            'admin.php' => 'page=',
    146154        );
Note: See TracChangeset for help on using the changeset viewer.