PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
← All changes | php/Settings/Settings_Fields.php +30 -30 3.10.1 → 4.0.0-beta.2 View file →
@@ -76,9 +76,9 @@
76 76 return self::get_instance()->fields;
77 77 }
78 78
79 79 /**
80 - * Initialise default settings values.
80 + * Initialize default settings values.
81 81 *
82 82 * @return void
83 83 */
84 84 private function init_defaults() {
@@ -83,19 +83,20 @@
83 83 */
84 84 private function init_defaults() {
85 85 $this->defaults = [
86 86 'general' => [
87 - 'activate_by_default' => true,
88 - 'enable_tags' => true,
89 - 'enable_description' => true,
90 - 'visual_editor_rows' => 5,
91 - 'list_order' => 'priority-asc',
92 - 'disable_prism' => false,
93 - 'hide_upgrade_menu' => false,
94 - 'complete_uninstall' => false,
95 - 'enable_flat_files' => false,
96 - 'enable_admin_bar' => true,
97 - 'admin_bar_snippet_limit' => 20,
87 + 'activate_by_default' => true,
88 + 'enable_tags' => true,
89 + 'enable_description' => true,
90 + 'visual_editor_rows' => 5,
91 + 'list_order' => 'priority-asc',
92 + 'disable_prism' => false,
93 + 'hide_upgrade_menu' => false,
94 + 'complete_uninstall' => false,
95 + 'enable_flat_files' => false,
96 + 'enable_admin_bar' => true,
97 + 'admin_bar_snippet_limit' => 20,
98 + 'enable_feedback_reporter' => false,
98 99 ],
99 100 'editor' => [
100 101 'indent_with_tabs' => true,
101 102 'tab_size' => 4,
@@ -112,11 +113,8 @@
112 113 ],
113 114 'version-switch' => [
114 115 'selected_version' => '',
115 116 ],
116 - 'debug' => [
117 - 'enable_version_change' => false,
118 - ],
119 117 ];
120 118
121 119 $this->defaults = apply_filters( 'code_snippets_settings_defaults', $this->defaults );
122 120 }
@@ -121,9 +119,9 @@
121 119 $this->defaults = apply_filters( 'code_snippets_settings_defaults', $this->defaults );
122 120 }
123 121
124 122 /**
125 - * Initialise the settings fields values.
123 + * Initialize the settings fields values.
126 124 *
127 125 * @return void
128 126 */
129 127 private function init_fields() {
@@ -129,24 +127,19 @@
129 127 private function init_fields() {
130 128 $this->fields = [];
131 129
132 130 $this->fields['debug'] = [
133 - 'database_update' => [
131 + 'database_update' => [
134 132 'name' => __( 'Database Table Upgrade', 'code-snippets' ),
135 133 'type' => 'action',
136 134 'label' => __( 'Upgrade Database Table', 'code-snippets' ),
137 135 'desc' => __( 'Use this button to manually upgrade the Code Snippets database table. This action will only affect the snippets table and should be used only when necessary.', 'code-snippets' ),
138 136 ],
139 - 'reset_caches' => [
137 + 'reset_caches' => [
140 138 'name' => __( 'Reset Caches', 'code-snippets' ),
141 139 'type' => 'action',
142 - 'desc' => __( 'Use this button to manually clear snippets caches.', 'code-snippets' ),
140 + 'desc' => __( 'Use this button to manually clear snippets caches. Worth doing before switching to an older version of the plugin, if your site uses a persistent object cache.', 'code-snippets' ),
143 141 ],
144 - 'enable_version_change' => [
145 - 'name' => __( 'Version Change', 'code-snippets' ),
146 - 'type' => 'checkbox',
147 - 'label' => __( 'Enable the ability to switch or rollback versions of the Code Snippets core plugin.', 'code-snippets' ),
148 - ],
149 142 ];
150 143
151 144 $this->fields['version-switch'] = [
152 145 'version_switcher' => [
@@ -229,19 +222,26 @@
229 222 'label' => __( 'Show a Snippets menu in the admin bar for quick access to snippets.', 'code-snippets' ),
230 223 ];
231 224
232 225 $this->fields['general']['admin_bar_snippet_limit'] = [
233 - 'name' => __( 'Admin Bar Snippets Per Page', 'code-snippets' ),
234 - 'type' => 'number',
235 - 'desc' => __( 'Number of snippets to show in the admin bar Active/Inactive menus before paginating.', 'code-snippets' ),
236 - 'label' => __( 'snippets', 'code-snippets' ),
237 - 'min' => 1,
238 - 'max' => 100,
226 + 'name' => __( 'Admin Bar Snippets Per Page', 'code-snippets' ),
227 + 'type' => 'number',
228 + 'desc' => __( 'Number of snippets to show in the admin bar Active/Inactive menus before paginating.', 'code-snippets' ),
229 + 'label' => __( 'snippets', 'code-snippets' ),
230 + 'min' => 1,
231 + 'max' => 100,
239 232 'show_if' => [
240 233 'section' => 'general',
241 234 'field' => 'enable_admin_bar',
242 235 'value' => true,
243 236 ],
237 + ];
238 +
239 + $this->fields['general']['enable_feedback_reporter'] = [
240 + 'name' => __( 'Enable Feedback Reporter', 'code-snippets' ),
241 + 'type' => 'checkbox',
242 + 'label' => __( 'Show a button on Code Snippets pages for reporting bugs, requesting features and sending feedback.', 'code-snippets' ),
243 + 'desc' => __( 'Reports include your site address, contact details and a list of active plugins, so that the team can reproduce the problem.', 'code-snippets' ),
244 244 ];
245 245
246 246 $this->fields['editor'] = [
247 247 'indent_with_tabs' => [