Changeset 1708392
- Timestamp:
- 08/04/2017 12:41:11 PM (9 years ago)
- Location:
- acf-qtranslate/trunk
- Files:
-
- 8 edited
-
acf-qtranslate.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
src/acf_5/fields/file.php (modified) (2 diffs)
-
src/acf_5/fields/image.php (modified) (1 diff)
-
src/acf_5/fields/text.php (modified) (1 diff)
-
src/acf_5/fields/textarea.php (modified) (1 diff)
-
src/acf_5/fields/wysiwyg.php (modified) (3 diffs)
-
src/plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-qtranslate/trunk/acf-qtranslate.php
r1585592 r1708392 4 4 Plugin URI: http://github.com/funkjedi/acf-qtranslate 5 5 Description: Provides multilingual versions of the text, text area, and wysiwyg fields. 6 Version: 1.7.2 26 Version: 1.7.23 7 7 Author: funkjedi 8 8 Author URI: http://funkjedi.com -
acf-qtranslate/trunk/readme.txt
r1585592 r1708392 4 4 Requires at least: 3.5.0 5 5 Tested up to: 4.7.2 6 Version: 1.7.2 27 Stable tag: 1.7.2 26 Version: 1.7.23 7 Stable tag: 1.7.23 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 54 54 55 55 == Changelog == 56 57 = 1.7.23 = 58 * Bug Fix: Added ACF 5.6 compatibility 56 59 57 60 = 1.7.22 = -
acf-qtranslate/trunk/src/acf_5/fields/file.php
r1584671 r1708392 25 25 $this->plugin = $plugin; 26 26 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 27 49 $this->name = 'qtranslate_file'; 28 $this->label = __("File", 'acf');50 $this->label = __("File",'acf'); 29 51 $this->category = __("qTranslate", 'acf'); 30 52 $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'), 42 64 ); 43 65 … … 46 68 add_filter('get_media_item_args', array($this, 'get_media_item_args')); 47 69 48 acf_field::__construct();49 70 } 50 71 -
acf-qtranslate/trunk/src/acf_5/fields/image.php
r1584640 r1708392 24 24 $this->plugin = $plugin; 25 25 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 26 49 $this->name = 'qtranslate_image'; 27 $this->label = __("Image", 'acf');50 $this->label = __("Image",'acf'); 28 51 $this->category = __("qTranslate", 'acf'); 29 52 $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' => '' 40 63 ); 41 64 $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'), 47 70 ); 48 71 49 72 50 73 // 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 55 77 } 56 78 -
acf-qtranslate/trunk/src/acf_5/fields/text.php
r1102077 r1708392 25 25 $this->plugin = $plugin; 26 26 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 27 49 $this->name = 'qtranslate_text'; 28 50 $this->label = __("Text",'acf'); 29 51 $this->category = __("qTranslate",'acf'); 30 52 $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' => '' 38 58 ); 39 59 40 acf_field::__construct();41 60 } 42 61 -
acf-qtranslate/trunk/src/acf_5/fields/textarea.php
r1102077 r1708392 25 25 $this->plugin = $plugin; 26 26 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 27 49 $this->name = 'qtranslate_textarea'; 28 50 $this->label = __("Text Area",'acf'); 29 51 $this->category = __("qTranslate",'acf'); 30 52 $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' => '' 38 58 ); 39 59 40 acf_field::__construct();41 60 } 42 61 -
acf-qtranslate/trunk/src/acf_5/fields/wysiwyg.php
r1577412 r1708392 25 25 $this->plugin = $plugin; 26 26 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 27 52 $this->name = 'qtranslate_wysiwyg'; 28 53 $this->label = __("Wysiwyg Editor",'acf'); … … 33 58 'media_upload' => 1, 34 59 'default_value' => '', 60 'delay' => 0 35 61 ); 36 62 … … 40 66 } 41 67 42 // actions43 add_action('acf/input/admin_footer', array($this, 'input_admin_footer'));44 45 acf_field::__construct();46 68 } 47 69 -
acf-qtranslate/trunk/src/plugin.php
r1585592 r1708392 71 71 * @return int 72 72 */ 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 */ 73 81 public function acf_major_version() { 74 return (int) acf()->settings['version'][0];82 return (int) $this->acf_version(); 75 83 } 76 84 … … 142 150 { 143 151 $pages = array( 144 'post.php' => '',152 //'post.php' => '', 145 153 'admin.php' => 'page=', 146 154 );
Note: See TracChangeset
for help on using the changeset viewer.