PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/ajax/demo-import.php +10 -7 2.9.0 → 2.14.0 View file →
@@ -20,9 +20,9 @@
20 20 public function __construct() {
21 21 $this->actions = array(
22 22 'get_demo_list' => array(
23 23 'callback' => array( $this, 'get_demo_list' ),
24 - 'capability' => 'manage_options',
24 + 'capability' => 'ablocks_import_templates',
25 25 'fields' => array(
26 26 'type' => 'string',
27 27 'cost_type' => 'string',
28 28 'page' => 'integer',
@@ -33,9 +33,9 @@
33 33 )
34 34 ),
35 35 'get_single_demo' => array(
36 36 'callback' => array( $this, 'get_single_demo' ),
37 - 'capability' => 'manage_options',
37 + 'capability' => 'ablocks_import_templates',
38 38 'fields' => array(
39 39 'id' => 'integer',
40 40 'with_images' => 'string',
41 41 )
@@ -41,9 +41,9 @@
41 41 )
42 42 ),
43 43 'get_demo_categories' => array(
44 44 'callback' => array( $this, 'get_demo_categories' ),
45 - 'capability' => 'manage_options',
45 + 'capability' => 'ablocks_import_templates',
46 46 'fields' => array(
47 47 'type' => 'string',
48 48 )
49 49 ),
@@ -48,13 +48,13 @@
48 48 )
49 49 ),
50 50 'get_theme_demos' => array(
51 51 'callback' => array( $this, 'get_theme_demos' ),
52 - 'capability' => 'manage_options',
52 + 'capability' => 'ablocks_import_templates',
53 53 ),
54 54 'check_dependencies' => array(
55 55 'callback' => array( $this, 'check_dependencies' ),
56 - 'capability' => 'manage_options',
56 + 'capability' => 'ablocks_import_templates',
57 57 'fields' => array(
58 58 'dependencies' => 'array|string',
59 59 )
60 60 ),
@@ -59,9 +59,12 @@
59 59 )
60 60 ),
61 61 'install_and_active' => array(
62 62 'callback' => array( $this, 'install_and_active' ),
63 - 'capability' => 'manage_options',
63 + // A demo's dependencies are plugins. Importing templates is a
64 + // design permission; installing plugins is not, and must never
65 + // become reachable through one.
66 + 'capability' => 'install_plugins',
64 67 'fields' => array(
65 68 'dependency' => 'array|string',
66 69 )
67 70 ),
@@ -66,9 +69,9 @@
66 69 )
67 70 ),
68 71 'import_template' => array(
69 72 'callback' => array( $this, 'import_template' ),
70 - 'capability' => 'manage_options',
73 + 'capability' => 'ablocks_import_templates',
71 74 'fields' => array(
72 75 'file_url' => 'string',
73 76 'customizer_file_url' => 'string',
74 77 'widget_file_url' => 'string',