|
@@ 134-150 (lines=17) @@
|
| 131 |
|
function check_duplicate() { |
| 132 |
|
|
| 133 |
|
// message |
| 134 |
|
if( $ids = acf_maybe_get($_GET, 'acfduplicatecomplete') ) { |
| 135 |
|
|
| 136 |
|
// explode |
| 137 |
|
$ids = explode(',', $ids); |
| 138 |
|
$total = count($ids); |
| 139 |
|
|
| 140 |
|
if( $total == 1 ) { |
| 141 |
|
|
| 142 |
|
acf_add_admin_notice( sprintf(__('Field group duplicated. %s', 'acf'), '<a href="' . get_edit_post_link($ids[0]) . '">' . get_the_title($ids[0]) . '</a>') ); |
| 143 |
|
|
| 144 |
|
} else { |
| 145 |
|
|
| 146 |
|
acf_add_admin_notice( sprintf(_n( '%s field group duplicated.', '%s field groups duplicated.', $total, 'acf' ), $total) ); |
| 147 |
|
|
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
|
| 153 |
|
// import field group |
|
@@ 220-236 (lines=17) @@
|
| 217 |
|
function check_sync() { |
| 218 |
|
|
| 219 |
|
// message |
| 220 |
|
if( $ids = acf_maybe_get($_GET, 'acfsynccomplete') ) { |
| 221 |
|
|
| 222 |
|
// explode |
| 223 |
|
$ids = explode(',', $ids); |
| 224 |
|
$total = count($ids); |
| 225 |
|
|
| 226 |
|
if( $total == 1 ) { |
| 227 |
|
|
| 228 |
|
acf_add_admin_notice( sprintf(__('Field group synchronised. %s', 'acf'), '<a href="' . get_edit_post_link($ids[0]) . '">' . get_the_title($ids[0]) . '</a>') ); |
| 229 |
|
|
| 230 |
|
} else { |
| 231 |
|
|
| 232 |
|
acf_add_admin_notice( sprintf(_n( '%s field group synchronised.', '%s field groups synchronised.', $total, 'acf' ), $total) ); |
| 233 |
|
|
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
|
| 239 |
|
// vars |