PluginProbe ʕ •ᴥ•ʔ
Advanced Custom Fields: Extended / 0.9.2.7
Advanced Custom Fields: Extended v0.9.2.7
0.9.2.7 0.9.2.6 0.9.2.5 0.8.6 0.8.6.1 0.8.6.3 0.8.6.5 0.8.6.6 0.8.6.7 0.8.6.8 0.8.6.9 0.8.7 0.8.7.1 0.8.7.2 0.8.7.3 0.8.7.4 0.8.7.5 0.8.7.6 0.8.8 0.8.8.1 0.8.8.10 0.8.8.11 0.8.8.2 0.8.8.3 0.8.8.4 0.8.8.5 0.8.8.6 0.8.8.7 0.8.8.8 0.8.8.9 0.8.9 0.8.9.1 0.8.9.2 0.8.9.3 0.8.9.4 0.8.9.5 0.9 0.9.0.1 0.9.0.2 0.9.0.3 0.9.0.4 0.9.0.5 0.9.0.6 0.9.0.7 0.9.0.8 0.9.0.9 0.9.1 0.9.1.1 0.9.2 0.9.2.1 0.9.2.2 0.9.2.3 0.9.2.4 trunk 0.5 0.5.1 0.5.2 0.5.2.1 0.5.2.3 0.5.5 0.5.5.1 0.5.8 0.5.8.1 0.6 0.6.0.1 0.6.0.2 0.6.1 0.6.3 0.6.5 0.6.7 0.6.7.2 0.7 0.7.0.3 0.7.5 0.7.5.5 0.7.8 0.7.9 0.7.9.3 0.7.9.4 0.7.9.9.8 0.7.9.9.9 0.8 0.8.1 0.8.2 0.8.3 0.8.3.1 0.8.4 0.8.4.1 0.8.4.5 0.8.4.6 0.8.5 0.8.5.5
acf-extended / includes / admin / tools / field-groups-export.php
acf-extended / includes / admin / tools Last commit date
field-groups-export.php 3 years ago field-groups-local.php 3 months ago module-export.php 3 months ago module-import.php 3 months ago
field-groups-export.php
64 lines
1 <?php
2
3 if(!defined('ABSPATH')){
4 exit;
5 }
6
7 if(!class_exists('acfe_field_groups_export')):
8
9 class acfe_field_groups_export extends ACF_Admin_Tool{
10
11 function initialize(){
12
13 $this->name = 'acfe-export';
14
15 }
16
17 function load(){
18
19 $action = $this->get_action();
20
21 if($action === 'json'){
22
23 acf()->admin_tools->get_tool('export')->submit_download();
24
25 }
26
27 // active
28 if($this->is_active()){
29
30 // get selected keys
31 $selected = acf()->admin_tools->get_tool('export')->get_selected_keys();
32
33 // add notice
34 if($selected){
35
36 $count = count($selected);
37 $text = sprintf( _n('Exported 1 field group.', 'Exported %s field groups.', $count, 'acf' ), $count);
38
39 acf_add_admin_notice( $text, 'success' );
40
41 }
42 }
43
44 }
45
46 function get_action(){
47
48 // vars
49 $action = acfe_maybe_get_REQUEST('action');
50
51 // check allowed
52 if(!in_array($action, array('json', 'php')))
53 $action = false;
54
55 // return
56 return $action;
57
58 }
59
60 }
61
62 acf_register_admin_tool('acfe_field_groups_export');
63
64 endif;