Changeset 1530543
- Timestamp:
- 11/08/2016 05:07:34 PM (9 years ago)
- Location:
- acf-link-picker-field
- Files:
-
- 3 edited
- 5 copied
-
tags/1.2.8 (copied) (copied from acf-link-picker-field/trunk)
-
tags/1.2.8/acf-link_picker-v5.php (copied) (copied from acf-link-picker-field/trunk/acf-link_picker-v5.php)
-
tags/1.2.8/acf-link_picker.php (copied) (copied from acf-link-picker-field/trunk/acf-link_picker.php) (1 diff)
-
tags/1.2.8/js/input.js (copied) (copied from acf-link-picker-field/trunk/js/input.js) (4 diffs)
-
tags/1.2.8/readme.txt (copied) (copied from acf-link-picker-field/trunk/readme.txt) (2 diffs)
-
trunk/acf-link_picker.php (modified) (1 diff)
-
trunk/js/input.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
acf-link-picker-field/tags/1.2.8/acf-link_picker.php
r1515612 r1530543 5 5 Plugin URI: https://github.com/ahebrank/ACF-Link-Picker-Field 6 6 Description: Adds an Advanced Custom Field field that allows the selection of a link utilising the WordPress link picker modal dialog 7 Version: 1.2. 77 Version: 1.2.8 8 8 Authors: Steve Marks (BIOSTALL), Andy Hebrank (caalami) 9 9 Author URI: http://biostall.com -
acf-link-picker-field/tags/1.2.8/js/input.js
r1515074 r1530543 18 18 19 19 function get_postid(url, field_id) { 20 21 // make sure we're ACF 5 and support post ID lookup 22 if (!$('#' + field_id + '-postid').length) { 23 return; 24 } 20 25 21 26 // lookup the post_id by url, set value on a hidden field … … 30 35 var id = response.field_id; 31 36 32 $('#' + id + '-postid').val(post_id); 33 $('#' + id + '-postid-label').html(post_id); 37 if ($('#' + id + '-postid').length && $('#' + id + '-postid-label').length) { 38 $('#' + id + '-postid').val(post_id); 39 $('#' + id + '-postid-label').html(post_id); 40 } 34 41 }, 'json'); 35 42 } … … 85 92 $('#' + doingLink + '-title').val(''); 86 93 $('#' + doingLink + '-target').val(''); 87 $('#' + doingLink + '-postid').val(''); 94 95 if ($('#' + doingLink + '-postid').length) { 96 $('#' + doingLink + '-postid').val(''); 97 } 88 98 89 99 $('#' + doingLink + '-none').show(); … … 114 124 if (url) { 115 125 var $postid_input = $el.find('input[name$="[postid]"]'); 116 var post_id = $postid_input.val(); 117 if (!post_id || post_id == 0) { 118 get_postid(url, $postid_input.attr('id').replace('-postid', '')); 126 // check input exists 127 if ($postid_input.length) { 128 var post_id = $postid_input.val(); 129 if (!post_id || post_id == 0) { 130 get_postid(url, $postid_input.attr('id').replace('-postid', '')); 131 } 119 132 } 120 133 } -
acf-link-picker-field/tags/1.2.8/readme.txt
r1515612 r1530543 25 25 * ACF 5 26 26 * ACF 4 27 28 *ACF 4 support is deprecated, and new plugin features will generally not work with ACF 4.* 27 29 28 30 == Installation == … … 60 62 61 63 == Changelog == 64 65 = 1.2.8 = 66 * Some additional compatibility checks for ACF 4 (disable post ID lookups to suppress JS errors) 62 67 63 68 = 1.2.7 = -
acf-link-picker-field/trunk/acf-link_picker.php
r1515612 r1530543 5 5 Plugin URI: https://github.com/ahebrank/ACF-Link-Picker-Field 6 6 Description: Adds an Advanced Custom Field field that allows the selection of a link utilising the WordPress link picker modal dialog 7 Version: 1.2. 77 Version: 1.2.8 8 8 Authors: Steve Marks (BIOSTALL), Andy Hebrank (caalami) 9 9 Author URI: http://biostall.com -
acf-link-picker-field/trunk/js/input.js
r1515074 r1530543 18 18 19 19 function get_postid(url, field_id) { 20 21 // make sure we're ACF 5 and support post ID lookup 22 if (!$('#' + field_id + '-postid').length) { 23 return; 24 } 20 25 21 26 // lookup the post_id by url, set value on a hidden field … … 30 35 var id = response.field_id; 31 36 32 $('#' + id + '-postid').val(post_id); 33 $('#' + id + '-postid-label').html(post_id); 37 if ($('#' + id + '-postid').length && $('#' + id + '-postid-label').length) { 38 $('#' + id + '-postid').val(post_id); 39 $('#' + id + '-postid-label').html(post_id); 40 } 34 41 }, 'json'); 35 42 } … … 85 92 $('#' + doingLink + '-title').val(''); 86 93 $('#' + doingLink + '-target').val(''); 87 $('#' + doingLink + '-postid').val(''); 94 95 if ($('#' + doingLink + '-postid').length) { 96 $('#' + doingLink + '-postid').val(''); 97 } 88 98 89 99 $('#' + doingLink + '-none').show(); … … 114 124 if (url) { 115 125 var $postid_input = $el.find('input[name$="[postid]"]'); 116 var post_id = $postid_input.val(); 117 if (!post_id || post_id == 0) { 118 get_postid(url, $postid_input.attr('id').replace('-postid', '')); 126 // check input exists 127 if ($postid_input.length) { 128 var post_id = $postid_input.val(); 129 if (!post_id || post_id == 0) { 130 get_postid(url, $postid_input.attr('id').replace('-postid', '')); 131 } 119 132 } 120 133 } -
acf-link-picker-field/trunk/readme.txt
r1515612 r1530543 25 25 * ACF 5 26 26 * ACF 4 27 28 *ACF 4 support is deprecated, and new plugin features will generally not work with ACF 4.* 27 29 28 30 == Installation == … … 60 62 61 63 == Changelog == 64 65 = 1.2.8 = 66 * Some additional compatibility checks for ACF 4 (disable post ID lookups to suppress JS errors) 62 67 63 68 = 1.2.7 =
Note: See TracChangeset
for help on using the changeset viewer.