Clearfy – WordPress optimization plugin and disable ultimate tweaker - Version 1.1.2

Version Description

  • Redesigned plugin interface design
  • Updated quick setup assistant, now it provides you with information about disabled functions.
  • Added plugin import and export settings
  • Added new features "Remove default widgets settings and quick mode"
  • Added new features "Disable and enable automatic updates of plugin or themes"
  • Added new features "Disable and enable auto core updates"
  • Added new features "Disable all updates qick mode"
  • Added donate button
  • Update readme.txt
Download this release

Release Info

Developer webcraftic
Plugin Icon 128x128 Clearfy – WordPress optimization plugin and disable ultimate tweaker
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

admin/ajax/configurate.php CHANGED
@@ -8,7 +8,7 @@
8
 
9
  function wbcr_clearfy_configurate_plugin()
10
  {
11
- check_ajax_referer('wbcr_clearfy_ajax_configurate_nonce', 'security');
12
 
13
  if( !current_user_can('manage_options') ) {
14
  echo json_encode(array('error' => __('You don\'t have enough capability to edit this information.', 'clearfy')));
@@ -19,121 +19,76 @@
19
  ? sanitize_text_field($_POST['mode'])
20
  : null;
21
 
22
- if( empty($mode_name) ) {
23
- return;
24
- }
25
 
26
- $allow_mods['recommended'] = array(
27
- 'disable_json_rest_api',
28
- 'disable_emoji',
29
- 'remove_dns_prefetch',
30
- 'remove_rsd_link',
31
- 'remove_wlw_link',
32
- 'remove_shortlink_link',
33
- 'remove_adjacent_posts_link',
34
- 'remove_recent_comments_style',
35
- 'content_image_auto_alt',
36
- 'comment_text_convert_links_pseudo',
37
- 'pseudo_comment_author_link',
38
- 'set_last_modified_headers',
39
- 'if_modified_since_headers',
40
- 'remove_last_item_breadcrumb_yoast',
41
- 'yoast_remove_image_from_xml_sitemap',
42
- 'yoast_remove_head_comment',
43
- 'redirect_archives_date',
44
- 'redirect_archives_author',
45
- 'redirect_archives_tag',
46
- 'attachment_pages_redirect',
47
- 'remove_single_pagination_duplicate',
48
- 'remove_replytocom',
49
- 'remove_meta_generator',
50
- 'protect_author_get',
51
- 'change_login_errors',
52
- 'remove_x_pingback',
53
- 'remove_style_version',
54
- 'remove_js_version'
55
- );
56
-
57
- $allow_mods['clear_code'] = array(
58
- 'disable_json_rest_api',
59
- 'disable_emoji',
60
- 'remove_dns_prefetch',
61
- 'remove_rsd_link',
62
- 'remove_wlw_link',
63
- 'remove_shortlink_link',
64
- 'remove_adjacent_posts_link',
65
- 'remove_recent_comments_style',
66
- 'yoast_remove_image_from_xml_sitemap',
67
- 'yoast_remove_head_comment',
68
- 'remove_meta_generator',
69
- 'remove_style_version',
70
- 'remove_js_version'
71
- );
72
-
73
- $allow_mods['defence'] = array(
74
- 'remove_meta_generator',
75
- 'protect_author_get',
76
- 'change_login_errors',
77
- 'remove_x_pingback',
78
- 'remove_style_version',
79
- 'remove_js_version'
80
- );
81
- $allow_mods['seo_optimize'] = array(
82
- 'content_image_auto_alt',
83
- 'comment_text_convert_links_pseudo',
84
- 'pseudo_comment_author_link',
85
- 'set_last_modified_headers',
86
- 'if_modified_since_headers',
87
- 'remove_last_item_breadcrumb_yoast',
88
- 'redirect_archives_date',
89
- 'redirect_archives_author',
90
- 'redirect_archives_tag',
91
- 'attachment_pages_redirect',
92
- 'remove_single_pagination_duplicate',
93
- 'remove_replytocom',
94
- );
95
-
96
- $all_options = array(
97
- 'remove_jquery_migrate',
98
- 'disable_embeds',
99
- 'disable_feed',
100
- 'remove_url_from_comment_form',
101
- 'remove_unnecessary_link_admin_bar',
102
- 'remove_unnecessary_link_admin_bar',
103
- 'revisions_disable',
104
- 'revision_limit',
105
- 'last_modified_exclude',
106
- 'right_robots_txt',
107
- 'robots_txt_text',
108
- 'quick_mode',
109
- 'html_minify',
110
- 'redirect_from_http_to_https',
111
- 'remove_style_version',
112
- 'remove_js_version',
113
- 'remove_version_exclude'
114
- );
115
-
116
- $all_options = array_unique(array_merge($all_options, $allow_mods['recommended'], $allow_mods['clear_code'], $allow_mods['defence'], $allow_mods['seo_optimize']), SORT_REGULAR);
117
-
118
- foreach($all_options as $opt_name) {
119
- delete_option('wbcr-clearfy_' . $opt_name);
120
- delete_option('wbcr-clearfy_' . $opt_name . '_is_active');
121
- }
122
-
123
- if( !isset($allow_mods[$mode_name]) && $mode_name != 'reset' ) {
124
  echo json_encode(array('error' => __('Undefinded mode.', 'clearfy')));
125
  exit;
126
  }
127
 
 
 
128
  if( $mode_name != 'reset' ) {
129
- foreach($allow_mods[$mode_name] as $option_name) {
130
- update_option('wbcr-clearfy_' . $option_name, 1);
 
 
 
 
 
131
  }
132
 
133
- update_option('wbcr-clearfy_quick_mode', $mode_name);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
 
136
- echo json_encode(array('status' => 'success'));
137
  exit;
138
  }
139
 
8
 
9
  function wbcr_clearfy_configurate_plugin()
10
  {
11
+ check_ajax_referer('wbcr_clearfy_ajax_quick_start_nonce', 'security');
12
 
13
  if( !current_user_can('manage_options') ) {
14
  echo json_encode(array('error' => __('You don\'t have enough capability to edit this information.', 'clearfy')));
19
  ? sanitize_text_field($_POST['mode'])
20
  : null;
21
 
22
+ $cancel_mode = isset($_POST['cancel_mode'])
23
+ ? true
24
+ : false;
25
 
26
+ if( empty($mode_name) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  echo json_encode(array('error' => __('Undefinded mode.', 'clearfy')));
28
  exit;
29
  }
30
 
31
+ $opt_prefix = 'wbcr-clearfy_';
32
+
33
  if( $mode_name != 'reset' ) {
34
+
35
+ $group = WbcrClr_Group::getInstance($mode_name);
36
+ $mode_options = $group->getOptions();
37
+
38
+ if( empty($mode_options) ) {
39
+ echo json_encode(array('error' => __('Undefinded mode.', 'clearfy')));
40
+ exit;
41
  }
42
 
43
+ foreach($mode_options as $option) {
44
+ $set_value = 1;
45
+
46
+ $option_name = $option->getName();
47
+ $option_value = $option->getValue($mode_name);
48
+
49
+ if( !$cancel_mode ) {
50
+ if( !empty($option_value) ) {
51
+ $set_value = $option_value;
52
+ }
53
+
54
+ update_option($opt_prefix . $option_name, $set_value);
55
+ } else {
56
+ delete_option($opt_prefix . $option_name);
57
+ delete_option($opt_prefix . $option_name . '_is_active');
58
+ }
59
+ }
60
+
61
+ $get_quick_mods = get_option($opt_prefix . 'quick_modes', array());
62
+
63
+ if( !$cancel_mode ) {
64
+ $get_quick_mods[] = $mode_name;
65
+ } else {
66
+ if( !empty($get_quick_mods) && in_array($mode_name, $get_quick_mods) ) {
67
+ foreach($get_quick_mods as $key => $m_name) {
68
+ if( $m_name == $mode_name ) {
69
+ unset($get_quick_mods[$key]);
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ if( empty($get_quick_mods) ) {
76
+ delete_option($opt_prefix . 'quick_modes');
77
+ } else {
78
+ update_option($opt_prefix . 'quick_modes', $get_quick_mods);
79
+ }
80
+ } else {
81
+ $all_options = WbcrClr_Option::getAllOptions();
82
+
83
+ if( !empty($all_options) ) {
84
+ foreach($all_options as $option) {
85
+ delete_option($opt_prefix . $option->getName());
86
+ delete_option($opt_prefix . $option->getName() . '_is_active');
87
+ }
88
+ }
89
  }
90
 
91
+ echo json_encode(array('status' => 'success', 'export_options' => wbcr_get_export_options()));
92
  exit;
93
  }
94
 
admin/ajax/import-settings.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Ajax plugin configuration
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright (c) 2017 Webraftic Ltd
6
+ * @version 1.0
7
+ */
8
+
9
+ function wbcr_clearfy_import_settings()
10
+ {
11
+ global $wpdb;
12
+
13
+ check_ajax_referer('wbcr_clearfy_ajax_quick_start_nonce', 'security');
14
+
15
+ if( !current_user_can('manage_options') ) {
16
+ echo json_encode(array('error' => __('You don\'t have enough capability to edit this information.', 'clearfy')));
17
+ exit;
18
+ }
19
+
20
+ $settings = wbcr_maybe_get_post_json('settings');
21
+
22
+ if( empty($settings) ) {
23
+ echo json_encode(array('error' => __('Settings are not defined or do not exist.', 'clearfy')));
24
+ exit;
25
+ }
26
+
27
+ $values = array();
28
+ $place_holders = array();
29
+ $query = "INSERT INTO {$wpdb->prefix}options (option_name, option_value) VALUES ";
30
+
31
+ foreach($settings as $key => $value) {
32
+ array_push($values, sanitize_text_field($key), wp_kses_post($value));
33
+ $place_holders[] = "('%s', '%s')";/* In my case, i know they will always be integers */
34
+ }
35
+
36
+ $query .= implode(', ', $place_holders);
37
+
38
+ $wpdb->query("DELETE FROM {$wpdb->prefix}options WHERE option_name LIKE '%wbcr-clearfy_%';");
39
+ $wpdb->query($wpdb->prepare("$query ", $values));
40
+
41
+ echo json_encode(array('status' => 'success'));
42
+ exit;
43
+ }
44
+
45
+ add_action('wp_ajax_wbcr_clearfy_import_settings', 'wbcr_clearfy_import_settings');
46
+
admin/assets/css/general.css CHANGED
@@ -4,6 +4,7 @@
4
  * @copyright Alex Kovalev 23.08.2017
5
  */
6
  #WBCR {
 
7
  /**
8
  Widget in the sidebar of the plugin
9
  */
@@ -52,12 +53,150 @@
52
  color: #8c8888;
53
  font-size: 12px;
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  #WBCR .wbcr-clearfy-sidebar-widget {
56
- width: 300px;
 
 
57
  margin-top: 20px;
58
  background-color: #fff;
59
- min-height: 200px;
60
  padding: 20px 15px;
 
61
  }
62
  #WBCR .wbcr-clearfy-sidebar-widget .wbcr-clearfy-hint-icon-simple {
63
  display: inline-block;
@@ -89,17 +228,25 @@
89
  margin-bottom: 5px;
90
  }
91
  #WBCR .wbcr-clearfy-board {
92
- background: #fff;
 
93
  padding: 20px;
94
  margin-top: 20px;
95
  }
 
 
 
 
 
 
 
96
  #WBCR .wbcr-clearfy-switch-success-message,
97
  #WBCR .wbcr-clearfy-switch-error-message {
98
  display: none;
99
  padding: 15px 20px;
100
  font-size: 13px;
101
  font-weight: bold;
102
- margin: 15px 0;
103
  border-radius: 4px;
104
  }
105
  #WBCR .wbcr-clearfy-switch-success-message {
@@ -112,10 +259,39 @@
112
  border-bottom: 3px solid #e2a19c;
113
  color: #bd6963;
114
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch {
116
  position: relative;
117
  padding: 20px;
118
- font-size: 13px;
119
  text-transform: uppercase;
120
  background: #f1f1f1;
121
  margin-top: 10px;
@@ -131,33 +307,43 @@
131
  background: #e9e9e9;
132
  border: 2px solid #d8d7d7;
133
  }
134
- #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-loading .wbcr-clearfy-switch-confirmation button {
135
- display: none !important;
136
- }
137
- #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-edit {
138
- border: 2px solid #e0dfdf;
139
- }
140
- #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-edit .wbcr-clearfy-switch-confirmation {
141
- display: block !important;
142
- }
143
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active {
144
  background: #e5f9ce;
145
  border: 2px solid #c9deb2;
146
  color: #677d4d;
147
  }
 
 
 
 
 
 
148
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-mode-reset:hover {
149
  background: #f7ccc9;
150
  color: #c55b5b;
151
  border: 2px solid #d8adad;
152
  }
 
 
 
 
 
 
 
 
153
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation {
154
  position: absolute;
155
  display: none;
 
156
  top: 0;
157
  left: 0;
158
  right: 0;
159
  bottom: 0;
160
  background: rgba(255, 255, 255, 0.85);
 
 
 
 
161
  }
162
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation button {
163
  margin-top: 15px;
@@ -178,3 +364,81 @@
178
  color: #a57b3c;
179
  margin-left: 10px;
180
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  * @copyright Alex Kovalev 23.08.2017
5
  */
6
  #WBCR {
7
+ position: relative;
8
  /**
9
  Widget in the sidebar of the plugin
10
  */
53
  color: #8c8888;
54
  font-size: 12px;
55
  }
56
+ #WBCR .wbcr-clr-options,
57
+ #WBCR .wbcr-clr-page {
58
+ position: relative;
59
+ background: #fff;
60
+ padding-left: 230px;
61
+ }
62
+ #WBCR .wbcr-clr-options form.form-horizontal,
63
+ #WBCR .wbcr-clr-page form.form-horizontal {
64
+ min-height: 700px;
65
+ padding: 130px 20px 50px 20px;
66
+ }
67
+ #WBCR .wbcr-clr-page {
68
+ min-height: 700px;
69
+ padding: 80px 20px 50px 230px;
70
+ }
71
+ #WBCR .wbcr-clearfy-dashboard-header {
72
+ position: absolute;
73
+ z-index: 13;
74
+ top: 0;
75
+ left: 0;
76
+ right: 0;
77
+ overflow: hidden;
78
+ background-color: #32373c;
79
+ color: #fff;
80
+ border-radius: 5px 5px 0 0;
81
+ }
82
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-header-logo {
83
+ float: left;
84
+ padding: 25px 0;
85
+ font-size: 20px;
86
+ line-height: 30px;
87
+ font-weight: 400;
88
+ text-align: center;
89
+ width: 170px;
90
+ background-color: #464b50;
91
+ color: #ccc;
92
+ padding-left: 25px;
93
+ background: none;
94
+ }
95
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-header-title {
96
+ display: inline-block;
97
+ vertical-align: middle;
98
+ }
99
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-header-title h2 {
100
+ font-size: 18px;
101
+ line-height: 30px;
102
+ font-weight: 300;
103
+ margin-top: 26px;
104
+ padding: 0 !important;
105
+ overflow: hidden;
106
+ white-space: nowrap;
107
+ text-overflow: ellipsis;
108
+ color: #fff;
109
+ }
110
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-control {
111
+ position: relative;
112
+ float: right;
113
+ margin: 12px;
114
+ }
115
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-control input[type="submit"] {
116
+ display: inline-block;
117
+ vertical-align: top;
118
+ font-size: 13px;
119
+ font-weight: 600;
120
+ line-height: 20px;
121
+ text-transform: uppercase;
122
+ margin: 10px 0 0;
123
+ padding: 8px 30px;
124
+ cursor: pointer;
125
+ position: relative;
126
+ overflow: hidden;
127
+ border: none;
128
+ border-radius: 50px;
129
+ box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08) inset;
130
+ background-color: #f1f1f1;
131
+ color: inherit;
132
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
133
+ text-align: center;
134
+ outline: none;
135
+ z-index: 3;
136
+ }
137
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-control input[type="submit"].wbcr-clearfy-type-save {
138
+ box-shadow: none;
139
+ min-width: 200px;
140
+ background-color: #8bc34a;
141
+ color: #fff;
142
+ }
143
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-control input[type="submit"].wbcr-clearfy-type-save:hover {
144
+ background: #9dbb7b;
145
+ color: #fff;
146
+ }
147
+ #WBCR .wbcr-clearfy-dashboard-header .wbcr-clearfy-control input[type="submit"].wbcr-clearfy-type-save:active {
148
+ box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.3);
149
+ }
150
+ #WBCR .wbcr-clearfy-left-navigation-bar {
151
+ position: absolute;
152
+ left: 0;
153
+ top: 0;
154
+ bottom: 0;
155
+ width: 230px;
156
+ background: #e6e6e6;
157
+ }
158
+ #WBCR .wbcr-clearfy-left-navigation-bar ul {
159
+ margin-top: 80px;
160
+ }
161
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab {
162
+ display: block;
163
+ background: #efefef;
164
+ margin: 1px 0;
165
+ }
166
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a {
167
+ display: block;
168
+ width: 100%;
169
+ padding: 20px 20px;
170
+ font-size: 12px;
171
+ color: #9a9a9a;
172
+ text-decoration: none;
173
+ text-transform: uppercase;
174
+ }
175
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a:hover {
176
+ background: #f7f6f6;
177
+ }
178
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a,
179
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a:active,
180
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a:hover,
181
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a:active,
182
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab a:focus {
183
+ outline: 0 !important;
184
+ box-shadow: none !important;
185
+ }
186
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab.wbcr-clearfy-active-tab {
187
+ background: #fff;
188
+ }
189
+ #WBCR .wbcr-clearfy-left-navigation-bar ul .wbcr-clearfy-nav-tab.wbcr-clearfy-active-tab a {
190
+ color: #222;
191
+ }
192
  #WBCR .wbcr-clearfy-sidebar-widget {
193
+ display: inline-block;
194
+ min-height: 230px;
195
+ width: 100%;
196
  margin-top: 20px;
197
  background-color: #fff;
 
198
  padding: 20px 15px;
199
+ vertical-align: top;
200
  }
201
  #WBCR .wbcr-clearfy-sidebar-widget .wbcr-clearfy-hint-icon-simple {
202
  display: inline-block;
228
  margin-bottom: 5px;
229
  }
230
  #WBCR .wbcr-clearfy-board {
231
+ background: #f9f8f8;
232
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
233
  padding: 20px;
234
  margin-top: 20px;
235
  }
236
+ #WBCR #wbcr-clearfy-quick-mode-board {
237
+ padding: 30px;
238
+ margin-top: 20px;
239
+ }
240
+ #WBCR #wbcr-clearfy-quick-mode-board h4 {
241
+ margin-top: 30px;
242
+ }
243
  #WBCR .wbcr-clearfy-switch-success-message,
244
  #WBCR .wbcr-clearfy-switch-error-message {
245
  display: none;
246
  padding: 15px 20px;
247
  font-size: 13px;
248
  font-weight: bold;
249
+ margin: 15px 0 0;
250
  border-radius: 4px;
251
  }
252
  #WBCR .wbcr-clearfy-switch-success-message {
259
  border-bottom: 3px solid #e2a19c;
260
  color: #bd6963;
261
  }
262
+ #WBCR .wbcr-clearfy-export-import-board {
263
+ text-align: right;
264
+ }
265
+ #WBCR .wbcr-clearfy-export-import-board label {
266
+ display: block;
267
+ width: 100%;
268
+ text-align: left;
269
+ padding: 7px 0;
270
+ }
271
+ #WBCR .wbcr-clearfy-export-import-board #wbcr-clearfy-import-export {
272
+ width: 100%;
273
+ box-sizing: border-box;
274
+ height: 150px;
275
+ line-height: inherit;
276
+ margin: 0;
277
+ padding: 7px 14px;
278
+ box-shadow: none;
279
+ border-radius: 3px;
280
+ border: 1px solid #eee;
281
+ border-top-color: #dedede;
282
+ background-color: #f1f1f1;
283
+ color: #444;
284
+ transition: border-color 0.3s;
285
+ -webkit-appearance: none;
286
+ }
287
+ #WBCR .wbcr-clearfy-export-import-board .wbcr-clearfy-import-options-button {
288
+ display: inline-block;
289
+ margin-top: 10px;
290
+ }
291
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch {
292
  position: relative;
293
  padding: 20px;
294
+ font-size: 11px;
295
  text-transform: uppercase;
296
  background: #f1f1f1;
297
  margin-top: 10px;
307
  background: #e9e9e9;
308
  border: 2px solid #d8d7d7;
309
  }
 
 
 
 
 
 
 
 
 
310
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active {
311
  background: #e5f9ce;
312
  border: 2px solid #c9deb2;
313
  color: #677d4d;
314
  }
315
+ #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active .wbcr-clearfy-switch-confirmation {
316
+ display: block !important;
317
+ }
318
+ #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-active:hover .wbcr-clearfy-switch-confirmation {
319
+ opacity: 1;
320
+ }
321
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-mode-reset:hover {
322
  background: #f7ccc9;
323
  color: #c55b5b;
324
  border: 2px solid #d8adad;
325
  }
326
+ #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-loading {
327
+ border: 2px solid #efefef;
328
+ background: #f5f5f5;
329
+ color: #d6d6d6;
330
+ }
331
+ #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch.wbcr-clearfy-loading .wbcr-clearfy-switch-confirmation button {
332
+ display: none !important;
333
+ }
334
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation {
335
  position: absolute;
336
  display: none;
337
+ opacity: 0;
338
  top: 0;
339
  left: 0;
340
  right: 0;
341
  bottom: 0;
342
  background: rgba(255, 255, 255, 0.85);
343
+ -webkit-transition: all 0.3s ease-out;
344
+ -moz-transition: all 0.3s ease-out;
345
+ -o-transition: all 0.3s ease-out;
346
+ transition: all 0.3s ease-out;
347
  }
348
  #WBCR #wbcr-clearfy-quick-mode-board .wbcr-clearfy-switch .wbcr-clearfy-switch-confirmation button {
349
  margin-top: 15px;
364
  color: #a57b3c;
365
  margin-left: 10px;
366
  }
367
+ #WBCR .wbcr-clearfy-layer {
368
+ display: none;
369
+ position: absolute;
370
+ top: 0;
371
+ left: 0;
372
+ right: 0;
373
+ bottom: 0;
374
+ background: rgba(255, 235, 59, 0.18);
375
+ z-index: 9;
376
+ }
377
+ #WBCR .wbcr-clearfy-confirm-popup {
378
+ display: none;
379
+ position: absolute;
380
+ top: 50%;
381
+ left: 50%;
382
+ width: 500px;
383
+ height: 400px;
384
+ margin: -200px 0 0 -250px;
385
+ padding: 20px;
386
+ background: rgba(255, 255, 255, 0.82);
387
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
388
+ border: 4px solid rgba(216, 210, 171, 0.44);
389
+ z-index: 99;
390
+ }
391
+ #WBCR .wbcr-clearfy-confirm-popup h3 {
392
+ font-size: 17px;
393
+ text-align: center;
394
+ font-weight: bold;
395
+ margin: 5px 0 0;
396
+ }
397
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-reset-warning-message {
398
+ display: none;
399
+ text-align: center;
400
+ }
401
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-list-options {
402
+ display: none;
403
+ height: 230px;
404
+ overflow-y: auto;
405
+ overflow-x: hidden;
406
+ padding-left: 40px;
407
+ list-style: decimal;
408
+ margin: 20px 0;
409
+ }
410
+ #WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-default-warning-options .wbcr-clearfy-list-options {
411
+ display: block;
412
+ }
413
+ #WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-reset-warning-options {
414
+ height: 200px;
415
+ margin: -100px 0 0 -250px;
416
+ }
417
+ #WBCR .wbcr-clearfy-confirm-popup.wbcr-clearfy-reset-warning-options .wbcr-clearfy-reset-warning-message {
418
+ display: block;
419
+ margin: 10px 0;
420
+ }
421
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons {
422
+ text-align: center;
423
+ padding: 10px;
424
+ }
425
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button {
426
+ display: inline-block;
427
+ padding: 7px 25px;
428
+ box-shadow: none;
429
+ border: 0;
430
+ font-weight: bold;
431
+ }
432
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button,
433
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button:focus {
434
+ outline: 0 !important;
435
+ box-shadow: none !important;
436
+ }
437
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button.wbcr-clearfy-popup-button-ok {
438
+ background: #FFEB3B;
439
+ color: #564f0d;
440
+ }
441
+ #WBCR .wbcr-clearfy-confirm-popup .wbcr-clearfy-popup-buttons button.wbcr-clearfy-cancel-mode {
442
+ background: #d6d6d6;
443
+ color: #5f5d5d;
444
+ }
admin/assets/css/general.less CHANGED
@@ -5,6 +5,8 @@
5
  */
6
 
7
  #WBCR {
 
 
8
  .alert.alert-success {
9
  margin: 0px;
10
  margin-top: 10px;
@@ -50,15 +52,163 @@
50
  }
51
  }
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  /**
54
  Widget in the sidebar of the plugin
55
  */
56
  .wbcr-clearfy-sidebar-widget {
57
- width: 300px;
 
 
58
  margin-top: 20px;
59
  background-color: #fff;
60
- min-height: 200px;
61
  padding: 20px 15px;
 
62
 
63
  .wbcr-clearfy-hint-icon-simple {
64
  display: inline-block;
@@ -97,17 +247,26 @@
97
  }*/
98
 
99
  .wbcr-clearfy-board {
100
- background: #fff;
 
101
  padding: 20px;
102
  margin-top: 20px;
103
  }
104
 
 
 
 
 
 
 
 
 
105
  .wbcr-clearfy-switch-success-message, .wbcr-clearfy-switch-error-message {
106
  display: none;
107
  padding: 15px 20px;
108
  font-size: 13px;
109
  font-weight: bold;
110
- margin: 15px 0;
111
  border-radius: 4px;
112
  }
113
  .wbcr-clearfy-switch-success-message {
@@ -122,11 +281,44 @@
122
  color: #bd6963;
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  #wbcr-clearfy-quick-mode-board {
126
  .wbcr-clearfy-switch {
127
  position: relative;
128
  padding: 20px;
129
- font-size: 13px;
130
  text-transform: uppercase;
131
  background: #f1f1f1;
132
  margin-top: 10px;
@@ -143,25 +335,18 @@
143
  background: darken(#f1f1f1, 3%);
144
  border: 2px solid darken(#e0dfdf, 3%);
145
  }
146
- &.wbcr-clearfy-loading {
147
- .wbcr-clearfy-switch-confirmation {
148
- // background-image: ;
149
- button {
150
- display: none !important;
151
- }
152
- }
153
- }
154
 
155
- &.wbcr-clearfy-edit {
156
- border: 2px solid #e0dfdf;
157
- .wbcr-clearfy-switch-confirmation {
158
- display: block !important;
159
- }
160
- }
161
  &.wbcr-clearfy-active {
162
  background: #e5f9ce;
163
  border: 2px solid #c9deb2;
164
  color: #677d4d;
 
 
 
 
 
 
 
165
  }
166
  &.wbcr-clearfy-mode-reset:hover {
167
  background: #f7ccc9;
@@ -169,14 +354,31 @@
169
  border: 2px solid #d8adad;
170
  }
171
 
 
 
 
 
 
 
 
 
 
 
 
 
172
  .wbcr-clearfy-switch-confirmation {
173
  position: absolute;
174
  display: none;
 
175
  top: 0;
176
  left: 0;
177
  right: 0;
178
  bottom: 0;
179
  background: rgba(255, 255, 255, 0.85);
 
 
 
 
180
 
181
  button {
182
  margin-top: 15px;
@@ -201,4 +403,97 @@
201
  }
202
  }
203
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  }
5
  */
6
 
7
  #WBCR {
8
+ position: relative;
9
+
10
  .alert.alert-success {
11
  margin: 0px;
12
  margin-top: 10px;
52
  }
53
  }
54
 
55
+ .wbcr-clr-options, .wbcr-clr-page {
56
+ position: relative;
57
+ background: #fff;
58
+ padding-left: 230px;
59
+
60
+ form.form-horizontal {
61
+ min-height: 700px;
62
+ //position: relative;
63
+ padding: 130px 20px 50px 20px
64
+ }
65
+ }
66
+
67
+ .wbcr-clr-page {
68
+ min-height: 700px;
69
+ padding: 80px 20px 50px 230px;
70
+ }
71
+
72
+ .wbcr-clearfy-dashboard-header {
73
+ position: absolute;
74
+ z-index: 13;
75
+ top: 0;
76
+ left: 0;
77
+ right: 0;
78
+ overflow: hidden;
79
+ background-color: #32373c;
80
+ color: #fff;
81
+ border-radius: 5px 5px 0 0;
82
+
83
+ .wbcr-clearfy-header-logo {
84
+ float: left;
85
+ padding: 25px 0;
86
+ font-size: 20px;
87
+ line-height: 30px;
88
+ font-weight: 400;
89
+ text-align: center;
90
+ width: 170px;
91
+ background-color: #464b50;
92
+ color: #ccc;
93
+ padding-left: 25px;
94
+ background: none;
95
+ }
96
+
97
+ .wbcr-clearfy-header-title {
98
+ display: inline-block;
99
+ vertical-align: middle;
100
+ h2 {
101
+ font-size: 18px;
102
+ line-height: 30px;
103
+ font-weight: 300;
104
+ margin-top: 26px;
105
+ padding: 0 !important;
106
+ //margin: 0 !important;
107
+ overflow: hidden;
108
+ white-space: nowrap;
109
+ text-overflow: ellipsis;
110
+ color: #fff;
111
+ }
112
+ }
113
+
114
+ .wbcr-clearfy-control {
115
+ position: relative;
116
+ float: right;
117
+ margin: 12px;
118
+
119
+ input[type="submit"] {
120
+ display: inline-block;
121
+ vertical-align: top;
122
+ font-size: 13px;
123
+ font-weight: 600;
124
+ line-height: 20px;
125
+ text-transform: uppercase;
126
+ margin: 10px 0 0;
127
+ padding: 8px 30px;
128
+ cursor: pointer;
129
+ position: relative;
130
+ overflow: hidden;
131
+ border: none;
132
+ border-radius: 50px;
133
+ box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08) inset;
134
+ background-color: #f1f1f1;
135
+ color: inherit;
136
+ transition: background-color 0.3s, border-color 0.3s, color 0.3s, opacity 0.3s;
137
+ text-align: center;
138
+ outline: none;
139
+ z-index: 3;
140
+
141
+ &.wbcr-clearfy-type-save {
142
+ box-shadow: none;
143
+ min-width: 200px;
144
+ background-color: #8bc34a;
145
+ color: #fff;
146
+ &:hover {
147
+ background: #9dbb7b;
148
+ color: #fff;
149
+ }
150
+ &:active {
151
+ box-shadow: inset -1px 1px 1px rgba(0, 0, 0, 0.3);
152
+ }
153
+ }
154
+ }
155
+ }
156
+
157
+ }
158
+
159
+ .wbcr-clearfy-left-navigation-bar {
160
+ position: absolute;
161
+ left: 0;
162
+ top: 0;
163
+ bottom: 0;
164
+ width: 230px;
165
+ background: #e6e6e6;
166
+
167
+ ul {
168
+ margin-top: 80px;
169
+ .wbcr-clearfy-nav-tab {
170
+ display: block;
171
+ background: #efefef;
172
+ //padding: 15px 20px;
173
+ margin: 1px 0;
174
+ a {
175
+ display: block;
176
+ width: 100%;
177
+ padding: 20px 20px;
178
+ font-size: 12px;
179
+ color: #9a9a9a;
180
+ text-decoration: none;
181
+ text-transform: uppercase;
182
+ &:hover {
183
+ background: #f7f6f6;
184
+ }
185
+ &, &:active, &:hover, &:active, &:focus {
186
+ outline: 0 !important;
187
+ box-shadow: none !important;
188
+ }
189
+
190
+ }
191
+ &.wbcr-clearfy-active-tab {
192
+ background: #fff;
193
+ a {
194
+ color: #222;
195
+ }
196
+ }
197
+ }
198
+ }
199
+ }
200
+
201
  /**
202
  Widget in the sidebar of the plugin
203
  */
204
  .wbcr-clearfy-sidebar-widget {
205
+ display: inline-block;
206
+ min-height: 230px;
207
+ width: 100%;
208
  margin-top: 20px;
209
  background-color: #fff;
 
210
  padding: 20px 15px;
211
+ vertical-align: top;
212
 
213
  .wbcr-clearfy-hint-icon-simple {
214
  display: inline-block;
247
  }*/
248
 
249
  .wbcr-clearfy-board {
250
+ background: #f9f8f8;
251
+ box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
252
  padding: 20px;
253
  margin-top: 20px;
254
  }
255
 
256
+ #wbcr-clearfy-quick-mode-board {
257
+ padding: 30px;
258
+ margin-top: 20px;
259
+ h4 {
260
+ margin-top: 30px;
261
+ }
262
+ }
263
+
264
  .wbcr-clearfy-switch-success-message, .wbcr-clearfy-switch-error-message {
265
  display: none;
266
  padding: 15px 20px;
267
  font-size: 13px;
268
  font-weight: bold;
269
+ margin: 15px 0 0;
270
  border-radius: 4px;
271
  }
272
  .wbcr-clearfy-switch-success-message {
281
  color: #bd6963;
282
  }
283
 
284
+ // import board
285
+
286
+ .wbcr-clearfy-export-import-board {
287
+ text-align: right;
288
+ label {
289
+ display: block;
290
+ width: 100%;
291
+ text-align: left;
292
+ padding: 7px 0;
293
+ }
294
+ #wbcr-clearfy-import-export {
295
+ width: 100%;
296
+ box-sizing: border-box;
297
+ height: 150px;
298
+ line-height: inherit;
299
+ margin: 0;
300
+ padding: 7px 14px;
301
+ box-shadow: none;
302
+ border-radius: 3px;
303
+ border: 1px solid #eee;
304
+ border-top-color: #dedede;
305
+ background-color: #f1f1f1;
306
+ color: #444;
307
+ transition: border-color 0.3s;
308
+ -webkit-appearance: none;
309
+ }
310
+ .wbcr-clearfy-import-options-button {
311
+ display: inline-block;
312
+ margin-top: 10px;
313
+ }
314
+ }
315
+
316
+ // quick mode board
317
  #wbcr-clearfy-quick-mode-board {
318
  .wbcr-clearfy-switch {
319
  position: relative;
320
  padding: 20px;
321
+ font-size: 11px;
322
  text-transform: uppercase;
323
  background: #f1f1f1;
324
  margin-top: 10px;
335
  background: darken(#f1f1f1, 3%);
336
  border: 2px solid darken(#e0dfdf, 3%);
337
  }
 
 
 
 
 
 
 
 
338
 
 
 
 
 
 
 
339
  &.wbcr-clearfy-active {
340
  background: #e5f9ce;
341
  border: 2px solid #c9deb2;
342
  color: #677d4d;
343
+
344
+ & .wbcr-clearfy-switch-confirmation {
345
+ display: block !important;
346
+ }
347
+ &:hover .wbcr-clearfy-switch-confirmation {
348
+ opacity: 1;
349
+ }
350
  }
351
  &.wbcr-clearfy-mode-reset:hover {
352
  background: #f7ccc9;
354
  border: 2px solid #d8adad;
355
  }
356
 
357
+ &.wbcr-clearfy-loading {
358
+ border: 2px solid #efefef;
359
+ background: #f5f5f5;
360
+ color: #d6d6d6;
361
+ .wbcr-clearfy-switch-confirmation {
362
+ // background-image: ;
363
+ button {
364
+ display: none !important;
365
+ }
366
+ }
367
+ }
368
+
369
  .wbcr-clearfy-switch-confirmation {
370
  position: absolute;
371
  display: none;
372
+ opacity: 0;
373
  top: 0;
374
  left: 0;
375
  right: 0;
376
  bottom: 0;
377
  background: rgba(255, 255, 255, 0.85);
378
+ -webkit-transition: all 0.3s ease-out;
379
+ -moz-transition: all 0.3s ease-out;
380
+ -o-transition: all 0.3s ease-out;
381
+ transition: all 0.3s ease-out;
382
 
383
  button {
384
  margin-top: 15px;
403
  }
404
  }
405
  }
406
+
407
+ .wbcr-clearfy-layer {
408
+ display: none;
409
+ position: absolute;
410
+ top: 0;
411
+ left: 0;
412
+ right: 0;
413
+ bottom: 0;
414
+ //background: rgba(255, 235, 59, 0.07);
415
+ background: rgba(255, 235, 59, 0.18);
416
+ z-index: 9;
417
+ }
418
+ .wbcr-clearfy-confirm-popup {
419
+ display: none;
420
+ position: absolute;
421
+ top: 50%;
422
+ left: 50%;
423
+ width: 500px;
424
+ height: 400px;
425
+ margin: -200px 0 0 -250px;
426
+ padding: 20px;
427
+ background: rgba(255, 255, 255, 0.82);
428
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
429
+ border: 4px solid rgba(216, 210, 171, 0.44);
430
+ z-index: 99;
431
+
432
+ h3 {
433
+ font-size: 17px;
434
+ text-align: center;
435
+ font-weight: bold;
436
+ margin: 5px 0 0;
437
+ }
438
+
439
+ .wbcr-clearfy-reset-warning-message {
440
+ display: none;
441
+ text-align: center;
442
+ }
443
+
444
+ .wbcr-clearfy-list-options {
445
+ display: none;
446
+ height: 230px;
447
+ overflow-y: auto;
448
+ overflow-x: hidden;
449
+ padding-left: 40px;
450
+ list-style: decimal;
451
+ margin: 20px 0;
452
+ li {
453
+
454
+ }
455
+ }
456
+
457
+ &.wbcr-clearfy-default-warning-options {
458
+ .wbcr-clearfy-list-options {
459
+ display: block;
460
+ }
461
+ }
462
+
463
+ &.wbcr-clearfy-reset-warning-options {
464
+ height: 200px;
465
+ margin: -100px 0 0 -250px;
466
+ .wbcr-clearfy-reset-warning-message {
467
+ display: block;
468
+ margin: 10px 0;
469
+ }
470
+ }
471
+
472
+ .wbcr-clearfy-popup-buttons {
473
+ text-align: center;
474
+ padding: 10px;
475
+ button {
476
+ display: inline-block;
477
+ padding: 7px 25px;
478
+ box-shadow: none;
479
+ border: 0;
480
+ font-weight: bold;
481
+
482
+ &, &:focus {
483
+ outline: 0 !important;
484
+ box-shadow: none !important;
485
+ }
486
+
487
+ &.wbcr-clearfy-popup-button-ok {
488
+ background: #FFEB3B;
489
+ color: #564f0d;
490
+ }
491
+ &.wbcr-clearfy-cancel-mode {
492
+ background: #d6d6d6;
493
+ color: #5f5d5d;
494
+ }
495
+ }
496
+
497
+ }
498
+ }
499
  }
admin/assets/js/general.010000.js DELETED
@@ -1,89 +0,0 @@
1
- /**
2
- * General
3
- * @author Webcraftic <wordpress.webraftic@gmail.com>
4
- * @copyright (c) 10.09.2017, Webcraftic
5
- * @version 1.0
6
- */
7
-
8
-
9
- (function($) {
10
- 'use strict';
11
-
12
- $(document).ready(function() {
13
- var errorContanier = $('.wbcr-clearfy-switch-error-message'),
14
- defaultErrorMessage = errorContanier.text();
15
-
16
- $('.wbcr-clearfy-switch').click(function() {
17
- var self = $(this);
18
-
19
- $('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-edit');
20
- self.addClass('wbcr-clearfy-edit');
21
- return false;
22
- });
23
-
24
- $('.wbcr-clearfy-confirm-button-cancel').click(function() {
25
- $(this).closest('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-edit');
26
- return false;
27
- });
28
-
29
- $('.wbcr-clearfy-confirm-button-accept').click(function() {
30
- var self = $(this), switcher = $(this).closest('.wbcr-clearfy-switch'),
31
- modeName = switcher.data('mode');
32
-
33
- if( !modeName ) {
34
- return;
35
- }
36
-
37
- switcher.addClass('wbcr-clearfy-loading');
38
-
39
- if( wbcr_clearfy_ajax === undefined ) {
40
- console.log('Undefinded wbcr_clearfy_ajax object.');
41
- return;
42
- }
43
-
44
- var ajaxUrl = wbcr_clearfy_ajax ? wbcr_clearfy_ajax.ajaxurl : ajaxurl;
45
-
46
- $.ajax(ajaxurl, {
47
- type: 'post',
48
- dataType: 'json',
49
- data: {
50
- action: 'wbcr_clearfy_configurate',
51
- mode: modeName,
52
- security: wbcr_clearfy_ajax.ajax_nonce
53
- },
54
- success: function(data, textStatus, jqXHR) {
55
- switcher.removeClass('wbcr-clearfy-edit')
56
- .removeClass('wbcr-clearfy-loading');
57
-
58
- if( !data || data.error ) {
59
-
60
- if( data ) {
61
-
62
- console.log(data.error);
63
- if( !errorContanier.is(':visible') ) {
64
- errorContanier.html(defaultErrorMessage + '<br>' + data.error);
65
- }
66
- }
67
-
68
- if( !errorContanier.is(':visible') ) {
69
- errorContanier.fadeIn(600).delay(10000).fadeOut(600);
70
- }
71
- return;
72
- }
73
-
74
- $('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-active');
75
-
76
- if( modeName != 'reset' ) {
77
- switcher.addClass('wbcr-clearfy-active');
78
- }
79
-
80
- $('.wbcr-clearfy-switch-success-message').fadeIn(600).delay(3000).fadeOut(600);
81
-
82
- }
83
- });
84
-
85
- });
86
-
87
- });
88
-
89
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/assets/js/general.js ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * General
3
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
4
+ * @copyright (c) 10.09.2017, Webcraftic
5
+ * @version 1.0
6
+ */
7
+
8
+
9
+ (function($) {
10
+ 'use strict';
11
+
12
+ var general = {
13
+ init: function() {
14
+ this.qickStartAssistent();
15
+ this.importOptions();
16
+ },
17
+ qickStartAssistent: function() {
18
+ var self = this;
19
+
20
+ $('.wbcr-clearfy-switch').click(function() {
21
+
22
+ var modeName = $(this).data('mode'),
23
+ modeOptions = $(this).data('mode-options');
24
+
25
+ self.showConfirmationPopup(modeName, modeOptions);
26
+ return false;
27
+ });
28
+
29
+ $('.wbcr-clearfy-popup-button-cancel').click(function() {
30
+ self.hideConfirmationPopup();
31
+ });
32
+
33
+ $('.wbcr-clearfy-cancel-mode').click(function() {
34
+ var $this = $(this), modeName = $(this).closest('.wbcr-clearfy-switch').data('mode'),
35
+ switcher = $(this).closest('.wbcr-clearfy-switch');
36
+
37
+ switcher.addClass('wbcr-clearfy-loading');
38
+
39
+ self.sendRequest({
40
+ action: 'wbcr_clearfy_configurate',
41
+ mode: modeName,
42
+ cancel_mode: true
43
+ }, function(data) {
44
+ switcher.removeClass('wbcr-clearfy-loading');
45
+
46
+ if( data && data.export_options ) {
47
+ $('#wbcr-clearfy-import-export').html(data.export_options);
48
+ }
49
+ },
50
+ function() {
51
+ if( modeName != 'reset' ) {
52
+ switcher.removeClass('wbcr-clearfy-active');
53
+ }
54
+ });
55
+ return false;
56
+ });
57
+
58
+ $('.wbcr-clearfy-popup-button-ok').click(function() {
59
+ var $this = $(this), modeName = $(this).closest('.wbcr-clearfy-confirm-popup').data('mode'),
60
+ switcher = $('div[data-mode="' + modeName + '"]', '#wbcr-clearfy-quick-mode-board');
61
+
62
+ self.hideConfirmationPopup();
63
+ switcher.addClass('wbcr-clearfy-loading');
64
+
65
+ self.sendRequest({
66
+ action: 'wbcr_clearfy_configurate',
67
+ mode: modeName
68
+ }, function(data) {
69
+ switcher.removeClass('wbcr-clearfy-loading');
70
+
71
+ if( data && data.export_options ) {
72
+ $('#wbcr-clearfy-import-export').html(data.export_options);
73
+ }
74
+ },
75
+ function() {
76
+ if( modeName != 'reset' ) {
77
+ switcher.addClass('wbcr-clearfy-active');
78
+ return;
79
+ }
80
+
81
+ $('.wbcr-clearfy-switch').removeClass('wbcr-clearfy-active');
82
+ });
83
+
84
+ return false;
85
+ });
86
+ },
87
+
88
+ showConfirmationPopup: function(modeName, options) {
89
+ var self = this;
90
+
91
+ $('.wbcr-clearfy-layer').fadeIn();
92
+
93
+ var popupElem = $('.wbcr-clearfy-confirm-popup');
94
+ popupElem.data('mode', modeName);
95
+ popupElem.fadeIn();
96
+
97
+ if( modeName != 'reset' ) {
98
+ var printOptTitles = '';
99
+
100
+ if( options ) {
101
+ for( var opt in options ) {
102
+ if( !options.hasOwnProperty(opt) ) {
103
+ continue;
104
+ }
105
+ printOptTitles += '<li>' + options[opt] + '</li>';
106
+
107
+ }
108
+ $('.wbcr-clearfy-list-options').html(printOptTitles);
109
+ popupElem.addClass('wbcr-clearfy-default-warning-options');
110
+ }
111
+ return;
112
+ }
113
+
114
+ popupElem.addClass('wbcr-clearfy-reset-warning-options');
115
+ },
116
+
117
+ hideConfirmationPopup: function() {
118
+ $('.wbcr-clearfy-layer').fadeOut(100);
119
+ var popupElem = $('.wbcr-clearfy-confirm-popup');
120
+
121
+ popupElem.fadeOut(100, function() {
122
+ popupElem.removeClass('wbcr-clearfy-default-warning-options');
123
+ popupElem.removeClass('wbcr-clearfy-reset-warning-options');
124
+ });
125
+
126
+ },
127
+
128
+ importOptions: function() {
129
+ var self = this;
130
+
131
+ $('.wbcr-clearfy-import-options-button').click(function() {
132
+ var settings = $('#wbcr-clearfy-import-export').val(),
133
+ $this = $(this);
134
+
135
+ if( !settings ) {
136
+ return;
137
+ }
138
+
139
+ $(this).prop('disabled', true);
140
+
141
+ self.sendRequest({
142
+ action: 'wbcr_clearfy_import_settings',
143
+ settings: settings
144
+ }, function(data) {
145
+ //console.log(data);
146
+ $this.prop('disabled', false);
147
+ });
148
+
149
+ return false;
150
+ });
151
+ },
152
+ sendRequest: function(data, beforeValidateCallback, successCallback) {
153
+
154
+ var errorContanier = $('.wbcr-clearfy-switch-error-message'),
155
+ defaultErrorMessage = errorContanier.text();
156
+
157
+ if( wbcr_clearfy_ajax === undefined ) {
158
+ console.log('Undefinded wbcr_clearfy_ajax object.');
159
+ return;
160
+ }
161
+
162
+ var ajaxUrl = wbcr_clearfy_ajax ? wbcr_clearfy_ajax.ajaxurl : ajaxurl;
163
+
164
+ if( typeof data === 'object' ) {
165
+ data.security = wbcr_clearfy_ajax.ajax_nonce;
166
+ }
167
+
168
+ $.ajax(ajaxurl, {
169
+ type: 'post',
170
+ dataType: 'json',
171
+ data: data,
172
+ success: function(data, textStatus, jqXHR) {
173
+
174
+ beforeValidateCallback && beforeValidateCallback(data);
175
+
176
+ if( !data || data.error ) {
177
+ if( data ) {
178
+ console.log(data.error);
179
+ if( !errorContanier.is(':visible') ) {
180
+ errorContanier.html(defaultErrorMessage + '<br>' + data.error);
181
+ }
182
+ }
183
+
184
+ if( !errorContanier.is(':visible') ) {
185
+ errorContanier.fadeIn(600).delay(10000).fadeOut(600);
186
+ }
187
+ return;
188
+ }
189
+
190
+ successCallback && successCallback();
191
+
192
+ $('.wbcr-clearfy-switch-success-message').fadeIn(600).delay(3000).fadeOut(600);
193
+
194
+ }
195
+ });
196
+ }
197
+ };
198
+
199
+ $(document).ready(function() {
200
+ general.init();
201
+ });
202
+
203
+ })(jQuery);
admin/boot.php CHANGED
@@ -6,20 +6,29 @@
6
  * @version 1.0
7
  */
8
 
9
- require(WBCR_CLR_PLUGIN_DIR . '/admin/activation.php');
10
- require(WBCR_CLR_PLUGIN_DIR . '/admin/includes/class.pages.php');
11
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/quick-start.php');
12
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/header.php');
13
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/privacy.php');
14
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/seo.php');
15
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/double-pages.php');
16
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/defence.php');
17
- require(WBCR_CLR_PLUGIN_DIR . '/admin/pages/additionally.php');
 
 
 
 
 
18
 
19
  if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'wbcr_clearfy_configurate' ) {
20
  require(WBCR_CLR_PLUGIN_DIR . '/admin/ajax/configurate.php');
21
  }
22
 
 
 
 
 
23
  /**
24
  * Checking and using additional import
25
  */
6
  * @version 1.0
7
  */
8
 
9
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/includes/classes/class.option.php');
10
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/includes/classes/class.group.php');
11
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/includes/classes/class.pages.php');
12
+
13
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/activation.php');
14
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/quick-start.php');
15
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/code-clean.php');
16
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/privacy.php');
17
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/updates.php');
18
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/seo.php');
19
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/double-pages.php');
20
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/defence.php');
21
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/widgets.php');
22
+ require_once(WBCR_CLR_PLUGIN_DIR . '/admin/pages/additionally.php');
23
 
24
  if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'wbcr_clearfy_configurate' ) {
25
  require(WBCR_CLR_PLUGIN_DIR . '/admin/ajax/configurate.php');
26
  }
27
 
28
+ if( isset($_REQUEST['action']) && $_REQUEST['action'] == 'wbcr_clearfy_import_settings' ) {
29
+ require(WBCR_CLR_PLUGIN_DIR . '/admin/ajax/import-settings.php');
30
+ }
31
+
32
  /**
33
  * Checking and using additional import
34
  */
admin/includes/class.pages.php DELETED
@@ -1,289 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Page template class
5
- * Author: Webcraftic <wordpress.webraftic@gmail.com>
6
- * Version: 1.0.0
7
- */
8
- class WbcrClr_Page extends FactoryPages321_AdminPage {
9
-
10
- /**
11
- * The id of the page in the admin menu.
12
- *
13
- * Mainly used to navigate between pages.
14
- * @see FactoryPages321_AdminPage
15
- *
16
- * @since 1.0.0
17
- * @var string
18
- */
19
-
20
- protected $_pages = array();
21
-
22
- public $customTarget = true;
23
-
24
- public $menuTarget = 'options-general.php';
25
-
26
- public $internal = true;
27
-
28
- public function __construct(Factory325_Plugin $plugin)
29
- {
30
- parent::__construct($plugin);
31
-
32
- $this->_pages = array(
33
- 'quick_start' => array(
34
- 'type' => 'page', // page, options
35
- 'url' => admin_url('options-general.php?page=quick_start-' . $plugin->pluginName),
36
- 'title' => __('Quick start', 'clearfy')
37
- ),
38
- 'general' => array(
39
- 'type' => 'options', // page, options
40
- 'url' => admin_url('options-general.php?page=general-' . $plugin->pluginName),
41
- 'title' => __('Header cleaning', 'clearfy')
42
- ),
43
- 'privacy' => array(
44
- 'type' => 'options', // page, options
45
- 'url' => admin_url('options-general.php?page=privacy-' . $plugin->pluginName),
46
- 'title' => __('Privacy Settings', 'clearfy')
47
- ),
48
- 'seo' => array(
49
- 'type' => 'options',
50
- 'url' => admin_url('options-general.php?page=seo-' . $plugin->pluginName),
51
- 'title' => __('SEO', 'clearfy')
52
- ),
53
- 'double_pages' => array(
54
- 'type' => 'options',
55
- 'url' => admin_url('options-general.php?page=double_pages-' . $plugin->pluginName),
56
- 'title' => __('Duplicate pages', 'clearfy')
57
- ),
58
- 'defence' => array(
59
- 'type' => 'options',
60
- 'url' => admin_url('options-general.php?page=defence-' . $plugin->pluginName),
61
- 'title' => __('Defence', 'clearfy')
62
- ),
63
- 'additionally' => array(
64
- 'type' => 'options',
65
- 'url' => admin_url('options-general.php?page=additionally-' . $plugin->pluginName),
66
- 'title' => __('Advanced', 'clearfy')
67
- )
68
- /*'support' => array(
69
- 'type' => 'page',
70
- 'url' => admin_url('options-general.php?page=support-' . $plugin->pluginName),
71
- 'title' => __('Support', 'clearfy')
72
- ),*/
73
- );
74
-
75
- foreach($this->_pages as $screen => $page) {
76
- $this->_pages[$screen]['url'] = add_query_arg(array('wbcr_clr_screen' => $screen), $page['url']);
77
- }
78
- }
79
-
80
- /**
81
- * Requests assets (js and css) for the page.
82
- *
83
- * @see FactoryPages321_AdminPage
84
- *
85
- * @since 1.0.0
86
- * @return void
87
- */
88
- public function assets($scripts, $styles)
89
- {
90
-
91
- $this->scripts->request('jquery');
92
-
93
- $this->scripts->request(array(
94
- 'control.checkbox',
95
- 'control.dropdown',
96
- 'bootstrap.tooltip',
97
- 'holder.more-link',
98
- 'bootstrap.tab',
99
- ), 'bootstrap');
100
-
101
- $this->styles->request(array(
102
- 'bootstrap.core',
103
- 'bootstrap.form-group',
104
- 'bootstrap.separator',
105
- 'bootstrap.tab',
106
- 'holder.more-link',
107
- 'control.dropdown',
108
- 'control.checkbox'
109
- ), 'bootstrap');
110
-
111
- $this->styles->add(WBCR_CLR_PLUGIN_URL . '/admin/assets/css/general.css');
112
- }
113
-
114
- /**
115
- * Shows a page or options
116
- *
117
- * @sinve 1.0.0
118
- * @return void
119
- */
120
- public function indexAction()
121
- {
122
- $screen = isset($_GET['wbcr_clr_screen'])
123
- ? sanitize_text_field($_GET['wbcr_clr_screen'])
124
- : 'quick_start';
125
-
126
- if( !isset($this->_pages[$screen]) ) {
127
- $screen = 'quick_start';
128
- }
129
-
130
- if( 'options' === $this->_pages[$screen]['type'] ) {
131
- $this->showOptions($screen);
132
- } else {
133
- $this->showPage($screen);
134
- }
135
- }
136
-
137
- protected function showNav($screen)
138
- {
139
- ?>
140
- <h2 class="nav-tab-wrapper">
141
- <?php foreach($this->_pages as $pageScreen => $page) { ?>
142
- <a href="<?php echo $page['url'] ?>" class="nav-tab <?php if( $pageScreen === $screen ) {
143
- echo 'nav-tab-active';
144
- } ?>" id="general-tab"><?php echo $page['title'] ?></a><?php } ?>
145
- </h2>
146
- <?php
147
- }
148
-
149
- protected function showOptions($screen)
150
- {
151
- $form = new FactoryForms328_Form(array(
152
- 'scope' => 'wbcr-clearfy',
153
- 'name' => "$screen-options"
154
- ), $this->plugin);
155
-
156
- $form->setProvider(new FactoryForms328_OptionsValueProvider(array(
157
- 'scope' => 'wbcr-clearfy'
158
- )));
159
-
160
- $options = $this->getOptions();
161
-
162
- if( isset($options[0]) && isset($options[0]['items']) && is_array($options[0]['items']) ) {
163
- foreach($options[0]['items'] as $key => $value) {
164
- if( in_array($value['type'], array('checkbox', 'textarea', 'integer', 'textbox')) ) {
165
- $options[0]['items'][$key]['layout']['column-left'] = '6';
166
- $options[0]['items'][$key]['layout']['column-right'] = '6';
167
- }
168
- }
169
- }
170
-
171
- $form->add($options);
172
-
173
- if( isset($_POST['save-action']) && wp_verify_nonce($_POST['wbcr_clearfy_save'], 'wbcr_clearfy_save_action') ) {
174
-
175
- if( !current_user_can('manage_options') ) {
176
- wp_die(__('You do not have permission to edit page.', 'clearfy'));
177
- exit;
178
- }
179
-
180
- $form->save();
181
-
182
- $redirectArgs = apply_filters('onp_hmwp_' . $screen . '_options', array(
183
- 'wbcr_clr_screen' => $screen,
184
- 'wbcr_saved' => 1
185
- ));
186
-
187
- $this->redirectToAction('index', $redirectArgs);
188
- }
189
-
190
-
191
- ?>
192
- <div id="WBCR" class="wrap">
193
- <div class="factory-bootstrap-329 factory-fontawesome-320">
194
- <h2><? _e('Clearfy - disable unused features', 'clearfy'); ?></h2>
195
-
196
- <?php if( isset($_GET['wbcr_saved']) ) { ?>
197
- <div id="message" class="alert alert-success">
198
- <p><?php _e('The settings have been updated successfully!', 'clearfy') ?></p>
199
- </div>
200
- <?php } ?>
201
-
202
- <?php $this->showNav($screen) ?>
203
-
204
- <div class="row">
205
- <div class="col-sm-8">
206
- <div class="wbcr-clr-options wbcr-clr-options-<?php echo $screen ?> ">
207
- <form method="post" class="form-horizontal">
208
- <?php $form->html(); ?>
209
- </form>
210
- </div>
211
- </div>
212
- <div class="col-sm-4">
213
- <div class="wbcr-clearfy-sidebar-widget alignright">
214
- <ul>
215
- <li>
216
- <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-red"><i class="fa fa-question" aria-hidden="true"></i></span>
217
- - <?php _e('A neutral setting that can not harm your site, but you must be sure that you need to use it.', 'clearfy'); ?>
218
- </li>
219
- <li>
220
- <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-grey"><i class="fa fa-question" aria-hidden="true"></i></span>
221
- - <?php _e('When set this option, you must be careful. Plugins and themes may depend on this function. You must be sure that you can disable this feature for the site.', 'clearfy'); ?>
222
- </li>
223
- <li>
224
- <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-green"><i class="fa fa-question" aria-hidden="true"></i></span>
225
- - <?php _e('Absolutely safe setting, We recommend to use.', 'clearfy'); ?>
226
- </li>
227
- </ul>
228
- ----------<br>
229
-
230
- <p><?php _e('Hover to the icon to get help for the feature you selected.', 'clearfy'); ?></p>
231
- </div>
232
- <div class="wbcr-clearfy-sidebar-widget alignright">
233
- <p>
234
- <strong><?php _e('Do you want the plugin to improved and update?', 'clearfy'); ?></strong>
235
- </p>
236
-
237
- <p><?php _e('Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', 'clearfy'); ?></p>
238
-
239
- <p><?php _e('And also write your ideas on how to extend or improve the plugin.', 'clearfy'); ?></p>
240
-
241
- <p>
242
- <i class="wbcr-clearfy-icon-5stars"></i>
243
- <a href="https://goo.gl/tETE2X" title="Go rate us" target="_blank">
244
- <strong><?php _e('Go rate us and push ideas', 'clearfy'); ?></strong>
245
- </a>
246
- </p>
247
- </div>
248
- </div>
249
- </div>
250
- </div>
251
- </div>
252
- <?php
253
- }
254
-
255
- protected function showPage($screen)
256
- {
257
- ?>
258
- <div id="WBCR" class="wrap">
259
- <div class="factory-bootstrap-329 factory-fontawesome-320">
260
- <h2><? _e('Clearfy - disable unused features', 'clearfy'); ?></h2>
261
-
262
- <?php $this->showNav($screen) ?>
263
- <?php $this->showPageContent() ?>
264
- </div>
265
- </div>
266
- <?php
267
- }
268
-
269
- public function _showFormButton()
270
- {
271
- ?>
272
- <div class="form-group factory-control-buttons">
273
- <div class="control-group">
274
- <?php wp_nonce_field('wbcr_clearfy_save_action', 'wbcr_clearfy_save'); ?>
275
- <input name="save-action" class="btn btn-primary" type="submit" value="<?php _e('Save changes', 'clearfy') ?>"/>
276
- <input type="hidden" name="wbcr_clr_options_submit" value="1"/>
277
- </div>
278
- </div>
279
- <?php
280
- }
281
-
282
- public function getPageUrl($screen)
283
- {
284
- return isset($this->_pages[$screen]['url'])
285
- ? $this->_pages[$screen]['url']
286
- : null;
287
- }
288
- }
289
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/includes/classes/class.group.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file groups the settings for quick setup
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 16.09.2017, Webcraftic
7
+ * @version 1.0
8
+ */
9
+ class WbcrClr_Group {
10
+
11
+ private $group_name;
12
+
13
+ public function __construct($group_name)
14
+ {
15
+ if( empty($group_name) || !is_string($group_name) ) {
16
+ throw new Exception('Empty group_name attribute.');
17
+ }
18
+ $this->group_name = $group_name;
19
+ }
20
+
21
+ public static function getInstance($group_name)
22
+ {
23
+ return new WbcrClr_Group($group_name);
24
+ }
25
+
26
+ public function getName()
27
+ {
28
+ return $this->group_name;
29
+ }
30
+
31
+ public function getOptions()
32
+ {
33
+ $options = WbcrClr_Option::getAllOptions();
34
+ $filter = array();
35
+
36
+ foreach($options as $option) {
37
+ if( $option->hasGroup($this->group_name) ) {
38
+ $filter[] = $option;
39
+ }
40
+ }
41
+
42
+ return $filter;
43
+ }
44
+ }
45
+
admin/includes/classes/class.option.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file groups the settings for quick setup
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 16.09.2017, Webcraftic
7
+ * @version 1.0
8
+ */
9
+ class WbcrClr_Option {
10
+
11
+ private $name;
12
+ private $title;
13
+ private $values;
14
+ private $tags;
15
+
16
+ public function __construct(array $option_data)
17
+ {
18
+ if( empty($option_data) ) {
19
+ throw new Exception('Empty group_name attribute.');
20
+ }
21
+
22
+ foreach($option_data as $key => $value) {
23
+ $this->$key = $value;
24
+ }
25
+ }
26
+
27
+ public function getName()
28
+ {
29
+ return $this->name;
30
+ }
31
+
32
+ public function getTitle()
33
+ {
34
+ return $this->title;
35
+ }
36
+
37
+ public function getValue($group_name = null)
38
+ {
39
+ if( !empty($group_name) && isset($this->values[$group_name]) ) {
40
+ return $this->values[$group_name];
41
+ }
42
+
43
+ return !empty($this->values)
44
+ ? $this->values
45
+ : array();
46
+ }
47
+
48
+ public function getTags()
49
+ {
50
+ return $this->tags;
51
+ }
52
+
53
+ public function hasGroup($group_name)
54
+ {
55
+ if( !empty($this->tags) && in_array($group_name, $this->tags) ) {
56
+ return true;
57
+ }
58
+
59
+ return false;
60
+ }
61
+
62
+ /**
63
+ * @return array
64
+ */
65
+ public static function getAllOptions()
66
+ {
67
+ $all_options = require(WBCR_CLR_PLUGIN_DIR . '/admin/includes/options.php');
68
+ $result = array();
69
+
70
+ if( !empty($all_options) ) {
71
+ foreach($all_options as $option_data) {
72
+ $result[] = new WbcrClr_Option($option_data);
73
+ }
74
+ }
75
+
76
+ return $result;
77
+ }
78
+ }
79
+
admin/includes/classes/class.pages.php ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Page template class
5
+ * Author: Webcraftic <wordpress.webraftic@gmail.com>
6
+ * Version: 1.0.0
7
+ */
8
+ class WbcrClr_Page extends FactoryPages321_AdminPage {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages321_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+
20
+ protected $_pages = array();
21
+
22
+ public $customTarget = true;
23
+
24
+ public $menuTarget = 'options-general.php';
25
+
26
+ public $internal = true;
27
+
28
+ public function __construct(Factory325_Plugin $plugin)
29
+ {
30
+ parent::__construct($plugin);
31
+
32
+ $this->_pages = array(
33
+ 'quick_start' => array(
34
+ 'type' => 'page', // page, options
35
+ 'url' => admin_url('options-general.php?page=quick_start-' . $plugin->pluginName),
36
+ 'title' => '<span class="dashicons dashicons-performance"></span> ' . __('Quick start', 'clearfy')
37
+ ),
38
+ 'code_clean' => array(
39
+ 'type' => 'options', // page, options
40
+ 'url' => admin_url('options-general.php?page=code_clean-' . $plugin->pluginName),
41
+ 'title' => '<span class="dashicons dashicons-editor-code"></span> ' . __('Code cleaning', 'clearfy')
42
+ ),
43
+ 'updates' => array(
44
+ 'type' => 'options', // page, options
45
+ 'url' => admin_url('options-general.php?page=updates-' . $plugin->pluginName),
46
+ 'title' => '<span class="dashicons dashicons-download"></span> ' . __('All site Updates', 'clearfy')
47
+ ),
48
+ 'privacy' => array(
49
+ 'type' => 'options', // page, options
50
+ 'url' => admin_url('options-general.php?page=privacy-' . $plugin->pluginName),
51
+ 'title' => '<span class="dashicons dashicons-hidden"></span> ' . __('Privacy Settings', 'clearfy')
52
+ ),
53
+ 'seo' => array(
54
+ 'type' => 'options',
55
+ 'url' => admin_url('options-general.php?page=seo-' . $plugin->pluginName),
56
+ 'title' => '<span class="dashicons dashicons-star-filled"></span> ' . __('SEO', 'clearfy')
57
+ ),
58
+ 'double_pages' => array(
59
+ 'type' => 'options',
60
+ 'url' => admin_url('options-general.php?page=double_pages-' . $plugin->pluginName),
61
+ 'title' => '<span class="dashicons dashicons-admin-page"></span> ' . __('Duplicate pages', 'clearfy')
62
+ ),
63
+ 'defence' => array(
64
+ 'type' => 'options',
65
+ 'url' => admin_url('options-general.php?page=defence-' . $plugin->pluginName),
66
+ 'title' => '<span class="dashicons dashicons-shield-alt"></span> ' . __('Defence', 'clearfy')
67
+ ),
68
+ 'widgets' => array(
69
+ 'type' => 'options',
70
+ 'url' => admin_url('options-general.php?page=widgets-' . $plugin->pluginName),
71
+ 'title' => '<span class="dashicons dashicons-networking"></span> ' . __('Widgets', 'clearfy')
72
+ ),
73
+ 'additionally' => array(
74
+ 'type' => 'options',
75
+ 'url' => admin_url('options-general.php?page=additionally-' . $plugin->pluginName),
76
+ 'title' => '<span class="dashicons dashicons-list-view"></span> ' . __('Advanced', 'clearfy')
77
+ )
78
+ /*'support' => array(
79
+ 'type' => 'page',
80
+ 'url' => admin_url('options-general.php?page=support-' . $plugin->pluginName),
81
+ 'title' => __('Support', 'clearfy')
82
+ ),*/
83
+ );
84
+
85
+ foreach($this->_pages as $screen => $page) {
86
+ $this->_pages[$screen]['url'] = add_query_arg(array('wbcr_clr_screen' => $screen), $page['url']);
87
+ }
88
+ }
89
+
90
+ /**
91
+ * Requests assets (js and css) for the page.
92
+ *
93
+ * @see FactoryPages321_AdminPage
94
+ *
95
+ * @since 1.0.0
96
+ * @return void
97
+ */
98
+ public function assets($scripts, $styles)
99
+ {
100
+
101
+ $this->scripts->request('jquery');
102
+
103
+ $this->scripts->request(array(
104
+ 'control.checkbox',
105
+ 'control.dropdown',
106
+ 'bootstrap.tooltip',
107
+ 'holder.more-link',
108
+ 'bootstrap.tab',
109
+ ), 'bootstrap');
110
+
111
+ $this->styles->request(array(
112
+ 'bootstrap.core',
113
+ 'bootstrap.form-group',
114
+ 'bootstrap.separator',
115
+ 'bootstrap.tab',
116
+ 'holder.more-link',
117
+ 'control.dropdown',
118
+ 'control.checkbox'
119
+ ), 'bootstrap');
120
+
121
+ $this->styles->add(WBCR_CLR_PLUGIN_URL . '/admin/assets/css/general.css');
122
+ }
123
+
124
+ /**
125
+ * Shows a page or options
126
+ *
127
+ * @sinve 1.0.0
128
+ * @return void
129
+ */
130
+ public function indexAction()
131
+ {
132
+ $screen = isset($_GET['wbcr_clr_screen'])
133
+ ? sanitize_text_field($_GET['wbcr_clr_screen'])
134
+ : 'quick_start';
135
+
136
+ if( !isset($this->_pages[$screen]) ) {
137
+ $screen = 'quick_start';
138
+ }
139
+
140
+ if( 'options' === $this->_pages[$screen]['type'] ) {
141
+ $this->showOptions($screen);
142
+ } else {
143
+ $this->showPage($screen);
144
+ }
145
+ }
146
+
147
+ protected function showNav($screen)
148
+ {
149
+ ?>
150
+ <ul class="wbcr-clearfy-left-nav-tab">
151
+ <?php foreach($this->_pages as $pageScreen => $page) { ?>
152
+ <li class="wbcr-clearfy-nav-tab <?php if( $pageScreen === $screen ) {
153
+ echo 'wbcr-clearfy-active-tab';
154
+ } ?>"><a href="<?php echo $page['url'] ?>" id="general-tab"><?php echo $page['title'] ?></a>
155
+ </li><?php } ?>
156
+ </ul>
157
+ <?php
158
+ }
159
+
160
+ protected function showHeader($pageTitle = true, $showSaveButton = true)
161
+ {
162
+ global $wbcr_clearfy_plugin
163
+ ?>
164
+ <div class="wbcr-clearfy-dashboard-header">
165
+ <div class="wbcr-clearfy-header-logo"><? _e('Clearfy', 'clearfy'); ?>
166
+ <span class="version"><?= $wbcr_clearfy_plugin->version ?> </span>
167
+ <?php if( $pageTitle ): ?><span class="dash">—</span><?php endif; ?>
168
+ </div>
169
+ <?php if( $pageTitle ): ?>
170
+ <div class="wbcr-clearfy-header-title">
171
+ <h2>Page: <?= $this->menuTitle ?></h2>
172
+ </div>
173
+ <?php endif; ?>
174
+ <?php if( $showSaveButton ): ?>
175
+ <div class="wbcr-clearfy-control">
176
+ <input name="save-action" class="wbcr-clearfy-type-save" type="submit" value="<? _e('Save settings', 'clearfy'); ?>">
177
+ <?php wp_nonce_field('wbcr_clearfy_save_action', 'wbcr_clearfy_save'); ?>
178
+ </div><?php endif; ?>
179
+ </div>
180
+ <?php
181
+ }
182
+
183
+ protected function showBottomSidebar()
184
+ {
185
+ ?>
186
+ <div class="row">
187
+ <div class="wbcr-clearfy-top-sidebar">
188
+ <div class="col-sm-4">
189
+ <div class="wbcr-clearfy-sidebar-widget">
190
+ <ul>
191
+ <li>
192
+ <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-red"><i class="fa fa-question" aria-hidden="true"></i></span>
193
+ - <?php _e('A neutral setting that can not harm your site, but you must be sure that you need to use it.', 'clearfy'); ?>
194
+ </li>
195
+ <li>
196
+ <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-grey"><i class="fa fa-question" aria-hidden="true"></i></span>
197
+ - <?php _e('When set this option, you must be careful. Plugins and themes may depend on this function. You must be sure that you can disable this feature for the site.', 'clearfy'); ?>
198
+ </li>
199
+ <li>
200
+ <span class="wbcr-clearfy-hint-icon-simple wbcr-clearfy-simple-green"><i class="fa fa-question" aria-hidden="true"></i></span>
201
+ - <?php _e('Absolutely safe setting, We recommend to use.', 'clearfy'); ?>
202
+ </li>
203
+ </ul>
204
+ ----------<br>
205
+
206
+ <p><?php _e('Hover to the icon to get help for the feature you selected.', 'clearfy'); ?></p>
207
+ </div>
208
+ </div>
209
+ <div class="col-sm-4">
210
+ <div class="wbcr-clearfy-sidebar-widget">
211
+ <p>
212
+ <strong><?php _e('Do you want the plugin to improved and update?', 'clearfy'); ?></strong>
213
+ </p>
214
+
215
+ <p><?php _e('Help the author, leave a review on wordpress.org. Thanks to feedback, I will know that the plugin is really useful to you and is needed.', 'clearfy'); ?></p>
216
+
217
+ <p><?php _e('And also write your ideas on how to extend or improve the plugin.', 'clearfy'); ?></p>
218
+
219
+ <p>
220
+ <i class="wbcr-clearfy-icon-5stars"></i>
221
+ <a href="https://goo.gl/tETE2X" title="Go rate us" target="_blank">
222
+ <strong><?php _e('Go rate us and push ideas', 'clearfy'); ?></strong>
223
+ </a>
224
+ </p>
225
+ </div>
226
+ </div>
227
+ <div class="col-sm-4">
228
+ <div class="wbcr-clearfy-sidebar-widget">
229
+ <p>
230
+ <strong><?php _e('Donation for plug-in development', 'clearfy'); ?></strong>
231
+ </p>
232
+
233
+ <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
234
+ <input type="hidden" name="cmd" value="_s-xclick">
235
+ <input type="hidden" name="hosted_button_id" value="VDX7JNTQPNPFW">
236
+ <input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!">
237
+ </form>
238
+ </div>
239
+ </div>
240
+ </div>
241
+ <?php
242
+ }
243
+
244
+ protected function showOptions($screen)
245
+ {
246
+
247
+ $form = new FactoryForms328_Form(array(
248
+ 'scope' => 'wbcr-clearfy',
249
+ 'name' => "$screen-options"
250
+ ), $this->plugin);
251
+
252
+ $form->setProvider(new FactoryForms328_OptionsValueProvider(array(
253
+ 'scope' => 'wbcr-clearfy'
254
+ )));
255
+
256
+ $options = $this->getOptions();
257
+
258
+ if( isset($options[0]) && isset($options[0]['items']) && is_array($options[0]['items']) ) {
259
+ foreach($options[0]['items'] as $key => $value) {
260
+ if( in_array($value['type'], array('checkbox', 'textarea', 'integer', 'textbox', 'dropdown')) ) {
261
+ $options[0]['items'][$key]['layout']['column-left'] = '6';
262
+ $options[0]['items'][$key]['layout']['column-right'] = '6';
263
+ }
264
+ }
265
+ }
266
+
267
+ $form->add($options);
268
+
269
+ if( isset($_POST['save-action']) && wp_verify_nonce($_POST['wbcr_clearfy_save'], 'wbcr_clearfy_save_action') ) {
270
+
271
+ if( !current_user_can('manage_options') ) {
272
+ wp_die(__('You do not have permission to edit page.', 'clearfy'));
273
+ exit;
274
+ }
275
+
276
+ $get_modes = get_option('wbcr-clearfy_quick_modes', array());
277
+ $mods_count = sizeof($get_modes);
278
+
279
+ if( !empty($get_modes) ) {
280
+ $group_options = WbcrClr_Option::getAllOptions();
281
+ $controls = $form->getControls();
282
+
283
+ foreach($controls as $control) {
284
+ $values = $control->getValuesToSave();
285
+ foreach($values as $keyToSave => $valueToSave) {
286
+ foreach($group_options as $option) {
287
+ if( $keyToSave == $option->getName() ) {
288
+ foreach($get_modes as $mode_key => $mode_name) {
289
+ if( $option->hasGroup($mode_name) ) {
290
+ $option_value = $option->getValue($mode_name);
291
+ if( !empty($option_value) ) {
292
+ if( $option_value != $valueToSave ) {
293
+ unset($get_modes[$mode_key]);
294
+ }
295
+ } else {
296
+ if( is_numeric($valueToSave) && 0 === intval($valueToSave) ) {
297
+ unset($get_modes[$mode_key]);
298
+ }
299
+ }
300
+ }
301
+ }
302
+ }
303
+ }
304
+ }
305
+ }
306
+
307
+ if( $mods_count != sizeof($get_modes) ) {
308
+ if( empty($get_modes) ) {
309
+ delete_option('wbcr-clearfy_quick_modes');
310
+ } else {
311
+ update_option('wbcr-clearfy_quick_modes', $get_modes);
312
+ }
313
+ }
314
+ }
315
+
316
+ $form->save();
317
+
318
+ $redirectArgs = apply_filters('wbcr_clearfy_' . $screen . '_options', array(
319
+ 'wbcr_clr_screen' => $screen,
320
+ 'wbcr_saved' => 1
321
+ ));
322
+
323
+ $this->redirectToAction('index', $redirectArgs);
324
+ }
325
+
326
+
327
+ ?>
328
+ <div id="WBCR" class="wrap">
329
+ <div class="factory-bootstrap-329 factory-fontawesome-320">
330
+ <div class="wbcr-clr-options wbcr-clr-options-<?php echo $screen ?> ">
331
+ <div class="wbcr-clearfy-left-navigation-bar">
332
+ <?php $this->showNav($screen) ?>
333
+ </div>
334
+ <form method="post" class="form-horizontal">
335
+ <?php $this->showHeader(); ?>
336
+ <?php if( isset($_GET['wbcr_saved']) ) { ?>
337
+ <div id="message" class="alert alert-success" style="margin-top:-40px;margin-bottom:40px;">
338
+ <p><?php _e('The settings have been updated successfully!', 'clearfy') ?></p>
339
+ </div>
340
+ <?php } ?>
341
+ <?php $form->html(); ?>
342
+ </form>
343
+ </div>
344
+ <?php $this->showBottomSidebar(); ?>
345
+ </div>
346
+ </div>
347
+ </div>
348
+ <?php
349
+ }
350
+
351
+ protected function showPage($screen)
352
+ {
353
+ ?>
354
+ <div id="WBCR" class="wrap">
355
+ <div class="factory-bootstrap-329 factory-fontawesome-320">
356
+ <div class="wbcr-clr-page factory-bootstrap-329 factory-fontawesome-320">
357
+ <div class="wbcr-clearfy-left-navigation-bar">
358
+ <?php $this->showNav($screen) ?>
359
+ </div>
360
+ <?php $this->showHeader(false, false); ?>
361
+ <?php $this->showPageContent() ?>
362
+ </div>
363
+ <?php $this->showBottomSidebar(); ?>
364
+ </div>
365
+ </div>
366
+ <?php
367
+ }
368
+
369
+ /*public function _showFormButton()
370
+ {
371
+ ?>
372
+ <div class="form-group factory-control-buttons">
373
+ <div class="control-group">
374
+ <?php wp_nonce_field('wbcr_clearfy_save_action', 'wbcr_clearfy_save'); ?>
375
+ <input name="save-action" class="btn btn-primary" type="submit" value="<?php _e('Save changes', 'clearfy') ?>"/>
376
+ <input type="hidden" name="wbcr_clr_options_submit" value="1"/>
377
+ </div>
378
+ </div>
379
+ <?php
380
+ }*/
381
+
382
+ public function getPageUrl($screen)
383
+ {
384
+ return isset($this->_pages[$screen]['url'])
385
+ ? $this->_pages[$screen]['url']
386
+ : null;
387
+ }
388
+ }
389
+
admin/includes/options.php ADDED
@@ -0,0 +1,305 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * * This file groups the settings for quick setup
4
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
5
+ * @copyright (c) 18.09.2017, Webcraftic
6
+ * @version 1.0
7
+ */
8
+
9
+ return array(
10
+ array(
11
+ 'name' => 'disable_json_rest_api',
12
+ 'title' => __('Remove REST API Links', 'clearfy'),
13
+ 'tags' => array('recommended', 'clear_code')
14
+ ),
15
+ array(
16
+ 'name' => 'disable_emoji',
17
+ 'title' => __('Disable Emojis', 'clearfy'),
18
+ 'tags' => array('recommended', 'clear_code')
19
+ ),
20
+ array(
21
+ 'name' => 'remove_dns_prefetch',
22
+ 'title' => __('Remove dns-prefetch', 'clearfy'),
23
+ 'tags' => array('recommended', 'clear_code')
24
+ ),
25
+ array(
26
+ 'name' => 'remove_rsd_link',
27
+ 'title' => __('Remove RSD Link', 'clearfy'),
28
+ 'tags' => array('recommended', 'clear_code')
29
+ ),
30
+ array(
31
+ 'name' => 'remove_wlw_link',
32
+ 'title' => __('Remove wlwmanifest Link', 'clearfy'),
33
+ 'tags' => array('recommended', 'clear_code')
34
+ ),
35
+ array(
36
+ 'name' => 'remove_shortlink_link',
37
+ 'title' => __('Remove Shortlink', 'clearfy'),
38
+ 'tags' => array('recommended', 'clear_code')
39
+ ),
40
+ array(
41
+ 'name' => 'remove_adjacent_posts_link',
42
+ 'title' => __('Remove links to previous, next post', 'clearfy'),
43
+ 'tags' => array('recommended', 'clear_code')
44
+ ),
45
+ array(
46
+ 'name' => 'remove_recent_comments_style',
47
+ 'title' => __('Remove .recentcomments styles', 'clearfy'),
48
+ 'tags' => array('recommended', 'clear_code')
49
+ ),
50
+ array(
51
+ 'name' => 'content_image_auto_alt',
52
+ 'title' => __('Automatically set the alt attribute', 'clearfy'),
53
+ 'tags' => array('recommended', 'seo_optimize')
54
+ ),
55
+ array(
56
+ 'name' => 'comment_text_convert_links_pseudo',
57
+ 'title' => __('Replace external links in comments on the JavaScript code', 'clearfy'),
58
+ 'tags' => array('recommended', 'seo_optimize')
59
+ ),
60
+ array(
61
+ 'name' => 'pseudo_comment_author_link',
62
+ 'title' => __('Replace external links from comment authors on the JavaScript code', 'clearfy'),
63
+ 'tags' => array('recommended', 'seo_optimize')
64
+ ),
65
+ array(
66
+ 'name' => 'set_last_modified_headers',
67
+ 'title' => __('Automatically insert the Last Modified header', 'clearfy'),
68
+ 'tags' => array('recommended', 'seo_optimize')
69
+ ),
70
+ array(
71
+ 'name' => 'if_modified_since_headers',
72
+ 'title' => __('Return an If-Modified-Since responce', 'clearfy'),
73
+ 'tags' => array('recommended', 'seo_optimize')
74
+ ),
75
+ array(
76
+ 'name' => 'remove_last_item_breadcrumb_yoast',
77
+ 'title' => __('Remove duplicate names in breadcrumbs WP SEO by Yoast', 'clearfy'),
78
+ 'tags' => array('recommended', 'seo_optimize')
79
+ ),
80
+ array(
81
+ 'name' => 'yoast_remove_image_from_xml_sitemap',
82
+ 'title' => sprintf(__('Remove the tag %s from XML site map', 'clearfy'), 'image:image'),
83
+ 'tags' => array('recommended', 'clear_code')
84
+ ),
85
+ array(
86
+ 'name' => 'yoast_remove_head_comment',
87
+ 'title' => sprintf(__('Remove comment from %s section', 'clearfy'), 'head'),
88
+ 'tags' => array('recommended', 'clear_code')
89
+ ),
90
+ array(
91
+ 'name' => 'redirect_archives_date',
92
+ 'title' => __('Remove archives date', 'clearfy'),
93
+ 'tags' => array('recommended', 'seo_optimize')
94
+ ),
95
+ array(
96
+ 'name' => 'redirect_archives_author',
97
+ 'title' => __('Remove author archives ', 'clearfy'),
98
+ 'tags' => array('recommended', 'seo_optimize')
99
+ ),
100
+ array(
101
+ 'name' => 'redirect_archives_tag',
102
+ 'title' => __('Remove archives tag', 'clearfy'),
103
+ 'tags' => array('recommended', 'seo_optimize')
104
+ ),
105
+ array(
106
+ 'name' => 'attachment_pages_redirect',
107
+ 'title' => __('Remove attachment pages', 'clearfy'),
108
+ 'tags' => array('recommended', 'seo_optimize')
109
+ ),
110
+ array(
111
+ 'name' => 'remove_single_pagination_duplicate',
112
+ 'title' => __('Remove post pagination', 'clearfy'),
113
+ 'tags' => array('recommended', 'seo_optimize')
114
+ ),
115
+ array(
116
+ 'name' => 'remove_replytocom',
117
+ 'title' => __('Remove ?replytocom', 'clearfy'),
118
+ 'tags' => array('recommended', 'seo_optimize')
119
+ ),
120
+ array(
121
+ 'name' => 'remove_meta_generator',
122
+ 'title' => __('Remove meta generator', 'clearfy'),
123
+ 'tags' => array('recommended', 'clear_code', 'defence')
124
+ ),
125
+ array(
126
+ 'name' => 'protect_author_get',
127
+ 'title' => __('Hide author login', 'clearfy'),
128
+ 'tags' => array('recommended', 'defence')
129
+ ),
130
+ array(
131
+ 'name' => 'change_login_errors',
132
+ 'title' => __('Hide errors when logging into the site', 'clearfy'),
133
+ 'tags' => array('recommended', 'defence')
134
+ ),
135
+ array(
136
+ 'name' => 'remove_x_pingback',
137
+ 'title' => __('Disable X-Pingback', 'clearfy'),
138
+ 'tags' => array('recommended', 'defence')
139
+ ),
140
+ array(
141
+ 'name' => 'remove_style_version',
142
+ 'title' => __('Remove Version from Stylesheet', 'clearfy'),
143
+ 'tags' => array('recommended', 'clear_code', 'defence')
144
+ ),
145
+ array(
146
+ 'name' => 'remove_js_version',
147
+ 'title' => __('Remove Version from Script', 'clearfy'),
148
+ 'tags' => array('recommended', 'clear_code', 'defence')
149
+ ),
150
+ array(
151
+ 'name' => 'remove_unneeded_widget_page',
152
+ 'title' => __('Remove the "Pages" widget', 'clearfy'),
153
+ 'tags' => array('remove_default_widgets')
154
+ ),
155
+ array(
156
+ 'name' => 'remove_unneeded_widget_calendar',
157
+ 'title' => __('Remove calendar widget', 'clearfy'),
158
+ 'tags' => array('remove_default_widgets')
159
+ ),
160
+ array(
161
+ 'name' => 'remove_unneeded_widget_tag_cloud',
162
+ 'title' => __('Remove the "Cloud of tags" widget', 'clearfy'),
163
+ 'tags' => array('remove_default_widgets')
164
+ ),
165
+ array(
166
+ 'name' => 'remove_unneeded_widget_archives',
167
+ 'title' => __('Remove the "Archives" widget', 'clearfy'),
168
+ 'tags' => array('remove_default_widgets')
169
+ ),
170
+ array(
171
+ 'name' => 'remove_unneeded_widget_links',
172
+ 'title' => __('Remove the "Links" widget', 'clearfy'),
173
+ 'tags' => array('remove_default_widgets')
174
+ ),
175
+ array(
176
+ 'name' => 'remove_unneeded_widget_meta',
177
+ 'title' => __('Remove the "Meta" widget', 'clearfy'),
178
+ 'tags' => array('remove_default_widgets')
179
+ ),
180
+ array(
181
+ 'name' => 'remove_unneeded_widget_search',
182
+ 'title' => __('Remove the "Search" widget', 'clearfy'),
183
+ 'tags' => array('remove_default_widgets')
184
+ ),
185
+ array(
186
+ 'name' => 'remove_unneeded_widget_text',
187
+ 'title' => __('Remove the "Text" widget', 'clearfy'),
188
+ 'tags' => array('remove_default_widgets')
189
+ ),
190
+ array(
191
+ 'name' => 'remove_unneeded_widget_categories',
192
+ 'title' => __('Remove the "Categories" widget', 'clearfy'),
193
+ 'tags' => array('remove_default_widgets')
194
+ ),
195
+ array(
196
+ 'name' => 'remove_unneeded_widget_recent_posts',
197
+ 'title' => __('Remove the "Recent Posts" widget', 'clearfy'),
198
+ 'tags' => array('remove_default_widgets')
199
+ ),
200
+ array(
201
+ 'name' => 'remove_unneeded_widget_recent_comments',
202
+ 'title' => __('Remove the "Recent Comments" widget', 'clearfy'),
203
+ 'tags' => array('remove_default_widgets')
204
+ ),
205
+ array(
206
+ 'name' => 'remove_unneeded_widget_text',
207
+ 'title' => __('Remove the "Text" widget', 'clearfy'),
208
+ 'tags' => array('remove_default_widgets')
209
+ ),
210
+ array(
211
+ 'name' => 'remove_unneeded_widget_rss',
212
+ 'title' => __('Remove the "RSS" widget', 'clearfy'),
213
+ 'tags' => array('remove_default_widgets')
214
+ ),
215
+ array(
216
+ 'name' => 'remove_unneeded_widget_menu',
217
+ 'title' => __('Remove the "Menu" widget', 'clearfy'),
218
+ 'tags' => array('remove_default_widgets')
219
+ ),
220
+ array(
221
+ 'name' => 'remove_unneeded_widget_twenty_eleven_ephemera',
222
+ 'title' => __('Remove the "Twenty Eleven Ephemera" widget', 'clearfy'),
223
+ 'tags' => array('remove_default_widgets')
224
+ ),
225
+ array(
226
+ 'name' => 'plugin_updates',
227
+ 'title' => __('Disable plugin updates', 'clearfy'),
228
+ 'tags' => array('disable_all_updates'),
229
+ 'values' => array('disable_all_updates' => 'disable_plugin_updates')
230
+ ),
231
+ array(
232
+ 'name' => 'theme_updates',
233
+ 'title' => __('Disable theme updates', 'clearfy'),
234
+ 'tags' => array('disable_all_updates'),
235
+ 'values' => array('disable_all_updates' => 'disable_theme_updates')
236
+ ),
237
+ array(
238
+ 'name' => 'auto_tran_update',
239
+ 'title' => __('Disable Automatic Translation Updates', 'clearfy'),
240
+ 'tags' => array('disable_all_updates')
241
+ ),
242
+ array(
243
+ 'name' => 'wp_update_core',
244
+ 'title' => __('Disable wordPress core updates', 'clearfy'),
245
+ 'tags' => array('disable_all_updates'),
246
+ 'values' => array('disable_all_updates' => 'disable_core_updates')
247
+ ),
248
+ array(
249
+ 'name' => 'enable_update_vcs',
250
+ 'title' => __('Enable updates for VCS Installations', 'clearfy'),
251
+ 'tags' => array()
252
+ ),
253
+ array('name' => 'revisions_disable', 'title' => __('Disable revision', 'clearfy'), 'tags' => array()),
254
+ array('name' => 'revision_limit', 'title' => __('Limit Post Revisions', 'clearfy'), 'tags' => array()),
255
+ array('name' => 'last_modified_exclude', 'title' => __('Exclude pages:', 'clearfy'), 'tags' => array()),
256
+ array(
257
+ 'name' => 'right_robots_txt',
258
+ 'title' => __('Create right robots.txt', 'clearfy'),
259
+ 'tags' => array()
260
+ ),
261
+ array(
262
+ 'name' => 'robots_txt_text',
263
+ 'title' => __('You can edit the robots.txt file in the box below:', 'clearfy'),
264
+ 'tags' => array()
265
+ ),
266
+ array('name' => 'quick_modes', 'title' => __('Quick mode', 'clearfy'), 'tags' => array()),
267
+ array(
268
+ 'name' => 'remove_jquery_migrate',
269
+ 'title' => __('Remove jQuery Migrate', 'clearfy'),
270
+ 'tags' => array()
271
+ ),
272
+ array('name' => 'disable_embeds', 'title' => __('Disable Embeds', 'clearfy'), 'tags' => array()),
273
+ array('name' => 'disable_feed', 'title' => __('Disable RSS feeds', 'clearfy'), 'tags' => array()),
274
+ array(
275
+ 'name' => 'remove_url_from_comment_form',
276
+ 'title' => __('Remove field "site" in comment form', 'clearfy'),
277
+ 'tags' => array()
278
+ ),
279
+ array(
280
+ 'name' => 'remove_unnecessary_link_admin_bar',
281
+ 'title' => __('Removes links to wordpress.org site from the admin bar', 'clearfy'),
282
+ 'tags' => array()
283
+ ),
284
+ array('name' => 'html_minify', 'title' => __('HTML minify', 'clearfy'), 'tags' => array()),
285
+ array(
286
+ 'name' => 'redirect_from_http_to_https',
287
+ 'title' => __('Redirect Http to Https', 'clearfy'),
288
+ 'tags' => array()
289
+ ),
290
+ array(
291
+ 'name' => 'remove_style_version',
292
+ 'title' => __('Remove Version from Stylesheet', 'clearfy'),
293
+ 'tags' => array()
294
+ ),
295
+ array(
296
+ 'name' => 'remove_js_version',
297
+ 'title' => __('Remove Version from Script', 'clearfy'),
298
+ 'tags' => array()
299
+ ),
300
+ array(
301
+ 'name' => 'remove_version_exclude',
302
+ 'title' => __('Eclude stylesheet/script file names', 'clearfy'),
303
+ 'tags' => array()
304
+ ),
305
+ );
admin/pages/additionally.php CHANGED
@@ -31,14 +31,14 @@
31
  * @since 1.0.0
32
  * @return void
33
  */
34
- public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains additional settings, usually not listed in the recommended list.', 'clearfy') ?>
39
  </div>
40
  <?php
41
- }
42
 
43
  /**
44
  * Permalinks options.
@@ -50,10 +50,10 @@
50
  {
51
  $options = array();
52
 
53
- $options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
- );
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
@@ -70,7 +70,7 @@
70
  'way' => 'buttons',
71
  'name' => 'remove_unnecessary_link_admin_bar',
72
  'title' => __('Removes links to wordpress.org site from the admin bar', 'clearfy'),
73
- 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
74
  'hint' => __('The first item in the toolbar goes wordpress logo and external links to wordpress.org, WP forums and documentation.', 'clearfy') . '<br><b>Clearfy</b>: ' . __('Removes all links to wordpress.org from the toolbar.', 'clearfy'),
75
  'default' => false
76
  );
@@ -106,16 +106,6 @@ So we recommend either disabling or limiting your revisions. ', 'clearfy') . ($i
106
  'default' => ''
107
  );
108
 
109
- $options[] = array(
110
- 'type' => 'separator',
111
- 'cssClass' => 'factory-separator-dashed'
112
- );
113
-
114
- $options[] = array(
115
- 'type' => 'html',
116
- 'html' => array($this, '_showFormButton')
117
- );
118
-
119
  $formOptions = array();
120
 
121
  $formOptions[] = array(
31
  * @since 1.0.0
32
  * @return void
33
  */
34
+ /*public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains additional settings, usually not listed in the recommended list.', 'clearfy') ?>
39
  </div>
40
  <?php
41
+ }*/
42
 
43
  /**
44
  * Permalinks options.
50
  {
51
  $options = array();
52
 
53
+ /*$options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
+ );*/
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
70
  'way' => 'buttons',
71
  'name' => 'remove_unnecessary_link_admin_bar',
72
  'title' => __('Removes links to wordpress.org site from the admin bar', 'clearfy'),
73
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'green'),
74
  'hint' => __('The first item in the toolbar goes wordpress logo and external links to wordpress.org, WP forums and documentation.', 'clearfy') . '<br><b>Clearfy</b>: ' . __('Removes all links to wordpress.org from the toolbar.', 'clearfy'),
75
  'default' => false
76
  );
106
  'default' => ''
107
  );
108
 
 
 
 
 
 
 
 
 
 
 
109
  $formOptions = array();
110
 
111
  $formOptions[] = array(
admin/pages/{header.php → code-clean.php} RENAMED
@@ -5,7 +5,7 @@
5
  *
6
  * @since 1.0.0
7
  */
8
- class WbcrClr_GeneralPage extends WbcrClr_Page {
9
 
10
  /**
11
  * The id of the page in the admin menu.
@@ -16,7 +16,7 @@
16
  * @since 1.0.0
17
  * @var string
18
  */
19
- public $id = "general";
20
 
21
  //public $internal = false;
22
 
@@ -24,7 +24,7 @@
24
  {
25
  parent::__construct($plugin);
26
 
27
- $this->menuTitle = __('Header cleaning', 'clearfy');
28
  }
29
 
30
  /**
@@ -33,14 +33,14 @@
33
  * @since 1.0.0
34
  * @return void
35
  */
36
- public function _showHeader()
37
  {
38
  ?>
39
  <div class="wbcr-clearfy-header">
40
  <?php _e('On this settings page, you can optimize the source code of the page.', 'clearfy') ?>
41
  </div>
42
  <?php
43
- }
44
 
45
  /**
46
  * Permalinks options.
@@ -52,10 +52,10 @@
52
  {
53
  $options = array();
54
 
55
- $options[] = array(
56
  'type' => 'html',
57
  'html' => array($this, '_showHeader')
58
- );
59
 
60
  $options[] = array(
61
  'type' => 'checkbox',
@@ -176,7 +176,7 @@
176
  'default' => false
177
  );
178
 
179
- $options[] = array(
180
  'type' => 'separator',
181
  'cssClass' => 'factory-separator-dashed'
182
  );
@@ -184,7 +184,7 @@
184
  $options[] = array(
185
  'type' => 'html',
186
  'html' => array($this, '_showFormButton')
187
- );
188
 
189
  $formOptions = array();
190
 
@@ -194,8 +194,8 @@
194
  //'cssClass' => 'postbox'
195
  );
196
 
197
- return apply_filters('wbcr_clr_general_form_options', $formOptions);
198
  }
199
  }
200
 
201
- FactoryPages321::register($wbcr_clearfy_plugin, 'WbcrClr_GeneralPage');
5
  *
6
  * @since 1.0.0
7
  */
8
+ class WbcrClr_CodeCleanPage extends WbcrClr_Page {
9
 
10
  /**
11
  * The id of the page in the admin menu.
16
  * @since 1.0.0
17
  * @var string
18
  */
19
+ public $id = "code_clean";
20
 
21
  //public $internal = false;
22
 
24
  {
25
  parent::__construct($plugin);
26
 
27
+ $this->menuTitle = __('Code cleaning', 'clearfy');
28
  }
29
 
30
  /**
33
  * @since 1.0.0
34
  * @return void
35
  */
36
+ /*public function _showHeader()
37
  {
38
  ?>
39
  <div class="wbcr-clearfy-header">
40
  <?php _e('On this settings page, you can optimize the source code of the page.', 'clearfy') ?>
41
  </div>
42
  <?php
43
+ }*/
44
 
45
  /**
46
  * Permalinks options.
52
  {
53
  $options = array();
54
 
55
+ /*$options[] = array(
56
  'type' => 'html',
57
  'html' => array($this, '_showHeader')
58
+ );*/
59
 
60
  $options[] = array(
61
  'type' => 'checkbox',
176
  'default' => false
177
  );
178
 
179
+ /*$options[] = array(
180
  'type' => 'separator',
181
  'cssClass' => 'factory-separator-dashed'
182
  );
184
  $options[] = array(
185
  'type' => 'html',
186
  'html' => array($this, '_showFormButton')
187
+ );*/
188
 
189
  $formOptions = array();
190
 
194
  //'cssClass' => 'postbox'
195
  );
196
 
197
+ return apply_filters('wbcr_clr_code_clean_form_options', $formOptions);
198
  }
199
  }
200
 
201
+ FactoryPages321::register($wbcr_clearfy_plugin, 'WbcrClr_CodeCleanPage');
admin/pages/defence.php CHANGED
@@ -31,14 +31,14 @@
31
  * @since 1.0.0
32
  * @return void
33
  */
34
- public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains the security configuration settings for your site.', 'clearfy') ?>
39
  </div>
40
  <?php
41
- }
42
 
43
  /**
44
  * Permalinks options.
@@ -50,10 +50,10 @@
50
  {
51
  $options = array();
52
 
53
- $options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
- );
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
@@ -79,21 +79,21 @@
79
  'type' => 'checkbox',
80
  'way' => 'buttons',
81
  'name' => 'remove_x_pingback',
82
- 'title' => __('Disable X-Pingback', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
83
  'layout' => array('hint-type' => 'icon'),
84
  'hint' => __('A pingback is basically an automated comment that gets created when another blog links to you. A self-pingback is created when you link to an article within your own blog. Pingbacks are essentially nothing more than spam and simply waste resources.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes the server responses a reference to the xmlrpc file.', 'clearfy'),
85
  'default' => false
86
  );
87
 
88
- $options[] = array(
89
  'type' => 'separator',
90
  'cssClass' => 'factory-separator-dashed'
91
- );
92
 
93
- $options[] = array(
94
  'type' => 'html',
95
  'html' => array($this, '_showFormButton')
96
- );
97
 
98
  $formOptions = array();
99
 
@@ -103,7 +103,7 @@
103
  //'cssClass' => 'postbox'
104
  );
105
 
106
- return apply_filters('wbcr_clr_general_form_options', $formOptions);
107
  }
108
  }
109
 
31
  * @since 1.0.0
32
  * @return void
33
  */
34
+ /*public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains the security configuration settings for your site.', 'clearfy') ?>
39
  </div>
40
  <?php
41
+ }*/
42
 
43
  /**
44
  * Permalinks options.
50
  {
51
  $options = array();
52
 
53
+ /*$options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
+ );*/
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
79
  'type' => 'checkbox',
80
  'way' => 'buttons',
81
  'name' => 'remove_x_pingback',
82
+ 'title' => __('Disable XML-RPC', 'clearfy') . ' <span class="wbcr-clearfy-recomended-text">(' . __('Recommended', 'clearfy') . ')</span>',
83
  'layout' => array('hint-type' => 'icon'),
84
  'hint' => __('A pingback is basically an automated comment that gets created when another blog links to you. A self-pingback is created when you link to an article within your own blog. Pingbacks are essentially nothing more than spam and simply waste resources.', 'clearfy') . '<br><b>Clearfy: </b>' . __('Removes the server responses a reference to the xmlrpc file.', 'clearfy'),
85
  'default' => false
86
  );
87
 
88
+ /*$options[] = array(
89
  'type' => 'separator',
90
  'cssClass' => 'factory-separator-dashed'
91
+ );*/
92
 
93
+ /*$options[] = array(
94
  'type' => 'html',
95
  'html' => array($this, '_showFormButton')
96
+ );*/
97
 
98
  $formOptions = array();
99
 
103
  //'cssClass' => 'postbox'
104
  );
105
 
106
+ return apply_filters('wbcr_clr_defence_form_options', $formOptions);
107
  }
108
  }
109
 
admin/pages/double-pages.php CHANGED
@@ -31,14 +31,14 @@
31
  * @since 1.0.0
32
  * @return void
33
  */
34
- public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains settings for setting up duplicate pages.', 'clearfy') ?>
39
  </div>
40
  <?php
41
- }
42
 
43
  /**
44
  * Permalinks options.
@@ -50,10 +50,10 @@
50
  {
51
  $options = array();
52
 
53
- $options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
- );
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
@@ -115,7 +115,7 @@
115
  'default' => false
116
  );
117
 
118
- $options[] = array(
119
  'type' => 'separator',
120
  'cssClass' => 'factory-separator-dashed'
121
  );
@@ -123,7 +123,7 @@
123
  $options[] = array(
124
  'type' => 'html',
125
  'html' => array($this, '_showFormButton')
126
- );
127
 
128
  $formOptions = array();
129
 
@@ -133,7 +133,7 @@
133
  //'cssClass' => 'postbox'
134
  );
135
 
136
- return apply_filters('wbcr_clr_general_form_options', $formOptions);
137
  }
138
  }
139
 
31
  * @since 1.0.0
32
  * @return void
33
  */
34
+ /*public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains settings for setting up duplicate pages.', 'clearfy') ?>
39
  </div>
40
  <?php
41
+ }*/
42
 
43
  /**
44
  * Permalinks options.
50
  {
51
  $options = array();
52
 
53
+ /*$options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
+ );*/
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
115
  'default' => false
116
  );
117
 
118
+ /*$options[] = array(
119
  'type' => 'separator',
120
  'cssClass' => 'factory-separator-dashed'
121
  );
123
  $options[] = array(
124
  'type' => 'html',
125
  'html' => array($this, '_showFormButton')
126
+ );*/
127
 
128
  $formOptions = array();
129
 
133
  //'cssClass' => 'postbox'
134
  );
135
 
136
+ return apply_filters('wbcr_clr_double_form_options', $formOptions);
137
  }
138
  }
139
 
admin/pages/privacy.php CHANGED
@@ -31,14 +31,14 @@
31
  * @since 1.0.0
32
  * @return void
33
  */
34
- public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('On this page you can configure the privacy settings of your site.', 'clearfy') ?>
39
  </div>
40
  <?php
41
- }
42
 
43
  /**
44
  * Permalinks options.
@@ -50,10 +50,10 @@
50
  {
51
  $options = array();
52
 
53
- $options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
- );
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
@@ -95,7 +95,7 @@
95
  'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
96
  'hint' => __('Enter Stylesheet/Script file names to exclude from version removal (each exclude file starts with a new line)', 'clearfy') . '<br><br><b>' . __('Example', 'clearfy') . ':</b>' . ' http://testwp.dev/wp-includes/js/jquery/jquery.js',
97
  );
98
- $options[] = array(
99
  'type' => 'separator',
100
  'cssClass' => 'factory-separator-dashed'
101
  );
@@ -103,7 +103,7 @@
103
  $options[] = array(
104
  'type' => 'html',
105
  'html' => array($this, '_showFormButton')
106
- );
107
 
108
  $formOptions = array();
109
 
31
  * @since 1.0.0
32
  * @return void
33
  */
34
+ /*public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('On this page you can configure the privacy settings of your site.', 'clearfy') ?>
39
  </div>
40
  <?php
41
+ }*/
42
 
43
  /**
44
  * Permalinks options.
50
  {
51
  $options = array();
52
 
53
+ /*$options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
+ );*/
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
95
  'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
96
  'hint' => __('Enter Stylesheet/Script file names to exclude from version removal (each exclude file starts with a new line)', 'clearfy') . '<br><br><b>' . __('Example', 'clearfy') . ':</b>' . ' http://testwp.dev/wp-includes/js/jquery/jquery.js',
97
  );
98
+ /*$options[] = array(
99
  'type' => 'separator',
100
  'cssClass' => 'factory-separator-dashed'
101
  );
103
  $options[] = array(
104
  'type' => 'html',
105
  'html' => array($this, '_showFormButton')
106
+ );*/
107
 
108
  $formOptions = array();
109
 
admin/pages/quick-start.php CHANGED
@@ -39,11 +39,11 @@
39
  {
40
  parent::assets($scripts, $styles);
41
 
42
- $this->scripts->add(WBCR_CLR_PLUGIN_URL . '/admin/assets/js/general.010000.js');
43
 
44
  $params = array(
45
  'ajaxurl' => admin_url('admin-ajax.php'),
46
- 'ajax_nonce' => wp_create_nonce('wbcr_clearfy_ajax_configurate_nonce'),
47
  );
48
  wp_localize_script('jquery', 'wbcr_clearfy_ajax', $params);
49
  }
@@ -105,7 +105,7 @@
105
  */
106
  public function gererate_reportAction()
107
  {
108
- require_once(WBCR_CLR_PLUGIN_DIR . '/includes/class.zip-archive.php');
109
 
110
  $reposts_dir = WBCR_CLR_PLUGIN_DIR . '/reports';
111
  $reports_temp = $reposts_dir . '/temp';
@@ -135,13 +135,13 @@
135
 
136
  public function selected($mode_name)
137
  {
138
- $get_mode = get_option('wbcr-clearfy_quick_mode');
139
 
140
- if( $get_mode == 'reset' || $mode_name == 'reset' ) {
141
  return ' wbcr-clearfy-mode-reset';
142
  }
143
 
144
- return $get_mode == $mode_name
145
  ? ' wbcr-clearfy-active'
146
  : '';
147
  }
@@ -156,59 +156,99 @@
156
  'clear_code' => __('Code Clearing', 'clearfy'),
157
  'defence' => __('Security', 'clearfy'),
158
  'seo_optimize' => __('Seo optimization', 'clearfy'),
 
 
159
  'reset' => __('Reset all settings', 'clearfy')
 
160
  );
161
  ?>
162
- <div class="wbcr-clr-options factory-bootstrap-329 factory-fontawesome-320">
163
- <div class="row">
164
- <div class="col-sm-6">
165
- <div class="wbcr-clearfy-switch-success-message">
166
- <?php _e('Settings successfully updated!', 'clearfy') ?>
167
- </div>
168
- <div class="wbcr-clearfy-switch-error-message">
169
- <?php _e('During the setup, an unknown error occurred, please try again or contact the plug-in support.', 'clearfy') ?>
170
- </div>
171
- <div id="wbcr-clearfy-quick-mode-board" class="wbcr-clearfy-board">
172
- <p><?php _e('This is the quick plug-in setup mode. Use it if you do not want to understand the settings or do not understand what settings you need to use.', 'clearfy') ?></p>
173
- <h4><?php _e('Select mode', 'clearfy') ?></h4>
174
-
175
- <p><?php _e('After selecting the mode, the plug-in automatically activates the necessary settings for the mode.', 'clearfy') ?></p>
176
-
177
- <div class="row">
178
- <?php foreach($allow_mods as $mode_name => $mode_title): ?>
179
- <div class="col-sm-4">
180
- <div class="wbcr-clearfy-switch<?= $this->selected($mode_name) ?>" data-mode="<?= $mode_name ?>">
181
- <?= $mode_title ?>
182
- <div class="wbcr-clearfy-switch-confirmation">
183
- <button class="wbcr-clearfy-confirm-button-accept"><?php _e('Ok', 'clearfy'); ?></button>
184
- <button class="wbcr-clearfy-confirm-button-cancel"><?php _e('Cancel', 'clearfy'); ?></button>
185
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  </div>
187
  </div>
188
- <?php endforeach; ?>
189
- </div>
190
  </div>
191
  </div>
192
- <div class="col-sm-4">
193
- <div class="wbcr-clearfy-troubleshooting-board wbcr-clearfy-board">
194
- <p><?php _e('If you faced with any issues, please follow the steps below to get quickly quality support:', 'clearfy') ?></p>
195
- <ol>
196
- <li>
197
- <p><?php _e('Generate a debug report which will contains inforamtion about your configuratin and installed plugins', 'clearfy') ?></p>
198
-
199
- <p>
200
- <a href="<?= admin_url('options-general.php?page=quick_start-' . $wbcr_clearfy_plugin->pluginName . '&action=gererate_report'); ?>" class="button"><?php _e('Generate Debug Report', 'clearfy') ?></a>
201
- </p>
202
- </li>
203
- <li>
204
- <p><?php _e('Send a message to <b>wordpress.webraftic@gmail.com</b> include the debug report into the message body.', 'clearfy'); ?></p>
205
- </li>
206
- </ol>
207
- <p style="margin-bottom: 0px;"><?php _e('We guarantee to respond you within 7 business day.', 'clearfy') ?></p>
208
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  </div>
210
  </div>
211
  </div>
 
212
  <?php
213
  }
214
  }
39
  {
40
  parent::assets($scripts, $styles);
41
 
42
+ $this->scripts->add(WBCR_CLR_PLUGIN_URL . '/admin/assets/js/general.js');
43
 
44
  $params = array(
45
  'ajaxurl' => admin_url('admin-ajax.php'),
46
+ 'ajax_nonce' => wp_create_nonce('wbcr_clearfy_ajax_quick_start_nonce'),
47
  );
48
  wp_localize_script('jquery', 'wbcr_clearfy_ajax', $params);
49
  }
105
  */
106
  public function gererate_reportAction()
107
  {
108
+ require_once(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.zip-archive.php');
109
 
110
  $reposts_dir = WBCR_CLR_PLUGIN_DIR . '/reports';
111
  $reports_temp = $reposts_dir . '/temp';
135
 
136
  public function selected($mode_name)
137
  {
138
+ $get_modes = get_option('wbcr-clearfy_quick_modes');
139
 
140
+ if( $mode_name == 'reset' ) {
141
  return ' wbcr-clearfy-mode-reset';
142
  }
143
 
144
+ return is_array($get_modes) && in_array($mode_name, $get_modes)
145
  ? ' wbcr-clearfy-active'
146
  : '';
147
  }
156
  'clear_code' => __('Code Clearing', 'clearfy'),
157
  'defence' => __('Security', 'clearfy'),
158
  'seo_optimize' => __('Seo optimization', 'clearfy'),
159
+ 'disable_all_updates' => __('Disable all updates', 'clearfy'),
160
+ 'remove_default_widgets' => __('Remove default Widgets', 'clearfy'),
161
  'reset' => __('Reset all settings', 'clearfy')
162
+
163
  );
164
  ?>
165
+ <div class="wbcr-clearfy-layer"></div>
166
+ <div class="wbcr-clearfy-confirm-popup">
167
+ <h3><?php _e('Are you sure you want to enable the this options?', 'clearfy') ?></h3>
168
+
169
+ <div class="wbcr-clearfy-reset-warning-message">
170
+ <?php _e('After confirmation, all the settings of the plug-in will return to the default state. Make backup settings by copying data from the export field.', 'clearfy') ?>
171
+ </div>
172
+ <ul class="wbcr-clearfy-list-options"></ul>
173
+ <div class="wbcr-clearfy-popup-buttons">
174
+ <button class="wbcr-clearfy-popup-button-ok"><?php _e('Confirm', 'clearfy') ?></button>
175
+ <button class="wbcr-clearfy-popup-button-cancel"><?php _e('Cancel', 'clearfy') ?></button>
176
+ </div>
177
+ </div>
178
+
179
+ <div class="row">
180
+ <div class="col-sm-8">
181
+ <div id="wbcr-clearfy-quick-mode-board">
182
+ <p><?php _e('This is the quick plug-in setup mode. Use it if you do not want to understand the settings or do not understand what settings you need to use.', 'clearfy') ?></p>
183
+ <h4><?php _e('Select mode', 'clearfy') ?></h4>
184
+
185
+ <p><?php _e('After selecting the mode, the plug-in automatically activates the necessary settings for the mode.', 'clearfy') ?></p>
186
+
187
+ <div class="row">
188
+ <?php foreach($allow_mods as $mode_name => $mode_title): ?>
189
+ <div class="col-sm-4">
190
+ <?php
191
+ $group = WbcrClr_Group::getInstance($mode_name);
192
+
193
+ $filter_mode_options = array();
194
+ foreach($group->getOptions() as $option) {
195
+ $filter_mode_options[$option->getName()] = $option->getTitle();
196
+ }
197
+
198
+ $print_group_options = wbcr_get_escape_json($filter_mode_options);
199
+ ?>
200
+ <div class="wbcr-clearfy-switch<?= $this->selected($mode_name) ?>" data-mode="<?= $mode_name ?>" data-mode-options="<?= $print_group_options ?>">
201
+ <?= $mode_title ?>
202
+ <div class="wbcr-clearfy-switch-confirmation">
203
+ <button class="wbcr-clearfy-cancel-mode"><?php _e('Cancel', 'clearfy'); ?></button>
204
  </div>
205
  </div>
206
+ </div>
207
+ <?php endforeach; ?>
208
  </div>
209
  </div>
210
+ </div>
211
+ <div class="col-sm-4">
212
+ <div class="wbcr-clearfy-switch-success-message">
213
+ <?php _e('Settings successfully updated!', 'clearfy') ?>
214
+ </div>
215
+ <div class="wbcr-clearfy-switch-error-message">
216
+ <?php _e('During the setup, an unknown error occurred, please try again or contact the plug-in support.', 'clearfy') ?>
217
+ </div>
218
+ </div>
219
+ <div class="col-sm-4">
220
+ <div class="wbcr-clearfy-export-import-board wbcr-clearfy-board">
221
+ <p>
222
+ <label for="wbcr-clearfy-import-export">
223
+ <strong><?php _e('Import/Export settings', 'clearfy') ?></strong>
224
+ </label>
225
+ <textarea id="wbcr-clearfy-import-export"><?= wbcr_get_export_options(); ?></textarea>
226
+ <button class="button wbcr-clearfy-import-options-button"><?php _e('Import options', 'clearfy') ?></button>
227
+ </p>
228
+ </div>
229
+ </div>
230
+ <div class="col-sm-4">
231
+ <div class="wbcr-clearfy-troubleshooting-board wbcr-clearfy-board">
232
+ <h4><?php _e('Support', 'clearfy') ?></h4>
233
+
234
+ <p><?php _e('If you faced with any issues, please follow the steps below to get quickly quality support:', 'clearfy') ?></p>
235
+ <ol>
236
+ <li>
237
+ <p><?php _e('Generate a debug report which will contains inforamtion about your configuratin and installed plugins', 'clearfy') ?></p>
238
+
239
+ <p>
240
+ <a href="<?= admin_url('options-general.php?page=quick_start-' . $wbcr_clearfy_plugin->pluginName . '&action=gererate_report'); ?>" class="button"><?php _e('Generate Debug Report', 'clearfy') ?></a>
241
+ </p>
242
+ </li>
243
+ <li>
244
+ <p><?php _e('Send a message to <b>wordpress.webraftic@gmail.com</b> include the debug report into the message body.', 'clearfy'); ?></p>
245
+ </li>
246
+ </ol>
247
+ <p style="margin-bottom: 0px;"><?php _e('We guarantee to respond you within 7 business day.', 'clearfy') ?></p>
248
  </div>
249
  </div>
250
  </div>
251
+
252
  <?php
253
  }
254
  }
admin/pages/seo.php CHANGED
@@ -31,14 +31,14 @@
31
  * @since 1.0.0
32
  * @return void
33
  */
34
- public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains important settings for SEO optimization.', 'clearfy') ?>
39
  </div>
40
  <?php
41
- }
42
 
43
  /**
44
  * Permalinks options.
@@ -50,10 +50,10 @@
50
  {
51
  $options = array();
52
 
53
- $options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
- );
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
@@ -206,7 +206,7 @@
206
  'default' => false
207
  );
208
 
209
- $options[] = array(
210
  'type' => 'separator',
211
  'cssClass' => 'factory-separator-dashed'
212
  );
@@ -214,7 +214,7 @@
214
  $options[] = array(
215
  'type' => 'html',
216
  'html' => array($this, '_showFormButton')
217
- );
218
 
219
  $formOptions = array();
220
 
@@ -224,7 +224,7 @@
224
  //'cssClass' => 'postbox'
225
  );
226
 
227
- return apply_filters('wbcr_clr_general_form_options', $formOptions);
228
  }
229
  }
230
 
31
  * @since 1.0.0
32
  * @return void
33
  */
34
+ /*public function _showHeader()
35
  {
36
  ?>
37
  <div class="wbcr-clearfy-header">
38
  <?php _e('This page contains important settings for SEO optimization.', 'clearfy') ?>
39
  </div>
40
  <?php
41
+ }*/
42
 
43
  /**
44
  * Permalinks options.
50
  {
51
  $options = array();
52
 
53
+ /*$options[] = array(
54
  'type' => 'html',
55
  'html' => array($this, '_showHeader')
56
+ );*/
57
 
58
  $options[] = array(
59
  'type' => 'checkbox',
206
  'default' => false
207
  );
208
 
209
+ /*$options[] = array(
210
  'type' => 'separator',
211
  'cssClass' => 'factory-separator-dashed'
212
  );
214
  $options[] = array(
215
  'type' => 'html',
216
  'html' => array($this, '_showFormButton')
217
+ );*/
218
 
219
  $formOptions = array();
220
 
224
  //'cssClass' => 'postbox'
225
  );
226
 
227
+ return apply_filters('wbcr_clr_seo_form_options', $formOptions);
228
  }
229
  }
230
 
admin/pages/updates.php ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page Settings.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class WbcrClr_UpdatesPage extends WbcrClr_Page {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages321_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+ public $id = "updates";
20
+
21
+ //public $internal = false;
22
+
23
+ public function __construct(Factory325_Plugin $plugin)
24
+ {
25
+ parent::__construct($plugin);
26
+
27
+ $this->menuTitle = __('Header cleaning', 'clearfy');
28
+ }
29
+
30
+ /**
31
+ * Shows the description above the options.
32
+ *
33
+ * @since 1.0.0
34
+ * @return void
35
+ */
36
+ /*public function _showHeader()
37
+ {
38
+ ?>
39
+ <div class="wbcr-clearfy-header">
40
+ <?php _e('On this settings page, you can optimize the source code of the page.', 'clearfy') ?>
41
+ </div>
42
+ <?php
43
+ }*/
44
+
45
+ /**
46
+ * Permalinks options.
47
+ *
48
+ * @since 1.0.0
49
+ * @return mixed[]
50
+ */
51
+ public function getOptions()
52
+ {
53
+ $options = array();
54
+
55
+ /*$options[] = array(
56
+ 'type' => 'html',
57
+ 'html' => array($this, '_showHeader')
58
+ );*/
59
+
60
+ $options[] = array(
61
+ 'type' => 'dropdown',
62
+ 'name' => 'plugin_updates',
63
+ 'way' => 'buttons',
64
+ 'title' => __('Plugin Updates', 'clearfy'),
65
+ 'data' => array(
66
+ array('enable_plugin_monual_updates', __('Monual updates', 'clearfy')),
67
+ array('enable_plugin_auto_updates', __('Enable auto updates', 'clearfy')),
68
+ array('disable_plugin_updates', __('Disable updates', 'clearfy'))
69
+ ),
70
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
71
+ 'hint' => __('You can disable all plugin updates or choose manual or automatic update mode.', 'clearfy'),
72
+ 'default' => 'enable_plugin_monual_updates'
73
+ );
74
+
75
+ $options[] = array(
76
+ 'type' => 'dropdown',
77
+ 'name' => 'theme_updates',
78
+ 'way' => 'buttons',
79
+ 'title' => __('Theme Updates', 'clearfy'),
80
+ 'data' => array(
81
+ array('enable_theme_monual_updates', __('Monual updates', 'clearfy')),
82
+ array('enable_theme_auto_updates', __('Enable auto updates', 'clearfy')),
83
+ array('disable_theme_updates', __('Disable updates', 'clearfy'))
84
+ ),
85
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
86
+ 'hint' => __('You can disable all themes updates or choose manual or automatic update mode.', 'clearfy'),
87
+ 'default' => 'enable_theme_monual_updates'
88
+ );
89
+
90
+ $options[] = array(
91
+ 'type' => 'checkbox',
92
+ 'way' => 'buttons',
93
+ 'name' => 'auto_tran_update',
94
+ 'title' => __('Disable Automatic Translation Updates', 'clearfy'),
95
+ //'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
96
+ //'hint' => __('', 'clearfy') . '<br><br><b>Clearfy: </b>' . __('', 'clearfy'),
97
+ 'default' => false,
98
+ );
99
+ $options[] = array(
100
+ 'type' => 'dropdown',
101
+ 'name' => 'wp_update_core',
102
+ 'title' => __('WordPress Core Updates', 'clearfy'),
103
+ 'data' => array(
104
+ array('disable_core_updates', __('Disable updates', 'clearfy')),
105
+ array('disable_core_auto_updates', __('Disable auto updates', 'clearfy')),
106
+ array('allow_minor_core_auto_updates', __('Allow minor auto updates', 'clearfy')),
107
+ array('allow_major_core_auto_updates', __('Allow major auto updates', 'clearfy')),
108
+ array('allow_dev_core_auto_updates', __('Allow development auto updates', 'clearfy'))
109
+ ),
110
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
111
+ 'hint' => __('You can disable all core WordPress updates, or disable only automatic updates. Also you can select the update mode. By default (minor)', 'clearfy') . '<br>-' . __('Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3).', 'clearfy') . '<br>-' . __('Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3)..', 'clearfy') . '<br>-' . __('Development - update automatically to Bleeding Edge releases.', 'clearfy'),
112
+ 'default' => 'allow_minor_core_auto_updates'
113
+ );
114
+
115
+ $options[] = array(
116
+ 'type' => 'checkbox',
117
+ 'way' => 'buttons',
118
+ 'name' => 'enable_update_vcs',
119
+ 'title' => __('Enable updates for VCS Installations', 'clearfy'),
120
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
121
+ 'hint' => __('Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in the WordPress directory', 'clearfy'),
122
+ 'default' => false,
123
+ );
124
+
125
+ /*$options[] = array(
126
+ 'type' => 'separator',
127
+ 'cssClass' => 'factory-separator-dashed'
128
+ );
129
+
130
+ $options[] = array(
131
+ 'type' => 'html',
132
+ 'html' => array($this, '_showFormButton')
133
+ );*/
134
+
135
+ $formOptions = array();
136
+
137
+ $formOptions[] = array(
138
+ 'type' => 'form-group',
139
+ 'items' => $options,
140
+ //'cssClass' => 'postbox'
141
+ );
142
+
143
+ return apply_filters('wbcr_clr_seo_form_options', $formOptions);
144
+ }
145
+ }
146
+
147
+ FactoryPages321::register($wbcr_clearfy_plugin, 'WbcrClr_UpdatesPage');
admin/pages/widgets.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The page Settings.
5
+ *
6
+ * @since 1.0.0
7
+ */
8
+ class WbcrClr_WidgetsPage extends WbcrClr_Page {
9
+
10
+ /**
11
+ * The id of the page in the admin menu.
12
+ *
13
+ * Mainly used to navigate between pages.
14
+ * @see FactoryPages321_AdminPage
15
+ *
16
+ * @since 1.0.0
17
+ * @var string
18
+ */
19
+ public $id = "widgets";
20
+
21
+ public function __construct(Factory325_Plugin $plugin)
22
+ {
23
+ parent::__construct($plugin);
24
+
25
+ $this->menuTitle = __('Widgets', 'clearfy');
26
+ }
27
+
28
+ /**
29
+ * Shows the description above the options.
30
+ *
31
+ * @since 1.0.0
32
+ * @return void
33
+ */
34
+ /*public function _showHeader()
35
+ {
36
+ ?>
37
+ <div class="wbcr-clearfy-header">
38
+ <?php _e('This page contains additional settings, usually not listed in the recommended list.', 'clearfy') ?>
39
+ </div>
40
+ <?php
41
+ }*/
42
+
43
+ /**
44
+ * Permalinks options.
45
+ *
46
+ * @since 1.0.0
47
+ * @return mixed[]
48
+ */
49
+ public function getOptions()
50
+ {
51
+ $options = array();
52
+
53
+ $options[] = array(
54
+ 'type' => 'checkbox',
55
+ 'way' => 'buttons',
56
+ 'name' => 'remove_unneeded_widget_page',
57
+ 'title' => __('Remove the "Pages" widget', 'clearfy'),
58
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
59
+ 'default' => false
60
+ );
61
+
62
+ $options[] = array(
63
+ 'type' => 'checkbox',
64
+ 'way' => 'buttons',
65
+ 'name' => 'remove_unneeded_widget_calendar',
66
+ 'title' => __('Remove calendar widget', 'clearfy'),
67
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
68
+ 'default' => false
69
+ );
70
+
71
+ $options[] = array(
72
+ 'type' => 'checkbox',
73
+ 'way' => 'buttons',
74
+ 'name' => 'remove_unneeded_widget_tag_cloud',
75
+ 'title' => __('Remove the "Cloud of tags" widget', 'clearfy'),
76
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
77
+ 'default' => false
78
+ );
79
+
80
+ $options[] = array(
81
+ 'type' => 'checkbox',
82
+ 'way' => 'buttons',
83
+ 'name' => 'remove_unneeded_widget_archives',
84
+ 'title' => __('Remove the "Archives" widget', 'clearfy'),
85
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
86
+ 'default' => false
87
+ );
88
+
89
+ $options[] = array(
90
+ 'type' => 'checkbox',
91
+ 'way' => 'buttons',
92
+ 'name' => 'remove_unneeded_widget_links',
93
+ 'title' => __('Remove the "Links" widget', 'clearfy'),
94
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
95
+ 'default' => false
96
+ );
97
+
98
+ $options[] = array(
99
+ 'type' => 'checkbox',
100
+ 'way' => 'buttons',
101
+ 'name' => 'remove_unneeded_widget_meta',
102
+ 'title' => __('Remove the "Meta" widget', 'clearfy'),
103
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
104
+ 'default' => false
105
+ );
106
+
107
+ $options[] = array(
108
+ 'type' => 'checkbox',
109
+ 'way' => 'buttons',
110
+ 'name' => 'remove_unneeded_widget_search',
111
+ 'title' => __('Remove the "Search" widget', 'clearfy'),
112
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
113
+ 'default' => false
114
+ );
115
+
116
+ $options[] = array(
117
+ 'type' => 'checkbox',
118
+ 'way' => 'buttons',
119
+ 'name' => 'remove_unneeded_widget_text',
120
+ 'title' => __('Remove the "Text" widget', 'clearfy'),
121
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
122
+ 'default' => false
123
+ );
124
+
125
+ $options[] = array(
126
+ 'type' => 'checkbox',
127
+ 'way' => 'buttons',
128
+ 'name' => 'remove_unneeded_widget_categories',
129
+ 'title' => __('Remove the "Categories" widget', 'clearfy'),
130
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
131
+ 'default' => false
132
+ );
133
+
134
+ $options[] = array(
135
+ 'type' => 'checkbox',
136
+ 'way' => 'buttons',
137
+ 'name' => 'remove_unneeded_widget_recent_posts',
138
+ 'title' => __('Remove the "Recent Posts" widget', 'clearfy'),
139
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
140
+ 'default' => false
141
+ );
142
+
143
+ $options[] = array(
144
+ 'type' => 'checkbox',
145
+ 'way' => 'buttons',
146
+ 'name' => 'remove_unneeded_widget_recent_comments',
147
+ 'title' => __('Remove the "Recent Comments" widget', 'clearfy'),
148
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
149
+ 'default' => false
150
+ );
151
+
152
+ $options[] = array(
153
+ 'type' => 'checkbox',
154
+ 'way' => 'buttons',
155
+ 'name' => 'remove_unneeded_widget_rss',
156
+ 'title' => __('Remove the "RSS" widget', 'clearfy'),
157
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
158
+ 'default' => false
159
+ );
160
+
161
+ $options[] = array(
162
+ 'type' => 'checkbox',
163
+ 'way' => 'buttons',
164
+ 'name' => 'remove_unneeded_widget_menu',
165
+ 'title' => __('Remove the "Menu" widget', 'clearfy'),
166
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
167
+ 'default' => false
168
+ );
169
+
170
+ $options[] = array(
171
+ 'type' => 'checkbox',
172
+ 'way' => 'buttons',
173
+ 'name' => 'remove_unneeded_widget_twenty_eleven_ephemera',
174
+ 'title' => __('Remove the "Twenty Eleven Ephemera" widget', 'clearfy'),
175
+ 'layout' => array('hint-type' => 'icon', 'hint-icon-color' => 'grey'),
176
+ 'default' => false
177
+ );
178
+
179
+ $formOptions = array();
180
+
181
+ $formOptions[] = array(
182
+ 'type' => 'form-group',
183
+ 'items' => $options,
184
+ //'cssClass' => 'postbox'
185
+ );
186
+
187
+ return apply_filters('wbcr_clr_seo_form_options', $formOptions);
188
+ }
189
+ }
190
+
191
+ FactoryPages321::register($wbcr_clearfy_plugin, 'WbcrClr_WidgetsPage');
clearfy.php CHANGED
@@ -2,10 +2,10 @@
2
  /**
3
  * Plugin Name: Clearfy - disable unused features
4
  * Plugin URI: https://wordpress.org/plugins/clearfy/
5
- * Description: Disable the rest api, emojis, rss, xml-rpc, revision. Remove Yoast SEO Comments, reduce HTTP requests, heartbeat and revision control.
6
  * Author: Webcraftic <wordpress.webraftic@gmail.com>
7
- * Version: 1.1.1
8
- * Text Domain: сlearfy
9
  * Domain Path: /languages/
10
  */
11
 
@@ -35,7 +35,7 @@
35
  $wbcr_clearfy_plugin = new Factory325_Plugin(__FILE__, array(
36
  'name' => 'wbcr_clearfy',
37
  'title' => __('Clearfy - disable unused features', 'clearfy'),
38
- 'version' => '1.1.1',
39
  'host' => 'wordpress.org'
40
  ));
41
 
@@ -49,14 +49,27 @@
49
  ));
50
 
51
  require(WBCR_CLR_PLUGIN_DIR . '/includes/functions.php');
 
52
 
53
  // loading other files
54
  if( is_admin() ) {
55
  require(WBCR_CLR_PLUGIN_DIR . '/admin/boot.php');
 
 
 
56
  }
57
 
58
- require(WBCR_CLR_PLUGIN_DIR . '/includes/class.core.php');
59
- new WbcrClearfy_Plugin();
 
 
 
 
 
 
 
 
 
60
  }
61
 
62
  /**
2
  /**
3
  * Plugin Name: Clearfy - disable unused features
4
  * Plugin URI: https://wordpress.org/plugins/clearfy/
5
+ * Description: Disables unused Wordpress features, improves performance and increases SEO rankings, using Clearfy, which makes WordPress very easy.
6
  * Author: Webcraftic <wordpress.webraftic@gmail.com>
7
+ * Version: 1.1.2
8
+ * Text Domain: clearfy
9
  * Domain Path: /languages/
10
  */
11
 
35
  $wbcr_clearfy_plugin = new Factory325_Plugin(__FILE__, array(
36
  'name' => 'wbcr_clearfy',
37
  'title' => __('Clearfy - disable unused features', 'clearfy'),
38
+ 'version' => '1.1.2',
39
  'host' => 'wordpress.org'
40
  ));
41
 
49
  ));
50
 
51
  require(WBCR_CLR_PLUGIN_DIR . '/includes/functions.php');
52
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate.php');
53
 
54
  // loading other files
55
  if( is_admin() ) {
56
  require(WBCR_CLR_PLUGIN_DIR . '/admin/boot.php');
57
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-updates.php');
58
+
59
+ new WbcrClearfy_ConfigUpdates();
60
  }
61
 
62
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-code-clean.php');
63
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-privacy.php');
64
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-security.php');
65
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-seo.php');
66
+ require(WBCR_CLR_PLUGIN_DIR . '/includes/classes/class.configurate-advanced.php');
67
+
68
+ new WbcrClearfy_ConfigCodeClean();
69
+ new WbcrClearfy_ConfigPrivacy();
70
+ new WbcrClearfy_ConfigSecurity();
71
+ new WbcrClearfy_ConfigSeo();
72
+ new WbcrClearfy_ConfigAdvanced();
73
  }
74
 
75
  /**
includes/class.core.php DELETED
@@ -1,902 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Core plugin
5
- * @author Webcraftic <wordpress.webraftic@gmail.com>
6
- * @copyright (c) 2017 Webraftic Ltd
7
- * @version 1.0
8
- */
9
- class WbcrClearfy_Plugin {
10
-
11
- public function __construct()
12
- {
13
-
14
- if( $this->getOption('comment_text_convert_links_pseudo') || $this->getOption('remove_url_from_comment_form') ) {
15
- add_action('wp_head', array($this, 'addPseudoLinkStyle'));
16
- add_action('wp_footer', array($this, 'addPseudoLinkScripts'));
17
- }
18
-
19
- if( $this->getOption('disable_emoji') ) {
20
- add_action('init', array($this, 'disableEmojis'));
21
- }
22
-
23
- if( $this->getOption('remove_jquery_migrate') ) {
24
- add_filter('wp_default_scripts', array($this, 'removeJqueryMigrate'));
25
- }
26
- if( $this->getOption('disable_embeds') ) {
27
- add_action('init', array($this, 'disableEmbeds'), 9999);
28
- }
29
-
30
- if( $this->getOption('disable_json_rest_api') ) {
31
- add_action('init', array($this, 'removeRestApi'));
32
- }
33
-
34
- if( $this->getOption('remove_recent_comments_style') ) {
35
- add_action('widgets_init', array($this, 'removeRecentCommentsStyle'));
36
- }
37
-
38
- if( $this->getOption('content_image_auto_alt') ) {
39
- add_filter('the_content', array($this, 'contentImageAutoAlt'));
40
- }
41
-
42
- if( $this->getOption('comment_text_convert_links_pseudo') ) {
43
- add_filter('comment_text', array($this, 'commentTextConvertLinksPseudo'));
44
- }
45
-
46
- if( $this->getOption('pseudo_comment_author_link') ) {
47
- add_filter('get_comment_author_link', array($this, 'pseudoCommentAuthorLink'), 100, 3);
48
- }
49
-
50
- if( $this->getOption('right_robots_txt') ) {
51
- add_filter('robots_txt', array($this, 'rightRobotsTxt'));
52
- }
53
-
54
- if( $this->getOption('remove_last_item_breadcrumb_yoast') ) {
55
- add_filter('wpseo_breadcrumb_single_link', array($this, 'removeLastItemBreadcrumbYoast'));
56
- }
57
-
58
- if( $this->getOption('attachment_pages_redirect') ) {
59
- add_action('template_redirect', array($this, 'attachmentPagesRedirect'));
60
- }
61
-
62
- if( $this->getOption('remove_single_pagination_duplicate') ) {
63
- add_action('template_redirect', array($this, 'removeSinglePaginationDuplicate'));
64
- }
65
-
66
- if( $this->getOption('change_login_errors') ) {
67
- add_filter('login_errors', array($this, 'changeLoginErrors'));
68
- }
69
-
70
- if( $this->getOption('remove_x_pingback') ) {
71
- add_filter('template_redirect', array($this, 'removeXPingbackHeaders'));
72
- add_filter('wp_headers', array($this, 'removeXPingback'));
73
-
74
- add_action('template_redirect', array($this, 'linkRelBufferStart'), -1);
75
- add_action('get_header', array($this, 'linkRelBufferStart'));
76
- add_action('wp_head', array($this, 'linkRelBufferEnd'), 999);
77
- }
78
-
79
- if( $this->getOption('disable_feed') ) {
80
- $this->disableFeed();
81
- }
82
-
83
- if( $this->getOption('remove_url_from_comment_form') ) {
84
- add_filter('comment_form_default_fields', array($this, 'removeUrlFromCommentForm'));
85
- }
86
-
87
- if( $this->getOption('remove_unnecessary_link_admin_bar') ) {
88
- add_action('wp_before_admin_bar_render', array($this, 'removeUnnecessaryLinkAdminBar'));
89
- }
90
- if( $this->getOption('revision_limit') && is_numeric($this->getOption('revision_limit')) || $this->getOption('revisions_disable') ) {
91
- add_filter('wp_revisions_to_keep', array($this, 'clearfyRevisionsToKeep'), 10, 2);
92
- }
93
-
94
- if( $this->getOption('set_last_modified_headers') ) {
95
- add_action('template_redirect', array($this, 'setLastModifiedHeaders'));
96
- }
97
-
98
- if( $this->getOption('protect_author_get') ) {
99
- add_action('wp', array($this, 'protectAuthorGet'));
100
- }
101
-
102
- if( $this->getOption('yoast_remove_image_from_xml_sitemap') ) {
103
- $this->yoastRemoveImageFromXmlSitemap();
104
- }
105
-
106
- if( $this->getOption('yoast_remove_head_comment') ) {
107
- add_action('init', array($this, 'yoastRemoveHeadComment'));
108
- }
109
-
110
- if( $this->getOption('remove_replytocom') ) {
111
- add_action('template_redirect', array($this, 'removeReplytocomRedirect'), 1);
112
- add_filter('comment_reply_link', array($this, 'removeReplytocomLink'));
113
- }
114
-
115
- if( $this->getOption('html_minify') ) {
116
- add_action('init', array($this, 'htmlCompressor'));
117
- }
118
-
119
- if( $this->getOption('redirect_from_http_to_https') ) {
120
- add_action('init', array($this, 'redirectFromHttpToHttps'));
121
- }
122
-
123
- /**
124
- * Priority set to 9999. Higher numbers correspond with later execution.
125
- * Hook into the style loader and remove the version information.
126
- */
127
-
128
- if( $this->getOption('remove_style_version') ) {
129
- add_filter('style_loader_src', array($this, 'hideWordpressVersionInScript'), 9999, 2);
130
- }
131
-
132
- /**
133
- * Hook into the script loader and remove the version information.
134
- */
135
-
136
- if( $this->getOption('remove_js_version') ) {
137
- add_filter('script_loader_src', array($this, 'hideWordpressVersionInScript'), 9999, 2);
138
- }
139
-
140
- $this->remove_tags_from_head();
141
-
142
- add_action('wp', array($this, 'redirectArchives'));
143
- }
144
-
145
- public function addPseudoLinkStyle()
146
- {
147
- echo '<style>';
148
- echo '.wbcr-clearfy-pseudo-link {color: #008acf;cursor: pointer;text-decoration: underline;}.wbcr-clearfy-pseudo-link:hover {text-decoration: none;}';
149
- echo '</style>';
150
- }
151
-
152
-
153
- public function addPseudoLinkScripts()
154
- {
155
- echo '<script type="text/javascript">';
156
- echo 'jQuery(function($) {$(document).on("click", ".wbcr-clearfy-pseudo-link", function(){window.open($(this).data("uri"));});});';
157
- echo '</script>';
158
- }
159
-
160
- /**
161
- * Disable Emojis
162
- * URI: https://geek.hellyer.kiwi/plugins/disable-emojis/
163
- * Version: 1.5.1
164
- * Author: Ryan Hellyer
165
- * Author URI: https://geek.hellyer.kiwi/
166
- * License: GPL2
167
- */
168
-
169
- public function disableEmojis()
170
- {
171
- remove_action('wp_head', 'print_emoji_detection_script', 7);
172
- remove_action('admin_print_scripts', 'print_emoji_detection_script');
173
- remove_action('wp_print_styles', 'print_emoji_styles');
174
- remove_action('admin_print_styles', 'print_emoji_styles');
175
- remove_filter('the_content_feed', 'wp_staticize_emoji');
176
- remove_filter('comment_text_rss', 'wp_staticize_emoji');
177
- remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
178
- add_filter('tiny_mce_plugins', array($this, 'disableEmojisTinymce'));
179
- }
180
-
181
- /**
182
- * Filter function used to remove the tinymce emoji plugin.
183
- *
184
- * @param array $plugins
185
- * @return array Difference betwen the two arrays
186
- */
187
-
188
- public function disableEmojisTinymce($plugins)
189
- {
190
- if( is_array($plugins) ) {
191
-
192
- return array_diff($plugins, array('wpemoji'));
193
- } else {
194
-
195
- return array();
196
- }
197
- }
198
-
199
- /**
200
- * Disable JSON API
201
- * http://wp-kama.ru/question/kak-polnostyu-otklyuchit-rest-api-vvedennyj-v-wp-4-4
202
- */
203
-
204
- public function removeRestApi()
205
- {
206
-
207
- // Disabled REST API
208
- add_filter('rest_enabled', '__return_false');
209
-
210
- // Add redirect except contact form and post request
211
- if( (preg_match('#^/wp-json/(oembed|)#i', $_SERVER['REQUEST_URI']) || preg_match('#^/wp-json$#i', $_SERVER['REQUEST_URI'])) && (!preg_match('#^/wp-json/contact-form-7/#', $_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_METHOD'] !== 'POST') ) {
212
- wp_redirect(get_option('siteurl'), 301);
213
- die();
214
- }
215
-
216
- // Disabled REST API filters
217
- remove_action('xmlrpc_rsd_apis', 'rest_output_rsd');
218
- remove_action('wp_head', 'rest_output_link_wp_head', 10, 0);
219
- remove_action('template_redirect', 'rest_output_link_header', 11, 0);
220
- remove_action('auth_cookie_malformed', 'rest_cookie_collect_status');
221
- remove_action('auth_cookie_expired', 'rest_cookie_collect_status');
222
- remove_action('auth_cookie_bad_username', 'rest_cookie_collect_status');
223
- remove_action('auth_cookie_bad_hash', 'rest_cookie_collect_status');
224
- remove_action('auth_cookie_valid', 'rest_cookie_collect_status');
225
- remove_filter('rest_authentication_errors', 'rest_cookie_check_errors', 100);
226
-
227
- // Disabled REST API events
228
- remove_action('init', 'rest_api_init');
229
- remove_action('rest_api_init', 'rest_api_default_filters', 10, 1);
230
-
231
- // Disabled Embeds which are used in Rest api
232
- remove_action('rest_api_init', 'wp_oembed_register_route');
233
- remove_filter('rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4);
234
- remove_action('wp_head', 'wp_oembed_add_discovery_links');
235
- }
236
-
237
- /**
238
- * Remove styles for .recentcomments a
239
- * .recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}
240
- * https://github.com/nickyurov/
241
- */
242
-
243
- public function removeRecentCommentsStyle()
244
- {
245
-
246
- global $wp_widget_factory;
247
-
248
- remove_action('wp_head', array(
249
- $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],
250
- 'recent_comments_style'
251
- ));
252
- }
253
-
254
- /**
255
- * Add post title in image alt attribute
256
- *
257
- * @param $content
258
- * @return mixed
259
- */
260
-
261
- public function contentImageAutoAlt($content)
262
- {
263
-
264
- global $post;
265
-
266
- $pattern = array(' alt=""', ' alt=\'\'');
267
-
268
- $replacement = array(
269
- ' alt="' . esc_attr($post->post_title) . '"',
270
- ' alt=\'' . esc_attr($post->post_title) . '\''
271
- );
272
-
273
- $content = str_replace($pattern, $replacement, $content);
274
-
275
- return $content;
276
- }
277
-
278
- /**
279
- * Convert links in comment text into span pseudo links
280
- *
281
- * @param $comment_text
282
- * @return mixed
283
- */
284
-
285
- public function commentTextConvertLinksPseudo($comment_text)
286
- {
287
-
288
- return $this->convertLinksPseudo($comment_text);
289
- }
290
-
291
- /**
292
- * Convert links into span pseudo links
293
- *
294
- * @param $text
295
- * @return mixed
296
- */
297
-
298
- public function convertLinksPseudo($text)
299
- {
300
-
301
- return preg_replace_callback('/<a[^>]+href=[\'"](https?:\/\/[^"\']+)[\'"][^>]+>(.*?)<\/a>/i', array(
302
- $this,
303
- 'replaceLinks'
304
- ), $text);
305
- }
306
-
307
- public function replaceLinks($matches)
308
- {
309
- if( $matches[1] == get_home_url() ) {
310
- return $matches[0];
311
- }
312
-
313
- return '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $matches[1] . '" > ' . $matches[2] . '</span>';
314
- }
315
-
316
- /**
317
- * Convert author link to pseudo link
318
- *
319
- * @return string
320
- */
321
-
322
- public function pseudoCommentAuthorLink($return, $author, $comment_ID)
323
- {
324
- $url = get_comment_author_url($comment_ID);
325
- $author = get_comment_author($comment_ID);
326
-
327
- if( empty($url) || 'http://' == $url ) {
328
- $return = $author;
329
- } else {
330
- $return = '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $url . '">' . $author . '</span>';
331
- }
332
-
333
- return $return;
334
- }
335
-
336
- /**
337
- * Add directories to virtual robots.txt file
338
-
339
- */
340
-
341
- public function rightRobotsTxt($output)
342
- {
343
- if( $this->getOption('robots_txt_text') ) {
344
- return $this->getOption('robots_txt_text');
345
- }
346
-
347
- return wbcr_clearfy_get_right_robot_txt();
348
- }
349
-
350
- /**
351
- * Remove last item from breadcrumbs SEO by YOAST
352
- * http://www.wpdiv.com/remove-post-title-yoast-seo-plugin-breadcrumb/
353
-
354
- */
355
-
356
- public function removeLastItemBreadcrumbYoast($link_output)
357
- {
358
-
359
- if( strpos($link_output, 'breadcrumb_last') !== false ) {
360
- $link_output = '';
361
- }
362
-
363
- return $link_output;
364
- }
365
-
366
- /**
367
- * Attachment pages redirect
368
- */
369
-
370
- public function attachmentPagesRedirect()
371
- {
372
-
373
- global $post;
374
- if( is_attachment() ) {
375
- if( isset($post->post_parent) && ($post->post_parent != 0) ) {
376
- wp_redirect(get_permalink($post->post_parent), 301);
377
- } else {
378
- wp_redirect(home_url(), 301);
379
- }
380
- exit;
381
- }
382
- }
383
-
384
- /**
385
- * Remove single pagination duplicate
386
- */
387
-
388
- public function removeSinglePaginationDuplicate()
389
- {
390
-
391
- if( is_singular() && !is_front_page() ) {
392
-
393
- global $post, $page;
394
-
395
- $num_pages = substr_count($post->post_content, '<!--nextpage-->') + 1;
396
-
397
- if( $page > $num_pages || $page == 1 ) {
398
-
399
- wp_redirect(get_permalink($post->ID));
400
-
401
- exit;
402
- }
403
- }
404
- }
405
-
406
- /**
407
- * Change login error message
408
- *
409
- * @return string
410
- */
411
-
412
- public function changeLoginErrors()
413
- {
414
- return __('<strong>ERROR</strong>: Wrong login or password', 'clearfy');
415
- }
416
-
417
- /**
418
- * Remove X-Pingback
419
- * https://github.com/nickyurov/
420
-
421
- */
422
-
423
- public function removeXPingback($headers)
424
- {
425
- unset($headers['X-Pingback']);
426
-
427
- return $headers;
428
- }
429
-
430
- public function removeXPingbackHeaders($headers)
431
- {
432
- if( function_exists('header_remove') ) {
433
- header_remove('X-Pingback');
434
- header_remove('Server');
435
- }
436
- }
437
-
438
- //https://wordpress.stackexchange.com/questions/158700/how-to-remove-pingback-from-head
439
-
440
- public function linkRelBufferCallback($buffer)
441
- {
442
- $buffer = preg_replace('/(<link.*?rel=("|\')pingback("|\').*?href=("|\')(.*?)("|\')(.*?)?\/?>|<link.*?href=("|\')(.*?)("|\').*?rel=("|\')pingback("|\')(.*?)?\/?>)/i', '', $buffer);
443
-
444
- return $buffer;
445
- }
446
-
447
- public function linkRelBufferStart()
448
- {
449
- ob_start(array($this, "linkRelBufferCallback"));
450
- }
451
-
452
- public function linkRelBufferEnd()
453
- {
454
- ob_flush();
455
- }
456
-
457
- /**
458
- * Disable feeds
459
-
460
- */
461
-
462
- public function disableFeed()
463
- {
464
- //Remove feed links from the <head> section
465
-
466
- remove_action('wp_head', 'feed_links_extra', 3);
467
- remove_action('wp_head', 'feed_links', 2);
468
-
469
- //Redirect feed URLs to home page
470
-
471
- add_action('do_feed', array($this, 'disableFeedRedirect'), 1);
472
- add_action('do_feed_rdf', array($this, 'disableFeedRedirect'), 1);
473
- add_action('do_feed_rss', array($this, 'disableFeedRedirect'), 1);
474
- add_action('do_feed_rss2', array($this, 'disableFeedRedirect'), 1);
475
- add_action('do_feed_atom', array($this, 'disableFeedRedirect'), 1);
476
- }
477
-
478
- public function disableFeedRedirect()
479
- {
480
- // if GET param - remove and redirect
481
- if( isset($_GET['feed']) ) {
482
- wp_redirect(esc_url_raw(remove_query_arg('feed')), 301);
483
-
484
- exit;
485
- }
486
-
487
- // if beauty permalink - remove and redirect
488
- if( get_query_var('feed') !== 'old' ) {
489
-
490
- set_query_var('feed', '');
491
- }
492
-
493
- redirect_canonical();
494
-
495
- wp_redirect(get_option('siteurl'), 301);
496
-
497
- die();
498
- }
499
-
500
- /**
501
- * Remove url field from comment form
502
- *
503
- * @param $fields
504
- * @return mixed
505
- */
506
-
507
- public function removeUrlFromCommentForm($fields)
508
- {
509
- if( isset($fields['url']) ) {
510
- unset($fields['url']);
511
- }
512
-
513
- return $fields;
514
- }
515
-
516
- /**
517
- * Deleted unnecessary link in admin bar
518
-
519
- */
520
-
521
- public function removeUnnecessaryLinkAdminBar()
522
- {
523
- if( !is_user_logged_in() ) {
524
- return;
525
- }
526
-
527
- global $wp_admin_bar;
528
-
529
- $wp_admin_bar->remove_menu('wp-logo');
530
- $wp_admin_bar->remove_menu('about');
531
- $wp_admin_bar->remove_menu('wporg');
532
- $wp_admin_bar->remove_menu('documentation');
533
- $wp_admin_bar->remove_menu('support-forums');
534
- $wp_admin_bar->remove_menu('feedback');
535
- $wp_admin_bar->remove_menu('view-site');
536
- }
537
-
538
- /**
539
- * Revisions limit
540
- *
541
- * @since 0.9.5
542
- */
543
-
544
- public function clearfyRevisionsToKeep($num, $post)
545
- {
546
- if( $this->getOption('revision_limit', null) && is_numeric($this->getOption('revision_limit', null)) ) {
547
- $num = $this->getOption('revision_limit', 0);
548
- }
549
-
550
- if( $this->getOption('revisions_disable') ) {
551
- $num = 0;
552
- }
553
-
554
- return $num;
555
- }
556
-
557
- /**
558
- * Set last modified to all posts and archives
559
- */
560
-
561
- public function setLastModifiedHeaders()
562
- {
563
- global $wp;
564
- $last_modified_exclude = $this->getOption('last_modified_exclude');
565
- $last_modified_exclude_exp = explode(PHP_EOL, $last_modified_exclude);
566
-
567
- $current_url = home_url(add_query_arg(array(), $wp->request));
568
-
569
- foreach($last_modified_exclude_exp as $expr) {
570
- if( !empty($expr) && strpos(urldecode($current_url), $expr) !== false ) {
571
- return;
572
- }
573
- }
574
- if( (defined('DOING_AJAX') && DOING_AJAX) || (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST) || (defined('REST_REQUEST') && REST_REQUEST) || (is_admin()) ) {
575
- return;
576
- }
577
- $last_modified = '';
578
- /**
579
- * If posts, pages, custom post types
580
- */
581
- if( is_singular() ) {
582
- global $post;
583
- if( !isset($post->post_modified_gmt) ) {
584
- return;
585
- }
586
- $post_time = strtotime($post->post_modified_gmt);
587
- $modified_time = $post_time;
588
- /**
589
- * If we have comment set new modified date
590
- */
591
- if( (int)$post->comment_count > 0 ) {
592
- $comments = get_comments(array(
593
- 'post_id' => $post->ID,
594
- 'number' => '1',
595
- 'status' => 'approve',
596
- 'orderby' => 'comment_date_gmt',
597
- ));
598
- if( !empty($comments) && isset($comments[0]) ) {
599
- $comment_time = strtotime($comments[0]->comment_date_gmt);
600
- if( $comment_time > $post_time ) {
601
- $modified_time = $comment_time;
602
- }
603
- }
604
- }
605
- $last_modified = str_replace('+0000', 'GMT', gmdate('r', $modified_time));
606
- }
607
- /**
608
- * If any archives: categories, tags, taxonomy terms, post type archives
609
- */
610
- if( is_archive() || is_home() ) {
611
- global $posts;
612
- if( empty($posts) ) {
613
- return;
614
- }
615
- $post = $posts[0];
616
- if( !isset($post->post_modified_gmt) ) {
617
- return;
618
- }
619
- $post_time = strtotime($post->post_modified_gmt);
620
- $modified_time = $post_time;
621
- $last_modified = str_replace('+0000', 'GMT', gmdate('r', $modified_time));
622
- }
623
-
624
- /**
625
- * If headers already sent - do nothing
626
- */
627
-
628
- if( headers_sent() ) {
629
- return;
630
- }
631
-
632
- if( !empty($last_modified) && !empty($modified_time) ) {
633
-
634
- header('Last-Modified: ' . $last_modified);
635
-
636
- if( $this->getOption('if_modified_since_headers') && !is_user_logged_in() ) {
637
-
638
- if( isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $modified_time ) {
639
-
640
- $protocol = (isset($_SERVER['SERVER_PROTOCOL'])
641
- ? $_SERVER['SERVER_PROTOCOL']
642
- : 'HTTP/1.0');
643
-
644
- header($protocol . ' 304 Not Modified');
645
- }
646
- }
647
- }
648
- }
649
-
650
- /**
651
- * Protect author get
652
- */
653
-
654
- public function protectAuthorGet()
655
- {
656
- if( isset($_GET['author']) && !is_admin() ) {
657
- wp_redirect(home_url(), 301);
658
-
659
- die();
660
- }
661
- }
662
-
663
- /**
664
- * Remove yoast comment
665
-
666
- */
667
-
668
- public function yoastRemoveHeadComment()
669
- {
670
- if( defined('WPSEO_VERSION') && !is_admin() ) {
671
- add_action('get_header', array($this, 'yoastRemoveHeadCommentStart'));
672
- add_action('wp_head', array($this, 'yoastRemoveHeadCommentEnd'), 999);
673
- }
674
- }
675
-
676
- public function yoastRemoveHeadCommentStart()
677
- {
678
- ob_start(array($this, 'yoastRemoveHeadCommentRemove'));
679
- }
680
-
681
- public function yoastRemoveHeadCommentEnd()
682
- {
683
- ob_end_flush();
684
- }
685
-
686
- public function yoastRemoveHeadCommentRemove($html)
687
- {
688
- return preg_replace('/^<!--.*?[Yy]oast.*?-->$/mi', '', $html);
689
- }
690
-
691
- /**
692
- * Remove unnecessary tags from head
693
-
694
- */
695
-
696
- public function remove_tags_from_head()
697
- {
698
-
699
- if( $this->getOption('remove_meta_generator') ) {
700
- remove_action('wp_head', 'wp_generator');
701
- add_filter('the_generator', '__return_empty_string');
702
- }
703
-
704
- if( $this->getOption('remove_dns_prefetch') ) {
705
- remove_action('wp_head', 'wp_resource_hints', 2);
706
- }
707
-
708
- if( $this->getOption('remove_rsd_link') ) {
709
- remove_action('wp_head', 'rsd_link');
710
- }
711
-
712
- if( $this->getOption('remove_wlw_link') ) {
713
- remove_action('wp_head', 'wlwmanifest_link');
714
- }
715
-
716
- if( $this->getOption('remove_adjacent_posts_link') ) {
717
- remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
718
- }
719
-
720
- if( $this->getOption('remove_adjacent_posts_link') ) {
721
- remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
722
- }
723
-
724
- if( $this->getOption('remove_shortlink_link') ) {
725
- remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
726
- remove_action('template_redirect', 'wp_shortlink_header', 11, 0);
727
- }
728
- }
729
-
730
- /**
731
- * Redirect archives author, date, tags
732
- */
733
-
734
- public function redirectArchives()
735
- {
736
-
737
- if( $this->getOption('redirect_archives_author') ) {
738
- if( is_author() && !is_admin() ) {
739
- wp_redirect(home_url(), 301);
740
-
741
- die();
742
- }
743
- }
744
-
745
- if( $this->getOption('redirect_archives_date') ) {
746
- if( is_date() && !is_admin() ) {
747
- wp_redirect(home_url(), 301);
748
-
749
- die();
750
- }
751
- }
752
-
753
- if( $this->getOption('redirect_archives_tag') ) {
754
- if( is_tag() && !is_admin() ) {
755
- wp_redirect(home_url(), 301);
756
-
757
- die();
758
- }
759
- }
760
- }
761
-
762
- /**
763
- * Remove replytocom
764
- */
765
- public function removeReplytocomRedirect()
766
- {
767
- if( isset($_GET['replytocom']) && is_singular() ) {
768
- $post_url = get_permalink($GLOBALS['post']->ID);
769
- $comment_id = sanitize_text_field($_GET['replytocom']);
770
- $query_string = remove_query_arg('replytocom', sanitize_text_field($_SERVER['QUERY_STRING']));
771
-
772
- if( !empty($query_string) ) {
773
- $post_url .= '?' . $query_string;
774
- }
775
- $post_url .= '#comment-' . $comment_id;
776
-
777
- wp_redirect($post_url, 301);
778
- die();
779
- }
780
-
781
- return false;
782
- }
783
-
784
- public function removeReplytocomLink($link)
785
- {
786
- return preg_replace('`href=(["\'])(?:.*(?:\?|&|&#038;)replytocom=(\d+)#respond)`', 'href=$1#comment-$2', $link);
787
- }
788
-
789
- /**
790
- * Remove <image:image> from sitemap
791
- */
792
- public function yoastRemoveImageFromXmlSitemap()
793
- {
794
- add_filter('wpseo_xml_sitemap_img', '__return_false');
795
- add_filter('wpseo_sitemap_url', array($this, 'yoastRemoveImageFromXmlClean'), 10, 2);
796
- }
797
-
798
- public function yoastRemoveImageFromXmlClean($output, $url)
799
- {
800
- $output = preg_replace('/<image:image[^>]*?>.*?<\/image:image>/si', '', $output);
801
-
802
- return $output;
803
- }
804
-
805
- // Remove jQuery Migrate
806
- public function removeJqueryMigrate(&$scripts)
807
- {
808
- if( !is_admin() ) {
809
- $scripts->remove('jquery');
810
- $scripts->add('jquery', false, array('jquery-core'), '1.12.4');
811
- }
812
- }
813
-
814
- // Disable Embeds
815
- public function disableEmbeds()
816
- {
817
- global $wp;
818
- $wp->public_query_vars = array_diff($wp->public_query_vars, array('embed',));
819
- remove_action('rest_api_init', 'wp_oembed_register_route');
820
- add_filter('embed_oembed_discover', '__return_false');
821
- remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
822
- remove_action('wp_head', 'wp_oembed_add_discovery_links');
823
- remove_action('wp_head', 'wp_oembed_add_host_js');
824
- add_filter('tiny_mce_plugins', 'disableEmbedsTinyMcePlugin');
825
- add_filter('rewrite_rules_array', 'disableEmbedsRewrites');
826
- remove_filter('pre_oembed_result', 'wp_filter_pre_oembed_result', 10);
827
- }
828
-
829
- public function disableEmbedsTinyMcePlugin($plugins)
830
- {
831
- return array_diff($plugins, array('wpembed'));
832
- }
833
-
834
- public function disableEmbedsRewrites($rules)
835
- {
836
- foreach($rules as $rule => $rewrite) {
837
- if( false !== strpos($rewrite, 'embed=true') ) {
838
- unset($rules[$rule]);
839
- }
840
- }
841
-
842
- return $rules;
843
- }
844
-
845
- public function htmlCompressor()
846
- {
847
- ob_start(array($this, 'htmlCompressorMain'));
848
- }
849
-
850
- public function htmlCompressorMain($data)
851
- {
852
- return wbcr_clearfy_minify_html_output($data);
853
- }
854
-
855
- public function redirectFromHttpToHttps()
856
- {
857
- if( is_ssl() ) {
858
- return;
859
- }
860
- if( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
861
- wp_redirect(set_url_scheme($_SERVER['REQUEST_URI'], 'https'), 301);
862
- } else {
863
- wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301);
864
- }
865
- die();
866
- }
867
-
868
-
869
- /**
870
- * Remove wp version from any enqueued scripts
871
- * @param string $target_url
872
- * @return string
873
- */
874
- public function hideWordpressVersionInScript($src, $handle)
875
- {
876
- if( is_admin() ) {
877
- return $src;
878
- }
879
-
880
- $filename_arr = explode('?', basename($src));
881
- $exclude_file_list = $this->getOption('remove_version_exclude', '');
882
- $exclude_files_arr = array_map('trim', explode(PHP_EOL, $exclude_file_list));
883
-
884
- if( strpos($src, 'ver=') && !in_array(str_replace('?' . $filename_arr[1], '', $src), $exclude_files_arr, true) ) {
885
- $src = remove_query_arg('ver', $src);
886
- }
887
-
888
- return $src;
889
- }
890
-
891
-
892
- /**
893
- * Get options with namespace
894
- * @param $option_name
895
- * @param bool $default
896
- * @return mixed|void
897
- */
898
- public function getOption($option_name, $default = false)
899
- {
900
- return get_option('wbcr-clearfy_' . $option_name, $default);
901
- }
902
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/classes/class.configurate-advanced.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures the parameters advanced
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigAdvanced extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( $this->getOption('remove_url_from_comment_form') ) {
14
+ add_filter('comment_form_default_fields', array($this, 'removeUrlFromCommentForm'));
15
+ }
16
+
17
+ if( $this->getOption('remove_unnecessary_link_admin_bar') ) {
18
+ add_action('wp_before_admin_bar_render', array($this, 'removeUnnecessaryLinkAdminBar'));
19
+ }
20
+ if( $this->getOption('revision_limit') && is_numeric($this->getOption('revision_limit')) || $this->getOption('revisions_disable') ) {
21
+ add_filter('wp_revisions_to_keep', array($this, 'clearfyRevisionsToKeep'), 10, 2);
22
+ }
23
+
24
+ add_action('widgets_init', array($this, 'unregisterDefaultWidgets'), 11);
25
+ }
26
+
27
+ // unregister all widgets
28
+ public function unregisterDefaultWidgets()
29
+ {
30
+ if( $this->getOption('remove_unneeded_widget_page') ) {
31
+ unregister_widget('WP_Widget_Pages');
32
+ }
33
+ if( $this->getOption('remove_unneeded_widget_calendar') ) {
34
+ unregister_widget('WP_Widget_Calendar');
35
+ }
36
+ if( $this->getOption('remove_unneeded_widget_tag_cloud') ) {
37
+ unregister_widget('WP_Widget_Tag_Cloud');
38
+ }
39
+ if( $this->getOption('remove_unneeded_widget_archives') ) {
40
+ unregister_widget('WP_Widget_Archives');
41
+ }
42
+ if( $this->getOption('remove_unneeded_widget_links') ) {
43
+ unregister_widget('WP_Widget_Links');
44
+ }
45
+ if( $this->getOption('remove_unneeded_widget_meta') ) {
46
+ unregister_widget('WP_Widget_Meta');
47
+ }
48
+ if( $this->getOption('remove_unneeded_widget_search') ) {
49
+ unregister_widget('WP_Widget_Search');
50
+ }
51
+ if( $this->getOption('remove_unneeded_widget_text') ) {
52
+ unregister_widget('WP_Widget_Text');
53
+ }
54
+ if( $this->getOption('remove_unneeded_widget_categories') ) {
55
+ unregister_widget('WP_Widget_Categories');
56
+ }
57
+ if( $this->getOption('remove_unneeded_widget_recent_posts') ) {
58
+ unregister_widget('WP_Widget_Recent_Posts');
59
+ }
60
+ if( $this->getOption('remove_unneeded_widget_text') ) {
61
+ unregister_widget('WP_Widget_Recent_Comments');
62
+ }
63
+ if( $this->getOption('remove_unneeded_widget_rss') ) {
64
+ unregister_widget('WP_Widget_RSS');
65
+ }
66
+ if( $this->getOption('remove_unneeded_widget_menu') ) {
67
+ unregister_widget('WP_Nav_Menu_Widget');
68
+ }
69
+ if( $this->getOption('remove_unneeded_widget_twenty_eleven_ephemera') ) {
70
+ unregister_widget('Twenty_Eleven_Ephemera_Widget');
71
+ }
72
+ }
73
+
74
+ /**
75
+ * Remove url field from comment form
76
+ *
77
+ * @param $fields
78
+ * @return mixed
79
+ */
80
+
81
+ public function removeUrlFromCommentForm($fields)
82
+ {
83
+ if( isset($fields['url']) ) {
84
+ unset($fields['url']);
85
+ }
86
+
87
+ return $fields;
88
+ }
89
+
90
+ /**
91
+ * Deleted unnecessary link in admin bar
92
+
93
+ */
94
+
95
+ public function removeUnnecessaryLinkAdminBar()
96
+ {
97
+ if( !is_user_logged_in() ) {
98
+ return;
99
+ }
100
+
101
+ global $wp_admin_bar;
102
+
103
+ $wp_admin_bar->remove_menu('wp-logo');
104
+ $wp_admin_bar->remove_menu('about');
105
+ $wp_admin_bar->remove_menu('wporg');
106
+ $wp_admin_bar->remove_menu('documentation');
107
+ $wp_admin_bar->remove_menu('support-forums');
108
+ $wp_admin_bar->remove_menu('feedback');
109
+ $wp_admin_bar->remove_menu('view-site');
110
+ }
111
+
112
+ /**
113
+ * Revisions limit
114
+ *
115
+ * @since 0.9.5
116
+ */
117
+
118
+ public function clearfyRevisionsToKeep($num, $post)
119
+ {
120
+ if( $this->getOption('revision_limit', null) && is_numeric($this->getOption('revision_limit', null)) ) {
121
+ $num = $this->getOption('revision_limit', 0);
122
+ }
123
+
124
+ if( $this->getOption('revisions_disable') ) {
125
+ $num = 0;
126
+ }
127
+
128
+ return $num;
129
+ }
130
+ }
includes/classes/class.configurate-code-clean.php ADDED
@@ -0,0 +1,262 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures the code cleanup settings
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigCodeClean extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( $this->getOption('disable_emoji') ) {
14
+ add_action('init', array($this, 'disableEmojis'));
15
+ }
16
+
17
+ if( $this->getOption('remove_jquery_migrate') ) {
18
+ add_filter('wp_default_scripts', array($this, 'removeJqueryMigrate'));
19
+ }
20
+ if( $this->getOption('disable_embeds') ) {
21
+ add_action('init', array($this, 'disableEmbeds'), 9999);
22
+ }
23
+
24
+ if( $this->getOption('disable_json_rest_api') ) {
25
+ add_action('init', array($this, 'removeRestApi'));
26
+ }
27
+
28
+ if( $this->getOption('disable_feed') ) {
29
+ $this->disableFeed();
30
+ }
31
+
32
+ if( $this->getOption('html_minify') ) {
33
+ add_action('init', array($this, 'htmlCompressor'));
34
+ }
35
+
36
+ if( $this->getOption('remove_recent_comments_style') ) {
37
+ add_action('widgets_init', array($this, 'removeRecentCommentsStyle'));
38
+ }
39
+
40
+ $this->remove_tags_from_head();
41
+ }
42
+
43
+ /**
44
+ * Disable Emojis
45
+ * URI: https://geek.hellyer.kiwi/plugins/disable-emojis/
46
+ * Version: 1.5.1
47
+ * Author: Ryan Hellyer
48
+ * Author URI: https://geek.hellyer.kiwi/
49
+ * License: GPL2
50
+ */
51
+
52
+ public function disableEmojis()
53
+ {
54
+ remove_action('wp_head', 'print_emoji_detection_script', 7);
55
+ remove_action('admin_print_scripts', 'print_emoji_detection_script');
56
+ remove_action('wp_print_styles', 'print_emoji_styles');
57
+ remove_action('admin_print_styles', 'print_emoji_styles');
58
+ remove_filter('the_content_feed', 'wp_staticize_emoji');
59
+ remove_filter('comment_text_rss', 'wp_staticize_emoji');
60
+ remove_filter('wp_mail', 'wp_staticize_emoji_for_email');
61
+ add_filter('tiny_mce_plugins', array($this, 'disableEmojisTinymce'));
62
+ }
63
+
64
+ /**
65
+ * Filter function used to remove the tinymce emoji plugin.
66
+ *
67
+ * @param array $plugins
68
+ * @return array Difference betwen the two arrays
69
+ */
70
+
71
+ public function disableEmojisTinymce($plugins)
72
+ {
73
+ if( is_array($plugins) ) {
74
+
75
+ return array_diff($plugins, array('wpemoji'));
76
+ } else {
77
+
78
+ return array();
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Disable JSON API
84
+ * http://wp-kama.ru/question/kak-polnostyu-otklyuchit-rest-api-vvedennyj-v-wp-4-4
85
+ */
86
+
87
+ public function removeRestApi()
88
+ {
89
+
90
+ // Disabled REST API
91
+ add_filter('rest_enabled', '__return_false');
92
+
93
+ // Add redirect except contact form and post request
94
+ if( (preg_match('#^/wp-json/(oembed|)#i', $_SERVER['REQUEST_URI']) || preg_match('#^/wp-json$#i', $_SERVER['REQUEST_URI'])) && (!preg_match('#^/wp-json/contact-form-7/#', $_SERVER['REQUEST_URI']) || $_SERVER['REQUEST_METHOD'] !== 'POST') ) {
95
+ wp_redirect(get_option('siteurl'), 301);
96
+ die();
97
+ }
98
+
99
+ // Disabled REST API filters
100
+ remove_action('xmlrpc_rsd_apis', 'rest_output_rsd');
101
+ remove_action('wp_head', 'rest_output_link_wp_head', 10, 0);
102
+ remove_action('template_redirect', 'rest_output_link_header', 11, 0);
103
+ remove_action('auth_cookie_malformed', 'rest_cookie_collect_status');
104
+ remove_action('auth_cookie_expired', 'rest_cookie_collect_status');
105
+ remove_action('auth_cookie_bad_username', 'rest_cookie_collect_status');
106
+ remove_action('auth_cookie_bad_hash', 'rest_cookie_collect_status');
107
+ remove_action('auth_cookie_valid', 'rest_cookie_collect_status');
108
+ remove_filter('rest_authentication_errors', 'rest_cookie_check_errors', 100);
109
+
110
+ // Disabled REST API events
111
+ remove_action('init', 'rest_api_init');
112
+ remove_action('rest_api_init', 'rest_api_default_filters', 10, 1);
113
+
114
+ // Disabled Embeds which are used in Rest api
115
+ remove_action('rest_api_init', 'wp_oembed_register_route');
116
+ remove_filter('rest_pre_serve_request', '_oembed_rest_pre_serve_request', 10, 4);
117
+ remove_action('wp_head', 'wp_oembed_add_discovery_links');
118
+ }
119
+
120
+ /**
121
+ * Remove styles for .recentcomments a
122
+ * .recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}
123
+ * https://github.com/nickyurov/
124
+ */
125
+
126
+ public function removeRecentCommentsStyle()
127
+ {
128
+
129
+ global $wp_widget_factory;
130
+
131
+ remove_action('wp_head', array(
132
+ $wp_widget_factory->widgets['WP_Widget_Recent_Comments'],
133
+ 'recent_comments_style'
134
+ ));
135
+ }
136
+
137
+ /**
138
+ * Disable feeds
139
+
140
+ */
141
+
142
+ public function disableFeed()
143
+ {
144
+ //Remove feed links from the <head> section
145
+
146
+ remove_action('wp_head', 'feed_links_extra', 3);
147
+ remove_action('wp_head', 'feed_links', 2);
148
+
149
+ //Redirect feed URLs to home page
150
+
151
+ add_action('do_feed', array($this, 'disableFeedRedirect'), 1);
152
+ add_action('do_feed_rdf', array($this, 'disableFeedRedirect'), 1);
153
+ add_action('do_feed_rss', array($this, 'disableFeedRedirect'), 1);
154
+ add_action('do_feed_rss2', array($this, 'disableFeedRedirect'), 1);
155
+ add_action('do_feed_atom', array($this, 'disableFeedRedirect'), 1);
156
+ }
157
+
158
+ public function disableFeedRedirect()
159
+ {
160
+ // if GET param - remove and redirect
161
+ if( isset($_GET['feed']) ) {
162
+ wp_redirect(esc_url_raw(remove_query_arg('feed')), 301);
163
+
164
+ exit;
165
+ }
166
+
167
+ // if beauty permalink - remove and redirect
168
+ if( get_query_var('feed') !== 'old' ) {
169
+
170
+ set_query_var('feed', '');
171
+ }
172
+
173
+ redirect_canonical();
174
+
175
+ wp_redirect(get_option('siteurl'), 301);
176
+
177
+ die();
178
+ }
179
+
180
+ /**
181
+ * Remove unnecessary tags from head
182
+
183
+ */
184
+
185
+ public function remove_tags_from_head()
186
+ {
187
+ if( $this->getOption('remove_dns_prefetch') ) {
188
+ remove_action('wp_head', 'wp_resource_hints', 2);
189
+ }
190
+
191
+ if( $this->getOption('remove_rsd_link') ) {
192
+ remove_action('wp_head', 'rsd_link');
193
+ }
194
+
195
+ if( $this->getOption('remove_wlw_link') ) {
196
+ remove_action('wp_head', 'wlwmanifest_link');
197
+ }
198
+
199
+ if( $this->getOption('remove_adjacent_posts_link') ) {
200
+ remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0);
201
+ }
202
+
203
+ if( $this->getOption('remove_adjacent_posts_link') ) {
204
+ remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
205
+ }
206
+
207
+ if( $this->getOption('remove_shortlink_link') ) {
208
+ remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
209
+ remove_action('template_redirect', 'wp_shortlink_header', 11, 0);
210
+ }
211
+ }
212
+
213
+ // Remove jQuery Migrate
214
+ public function removeJqueryMigrate(&$scripts)
215
+ {
216
+ if( !is_admin() ) {
217
+ $scripts->remove('jquery');
218
+ $scripts->add('jquery', false, array('jquery-core'), '1.12.4');
219
+ }
220
+ }
221
+
222
+ // Disable Embeds
223
+ public function disableEmbeds()
224
+ {
225
+ global $wp;
226
+ $wp->public_query_vars = array_diff($wp->public_query_vars, array('embed',));
227
+ remove_action('rest_api_init', 'wp_oembed_register_route');
228
+ add_filter('embed_oembed_discover', '__return_false');
229
+ remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);
230
+ remove_action('wp_head', 'wp_oembed_add_discovery_links');
231
+ remove_action('wp_head', 'wp_oembed_add_host_js');
232
+ add_filter('tiny_mce_plugins', array($this, 'disableEmbedsTinyMcePlugin'));
233
+ add_filter('rewrite_rules_array', array($this, 'disableEmbedsRewrites'));
234
+ remove_filter('pre_oembed_result', 'wp_filter_pre_oembed_result', 10);
235
+ }
236
+
237
+ public function disableEmbedsTinyMcePlugin($plugins)
238
+ {
239
+ return array_diff($plugins, array('wpembed'));
240
+ }
241
+
242
+ public function disableEmbedsRewrites($rules)
243
+ {
244
+ foreach($rules as $rule => $rewrite) {
245
+ if( false !== strpos($rewrite, 'embed=true') ) {
246
+ unset($rules[$rule]);
247
+ }
248
+ }
249
+
250
+ return $rules;
251
+ }
252
+
253
+ public function htmlCompressor()
254
+ {
255
+ ob_start(array($this, 'htmlCompressorMain'));
256
+ }
257
+
258
+ public function htmlCompressorMain($data)
259
+ {
260
+ return wbcr_clearfy_minify_html_output($data);
261
+ }
262
+ }
includes/classes/class.configurate-privacy.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures the code cleanup settings
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigPrivacy extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( $this->getOption('remove_meta_generator') ) {
14
+ remove_action('wp_head', 'wp_generator');
15
+ add_filter('the_generator', '__return_empty_string');
16
+ }
17
+
18
+ /**
19
+ * Priority set to 9999. Higher numbers correspond with later execution.
20
+ * Hook into the style loader and remove the version information.
21
+ */
22
+
23
+ if( $this->getOption('remove_style_version') ) {
24
+ add_filter('style_loader_src', array($this, 'hideWordpressVersionInScript'), 9999, 2);
25
+ }
26
+
27
+ /**
28
+ * Hook into the script loader and remove the version information.
29
+ */
30
+
31
+ if( $this->getOption('remove_js_version') ) {
32
+ add_filter('script_loader_src', array($this, 'hideWordpressVersionInScript'), 9999, 2);
33
+ }
34
+ }
35
+
36
+ /**
37
+ * Remove wp version from any enqueued scripts
38
+ * @param string $target_url
39
+ * @return string
40
+ */
41
+ public function hideWordpressVersionInScript($src, $handle)
42
+ {
43
+ if( is_admin() ) {
44
+ return $src;
45
+ }
46
+
47
+ $filename_arr = explode('?', basename($src));
48
+ $exclude_file_list = $this->getOption('remove_version_exclude', '');
49
+ $exclude_files_arr = array_map('trim', explode(PHP_EOL, $exclude_file_list));
50
+
51
+ if( strpos($src, 'ver=') && !in_array(str_replace('?' . $filename_arr[1], '', $src), $exclude_files_arr, true) ) {
52
+ $src = remove_query_arg('ver', $src);
53
+ }
54
+
55
+ return $src;
56
+ }
57
+ }
includes/classes/class.configurate-security.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures security settings
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigSecurity extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( $this->getOption('change_login_errors') ) {
14
+ add_filter('login_errors', array($this, 'changeLoginErrors'));
15
+ }
16
+
17
+ if( $this->getOption('remove_x_pingback') ) {
18
+ add_filter('template_redirect', array($this, 'removeXPingbackHeaders'));
19
+ add_filter('wp_headers', array($this, 'removeXPingback'));
20
+
21
+ add_action('template_redirect', array($this, 'linkRelBufferStart'), -1);
22
+ add_action('get_header', array($this, 'linkRelBufferStart'));
23
+ add_action('wp_head', array($this, 'linkRelBufferEnd'), 999);
24
+ }
25
+
26
+ if( $this->getOption('protect_author_get') ) {
27
+ add_action('wp', array($this, 'protectAuthorGet'));
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Change login error message
33
+ *
34
+ * @return string
35
+ */
36
+
37
+ public function changeLoginErrors()
38
+ {
39
+ return __('<strong>ERROR</strong>: Wrong login or password', 'clearfy');
40
+ }
41
+
42
+ /**
43
+ * Remove X-Pingback
44
+ * https://github.com/nickyurov/
45
+
46
+ */
47
+
48
+ public function removeXPingback($headers)
49
+ {
50
+ unset($headers['X-Pingback']);
51
+
52
+ return $headers;
53
+ }
54
+
55
+ public function removeXPingbackHeaders($headers)
56
+ {
57
+ if( function_exists('header_remove') ) {
58
+ header_remove('X-Pingback');
59
+ header_remove('Server');
60
+ }
61
+ }
62
+
63
+ //https://wordpress.stackexchange.com/questions/158700/how-to-remove-pingback-from-head
64
+
65
+ public function linkRelBufferCallback($buffer)
66
+ {
67
+ $buffer = preg_replace('/(<link.*?rel=("|\')pingback("|\').*?href=("|\')(.*?)("|\')(.*?)?\/?>|<link.*?href=("|\')(.*?)("|\').*?rel=("|\')pingback("|\')(.*?)?\/?>)/i', '', $buffer);
68
+
69
+ return $buffer;
70
+ }
71
+
72
+ public function linkRelBufferStart()
73
+ {
74
+ ob_start(array($this, "linkRelBufferCallback"));
75
+ }
76
+
77
+ public function linkRelBufferEnd()
78
+ {
79
+ ob_flush();
80
+ }
81
+
82
+ /**
83
+ * Protect author get
84
+ */
85
+
86
+ public function protectAuthorGet()
87
+ {
88
+ if( isset($_GET['author']) && !is_admin() ) {
89
+ wp_redirect(home_url(), 301);
90
+
91
+ die();
92
+ }
93
+ }
94
+ }
includes/classes/class.configurate-seo.php ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures the parameters seo
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigSeo extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ if( $this->getOption('comment_text_convert_links_pseudo') || $this->getOption('remove_url_from_comment_form') ) {
14
+ add_action('wp_head', array($this, 'addPseudoLinkStyle'));
15
+ add_action('wp_footer', array($this, 'addPseudoLinkScripts'));
16
+ }
17
+
18
+ if( $this->getOption('content_image_auto_alt') ) {
19
+ add_filter('the_content', array($this, 'contentImageAutoAlt'));
20
+ }
21
+
22
+ if( $this->getOption('comment_text_convert_links_pseudo') ) {
23
+ add_filter('comment_text', array($this, 'commentTextConvertLinksPseudo'));
24
+ }
25
+
26
+ if( $this->getOption('pseudo_comment_author_link') ) {
27
+ add_filter('get_comment_author_link', array($this, 'pseudoCommentAuthorLink'), 100, 3);
28
+ }
29
+
30
+ if( $this->getOption('right_robots_txt') ) {
31
+ add_filter('robots_txt', array($this, 'rightRobotsTxt'));
32
+ }
33
+
34
+ if( $this->getOption('remove_last_item_breadcrumb_yoast') ) {
35
+ add_filter('wpseo_breadcrumb_single_link', array($this, 'removeLastItemBreadcrumbYoast'));
36
+ }
37
+
38
+ if( $this->getOption('attachment_pages_redirect') ) {
39
+ add_action('template_redirect', array($this, 'attachmentPagesRedirect'));
40
+ }
41
+
42
+ if( $this->getOption('remove_single_pagination_duplicate') ) {
43
+ add_action('template_redirect', array($this, 'removeSinglePaginationDuplicate'));
44
+ }
45
+
46
+ if( $this->getOption('set_last_modified_headers') ) {
47
+ add_action('template_redirect', array($this, 'setLastModifiedHeaders'));
48
+ }
49
+
50
+ if( $this->getOption('yoast_remove_image_from_xml_sitemap') ) {
51
+ $this->yoastRemoveImageFromXmlSitemap();
52
+ }
53
+
54
+ if( $this->getOption('yoast_remove_head_comment') ) {
55
+ add_action('init', array($this, 'yoastRemoveHeadComment'));
56
+ }
57
+
58
+ if( $this->getOption('remove_replytocom') ) {
59
+ add_action('template_redirect', array($this, 'removeReplytocomRedirect'), 1);
60
+ add_filter('comment_reply_link', array($this, 'removeReplytocomLink'));
61
+ }
62
+
63
+ if( $this->getOption('redirect_from_http_to_https') ) {
64
+ //add_action('init', array($this, 'redirectFromHttpToHttps'));
65
+ }
66
+
67
+ add_action('wp', array($this, 'redirectArchives'));
68
+ }
69
+
70
+ public function addPseudoLinkStyle()
71
+ {
72
+ echo '<style>';
73
+ echo '.wbcr-clearfy-pseudo-link {color: #008acf;cursor: pointer;text-decoration: underline;}.wbcr-clearfy-pseudo-link:hover {text-decoration: none;}';
74
+ echo '</style>';
75
+ }
76
+
77
+
78
+ public function addPseudoLinkScripts()
79
+ {
80
+ echo '<script type="text/javascript">';
81
+ echo 'jQuery(function($) {$(document).on("click", ".wbcr-clearfy-pseudo-link", function(){window.open($(this).data("uri"));});});';
82
+ echo '</script>';
83
+ }
84
+
85
+ /**
86
+ * Add post title in image alt attribute
87
+ *
88
+ * @param $content
89
+ * @return mixed
90
+ */
91
+
92
+ public function contentImageAutoAlt($content)
93
+ {
94
+
95
+ global $post;
96
+
97
+ $pattern = array(' alt=""', ' alt=\'\'');
98
+
99
+ $replacement = array(
100
+ ' alt="' . esc_attr($post->post_title) . '"',
101
+ ' alt=\'' . esc_attr($post->post_title) . '\''
102
+ );
103
+
104
+ $content = str_replace($pattern, $replacement, $content);
105
+
106
+ return $content;
107
+ }
108
+
109
+ /**
110
+ * Convert links in comment text into span pseudo links
111
+ *
112
+ * @param $comment_text
113
+ * @return mixed
114
+ */
115
+
116
+ public function commentTextConvertLinksPseudo($comment_text)
117
+ {
118
+
119
+ return $this->convertLinksPseudo($comment_text);
120
+ }
121
+
122
+ /**
123
+ * Convert links into span pseudo links
124
+ *
125
+ * @param $text
126
+ * @return mixed
127
+ */
128
+
129
+ public function convertLinksPseudo($text)
130
+ {
131
+
132
+ return preg_replace_callback('/<a[^>]+href=[\'"](https?:\/\/[^"\']+)[\'"][^>]+>(.*?)<\/a>/i', array(
133
+ $this,
134
+ 'replaceLinks'
135
+ ), $text);
136
+ }
137
+
138
+ public function replaceLinks($matches)
139
+ {
140
+ if( $matches[1] == get_home_url() ) {
141
+ return $matches[0];
142
+ }
143
+
144
+ return '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $matches[1] . '" > ' . $matches[2] . '</span>';
145
+ }
146
+
147
+ /**
148
+ * Convert author link to pseudo link
149
+ *
150
+ * @return string
151
+ */
152
+
153
+ public function pseudoCommentAuthorLink($return, $author, $comment_ID)
154
+ {
155
+ $url = get_comment_author_url($comment_ID);
156
+ $author = get_comment_author($comment_ID);
157
+
158
+ if( empty($url) || 'http://' == $url ) {
159
+ $return = $author;
160
+ } else {
161
+ $return = '<span class="wbcr-clearfy-pseudo-link" data-uri="' . $url . '">' . $author . '</span>';
162
+ }
163
+
164
+ return $return;
165
+ }
166
+
167
+ /**
168
+ * Add directories to virtual robots.txt file
169
+
170
+ */
171
+
172
+ public function rightRobotsTxt($output)
173
+ {
174
+ if( $this->getOption('robots_txt_text') ) {
175
+ return $this->getOption('robots_txt_text');
176
+ }
177
+
178
+ return wbcr_clearfy_get_right_robot_txt();
179
+ }
180
+
181
+ /**
182
+ * Remove last item from breadcrumbs SEO by YOAST
183
+ * http://www.wpdiv.com/remove-post-title-yoast-seo-plugin-breadcrumb/
184
+
185
+ */
186
+
187
+ public function removeLastItemBreadcrumbYoast($link_output)
188
+ {
189
+
190
+ if( strpos($link_output, 'breadcrumb_last') !== false ) {
191
+ $link_output = '';
192
+ }
193
+
194
+ return $link_output;
195
+ }
196
+
197
+ /**
198
+ * Attachment pages redirect
199
+ */
200
+
201
+ public function attachmentPagesRedirect()
202
+ {
203
+
204
+ global $post;
205
+ if( is_attachment() ) {
206
+ if( isset($post->post_parent) && ($post->post_parent != 0) ) {
207
+ wp_redirect(get_permalink($post->post_parent), 301);
208
+ } else {
209
+ wp_redirect(home_url(), 301);
210
+ }
211
+ exit;
212
+ }
213
+ }
214
+
215
+ /**
216
+ * Remove single pagination duplicate
217
+ */
218
+
219
+ public function removeSinglePaginationDuplicate()
220
+ {
221
+
222
+ if( is_singular() && !is_front_page() ) {
223
+
224
+ global $post, $page;
225
+
226
+ $num_pages = substr_count($post->post_content, '<!--nextpage-->') + 1;
227
+
228
+ if( $page > $num_pages || $page == 1 ) {
229
+
230
+ wp_redirect(get_permalink($post->ID));
231
+
232
+ exit;
233
+ }
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Remove yoast comment
239
+ */
240
+
241
+ public function yoastRemoveHeadComment()
242
+ {
243
+ if( defined('WPSEO_VERSION') && !is_admin() ) {
244
+ add_action('get_header', array($this, 'yoastRemoveHeadCommentStart'));
245
+ add_action('wp_head', array($this, 'yoastRemoveHeadCommentEnd'), 999);
246
+ }
247
+ }
248
+
249
+ public function yoastRemoveHeadCommentStart()
250
+ {
251
+ ob_start(array($this, 'yoastRemoveHeadCommentRemove'));
252
+ }
253
+
254
+ public function yoastRemoveHeadCommentEnd()
255
+ {
256
+ ob_end_flush();
257
+ }
258
+
259
+ public function yoastRemoveHeadCommentRemove($html)
260
+ {
261
+ return preg_replace('/^<!--.*?[Yy]oast.*?-->$/mi', '', $html);
262
+ }
263
+
264
+ /**
265
+ * Redirect archives author, date, tags
266
+ */
267
+
268
+ public function redirectArchives()
269
+ {
270
+
271
+ if( $this->getOption('redirect_archives_author') ) {
272
+ if( is_author() && !is_admin() ) {
273
+ wp_redirect(home_url(), 301);
274
+
275
+ die();
276
+ }
277
+ }
278
+
279
+ if( $this->getOption('redirect_archives_date') ) {
280
+ if( is_date() && !is_admin() ) {
281
+ wp_redirect(home_url(), 301);
282
+
283
+ die();
284
+ }
285
+ }
286
+
287
+ if( $this->getOption('redirect_archives_tag') ) {
288
+ if( is_tag() && !is_admin() ) {
289
+ wp_redirect(home_url(), 301);
290
+
291
+ die();
292
+ }
293
+ }
294
+ }
295
+
296
+ /**
297
+ * Remove replytocom
298
+ */
299
+ public function removeReplytocomRedirect()
300
+ {
301
+ if( isset($_GET['replytocom']) && is_singular() ) {
302
+ $post_url = get_permalink($GLOBALS['post']->ID);
303
+ $comment_id = sanitize_text_field($_GET['replytocom']);
304
+ $query_string = remove_query_arg('replytocom', sanitize_text_field($_SERVER['QUERY_STRING']));
305
+
306
+ if( !empty($query_string) ) {
307
+ $post_url .= '?' . $query_string;
308
+ }
309
+ $post_url .= '#comment-' . $comment_id;
310
+
311
+ wp_redirect($post_url, 301);
312
+ die();
313
+ }
314
+
315
+ return false;
316
+ }
317
+
318
+ public function removeReplytocomLink($link)
319
+ {
320
+ return preg_replace('`href=(["\'])(?:.*(?:\?|&|&#038;)replytocom=(\d+)#respond)`', 'href=$1#comment-$2', $link);
321
+ }
322
+
323
+ /**
324
+ * Remove <image:image> from sitemap
325
+ */
326
+ public function yoastRemoveImageFromXmlSitemap()
327
+ {
328
+ add_filter('wpseo_xml_sitemap_img', '__return_false');
329
+ add_filter('wpseo_sitemap_url', array($this, 'yoastRemoveImageFromXmlClean'), 10, 2);
330
+ }
331
+
332
+ public function yoastRemoveImageFromXmlClean($output, $url)
333
+ {
334
+ $output = preg_replace('/<image:image[^>]*?>.*?<\/image:image>/si', '', $output);
335
+
336
+ return $output;
337
+ }
338
+
339
+ public function redirectFromHttpToHttps()
340
+ {
341
+ if( is_ssl() ) {
342
+ return;
343
+ }
344
+ if( 0 === strpos($_SERVER['REQUEST_URI'], 'http') ) {
345
+ wp_redirect(set_url_scheme($_SERVER['REQUEST_URI'], 'https'), 301);
346
+ } else {
347
+ wp_redirect('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301);
348
+ }
349
+ die();
350
+ }
351
+
352
+ public function setLastModifiedHeaders()
353
+ {
354
+ global $wp;
355
+ $last_modified_exclude = $this->getOption('last_modified_exclude');
356
+ $last_modified_exclude_exp = explode(PHP_EOL, $last_modified_exclude);
357
+
358
+ $current_url = home_url(add_query_arg(array(), $wp->request));
359
+
360
+ foreach($last_modified_exclude_exp as $expr) {
361
+ if( !empty($expr) && strpos(urldecode($current_url), $expr) !== false ) {
362
+ return;
363
+ }
364
+ }
365
+ if( (defined('DOING_AJAX') && DOING_AJAX) || (defined('XMLRPC_REQUEST') && XMLRPC_REQUEST) || (defined('REST_REQUEST') && REST_REQUEST) || (is_admin()) ) {
366
+ return;
367
+ }
368
+ $last_modified = '';
369
+ /**
370
+ * If posts, pages, custom post types
371
+ */
372
+ if( is_singular() ) {
373
+ global $post;
374
+ if( !isset($post->post_modified_gmt) ) {
375
+ return;
376
+ }
377
+ $post_time = strtotime($post->post_modified_gmt);
378
+ $modified_time = $post_time;
379
+ /**
380
+ * If we have comment set new modified date
381
+ */
382
+ if( (int)$post->comment_count > 0 ) {
383
+ $comments = get_comments(array(
384
+ 'post_id' => $post->ID,
385
+ 'number' => '1',
386
+ 'status' => 'approve',
387
+ 'orderby' => 'comment_date_gmt',
388
+ ));
389
+ if( !empty($comments) && isset($comments[0]) ) {
390
+ $comment_time = strtotime($comments[0]->comment_date_gmt);
391
+ if( $comment_time > $post_time ) {
392
+ $modified_time = $comment_time;
393
+ }
394
+ }
395
+ }
396
+ $last_modified = str_replace('+0000', 'GMT', gmdate('r', $modified_time));
397
+ }
398
+ /**
399
+ * If any archives: categories, tags, taxonomy terms, post type archives
400
+ */
401
+ if( is_archive() || is_home() ) {
402
+ global $posts;
403
+ if( empty($posts) ) {
404
+ return;
405
+ }
406
+ $post = $posts[0];
407
+ if( !isset($post->post_modified_gmt) ) {
408
+ return;
409
+ }
410
+ $post_time = strtotime($post->post_modified_gmt);
411
+ $modified_time = $post_time;
412
+ $last_modified = str_replace('+0000', 'GMT', gmdate('r', $modified_time));
413
+ }
414
+
415
+ /**
416
+ * If headers already sent - do nothing
417
+ */
418
+
419
+ if( headers_sent() ) {
420
+ return;
421
+ }
422
+
423
+ if( !empty($last_modified) && !empty($modified_time) ) {
424
+
425
+ header('Last-Modified: ' . $last_modified);
426
+
427
+ if( $this->getOption('if_modified_since_headers') && !is_user_logged_in() ) {
428
+
429
+ if( isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $modified_time ) {
430
+
431
+ $protocol = (isset($_SERVER['SERVER_PROTOCOL'])
432
+ ? $_SERVER['SERVER_PROTOCOL']
433
+ : 'HTTP/1.0');
434
+
435
+ header($protocol . ' 304 Not Modified');
436
+ }
437
+ }
438
+ }
439
+ }
440
+ }
includes/classes/class.configurate-updates.php ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This class configures the parameters seo
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ class WbcrClearfy_ConfigUpdates extends WbcrClearfy_Configurate {
10
+
11
+ public function registerActionsAndFilters()
12
+ {
13
+ /**
14
+ * Plugin updates
15
+ */
16
+
17
+ switch( $this->getOption('plugin_updates') ) {
18
+ case 'disable_plugin_updates':
19
+ $this->disableAllPluginUpdates();
20
+ break;
21
+ case 'enable_plugin_auto_updates':
22
+ add_filter('auto_update_plugin', '__return_true', 1);
23
+ break;
24
+ }
25
+
26
+ /**
27
+ * Theme updates
28
+ */
29
+
30
+ switch( $this->getOption('theme_updates') ) {
31
+ case 'disable_theme_updates':
32
+ $this->disableAllThemesUpdates();
33
+ break;
34
+ case 'enable_theme_auto_updates':
35
+ add_filter('auto_update_plugin', '__return_true', 1);
36
+ break;
37
+ }
38
+
39
+ /**
40
+ * disable wp default translation update
41
+ */
42
+
43
+ if( $this->getOption('auto_tran_update') ) {
44
+ add_filter('auto_update_translation', '__return_false', 1);
45
+ }
46
+
47
+ /**
48
+ * control WP Auto core update
49
+ */
50
+
51
+ switch( $this->getOption('wp_update_core') ) {
52
+ case 'minor':
53
+ add_filter('allow_minor_auto_core_updates', '__return_true');
54
+ break;
55
+ case 'major':
56
+ add_filter('allow_major_auto_core_updates', '__return_true');
57
+ break;
58
+ case 'development':
59
+ add_filter('allow_dev_auto_core_updates', '__return_true');
60
+ break;
61
+ default:
62
+ $this->disableAllCoreUpdates();
63
+ }
64
+
65
+ /**
66
+ * disable wp default translation update
67
+ */
68
+
69
+ if( $this->getOption('enable_update_vcs') ) {
70
+ add_filter('automatic_updates_is_vcs_checkout', '__return_false', 1);
71
+ }
72
+ }
73
+
74
+ public function disableAllCoreUpdates()
75
+ {
76
+ add_action('admin_init', array($this, 'adminInitForCore'));
77
+
78
+ /*
79
+ * Disable Core Updates
80
+ * 2.8 to 3.0
81
+ */
82
+ add_filter('pre_transient_update_core', array($this, 'lastCheckedNow'));
83
+ /*
84
+ * 3.0
85
+ */
86
+ add_filter('pre_site_transient_update_core', array($this, 'lastCheckedNow'));
87
+
88
+ /*
89
+ * Disable All Automatic Updates
90
+ * 3.7+
91
+ *
92
+ * @author sLa NGjI's @ slangji.wordpress.com
93
+ */
94
+ add_filter('automatic_updater_disabled', '__return_true');
95
+ add_filter('allow_minor_auto_core_updates', '__return_false');
96
+ add_filter('allow_major_auto_core_updates', '__return_false');
97
+ add_filter('allow_dev_auto_core_updates', '__return_false');
98
+ add_filter('auto_update_core', '__return_false');
99
+ add_filter('wp_auto_update_core', '__return_false');
100
+ add_filter('auto_core_update_send_email', '__return_false');
101
+ add_filter('send_core_update_notification_email', '__return_false');
102
+ add_filter('automatic_updates_send_debug_email', '__return_false');
103
+ add_filter('automatic_updates_is_vcs_checkout', '__return_true');
104
+ }
105
+
106
+ public function disableAllPluginUpdates()
107
+ {
108
+ add_action('admin_init', array($this, 'adminInitForPlugins'));
109
+
110
+ /*
111
+ * Disable Plugin Updates
112
+ * 2.8 to 3.0
113
+ */
114
+ add_action('pre_transient_update_plugins', array($this, 'lastCheckedNow'));
115
+ /*
116
+ * 3.0
117
+ */
118
+ add_filter('pre_site_transient_update_plugins', array($this, 'lastCheckedNow'));
119
+
120
+ /*
121
+ * Disable All Automatic Updates
122
+ * 3.7+
123
+ *
124
+ * @author sLa NGjI's @ slangji.wordpress.com
125
+ */
126
+ add_filter('auto_update_plugin', '__return_false');
127
+ }
128
+
129
+ public function disableAllThemesUpdates()
130
+ {
131
+ add_action('admin_init', array($this, 'adminInitForThemes'));
132
+
133
+ /*
134
+ * Disable Theme Updates
135
+ * 2.8 to 3.0
136
+ */
137
+ add_filter('pre_transient_update_themes', array($this, 'lastCheckedNow'));
138
+ /*
139
+ * 3.0
140
+ */
141
+ add_filter('pre_site_transient_update_themes', array($this, 'lastCheckedNow'));
142
+
143
+ /*
144
+ * Disable All Automatic Updates
145
+ * 3.7+
146
+ *
147
+ * @author sLa NGjI's @ slangji.wordpress.com
148
+ */
149
+ add_filter('auto_update_theme', '__return_false');
150
+ }
151
+
152
+ public function disableAllTranslationUpdates()
153
+ {
154
+ /*
155
+ * Disable All Automatic Updates
156
+ * 3.7+
157
+ *
158
+ * @author sLa NGjI's @ slangji.wordpress.com
159
+ */
160
+ add_filter('auto_update_translation', '__return_false');
161
+
162
+ /*
163
+ * Disable Theme Translations
164
+ * 2.8 to 3.0
165
+ */
166
+ add_filter('transient_update_themes', array($this, 'removeTranslations'));
167
+ /*
168
+ * 3.0
169
+ */
170
+ add_filter('site_transient_update_themes', array($this, 'removeTranslations'));
171
+
172
+ /*
173
+ * Disable Plugin Translations
174
+ * 2.8 to 3.0
175
+ */
176
+ add_action('transient_update_plugins', array($this, 'removeTranslations'));
177
+ /*
178
+ * 3.0
179
+ */
180
+ add_filter('site_transient_update_plugins', array($this, 'removeTranslations'));
181
+
182
+ /*
183
+ * Disable Core Translations
184
+ * 2.8 to 3.0
185
+ */
186
+ add_filter('transient_update_core', array($this, 'removeTranslations'));
187
+ /*
188
+ * 3.0
189
+ */
190
+ add_filter('site_transient_update_core', array($this, 'removeTranslations'));
191
+ }
192
+
193
+ public function removeTranslations($transient)
194
+ {
195
+
196
+ if( is_object($transient) && isset($transient->translations) ) {
197
+ $transient->translations = array();
198
+ }
199
+
200
+ return $transient;
201
+ }
202
+
203
+
204
+ /**
205
+ * Initialize and load the plugin stuff
206
+ *
207
+ * @since 1.3
208
+ * @author scripts@schloebe.de
209
+ */
210
+ function adminInitForPlugins()
211
+ {
212
+ /*
213
+ * Disable Plugin Updates
214
+ * 2.8 to 3.0
215
+ */
216
+ remove_action('load-plugins.php', 'wp_update_plugins');
217
+ remove_action('load-update.php', 'wp_update_plugins');
218
+ remove_action('admin_init', '_maybe_update_plugins');
219
+ remove_action('wp_update_plugins', 'wp_update_plugins');
220
+ wp_clear_scheduled_hook('wp_update_plugins');
221
+
222
+ /*
223
+ * 3.0
224
+ */
225
+ remove_action('load-update-core.php', 'wp_update_plugins');
226
+ wp_clear_scheduled_hook('wp_update_plugins');
227
+ }
228
+
229
+ function adminInitForThemes()
230
+ {
231
+ /*
232
+ * Disable Theme Updates
233
+ * 2.8 to 3.0
234
+ */
235
+ remove_action('load-themes.php', 'wp_update_themes');
236
+ remove_action('load-update.php', 'wp_update_themes');
237
+ remove_action('admin_init', '_maybe_update_themes');
238
+ remove_action('wp_update_themes', 'wp_update_themes');
239
+ wp_clear_scheduled_hook('wp_update_themes');
240
+
241
+ /*
242
+ * 3.0
243
+ */
244
+ remove_action('load-update-core.php', 'wp_update_themes');
245
+ wp_clear_scheduled_hook('wp_update_themes');
246
+ }
247
+
248
+ /**
249
+ * Initialize and load the plugin stuff
250
+ *
251
+ * @since 1.3
252
+ * @author scripts@schloebe.de
253
+ */
254
+ function adminInitForCore()
255
+ {
256
+ /*
257
+ * Disable Core Updates
258
+ * 2.8 to 3.0
259
+ */
260
+ remove_action('wp_version_check', 'wp_version_check');
261
+ remove_action('admin_init', '_maybe_update_core');
262
+ wp_clear_scheduled_hook('wp_version_check');
263
+
264
+ /*
265
+ * 3.0
266
+ */
267
+ wp_clear_scheduled_hook('wp_version_check');
268
+
269
+ /*
270
+ * 3.7+
271
+ */
272
+ remove_action('wp_maybe_auto_update', 'wp_maybe_auto_update');
273
+ remove_action('admin_init', 'wp_maybe_auto_update');
274
+ remove_action('admin_init', 'wp_auto_update_core');
275
+ wp_clear_scheduled_hook('wp_maybe_auto_update');
276
+ }
277
+
278
+ public function lastCheckedNow($transient)
279
+ {
280
+ global $wp_version;
281
+
282
+ include ABSPATH . WPINC . '/version.php';
283
+ $current = new stdClass;
284
+ $current->updates = array();
285
+ $current->version_checked = $wp_version;
286
+ $current->last_checked = time();
287
+
288
+ return $current;
289
+ }
290
+ }
includes/classes/class.configurate.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Core plugin
5
+ * @author Webcraftic <wordpress.webraftic@gmail.com>
6
+ * @copyright (c) 2017 Webraftic Ltd
7
+ * @version 1.0
8
+ */
9
+ abstract class WbcrClearfy_Configurate {
10
+
11
+ public function __construct()
12
+ {
13
+ $this->registerActionsAndFilters();
14
+ }
15
+
16
+ /**
17
+ * Registers filters and actions
18
+ * @return mixed
19
+ */
20
+ abstract protected function registerActionsAndFilters();
21
+
22
+ /**
23
+ * Get options with namespace
24
+ * @param $option_name
25
+ * @param bool $default
26
+ * @return mixed|void
27
+ */
28
+ public function getOption($option_name, $default = false)
29
+ {
30
+ return get_option('wbcr-clearfy_' . $option_name, $default);
31
+ }
32
+ }
includes/{class.zip-archive.php → classes/class.zip-archive.php} RENAMED
File without changes
includes/functions.php CHANGED
@@ -6,6 +6,91 @@
6
  * @version 1.0
7
  */
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  /**
10
  * Html minify function by Tim Eckel<tim@leethost.com>
11
  * @param $buffer
6
  * @version 1.0
7
  */
8
 
9
+ /**
10
+ * @param string $return
11
+ * @return array|string
12
+ */
13
+ function wbcr_get_export_options($return = 'json')
14
+ {
15
+ global $wpdb;
16
+
17
+ $export_options = array();
18
+ $request = $wpdb->get_results("SELECT option_name, option_value FROM {$wpdb->prefix}options WHERE option_name LIKE '%wbcr-clearfy_%'");
19
+
20
+ if( !empty($request) ) {
21
+ foreach($request as $option) {
22
+ $export_options[$option->option_name] = $option->option_value;
23
+ }
24
+ }
25
+
26
+ if( $return == 'array' ) {
27
+ return $export_options;
28
+ }
29
+
30
+ return wbcr_get_escape_json($export_options);
31
+ }
32
+
33
+ /**
34
+ * Merge arrays, inserting $arr2 into $arr1 before/after certain key
35
+ *
36
+ * @param array $arr Modifyed array
37
+ * @param array $inserted Inserted array
38
+ * @param string $position 'before' / 'after' / 'top' / 'bottom'
39
+ * @param string $key Associative key of $arr1 for before/after insertion
40
+ *
41
+ * @return array
42
+ */
43
+ function wbcr_array_merge_insert(array $arr, array $inserted, $position = 'bottom', $key = null)
44
+ {
45
+ if( $position == 'top' ) {
46
+ return array_merge($inserted, $arr);
47
+ }
48
+ $key_position = ($key === null)
49
+ ? false
50
+ : array_search($key, array_keys($arr));
51
+ if( $key_position === false OR ($position != 'before' AND $position != 'after') ) {
52
+ return array_merge($arr, $inserted);
53
+ }
54
+ if( $position == 'after' ) {
55
+ $key_position++;
56
+ }
57
+
58
+ return array_merge(array_slice($arr, 0, $key_position, true), $inserted, array_slice($arr, $key_position, null, true));
59
+ }
60
+
61
+ /**
62
+ * Try to get variable from JSON-encoded post variable
63
+ *
64
+ * Note: we pass some params via json-encoded variables, as via pure post some data (ex empty array) will be absent
65
+ *
66
+ * @param string $name $_POST's variable name
67
+ *
68
+ * @return array
69
+ */
70
+ function wbcr_maybe_get_post_json($name)
71
+ {
72
+ if( isset($_POST[$name]) AND is_string($_POST[$name]) ) {
73
+ $result = json_decode(stripslashes($_POST[$name]), true);
74
+ if( !is_array($result) ) {
75
+ $result = array();
76
+ }
77
+
78
+ return $result;
79
+ } else {
80
+ return array();
81
+ }
82
+ }
83
+
84
+ /**
85
+ * Escape json data
86
+ * @param array $data
87
+ * @return string escaped json string
88
+ */
89
+ function wbcr_get_escape_json(array $data)
90
+ {
91
+ return htmlspecialchars(json_encode($data), ENT_QUOTES, 'UTF-8');
92
+ }
93
+
94
  /**
95
  * Html minify function by Tim Eckel<tim@leethost.com>
96
  * @param $buffer
languages/clearfy-ru_RU.mo CHANGED
Binary file
languages/clearfy-ru_RU.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: clearfy\n"
4
- "POT-Creation-Date: 2017-09-13 08:27+0300\n"
5
- "PO-Revision-Date: 2017-09-13 08:29+0300\n"
6
  "Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
7
  "Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
8
  "Language: ru_RU\n"
@@ -18,60 +18,67 @@ msgstr ""
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: libs\n"
20
 
21
- #: admin/ajax/configurate.php:14
22
  msgid "You don't have enough capability to edit this information."
23
  msgstr "У вас недостаточно возможностей для редактирования этой информации."
24
 
25
- #: admin/ajax/configurate.php:122
26
  msgid "Undefinded mode."
27
  msgstr "Неопределенный режим."
28
 
29
- #: admin/boot.php:42
 
 
 
 
30
  msgid "Settings"
31
  msgstr "Настройки"
32
 
33
- #: admin/includes/class.pages.php:36
34
  msgid "Quick start"
35
  msgstr "Быстрый старт"
36
 
37
- #: admin/includes/class.pages.php:41 admin/pages/header.php:27
38
- msgid "Header cleaning"
39
  msgstr "Очистка кода"
40
 
41
- #: admin/includes/class.pages.php:46 admin/pages/privacy.php:25
 
 
 
 
42
  msgid "Privacy Settings"
43
  msgstr "Настройки приватности"
44
 
45
- #: admin/includes/class.pages.php:51 admin/pages/seo.php:25
46
  msgid "SEO"
47
  msgstr "SEO"
48
 
49
- #: admin/includes/class.pages.php:56 admin/pages/double-pages.php:25
50
  msgid "Duplicate pages"
51
  msgstr "Дубли страниц"
52
 
53
- #: admin/includes/class.pages.php:61 admin/pages/defence.php:25
54
  msgid "Defence"
55
  msgstr "Защита"
56
 
57
- #: admin/includes/class.pages.php:66 admin/pages/additionally.php:25
 
 
 
 
58
  msgid "Advanced"
59
  msgstr "Дополнительно"
60
 
61
- #: admin/includes/class.pages.php:176
62
- msgid "You do not have permission to edit page."
63
- msgstr "У вас недостаточно прав, для редактирования этой страницы."
64
 
65
- #: admin/includes/class.pages.php:194 admin/includes/class.pages.php:260
66
- #: admin/pages/quick-start.php:27 clearfy.php:63
67
- msgid "Clearfy - disable unused features"
68
- msgstr "Clearfy - отключите бесполезные функции"
69
-
70
- #: admin/includes/class.pages.php:198
71
- msgid "The settings have been updated successfully!"
72
- msgstr "Настройки были успешно обновлены!"
73
 
74
- #: admin/includes/class.pages.php:217
75
  msgid ""
76
  "A neutral setting that can not harm your site, but you must be sure that you "
77
  "need to use it."
@@ -79,7 +86,7 @@ msgstr ""
79
  "Нейтральная настройка, которая не может нанести вред вашему сайту, но вы "
80
  "должны быть уверены, что вам нужно ее использовать."
81
 
82
- #: admin/includes/class.pages.php:221
83
  msgid ""
84
  "When set this option, you must be careful. Plugins and themes may depend on "
85
  "this function. You must be sure that you can disable this feature for the "
@@ -89,21 +96,21 @@ msgstr ""
89
  "темы могут зависеть от этой функции. Вы должны быть уверены, что эту функцию "
90
  "можно отключить для сайта."
91
 
92
- #: admin/includes/class.pages.php:225
93
  msgid "Absolutely safe setting, We recommend to use."
94
  msgstr "Абсолютно безопасная настройка, рекомендуем использовать."
95
 
96
- #: admin/includes/class.pages.php:230
97
  msgid "Hover to the icon to get help for the feature you selected."
98
  msgstr ""
99
  "Наведите указатель мыши на значок, чтобы получить справку по выбранной "
100
  "функции."
101
 
102
- #: admin/includes/class.pages.php:234
103
  msgid "Do you want the plugin to improved and update?"
104
  msgstr "Вы хотите, чтобы плагин улучшался и обновлялся?"
105
 
106
- #: admin/includes/class.pages.php:237
107
  msgid ""
108
  "Help the author, leave a review on wordpress.org. Thanks to feedback, I will "
109
  "know that the plugin is really useful to you and is needed."
@@ -111,30 +118,275 @@ msgstr ""
111
  "Помогите автору, оставьте отзыв на wordpress.org. Благодаря отзывам, я буду "
112
  "знать, что плагин действительно полезен для вас и необходим."
113
 
114
- #: admin/includes/class.pages.php:239
115
  msgid "And also write your ideas on how to extend or improve the plugin."
116
  msgstr "А также напишите свои идеи о том, как расширить или улучшить плагин."
117
 
118
- #: admin/includes/class.pages.php:244
119
  msgid "Go rate us and push ideas"
120
  msgstr "Оставить отзыв или поделиться идеей"
121
 
122
- #: admin/includes/class.pages.php:275
123
- msgid "Save changes"
124
- msgstr "Сохранить настройки"
125
 
126
- #: admin/pages/additionally.php:38
127
- msgid ""
128
- "This page contains additional settings, usually not listed in the "
129
- "recommended list."
130
- msgstr ""
131
- "Эта страница содержит дополнительные параметры, обычно, не перечисленные в "
132
- "списке рекомендованных."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
- #: admin/pages/additionally.php:62
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  msgid "Remove field \"site\" in comment form"
136
  msgstr "Удаляет поле \"Сайт\" в форме комментариев"
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  #: admin/pages/additionally.php:64
139
  msgid ""
140
  "Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
@@ -155,10 +407,6 @@ msgstr ""
155
  "Работает со стандартной формой комментирования, если в Вашей теме форма "
156
  "прописана вручную - скорей всего не сработает!"
157
 
158
- #: admin/pages/additionally.php:72
159
- msgid "Removes links to wordpress.org site from the admin bar"
160
- msgstr "Удаляет ссылки на wordpress.org сайт из панели администратора"
161
-
162
  #: admin/pages/additionally.php:74
163
  msgid ""
164
  "The first item in the toolbar goes wordpress logo and external links to "
@@ -186,14 +434,6 @@ msgstr ""
186
  "изменения в редакторе Wordpress. В дальнейшем вы можете просмотреть все "
187
  "версии с возможностью восстановить любую из них."
188
 
189
- #: admin/pages/additionally.php:87
190
- msgid "Disable revision"
191
- msgstr "Отключить ревизии"
192
-
193
- #: admin/pages/additionally.php:100
194
- msgid "Limit Post Revisions"
195
- msgstr "Установить лимит ревизий"
196
-
197
  #: admin/pages/additionally.php:102
198
  msgid ""
199
  "WordPress automatically saves revisions when you are working on posts and "
@@ -223,210 +463,7 @@ msgstr ""
223
  "она определяет количество ревизий. Удалите ее, чтобы вы могли изменить это "
224
  "значение через панель администратора."
225
 
226
- #: admin/pages/defence.php:38
227
- msgid "This page contains the security configuration settings for your site."
228
- msgstr ""
229
- "Эта страница содержит параметры конфигурации безопасности для вашего сайта."
230
-
231
- #: admin/pages/defence.php:62
232
- msgid "Hide author login"
233
- msgstr "Убрать возможность узнать логин автора"
234
-
235
- #: admin/pages/defence.php:62 admin/pages/defence.php:72
236
- #: admin/pages/defence.php:82 admin/pages/double-pages.php:62
237
- #: admin/pages/double-pages.php:72 admin/pages/double-pages.php:92
238
- #: admin/pages/double-pages.php:102 admin/pages/double-pages.php:112
239
- #: admin/pages/header.php:84 admin/pages/header.php:114
240
- #: admin/pages/header.php:123 admin/pages/header.php:133
241
- #: admin/pages/header.php:143 admin/pages/header.php:153
242
- #: admin/pages/header.php:163 admin/pages/privacy.php:62
243
- #: admin/pages/privacy.php:72 admin/pages/privacy.php:83 admin/pages/seo.php:62
244
- #: admin/pages/seo.php:72 admin/pages/seo.php:82 admin/pages/seo.php:142
245
- #: admin/pages/seo.php:165 admin/pages/seo.php:188 admin/pages/seo.php:198
246
- #: admin/pages/seo.php:208
247
- msgid "Recommended"
248
- msgstr "Рекомендовано"
249
-
250
- #: admin/pages/defence.php:64
251
- msgid ""
252
- "An attacker can find out the author's login, using a similar request to get "
253
- "your site. mysite.com/?author=1"
254
- msgstr ""
255
- "Злоумышленник может узнать логин автора, с помощью подобного get запроса "
256
- "mysite.com/?author=1"
257
-
258
- #: admin/pages/defence.php:64
259
- msgid "Sets the redirect to exclude the possibility of obtaining a login."
260
- msgstr ""
261
- "Предотвращает возможность узнать логин автора, устанавливая перенаправление."
262
-
263
- #: admin/pages/defence.php:72
264
- msgid "Hide errors when logging into the site"
265
- msgstr "Спрятать ошибки при входе на сайт"
266
-
267
- #: admin/pages/defence.php:74
268
- msgid ""
269
- "WP by default shows whether you entered a wrong login or incorrect password, "
270
- "which allows attackers to understand if there is a certain user on the site, "
271
- "and then start searching through the passwords."
272
- msgstr ""
273
- "Wordpress по умолчанию показывает, ввели ли вы неправильный логин или "
274
- "неправильный пароль, что дает злоумышленникам понять, существует ли "
275
- "определенный пользователь на сайте, а после начать перебор паролей."
276
-
277
- #: admin/pages/defence.php:74
278
- msgid ""
279
- "Changes in the text of the error so that attackers could not find the login."
280
- msgstr ""
281
- "Меняет текст ошибки так, чтобы злоумышленники не смогли подобрать логин."
282
-
283
- #: admin/pages/defence.php:82
284
- msgid "Disable X-Pingback"
285
- msgstr "Убрать ссылку на X-Pingback и возможность спамить pingback-ами"
286
-
287
- #: admin/pages/defence.php:84
288
- msgid ""
289
- "A pingback is basically an automated comment that gets created when another "
290
- "blog links to you. A self-pingback is created when you link to an article "
291
- "within your own blog. Pingbacks are essentially nothing more than spam and "
292
- "simply waste resources."
293
- msgstr ""
294
- "Pingback по-существу автоматизированных комментарий, который создается, "
295
- "когда другой блог ссылается на вас. Self-pingback создается, когда вы "
296
- "оставили ссылку на статью в своем блоге. Pingbacks по существу являются не "
297
- "более чем спам и пустая трата ресурсов вашего сайта."
298
-
299
- #: admin/pages/defence.php:84
300
- msgid "Removes the server responses a reference to the xmlrpc file."
301
- msgstr "Удаляет ссылку на xmlrpc-файл и ответ сервера."
302
-
303
- #: admin/pages/double-pages.php:38
304
- msgid "This page contains settings for setting up duplicate pages."
305
- msgstr "Эта страница содержит параметры для настройки дублирования страниц."
306
-
307
- #: admin/pages/double-pages.php:62
308
- msgid "Remove archives date"
309
- msgstr "Удалить архивы дат"
310
-
311
- #: admin/pages/double-pages.php:64
312
- #, php-format
313
- msgid ""
314
- "Many duplicates in date archives. Imagine, in addition, that your article "
315
- "will be displayed in the main and in the category, you will still receive at "
316
- "least 3 duplicates: in archives by year, month and date, for example %s."
317
- msgstr ""
318
- "Огромное количество дублей в архивах дат. Представьте, кроме того, что Ваша "
319
- "статья будет выводиться на главной и в категории, Вы еще получите как "
320
- "минимум 3 дубля: в архивах по году, месяцу и дате, например %s."
321
-
322
- #: admin/pages/double-pages.php:64
323
- msgid "Removes all pages with the date archives and puts a redirect."
324
- msgstr "Удаляет полностью архивы дат и ставит редирект."
325
-
326
- #: admin/pages/double-pages.php:72
327
- msgid "Remove author archives "
328
- msgstr "Удалить архивы автора"
329
-
330
- #: admin/pages/double-pages.php:74
331
- #, php-format
332
- msgid ""
333
- "If the site is only filled by you - a mandatory item. Allows you to get rid "
334
- "of duplicates on user archives, for example %s."
335
- msgstr ""
336
- "Если сайт заполняете только вы - это функция обязательна. Позволяет вам "
337
- "избавиться от дубликатов страниц автора, например %s."
338
-
339
- #: admin/pages/double-pages.php:74
340
- msgid "Removes all pages with the author archives and puts a redirect."
341
- msgstr "Удаляет все страницы из архивов автора и ставит перенаправление."
342
-
343
- #: admin/pages/double-pages.php:82
344
- msgid "Remove archives tag"
345
- msgstr "Удалить метки архивов"
346
-
347
- #: admin/pages/double-pages.php:84
348
- msgid ""
349
- "If you use tags only for the block Similar records, or do not use them at "
350
- "all - it will be more correct to close them to avoid duplicates."
351
- msgstr ""
352
- "Если вы используете теги только для виджета \"Похожие записи\", либо не "
353
- "используете их совсем - правильнее будет их закрыть, чтобы избежать дублей."
354
-
355
- #: admin/pages/double-pages.php:84
356
- msgid "Removes all pages with the tag archives and puts a redirect."
357
- msgstr "Ставит редирект со страниц тегов на главную."
358
-
359
- #: admin/pages/double-pages.php:92
360
- msgid "Remove attachment pages"
361
- msgstr "Удалить страницы вложений"
362
-
363
- #: admin/pages/double-pages.php:94
364
- msgid ""
365
- "Every of the pictures has its own page on the site. Such pages are "
366
- "successfully indexed and create duplicates. The site can have thousands of "
367
- "same-type attachment pages."
368
- msgstr ""
369
- "Каждая загруженная картинка имеет свою страничку на сайте, состоящую только "
370
- "из одной картинки. Такие страницы успешно индексируются и создают дубли. На "
371
- "сайте могут быть тысячи однотипных страниц вложений."
372
-
373
- #: admin/pages/double-pages.php:94
374
- msgid "Removes attachment pages and puts a redirect."
375
- msgstr "Удаляет страницы вложений и ставит редирект на запись."
376
-
377
- #: admin/pages/double-pages.php:102
378
- msgid "Remove post pagination"
379
- msgstr "Удалить постраничную навигацию записей"
380
-
381
- #: admin/pages/double-pages.php:104
382
- #, php-format
383
- msgid ""
384
- "In WordPress, any post can be divided into parts (pages), each part will "
385
- "have its own address. But this functionality is rarely used, but it can "
386
- "create trouble for you. For example, you can add a number to the address of "
387
- "any entry of your blog, %s - the post itself will open, which will be a "
388
- "duplicate. You can substitute any number."
389
- msgstr ""
390
- "В WordPress любое содержание можно разделить на части (страницы), каждая "
391
- "часть будет иметь свой собственный адрес. Эта функциональность используется "
392
- "редко, но это может создать проблемы для вас. Например вы можете добавить "
393
- "номер в адрес любой записи вашего блога, %s - откроет текущую страницу, "
394
- "которая будет дублироваться."
395
-
396
- #: admin/pages/double-pages.php:104
397
- #, php-format
398
- msgid "Removes the pagination from the post and puts a redirect. Example: %s"
399
- msgstr ""
400
- "Удаление постраничную навигацию из записи и устанавливет перенаправление. "
401
- "Пример: %s"
402
-
403
- #: admin/pages/double-pages.php:112
404
- msgid "Remove ?replytocom"
405
- msgstr "Удалить ?replytocom"
406
-
407
- #: admin/pages/double-pages.php:114
408
- #, php-format
409
- msgid ""
410
- "WordPress adds %s to the link \"Reply\" in the comments, if you use "
411
- "hierarchical comments."
412
- msgstr ""
413
- "WordPress добавляет %s к ссылке «Ответ» в комментариях, если вы используете "
414
- "иерархические комментарии."
415
-
416
- #: admin/pages/double-pages.php:114
417
- msgid "?relpytocom remove and and puts a redirect."
418
- msgstr "Удаляет ?relpytocom и ставит перенаправление."
419
-
420
- #: admin/pages/header.php:40
421
- msgid "On this settings page, you can optimize the source code of the page."
422
- msgstr ""
423
- "На этой странице настроек вы можете оптимизировать исходный код страницы."
424
-
425
- #: admin/pages/header.php:64
426
- msgid "Disable RSS feeds"
427
- msgstr "Отключить RSS каналы"
428
-
429
- #: admin/pages/header.php:66
430
  msgid ""
431
  "By default, WordPress generates all types of different RSS feeds for your "
432
  "site. While RSS feeds can be useful if you are running a blog, businesses "
@@ -437,7 +474,7 @@ msgstr ""
437
  "например, но если у вас обычный одностаничник, то RSS для вас будет "
438
  "бесполезен. "
439
 
440
- #: admin/pages/header.php:66
441
  #, php-format
442
  msgid ""
443
  "Removes a link to the RSS-feed from the %s section, closes and puts the "
@@ -446,11 +483,7 @@ msgstr ""
446
  "Удаляет ссылку на RSS-канал из раздела %s, закрывает и ставит "
447
  "перенаправления от всех RSS-каналов."
448
 
449
- #: admin/pages/header.php:74
450
- msgid "Remove REST API Links"
451
- msgstr "Отключить Rest API"
452
-
453
- #: admin/pages/header.php:76
454
  msgid ""
455
  "The WordPress REST API provides API endpoints for WordPress data types that "
456
  "allow developers to interact with sites remotely by sending and receiving "
@@ -463,17 +496,28 @@ msgstr ""
463
  "Однако многие сайты не используют это, и поэтому в большинстве случаев, это "
464
  "только ненужный код."
465
 
466
- #: admin/pages/header.php:76
467
  msgid ""
468
  "Removes REST API link tag from the front end and the REST API header link "
469
  "from page requests."
470
  msgstr "Отключает REST API и удаляет все ссылки из исходного кода страницы."
471
 
472
- #: admin/pages/header.php:84
473
- msgid "Disable Emojis"
474
- msgstr "Отключить Emojis (эмоции)"
 
 
 
 
 
 
 
 
 
 
 
475
 
476
- #: admin/pages/header.php:86
477
  msgid ""
478
  "Emojis are fun and all, but if you are aren’t using them they actually load "
479
  "a JavaScript file (wp-emoji-release.min.js) on every page of your website. "
@@ -486,15 +530,11 @@ msgstr ""
486
  "требуется и просто увеличивает время загрузки страницы. Поэтому мы "
487
  "рекомендуем отключить это."
488
 
489
- #: admin/pages/header.php:86
490
  msgid "Removes WordPress Emojis JavaScript file (wp-emoji-release.min.js)."
491
  msgstr "Удаляет код Emojis из исходного кода страницы"
492
 
493
- #: admin/pages/header.php:94
494
- msgid "Remove jQuery Migrate"
495
- msgstr "Удалить jQuery Migrate"
496
-
497
- #: admin/pages/header.php:96
498
  msgid ""
499
  "They started adding jQuery migrate in WordPress 3.6. Most up-to-date "
500
  "frontend code and plugins don’t require jquery-migrate.min.js. In most "
@@ -505,21 +545,17 @@ msgstr ""
505
  "интерфейсов и плагинов не требуют jquery-migrate.min.js. В большинстве "
506
  "случаев это просто ненужная нагрузка на ваш сайт. "
507
 
508
- #: admin/pages/header.php:96
509
  msgid "Removes jQuery Migrate JavaScript file (jquery-migrate.min.js)."
510
  msgstr "Удаляет подключаемый файл (jquery-migrate.min.js)."
511
 
512
- #: admin/pages/header.php:96
513
  msgid "Warning! If there is a broke on your site, disable this option!"
514
  msgstr ""
515
  "Предупреждение! Если у вас появились проблемы в работе сайта или плагинов, "
516
  "отключите эту опцию!"
517
 
518
- #: admin/pages/header.php:104
519
- msgid "Disable Embeds"
520
- msgstr "Отключить Embeds"
521
-
522
- #: admin/pages/header.php:106
523
  msgid ""
524
  "Embeds were released with WordPress 4.4. This is basically the magic that "
525
  "auto converts your YouTube videos, Tweets, and URLs into pretty previews "
@@ -536,16 +572,12 @@ msgstr ""
536
  "функции автоматического преобразования встраиваемых объектов, то можете "
537
  "отключить эту функцию."
538
 
539
- #: admin/pages/header.php:106
540
  msgid "Removes WordPress Embed JavaScript file (wp-embed.min.js)"
541
  msgstr ""
542
  "Удаляет JavaScript код отвечающий за встраиваемые объекты (wp-embed.min.js)"
543
 
544
- #: admin/pages/header.php:114
545
- msgid "Remove dns-prefetch"
546
- msgstr "Удалить dns-prefetch"
547
-
548
- #: admin/pages/header.php:116
549
  #, php-format
550
  msgid ""
551
  "Since version 4.6.1 in WordPress there are new links in the section %s this "
@@ -554,16 +586,12 @@ msgstr ""
554
  "Начиная с версии 4.6.1 в WordPress появляются новые ссылки в секции %s "
555
  "пример:"
556
 
557
- #: admin/pages/header.php:116
558
  #, php-format
559
  msgid "Removes dns-prefetch links from the %s section"
560
  msgstr "Удаляет тег link dns-prefetch из секции %s"
561
 
562
- #: admin/pages/header.php:123
563
- msgid "Remove RSD Link"
564
- msgstr "Удаляет RSD ссылку"
565
-
566
- #: admin/pages/header.php:125
567
  msgid ""
568
  "The above link is used by blog clients. If you edit your site from your "
569
  "browser then you don’t need this. It is also used by some 3rd party "
@@ -575,108 +603,216 @@ msgstr ""
575
  "приложениях, которые используют XML-RPC-запросы. В большинстве случаев это "
576
  "только ненужный код."
577
 
578
- #: admin/pages/header.php:125
579
  msgid "Remove RSD (Real Simple Discovery) link tag."
580
  msgstr "Удаляет RSD link тег"
581
 
582
- #: admin/pages/header.php:133
583
- msgid "Remove wlwmanifest Link"
584
- msgstr "Удалить wlwmanifest Link"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
 
586
- #: admin/pages/header.php:135
 
 
 
 
587
  msgid ""
588
- "This link is actually used by Windows Live Writer. If you don’t know use "
589
- "Windows Live Writer, which we are guessing you don’t, this is just "
590
- "unnecessary code."
 
591
  msgstr ""
592
- "Эта ссылка используется фактически Windows Live Writer. Если вы не знаете, "
593
- "как использовать Windows Live Writer, то это только ненужный код."
594
-
595
- #: admin/pages/header.php:135
596
- msgid "Remove wlwmanifest (Windows Live Writer) link tag."
597
- msgstr "Удаляет тег link wlwmanifest (Windows Live Writer)."
598
 
599
- #: admin/pages/header.php:143
600
- msgid "Remove Shortlink"
601
- msgstr "Удалить короткие ссылки"
602
 
603
- #: admin/pages/header.php:145
604
  #, php-format
605
  msgid ""
606
- "By default, the following tag shows up in every WordPress install. %s This "
607
- "is used for a shortlink to your pages and posts. However, if you are already "
608
- "using pretty permalinks, such as domain.com/post, then there is no reason to "
609
- "keep this, it is just unnecessary code."
610
  msgstr ""
611
- "По умолчанию следующий тег печатается на каждой странице ваших записей и "
612
- "страниц. %s Это используется, как короткая ссылка на вашу статью. Если вы "
613
- "используете постоянные ссылки, то это не нужный код."
614
-
615
- #: admin/pages/header.php:145
616
- msgid "Remove Shortlink link tag."
617
- msgstr "Удаляет тег link shortlink."
618
 
619
- #: admin/pages/header.php:153
620
- msgid "Remove links to previous, next post"
621
- msgstr "Удалить ссылки следующая, предыдущая запись"
622
 
623
- #: admin/pages/header.php:155
 
624
  msgid ""
625
- "If you use Wordpress as a CMS, then you can delete these links, they can "
626
- "only come in handy for a blog."
627
  msgstr ""
628
- "Если вы используете Wordpress как CMS не блог), то вы можете удалить эти "
629
- "ссылки, но для блога они могут быть полезны."
630
 
631
- #: admin/pages/header.php:155
 
 
 
 
632
  msgid ""
633
- "Remove the previous and next post links within the wp_head of your wordpress "
634
- "theme."
635
  msgstr ""
636
- "Удаляет ссылки предидущая и следующая запись в head вашей темы wordpress."
 
637
 
638
- #: admin/pages/header.php:163
639
- msgid "Remove .recentcomments styles"
640
- msgstr "Удалить стили .recentcomments"
641
 
642
- #: admin/pages/header.php:165
643
  msgid ""
644
- "WP by default for the widget \"recent comments\" prescribes in the code "
645
- "styles that are almost impossible to change, because to them apply! "
646
- "important."
647
  msgstr ""
648
- "Wordpress по умолчанию для виджета \"Последние комментари\" прописывает в "
649
- "стилях код, которые почти невозможно изменить, потому что к ним применяются "
650
- "значение !important."
651
-
652
- #: admin/pages/header.php:165
653
- msgid "Removes .recentcomments styles from head section."
654
- msgstr "Удаляет .recentcomments стили из head секции."
655
 
656
- #: admin/pages/header.php:173
657
- msgid "HTML minify"
658
- msgstr "Html сжатие"
659
 
660
- #: admin/pages/header.php:175
 
661
  msgid ""
662
- "Reduces the weight of the page by removing line breaks, tabs, spaces, etc."
 
 
 
 
663
  msgstr ""
664
- "Уменьшает вес страницы путем удаления разрывов строк, вкладок, пробелов и т. "
665
- "Д."
 
 
 
666
 
667
- #: admin/pages/header.php:175
668
- msgid "Minify pages."
669
- msgstr "Минимизировать страницы."
 
 
 
670
 
671
- #: admin/pages/privacy.php:38
672
- msgid "On this page you can configure the privacy settings of your site."
 
 
 
673
  msgstr ""
674
- "На этой странице вы можете установить настройки приватности для скриптов на "
675
- "вашем сайте."
676
 
677
- #: admin/pages/privacy.php:62
678
- msgid "Remove meta generator"
679
- msgstr "Удалить meta generator"
680
 
681
  #: admin/pages/privacy.php:64
682
  msgid ""
@@ -691,10 +827,6 @@ msgstr ""
691
  msgid "Removes the meta tag from the %s section"
692
  msgstr "Удаляет мета-тег из раздел %s"
693
 
694
- #: admin/pages/privacy.php:72
695
- msgid "Remove Version from Stylesheet"
696
- msgstr "Удалить версию у файлов стилей"
697
-
698
  #: admin/pages/privacy.php:74 admin/pages/privacy.php:85
699
  msgid ""
700
  "To make it more difficult for others to hack your website you can remove the "
@@ -714,19 +846,11 @@ msgid ""
714
  "only)."
715
  msgstr "Удаляет номер версии из файлов стилей стилей (только для фронтенда)."
716
 
717
- #: admin/pages/privacy.php:83
718
- msgid "Remove Version from Script"
719
- msgstr "Удаляет версию у javascript файлов"
720
-
721
  #: admin/pages/privacy.php:86
722
  msgid ""
723
  "Removes wordpress version number from scripts (not logged in user only)."
724
  msgstr "Удаляет номер версии из javascript файлов (только для фронтенда)."
725
 
726
- #: admin/pages/privacy.php:94
727
- msgid "Eclude stylesheet/script file names"
728
- msgstr "Исключает файлы стилей/сприптов"
729
-
730
  #: admin/pages/privacy.php:96
731
  msgid ""
732
  "Enter Stylesheet/Script file names to exclude from version removal (each "
@@ -740,6 +864,10 @@ msgstr ""
740
  msgid "Example"
741
  msgstr "Например"
742
 
 
 
 
 
743
  #: admin/pages/quick-start.php:61
744
  msgid ""
745
  "On this page you can quickly configure the plug-in without going into "
@@ -765,22 +893,39 @@ msgid "Seo optimization"
765
  msgstr "Оптимизация SEO"
766
 
767
  #: admin/pages/quick-start.php:159
 
 
 
 
 
 
 
 
768
  msgid "Reset all settings"
769
  msgstr "Сбросить все настройки"
770
 
771
- #: admin/pages/quick-start.php:166
772
- msgid "Settings successfully updated!"
773
- msgstr "Настройки успешно обновлены!"
774
 
775
- #: admin/pages/quick-start.php:169
776
  msgid ""
777
- "During the setup, an unknown error occurred, please try again or contact the "
778
- "plug-in support."
779
  msgstr ""
780
- "Во время установки произошла неизвестная ошибка, повторите попытку или "
781
- "обратитесь в службу поддержки плагинов."
 
782
 
783
- #: admin/pages/quick-start.php:172
 
 
 
 
 
 
 
 
784
  msgid ""
785
  "This is the quick plug-in setup mode. Use it if you do not want to "
786
  "understand the settings or do not understand what settings you need to use."
@@ -788,11 +933,11 @@ msgstr ""
788
  "Это режим быстрой настройки плагина. Используйте его, если вы не хотите "
789
  "разбираться в настройках или не понимаете, какие настройки вам нужны."
790
 
791
- #: admin/pages/quick-start.php:173
792
  msgid "Select mode"
793
  msgstr "Выберите режим"
794
 
795
- #: admin/pages/quick-start.php:175
796
  msgid ""
797
  "After selecting the mode, the plug-in automatically activates the necessary "
798
  "settings for the mode."
@@ -800,15 +945,31 @@ msgstr ""
800
  "Выбрав режим, плагин автоматически активирует необходимые настройки, для "
801
  "выполнения этого режима."
802
 
803
- #: admin/pages/quick-start.php:183
804
- msgid "Ok"
805
- msgstr "Принять"
806
 
807
- #: admin/pages/quick-start.php:184
808
- msgid "Cancel"
809
- msgstr "Отмена"
 
 
 
 
810
 
811
- #: admin/pages/quick-start.php:194
 
 
 
 
 
 
 
 
 
 
 
 
812
  msgid ""
813
  "If you faced with any issues, please follow the steps below to get quickly "
814
  "quality support:"
@@ -816,7 +977,7 @@ msgstr ""
816
  "Если вы столкнулись с какими-либо проблемами, выполните следующие действия, "
817
  "чтобы быстро получить качественную поддержку:"
818
 
819
- #: admin/pages/quick-start.php:197
820
  msgid ""
821
  "Generate a debug report which will contains inforamtion about your "
822
  "configuratin and installed plugins"
@@ -824,11 +985,11 @@ msgstr ""
824
  "Создайте отчет об ошибках, который будет содержать информацию о вашей "
825
  "конфигурации и установленных плагинах."
826
 
827
- #: admin/pages/quick-start.php:200
828
  msgid "Generate Debug Report"
829
  msgstr "Сгенерировать отчет об ошибках"
830
 
831
- #: admin/pages/quick-start.php:204
832
  msgid ""
833
  "Send a message to <b>wordpress.webraftic@gmail.com</b> include the debug "
834
  "report into the message body."
@@ -836,18 +997,10 @@ msgstr ""
836
  "Отправьте ваше сообщение на <b>wordpress.webraftic@gmail.com</b>, к "
837
  "сообщению прикрепите отчет об ошибках"
838
 
839
- #: admin/pages/quick-start.php:207
840
  msgid "We guarantee to respond you within 7 business day."
841
  msgstr "Мы гарантируем ответ на ваш вопрос в течении 7 дней."
842
 
843
- #: admin/pages/seo.php:38
844
- msgid "This page contains important settings for SEO optimization."
845
- msgstr "Эта страница содержит важные настройки SEO оптимизации."
846
-
847
- #: admin/pages/seo.php:62
848
- msgid "Automatically set the alt attribute"
849
- msgstr "Автоматически устанавливать атрибут alt"
850
-
851
  #: admin/pages/seo.php:64
852
  msgid ""
853
  "The alt attribute is mandatory, so most SEO experts say. If you missed or "
@@ -863,10 +1016,6 @@ msgstr ""
863
  msgid "Replaces the %s, on attribute with an article name %s"
864
  msgstr "Заменяет %s, на атрибут с названием статьи %s"
865
 
866
- #: admin/pages/seo.php:72
867
- msgid "Replace external links in comments on the JavaScript code"
868
- msgstr "Заменить внешние ссылки в комментариях на JavaScript код"
869
-
870
  #: admin/pages/seo.php:74
871
  msgid ""
872
  "Superfluous external links from comments, which can be typed from a dozen "
@@ -882,10 +1031,6 @@ msgstr ""
882
  "Заменяет ссылки %s, на span тег и устанавливает переход с помощью JavaScript "
883
  "%s"
884
 
885
- #: admin/pages/seo.php:82
886
- msgid "Replace external links from comment authors on the JavaScript code"
887
- msgstr "Заменить внешние ссылки от авторов комментариев на код JavaScript"
888
-
889
  #: admin/pages/seo.php:84
890
  msgid ""
891
  "Up to 90 percent of comments in the blog can be left for the sake of an "
@@ -906,10 +1051,6 @@ msgstr ""
906
  msgid "In some Wordpress topics this may not work."
907
  msgstr "В некоторых темах Wordpress это может не сработать."
908
 
909
- #: admin/pages/seo.php:92
910
- msgid "Create right robots.txt"
911
- msgstr "Создайте правильный robots.txt"
912
-
913
  #: admin/pages/seo.php:94
914
  msgid ""
915
  "After installation, WP does not contain a robots.txt file and create it "
@@ -924,15 +1065,7 @@ msgstr ""
924
  msgid "Automatically creates the perfect robots.txt file"
925
  msgstr "Автоматически создает идеальный robots.txt"
926
 
927
- #: admin/pages/seo.php:111
928
- msgid "You can edit the robots.txt file in the box below:"
929
- msgstr "Вы можете отредактировать файл robots.txt в поле ниже:"
930
-
931
- #: admin/pages/seo.php:122
932
- msgid "Redirect Http to Https"
933
- msgstr "Перенаправление Http на Https"
934
-
935
- #: admin/pages/seo.php:124
936
  msgid ""
937
  "If your site uses an SSL certificate, check this box to enable redirection "
938
  "from http to https."
@@ -940,20 +1073,20 @@ msgstr ""
940
  "Если ваш сайт использует сертификат SSL, установите этот флажок, чтобы "
941
  "включить перенаправление с http на https."
942
 
943
- #: admin/pages/seo.php:124
944
  msgid "Puts the redirect from http to https."
945
  msgstr "Передает перенаправление с http на https."
946
 
947
- #: admin/pages/seo.php:124
948
  msgid "Warning! Before activation, make sure your site is open https."
949
  msgstr ""
950
  "Внимание! Перед активацией убедитесь, что ваш сайт открывается по https."
951
 
952
- #: admin/pages/seo.php:130
953
  msgid "Server headers and response"
954
  msgstr "Заголовки серверов и ответ"
955
 
956
- #: admin/pages/seo.php:130
957
  msgid ""
958
  "WordPress does not know how to give the Last Modified header in the server's "
959
  "responses. You can do this using the settings below."
@@ -961,15 +1094,7 @@ msgstr ""
961
  "WordPress не знает, как отдать заголовок Last Modified. Вы можете сделать "
962
  "это с помощью параметров ниже."
963
 
964
- #: admin/pages/seo.php:142
965
- msgid "Automatically insert the Last Modified header"
966
- msgstr "Автоматически вставлять заголовок Last Modified"
967
-
968
- #: admin/pages/seo.php:156
969
- msgid "Exclude pages:"
970
- msgstr "Исключить страницы:"
971
-
972
- #: admin/pages/seo.php:158
973
  #, php-format
974
  msgid ""
975
  "You can specify a page mask, for example: %s or %s. All pages that contain "
@@ -979,15 +1104,11 @@ msgstr ""
979
  "содержат эти строки, будут исключены. Каждое исключение должно начинаться с "
980
  "новой строки."
981
 
982
- #: admin/pages/seo.php:165
983
- msgid "Return an If-Modified-Since responce"
984
- msgstr "Возвращать заголовок If-Modified-Since"
985
-
986
- #: admin/pages/seo.php:176
987
  msgid "For the Yoast SEO plugin"
988
  msgstr "Для плагина Yoast SEO"
989
 
990
- #: admin/pages/seo.php:176
991
  msgid ""
992
  "These settings will help you eliminate some problems associated with the "
993
  "popular Yoast SEO plugin"
@@ -995,11 +1116,7 @@ msgstr ""
995
  "Эти параметры помогут вам устранить некоторые проблемы, связанные с "
996
  "популярной Yoast SEO plugin"
997
 
998
- #: admin/pages/seo.php:188
999
- msgid "Remove duplicate names in breadcrumbs WP SEO by Yoast"
1000
- msgstr "Удалить дубли имен в хлебных крошках WP SEO Yoast"
1001
-
1002
- #: admin/pages/seo.php:190
1003
  msgid ""
1004
  "The last element in the breadcrumbs in the Yoast SEO plugin duplicates the "
1005
  "title of the article. Some SEO-specialists consider this duplication to be "
@@ -1008,18 +1125,13 @@ msgstr ""
1008
  "Последний элемент в хлебных крошках Yoast SEO дублирует название статьи. "
1009
  "Некоторые SEO-специалисты считают это дублирование излишним."
1010
 
1011
- #: admin/pages/seo.php:190
1012
  msgid ""
1013
  "Removes duplication of the name in the breadcrumbs of the WP SEO plugin from "
1014
  "Yoast."
1015
  msgstr "Удаляет последний элемент в хлебных крошках Yoast SEO."
1016
 
1017
- #: admin/pages/seo.php:198
1018
- #, php-format
1019
- msgid "Remove the tag %s from XML site map"
1020
- msgstr "Удаляет тег %s из XML карты сайта плагин Yoast SEO."
1021
-
1022
- #: admin/pages/seo.php:200
1023
  msgid ""
1024
  "Yandex.Webmaster swears on a standard XML card from the plugin Yoast, tk. it "
1025
  "has a specific tag"
@@ -1027,12 +1139,12 @@ msgstr ""
1027
  "Яндекс вебмастер ругается на стандартной карты XML из плагина Yoast SEO, из-"
1028
  "за определенного тега "
1029
 
1030
- #: admin/pages/seo.php:200
1031
  #, php-format
1032
  msgid "Remove the tag %s from XML site map of the plugin Yoast SEO."
1033
  msgstr "Удаляет тег %s из XML карта сайта плагин Yoast SEO."
1034
 
1035
- #: admin/pages/seo.php:200
1036
  msgid ""
1037
  "Attention! After activation, turn off the site map and enable it back to "
1038
  "regenerate it."
@@ -1040,35 +1152,156 @@ msgstr ""
1040
  "Внимание! После активации, выключите карту сайта и включите ее обратно, "
1041
  "чтобы обновить ее."
1042
 
1043
- #: admin/pages/seo.php:200
1044
  msgid "In older versions of Yoast SEO may not work - update the plugin Yoast"
1045
  msgstr ""
1046
  "В более старых версиях Yoast SEO не может работать - обновите плагин Yoast "
1047
  "SEO"
1048
 
1049
- #: admin/pages/seo.php:208
1050
- #, php-format
1051
- msgid "Remove comment from %s section"
1052
- msgstr "Удалить комментарии из секции %s"
1053
-
1054
- #: admin/pages/seo.php:210
1055
  #, php-format
1056
  msgid "The Yoast SEO plugin displays a comment of the form %s in %s section"
1057
  msgstr "Yoast SEO плагин отображает комментарий формы %s в секции %s"
1058
 
1059
- #: admin/pages/seo.php:210
1060
  #, php-format
1061
  msgid "Removes the Yoast SEO plugin comment of their section %s"
1062
  msgstr "Удаляет комментрии Yoast SEO из %s"
1063
 
1064
- #: includes/class.core.php:414
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065
  msgid "<strong>ERROR</strong>: Wrong login or password"
1066
  msgstr "<strong>Ошибка</strong>: Неправильный логин или пароль"
1067
 
1068
- #: includes/class.zip-archive.php:10
1069
  msgid "The ZipArchive class does not exist in this version of php."
1070
  msgstr "Класса ZipArchive не существует в этой версии php."
1071
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1072
  #~ msgid "Header section"
1073
  #~ msgstr "Раздел head"
1074
 
@@ -1108,9 +1341,6 @@ msgstr "Класса ZipArchive не существует в этой верси
1108
  #~ "Работает со стандартной формой комментирования, если в Вашей теме форма "
1109
  #~ "прописана вручную - скорей всего не сработает!"
1110
 
1111
- #~ msgid "Support"
1112
- #~ msgstr "Поддержка"
1113
-
1114
  #~ msgid "Urls pack"
1115
  #~ msgstr "URL-адреса"
1116
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: clearfy\n"
4
+ "POT-Creation-Date: 2017-09-19 12:50+0300\n"
5
+ "PO-Revision-Date: 2017-09-19 12:50+0300\n"
6
  "Last-Translator: alex.kovalevv@gmail.com <alex.kovalevv@gmail.com>\n"
7
  "Language-Team: Alex Kovalev <alex.kovalevv@gmail.com>\n"
8
  "Language: ru_RU\n"
18
  "X-Poedit-SearchPath-0: .\n"
19
  "X-Poedit-SearchPathExcluded-0: libs\n"
20
 
21
+ #: admin/ajax/configurate.php:14 admin/ajax/import-settings.php:16
22
  msgid "You don't have enough capability to edit this information."
23
  msgstr "У вас недостаточно возможностей для редактирования этой информации."
24
 
25
+ #: admin/ajax/configurate.php:27 admin/ajax/configurate.php:39
26
  msgid "Undefinded mode."
27
  msgstr "Неопределенный режим."
28
 
29
+ #: admin/ajax/import-settings.php:23
30
+ msgid "Settings are not defined or do not exist."
31
+ msgstr "Настройки не определены или не существуют."
32
+
33
+ #: admin/boot.php:51
34
  msgid "Settings"
35
  msgstr "Настройки"
36
 
37
+ #: admin/includes/classes/class.pages.php:36
38
  msgid "Quick start"
39
  msgstr "Быстрый старт"
40
 
41
+ #: admin/includes/classes/class.pages.php:41 admin/pages/code-clean.php:27
42
+ msgid "Code cleaning"
43
  msgstr "Очистка кода"
44
 
45
+ #: admin/includes/classes/class.pages.php:46
46
+ msgid "All site Updates"
47
+ msgstr "Все обновления сайта"
48
+
49
+ #: admin/includes/classes/class.pages.php:51 admin/pages/privacy.php:25
50
  msgid "Privacy Settings"
51
  msgstr "Настройки приватности"
52
 
53
+ #: admin/includes/classes/class.pages.php:56 admin/pages/seo.php:25
54
  msgid "SEO"
55
  msgstr "SEO"
56
 
57
+ #: admin/includes/classes/class.pages.php:61 admin/pages/double-pages.php:25
58
  msgid "Duplicate pages"
59
  msgstr "Дубли страниц"
60
 
61
+ #: admin/includes/classes/class.pages.php:66 admin/pages/defence.php:25
62
  msgid "Defence"
63
  msgstr "Защита"
64
 
65
+ #: admin/includes/classes/class.pages.php:71 admin/pages/widgets.php:25
66
+ msgid "Widgets"
67
+ msgstr "Виджеты"
68
+
69
+ #: admin/includes/classes/class.pages.php:76 admin/pages/additionally.php:25
70
  msgid "Advanced"
71
  msgstr "Дополнительно"
72
 
73
+ #: admin/includes/classes/class.pages.php:165
74
+ msgid "Clearfy"
75
+ msgstr "Clearfy"
76
 
77
+ #: admin/includes/classes/class.pages.php:176
78
+ msgid "Save settings"
79
+ msgstr "Сохранить настройки"
 
 
 
 
 
80
 
81
+ #: admin/includes/classes/class.pages.php:193
82
  msgid ""
83
  "A neutral setting that can not harm your site, but you must be sure that you "
84
  "need to use it."
86
  "Нейтральная настройка, которая не может нанести вред вашему сайту, но вы "
87
  "должны быть уверены, что вам нужно ее использовать."
88
 
89
+ #: admin/includes/classes/class.pages.php:197
90
  msgid ""
91
  "When set this option, you must be careful. Plugins and themes may depend on "
92
  "this function. You must be sure that you can disable this feature for the "
96
  "темы могут зависеть от этой функции. Вы должны быть уверены, что эту функцию "
97
  "можно отключить для сайта."
98
 
99
+ #: admin/includes/classes/class.pages.php:201
100
  msgid "Absolutely safe setting, We recommend to use."
101
  msgstr "Абсолютно безопасная настройка, рекомендуем использовать."
102
 
103
+ #: admin/includes/classes/class.pages.php:206
104
  msgid "Hover to the icon to get help for the feature you selected."
105
  msgstr ""
106
  "Наведите указатель мыши на значок, чтобы получить справку по выбранной "
107
  "функции."
108
 
109
+ #: admin/includes/classes/class.pages.php:212
110
  msgid "Do you want the plugin to improved and update?"
111
  msgstr "Вы хотите, чтобы плагин улучшался и обновлялся?"
112
 
113
+ #: admin/includes/classes/class.pages.php:215
114
  msgid ""
115
  "Help the author, leave a review on wordpress.org. Thanks to feedback, I will "
116
  "know that the plugin is really useful to you and is needed."
118
  "Помогите автору, оставьте отзыв на wordpress.org. Благодаря отзывам, я буду "
119
  "знать, что плагин действительно полезен для вас и необходим."
120
 
121
+ #: admin/includes/classes/class.pages.php:217
122
  msgid "And also write your ideas on how to extend or improve the plugin."
123
  msgstr "А также напишите свои идеи о том, как расширить или улучшить плагин."
124
 
125
+ #: admin/includes/classes/class.pages.php:222
126
  msgid "Go rate us and push ideas"
127
  msgstr "Оставить отзыв или поделиться идеей"
128
 
129
+ #: admin/includes/classes/class.pages.php:230
130
+ msgid "Donation for plug-in development"
131
+ msgstr "Пожертвования на развитие плагина"
132
 
133
+ #: admin/includes/classes/class.pages.php:273
134
+ msgid "You do not have permission to edit page."
135
+ msgstr "У вас недостаточно прав, для редактирования этой страницы."
136
+
137
+ #: admin/includes/classes/class.pages.php:339
138
+ msgid "The settings have been updated successfully!"
139
+ msgstr "Настройки были успешно обновлены!"
140
+
141
+ #: admin/includes/options.php:12 admin/pages/code-clean.php:74
142
+ msgid "Remove REST API Links"
143
+ msgstr "Отключить Rest API"
144
+
145
+ #: admin/includes/options.php:17 admin/pages/code-clean.php:84
146
+ msgid "Disable Emojis"
147
+ msgstr "Отключить Emojis (эмоции)"
148
+
149
+ #: admin/includes/options.php:22 admin/pages/code-clean.php:114
150
+ msgid "Remove dns-prefetch"
151
+ msgstr "Удалить dns-prefetch"
152
+
153
+ #: admin/includes/options.php:27 admin/pages/code-clean.php:123
154
+ msgid "Remove RSD Link"
155
+ msgstr "Удаляет RSD ссылку"
156
+
157
+ #: admin/includes/options.php:32 admin/pages/code-clean.php:133
158
+ msgid "Remove wlwmanifest Link"
159
+ msgstr "Удалить wlwmanifest Link"
160
+
161
+ #: admin/includes/options.php:37 admin/pages/code-clean.php:143
162
+ msgid "Remove Shortlink"
163
+ msgstr "Удалить короткие ссылки"
164
+
165
+ #: admin/includes/options.php:42 admin/pages/code-clean.php:153
166
+ msgid "Remove links to previous, next post"
167
+ msgstr "Удалить ссылки следующая, предыдущая запись"
168
+
169
+ #: admin/includes/options.php:47 admin/pages/code-clean.php:163
170
+ msgid "Remove .recentcomments styles"
171
+ msgstr "Удалить стили .recentcomments"
172
+
173
+ #: admin/includes/options.php:52 admin/pages/seo.php:62
174
+ msgid "Automatically set the alt attribute"
175
+ msgstr "Автоматически устанавливать атрибут alt"
176
+
177
+ #: admin/includes/options.php:57 admin/pages/seo.php:72
178
+ msgid "Replace external links in comments on the JavaScript code"
179
+ msgstr "Заменить внешние ссылки в комментариях на JavaScript код"
180
+
181
+ #: admin/includes/options.php:62 admin/pages/seo.php:82
182
+ msgid "Replace external links from comment authors on the JavaScript code"
183
+ msgstr "Заменить внешние ссылки от авторов комментариев на код JavaScript"
184
+
185
+ #: admin/includes/options.php:67 admin/pages/seo.php:137
186
+ msgid "Automatically insert the Last Modified header"
187
+ msgstr "Автоматически вставлять заголовок Last Modified"
188
+
189
+ #: admin/includes/options.php:72 admin/pages/seo.php:160
190
+ msgid "Return an If-Modified-Since responce"
191
+ msgstr "Возвращать заголовок If-Modified-Since"
192
+
193
+ #: admin/includes/options.php:77 admin/pages/seo.php:183
194
+ msgid "Remove duplicate names in breadcrumbs WP SEO by Yoast"
195
+ msgstr "Удалить дубли имен в хлебных крошках WP SEO Yoast"
196
+
197
+ #: admin/includes/options.php:82 admin/pages/seo.php:193
198
+ #, php-format
199
+ msgid "Remove the tag %s from XML site map"
200
+ msgstr "Удаляет тег %s из XML карты сайта плагин Yoast SEO."
201
+
202
+ #: admin/includes/options.php:87 admin/pages/seo.php:203
203
+ #, php-format
204
+ msgid "Remove comment from %s section"
205
+ msgstr "Удалить комментарии из секции %s"
206
+
207
+ #: admin/includes/options.php:92 admin/pages/double-pages.php:62
208
+ msgid "Remove archives date"
209
+ msgstr "Удалить архивы дат"
210
+
211
+ #: admin/includes/options.php:97 admin/pages/double-pages.php:72
212
+ msgid "Remove author archives "
213
+ msgstr "Удалить архивы автора"
214
+
215
+ #: admin/includes/options.php:102 admin/pages/double-pages.php:82
216
+ msgid "Remove archives tag"
217
+ msgstr "Удалить метки архивов"
218
+
219
+ #: admin/includes/options.php:107 admin/pages/double-pages.php:92
220
+ msgid "Remove attachment pages"
221
+ msgstr "Удалить страницы вложений"
222
+
223
+ #: admin/includes/options.php:112 admin/pages/double-pages.php:102
224
+ msgid "Remove post pagination"
225
+ msgstr "Удалить постраничную навигацию записей"
226
+
227
+ #: admin/includes/options.php:117 admin/pages/double-pages.php:112
228
+ msgid "Remove ?replytocom"
229
+ msgstr "Удалить ?replytocom"
230
+
231
+ #: admin/includes/options.php:122 admin/pages/privacy.php:62
232
+ msgid "Remove meta generator"
233
+ msgstr "Удалить meta generator"
234
+
235
+ #: admin/includes/options.php:127 admin/pages/defence.php:62
236
+ msgid "Hide author login"
237
+ msgstr "Убрать возможность узнать логин автора"
238
+
239
+ #: admin/includes/options.php:132 admin/pages/defence.php:72
240
+ msgid "Hide errors when logging into the site"
241
+ msgstr "Спрятать ошибки при входе на сайт"
242
+
243
+ #: admin/includes/options.php:137
244
+ msgid "Disable X-Pingback"
245
+ msgstr "Убрать ссылку на X-Pingback и возможность спамить pingback-ами"
246
+
247
+ #: admin/includes/options.php:142 admin/includes/options.php:292
248
+ #: admin/pages/privacy.php:72
249
+ msgid "Remove Version from Stylesheet"
250
+ msgstr "Удалить версию у файлов стилей"
251
+
252
+ #: admin/includes/options.php:147 admin/includes/options.php:297
253
+ #: admin/pages/privacy.php:83
254
+ msgid "Remove Version from Script"
255
+ msgstr "Удаляет версию у javascript файлов"
256
+
257
+ #: admin/includes/options.php:152 admin/pages/widgets.php:57
258
+ msgid "Remove the \"Pages\" widget"
259
+ msgstr "Удалите виджет «Страницы»"
260
+
261
+ #: admin/includes/options.php:157 admin/pages/widgets.php:66
262
+ msgid "Remove calendar widget"
263
+ msgstr "Удалить виджет календаря"
264
+
265
+ #: admin/includes/options.php:162 admin/pages/widgets.php:75
266
+ msgid "Remove the \"Cloud of tags\" widget"
267
+ msgstr "Удалите виджет «Облако тегов»"
268
+
269
+ #: admin/includes/options.php:167 admin/pages/widgets.php:84
270
+ msgid "Remove the \"Archives\" widget"
271
+ msgstr "Удалите виджет «Архивы»"
272
+
273
+ #: admin/includes/options.php:172 admin/pages/widgets.php:93
274
+ msgid "Remove the \"Links\" widget"
275
+ msgstr "Удалите виджет «Ссылки»"
276
+
277
+ #: admin/includes/options.php:177 admin/pages/widgets.php:102
278
+ msgid "Remove the \"Meta\" widget"
279
+ msgstr "Удалите виджет «Мета»"
280
 
281
+ #: admin/includes/options.php:182 admin/pages/widgets.php:111
282
+ msgid "Remove the \"Search\" widget"
283
+ msgstr "Удалите виджет «Поиск»"
284
+
285
+ #: admin/includes/options.php:187 admin/includes/options.php:207
286
+ #: admin/pages/widgets.php:120
287
+ msgid "Remove the \"Text\" widget"
288
+ msgstr "Удалите виджет «Текст»"
289
+
290
+ #: admin/includes/options.php:192 admin/pages/widgets.php:129
291
+ msgid "Remove the \"Categories\" widget"
292
+ msgstr "Удалите виджет «Категории»"
293
+
294
+ #: admin/includes/options.php:197 admin/pages/widgets.php:138
295
+ msgid "Remove the \"Recent Posts\" widget"
296
+ msgstr "Удалите виджет «Последние записи»"
297
+
298
+ #: admin/includes/options.php:202 admin/pages/widgets.php:147
299
+ msgid "Remove the \"Recent Comments\" widget"
300
+ msgstr "Удалите виджет «Последние комментарии»"
301
+
302
+ #: admin/includes/options.php:212 admin/pages/widgets.php:156
303
+ msgid "Remove the \"RSS\" widget"
304
+ msgstr "Удалить виджет «RSS»"
305
+
306
+ #: admin/includes/options.php:217 admin/pages/widgets.php:165
307
+ msgid "Remove the \"Menu\" widget"
308
+ msgstr "Удалите виджет «Меню»"
309
+
310
+ #: admin/includes/options.php:222 admin/pages/widgets.php:174
311
+ msgid "Remove the \"Twenty Eleven Ephemera\" widget"
312
+ msgstr "Удалите виджет \"Twenty Eleven Ephemera\""
313
+
314
+ #: admin/includes/options.php:227
315
+ msgid "Disable plugin updates"
316
+ msgstr "Отключить обновления плагинов"
317
+
318
+ #: admin/includes/options.php:233
319
+ msgid "Disable theme updates"
320
+ msgstr "Отключить обновления тем"
321
+
322
+ #: admin/includes/options.php:239 admin/pages/updates.php:94
323
+ msgid "Disable Automatic Translation Updates"
324
+ msgstr "Отключить автоматические обновления переводов"
325
+
326
+ #: admin/includes/options.php:244
327
+ msgid "Disable wordPress core updates"
328
+ msgstr "Отключить обновления ядра Wordpress"
329
+
330
+ #: admin/includes/options.php:250 admin/pages/updates.php:119
331
+ msgid "Enable updates for VCS Installations"
332
+ msgstr "Включить обновления для установок VCS"
333
+
334
+ #: admin/includes/options.php:253 admin/pages/additionally.php:87
335
+ msgid "Disable revision"
336
+ msgstr "Отключить ревизии"
337
+
338
+ #: admin/includes/options.php:254 admin/pages/additionally.php:100
339
+ msgid "Limit Post Revisions"
340
+ msgstr "Установить лимит ревизий"
341
+
342
+ #: admin/includes/options.php:255 admin/pages/seo.php:151
343
+ msgid "Exclude pages:"
344
+ msgstr "Исключить страницы:"
345
+
346
+ #: admin/includes/options.php:258 admin/pages/seo.php:92
347
+ msgid "Create right robots.txt"
348
+ msgstr "Создайте правильный robots.txt"
349
+
350
+ #: admin/includes/options.php:263 admin/pages/seo.php:107
351
+ msgid "You can edit the robots.txt file in the box below:"
352
+ msgstr "Вы можете отредактировать файл robots.txt в поле ниже:"
353
+
354
+ #: admin/includes/options.php:266
355
+ msgid "Quick mode"
356
+ msgstr "Быстрый старт"
357
+
358
+ #: admin/includes/options.php:269 admin/pages/code-clean.php:94
359
+ msgid "Remove jQuery Migrate"
360
+ msgstr "Удалить jQuery Migrate"
361
+
362
+ #: admin/includes/options.php:272 admin/pages/code-clean.php:104
363
+ msgid "Disable Embeds"
364
+ msgstr "Отключить Embeds"
365
+
366
+ #: admin/includes/options.php:273 admin/pages/code-clean.php:64
367
+ msgid "Disable RSS feeds"
368
+ msgstr "Отключить RSS каналы"
369
+
370
+ #: admin/includes/options.php:276 admin/pages/additionally.php:62
371
  msgid "Remove field \"site\" in comment form"
372
  msgstr "Удаляет поле \"Сайт\" в форме комментариев"
373
 
374
+ #: admin/includes/options.php:281 admin/pages/additionally.php:72
375
+ msgid "Removes links to wordpress.org site from the admin bar"
376
+ msgstr "Удаляет ссылки на wordpress.org сайт из панели администратора"
377
+
378
+ #: admin/includes/options.php:284 admin/pages/code-clean.php:173
379
+ msgid "HTML minify"
380
+ msgstr "Html сжатие"
381
+
382
+ #: admin/includes/options.php:287 admin/pages/seo.php:117
383
+ msgid "Redirect Http to Https"
384
+ msgstr "Перенаправление Http на Https"
385
+
386
+ #: admin/includes/options.php:302 admin/pages/privacy.php:94
387
+ msgid "Eclude stylesheet/script file names"
388
+ msgstr "Исключает файлы стилей/сприптов"
389
+
390
  #: admin/pages/additionally.php:64
391
  msgid ""
392
  "Tired of spam in the comments? Do visitors leave \"blank\" comments for the "
407
  "Работает со стандартной формой комментирования, если в Вашей теме форма "
408
  "прописана вручную - скорей всего не сработает!"
409
 
 
 
 
 
410
  #: admin/pages/additionally.php:74
411
  msgid ""
412
  "The first item in the toolbar goes wordpress logo and external links to "
434
  "изменения в редакторе Wordpress. В дальнейшем вы можете просмотреть все "
435
  "версии с возможностью восстановить любую из них."
436
 
 
 
 
 
 
 
 
 
437
  #: admin/pages/additionally.php:102
438
  msgid ""
439
  "WordPress automatically saves revisions when you are working on posts and "
463
  "она определяет количество ревизий. Удалите ее, чтобы вы могли изменить это "
464
  "значение через панель администратора."
465
 
466
+ #: admin/pages/code-clean.php:66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  msgid ""
468
  "By default, WordPress generates all types of different RSS feeds for your "
469
  "site. While RSS feeds can be useful if you are running a blog, businesses "
474
  "например, но если у вас обычный одностаничник, то RSS для вас будет "
475
  "бесполезен. "
476
 
477
+ #: admin/pages/code-clean.php:66
478
  #, php-format
479
  msgid ""
480
  "Removes a link to the RSS-feed from the %s section, closes and puts the "
483
  "Удаляет ссылку на RSS-канал из раздела %s, закрывает и ставит "
484
  "перенаправления от всех RSS-каналов."
485
 
486
+ #: admin/pages/code-clean.php:76
 
 
 
 
487
  msgid ""
488
  "The WordPress REST API provides API endpoints for WordPress data types that "
489
  "allow developers to interact with sites remotely by sending and receiving "
496
  "Однако многие сайты не используют это, и поэтому в большинстве случаев, это "
497
  "только ненужный код."
498
 
499
+ #: admin/pages/code-clean.php:76
500
  msgid ""
501
  "Removes REST API link tag from the front end and the REST API header link "
502
  "from page requests."
503
  msgstr "Отключает REST API и удаляет все ссылки из исходного кода страницы."
504
 
505
+ #: admin/pages/code-clean.php:84 admin/pages/code-clean.php:114
506
+ #: admin/pages/code-clean.php:123 admin/pages/code-clean.php:133
507
+ #: admin/pages/code-clean.php:143 admin/pages/code-clean.php:153
508
+ #: admin/pages/code-clean.php:163 admin/pages/defence.php:62
509
+ #: admin/pages/defence.php:72 admin/pages/defence.php:82
510
+ #: admin/pages/double-pages.php:62 admin/pages/double-pages.php:72
511
+ #: admin/pages/double-pages.php:92 admin/pages/double-pages.php:102
512
+ #: admin/pages/double-pages.php:112 admin/pages/privacy.php:62
513
+ #: admin/pages/privacy.php:72 admin/pages/privacy.php:83 admin/pages/seo.php:62
514
+ #: admin/pages/seo.php:72 admin/pages/seo.php:82 admin/pages/seo.php:137
515
+ #: admin/pages/seo.php:160 admin/pages/seo.php:183 admin/pages/seo.php:193
516
+ #: admin/pages/seo.php:203
517
+ msgid "Recommended"
518
+ msgstr "Рекомендовано"
519
 
520
+ #: admin/pages/code-clean.php:86
521
  msgid ""
522
  "Emojis are fun and all, but if you are aren’t using them they actually load "
523
  "a JavaScript file (wp-emoji-release.min.js) on every page of your website. "
530
  "требуется и просто увеличивает время загрузки страницы. Поэтому мы "
531
  "рекомендуем отключить это."
532
 
533
+ #: admin/pages/code-clean.php:86
534
  msgid "Removes WordPress Emojis JavaScript file (wp-emoji-release.min.js)."
535
  msgstr "Удаляет код Emojis из исходного кода страницы"
536
 
537
+ #: admin/pages/code-clean.php:96
 
 
 
 
538
  msgid ""
539
  "They started adding jQuery migrate in WordPress 3.6. Most up-to-date "
540
  "frontend code and plugins don’t require jquery-migrate.min.js. In most "
545
  "интерфейсов и плагинов не требуют jquery-migrate.min.js. В большинстве "
546
  "случаев это просто ненужная нагрузка на ваш сайт. "
547
 
548
+ #: admin/pages/code-clean.php:96
549
  msgid "Removes jQuery Migrate JavaScript file (jquery-migrate.min.js)."
550
  msgstr "Удаляет подключаемый файл (jquery-migrate.min.js)."
551
 
552
+ #: admin/pages/code-clean.php:96
553
  msgid "Warning! If there is a broke on your site, disable this option!"
554
  msgstr ""
555
  "Предупреждение! Если у вас появились проблемы в работе сайта или плагинов, "
556
  "отключите эту опцию!"
557
 
558
+ #: admin/pages/code-clean.php:106
 
 
 
 
559
  msgid ""
560
  "Embeds were released with WordPress 4.4. This is basically the magic that "
561
  "auto converts your YouTube videos, Tweets, and URLs into pretty previews "
572
  "функции автоматического преобразования встраиваемых объектов, то можете "
573
  "отключить эту функцию."
574
 
575
+ #: admin/pages/code-clean.php:106
576
  msgid "Removes WordPress Embed JavaScript file (wp-embed.min.js)"
577
  msgstr ""
578
  "Удаляет JavaScript код отвечающий за встраиваемые объекты (wp-embed.min.js)"
579
 
580
+ #: admin/pages/code-clean.php:116
 
 
 
 
581
  #, php-format
582
  msgid ""
583
  "Since version 4.6.1 in WordPress there are new links in the section %s this "
586
  "Начиная с версии 4.6.1 в WordPress появляются новые ссылки в секции %s "
587
  "пример:"
588
 
589
+ #: admin/pages/code-clean.php:116
590
  #, php-format
591
  msgid "Removes dns-prefetch links from the %s section"
592
  msgstr "Удаляет тег link dns-prefetch из секции %s"
593
 
594
+ #: admin/pages/code-clean.php:125
 
 
 
 
595
  msgid ""
596
  "The above link is used by blog clients. If you edit your site from your "
597
  "browser then you don’t need this. It is also used by some 3rd party "
603
  "приложениях, которые используют XML-RPC-запросы. В большинстве случаев это "
604
  "только ненужный код."
605
 
606
+ #: admin/pages/code-clean.php:125
607
  msgid "Remove RSD (Real Simple Discovery) link tag."
608
  msgstr "Удаляет RSD link тег"
609
 
610
+ #: admin/pages/code-clean.php:135
611
+ msgid ""
612
+ "This link is actually used by Windows Live Writer. If you don’t know use "
613
+ "Windows Live Writer, which we are guessing you don’t, this is just "
614
+ "unnecessary code."
615
+ msgstr ""
616
+ "Эта ссылка используется фактически Windows Live Writer. Если вы не знаете, "
617
+ "как использовать Windows Live Writer, то это только ненужный код."
618
+
619
+ #: admin/pages/code-clean.php:135
620
+ msgid "Remove wlwmanifest (Windows Live Writer) link tag."
621
+ msgstr "Удаляет тег link wlwmanifest (Windows Live Writer)."
622
+
623
+ #: admin/pages/code-clean.php:145
624
+ #, php-format
625
+ msgid ""
626
+ "By default, the following tag shows up in every WordPress install. %s This "
627
+ "is used for a shortlink to your pages and posts. However, if you are already "
628
+ "using pretty permalinks, such as domain.com/post, then there is no reason to "
629
+ "keep this, it is just unnecessary code."
630
+ msgstr ""
631
+ "По умолчанию следующий тег печатается на каждой странице ваших записей и "
632
+ "страниц. %s Это используется, как короткая ссылка на вашу статью. Если вы "
633
+ "используете постоянные ссылки, то это не нужный код."
634
+
635
+ #: admin/pages/code-clean.php:145
636
+ msgid "Remove Shortlink link tag."
637
+ msgstr "Удаляет тег link shortlink."
638
+
639
+ #: admin/pages/code-clean.php:155
640
+ msgid ""
641
+ "If you use Wordpress as a CMS, then you can delete these links, they can "
642
+ "only come in handy for a blog."
643
+ msgstr ""
644
+ "Если вы используете Wordpress как CMS (а не блог), то вы можете удалить эти "
645
+ "ссылки, но для блога они могут быть полезны."
646
+
647
+ #: admin/pages/code-clean.php:155
648
+ msgid ""
649
+ "Remove the previous and next post links within the wp_head of your wordpress "
650
+ "theme."
651
+ msgstr ""
652
+ "Удаляет ссылки предидущая и следующая запись в head вашей темы wordpress."
653
+
654
+ #: admin/pages/code-clean.php:165
655
+ msgid ""
656
+ "WP by default for the widget \"recent comments\" prescribes in the code "
657
+ "styles that are almost impossible to change, because to them apply! "
658
+ "important."
659
+ msgstr ""
660
+ "Wordpress по умолчанию для виджета \"Последние комментари\" прописывает в "
661
+ "стилях код, которые почти невозможно изменить, потому что к ним применяются "
662
+ "значение !important."
663
+
664
+ #: admin/pages/code-clean.php:165
665
+ msgid "Removes .recentcomments styles from head section."
666
+ msgstr "Удаляет .recentcomments стили из head секции."
667
+
668
+ #: admin/pages/code-clean.php:175
669
+ msgid ""
670
+ "Reduces the weight of the page by removing line breaks, tabs, spaces, etc."
671
+ msgstr ""
672
+ "Уменьшает вес страницы путем удаления разрывов строк, вкладок, пробелов и т. "
673
+ "Д."
674
+
675
+ #: admin/pages/code-clean.php:175
676
+ msgid "Minify pages."
677
+ msgstr "Минимизировать страницы."
678
+
679
+ #: admin/pages/defence.php:64
680
+ msgid ""
681
+ "An attacker can find out the author's login, using a similar request to get "
682
+ "your site. mysite.com/?author=1"
683
+ msgstr ""
684
+ "Злоумышленник может узнать логин автора, с помощью подобного get запроса "
685
+ "mysite.com/?author=1"
686
+
687
+ #: admin/pages/defence.php:64
688
+ msgid "Sets the redirect to exclude the possibility of obtaining a login."
689
+ msgstr ""
690
+ "Предотвращает возможность узнать логин автора, устанавливая перенаправление."
691
+
692
+ #: admin/pages/defence.php:74
693
+ msgid ""
694
+ "WP by default shows whether you entered a wrong login or incorrect password, "
695
+ "which allows attackers to understand if there is a certain user on the site, "
696
+ "and then start searching through the passwords."
697
+ msgstr ""
698
+ "Wordpress по умолчанию показывает, ввели ли вы неправильный логин или "
699
+ "неправильный пароль, что дает злоумышленникам понять, существует ли "
700
+ "определенный пользователь на сайте, а после начать перебор паролей."
701
+
702
+ #: admin/pages/defence.php:74
703
+ msgid ""
704
+ "Changes in the text of the error so that attackers could not find the login."
705
+ msgstr ""
706
+ "Меняет текст ошибки так, чтобы злоумышленники не смогли подобрать логин."
707
 
708
+ #: admin/pages/defence.php:82
709
+ msgid "Disable XML-RPC"
710
+ msgstr "Отключить XML-RPC"
711
+
712
+ #: admin/pages/defence.php:84
713
  msgid ""
714
+ "A pingback is basically an automated comment that gets created when another "
715
+ "blog links to you. A self-pingback is created when you link to an article "
716
+ "within your own blog. Pingbacks are essentially nothing more than spam and "
717
+ "simply waste resources."
718
  msgstr ""
719
+ "Pingback по-существу автоматизированных комментарий, который создается, "
720
+ "когда другой блог ссылается на вас. Self-pingback создается, когда вы "
721
+ "оставили ссылку на статью в своем блоге. Pingbacks по существу являются не "
722
+ "более чем спам и пустая трата ресурсов вашего сайта."
 
 
723
 
724
+ #: admin/pages/defence.php:84
725
+ msgid "Removes the server responses a reference to the xmlrpc file."
726
+ msgstr "Удаляет ссылку на xmlrpc-файл и ответ сервера."
727
 
728
+ #: admin/pages/double-pages.php:64
729
  #, php-format
730
  msgid ""
731
+ "Many duplicates in date archives. Imagine, in addition, that your article "
732
+ "will be displayed in the main and in the category, you will still receive at "
733
+ "least 3 duplicates: in archives by year, month and date, for example %s."
 
734
  msgstr ""
735
+ "Огромное количество дублей в архивах дат. Представьте, кроме того, что Ваша "
736
+ "статья будет выводиться на главной и в категории, Вы еще получите как "
737
+ "минимум 3 дубля: в архивах по году, месяцу и дате, например %s."
 
 
 
 
738
 
739
+ #: admin/pages/double-pages.php:64
740
+ msgid "Removes all pages with the date archives and puts a redirect."
741
+ msgstr "Удаляет полностью архивы дат и ставит редирект."
742
 
743
+ #: admin/pages/double-pages.php:74
744
+ #, php-format
745
  msgid ""
746
+ "If the site is only filled by you - a mandatory item. Allows you to get rid "
747
+ "of duplicates on user archives, for example %s."
748
  msgstr ""
749
+ "Если сайт заполняете только вы - это функция обязательна. Позволяет вам "
750
+ "избавиться от дубликатов страниц автора, например %s."
751
 
752
+ #: admin/pages/double-pages.php:74
753
+ msgid "Removes all pages with the author archives and puts a redirect."
754
+ msgstr "Удаляет все страницы из архивов автора и ставит перенаправление."
755
+
756
+ #: admin/pages/double-pages.php:84
757
  msgid ""
758
+ "If you use tags only for the block Similar records, or do not use them at "
759
+ "all - it will be more correct to close them to avoid duplicates."
760
  msgstr ""
761
+ "Если вы используете теги только для виджета \"Похожие записи\", либо не "
762
+ "используете их совсем - правильнее будет их закрыть, чтобы избежать дублей."
763
 
764
+ #: admin/pages/double-pages.php:84
765
+ msgid "Removes all pages with the tag archives and puts a redirect."
766
+ msgstr "Ставит редирект со страниц тегов на главную."
767
 
768
+ #: admin/pages/double-pages.php:94
769
  msgid ""
770
+ "Every of the pictures has its own page on the site. Such pages are "
771
+ "successfully indexed and create duplicates. The site can have thousands of "
772
+ "same-type attachment pages."
773
  msgstr ""
774
+ "Каждая загруженная картинка имеет свою страничку на сайте, состоящую только "
775
+ "из одной картинки. Такие страницы успешно индексируются и создают дубли. На "
776
+ "сайте могут быть тысячи однотипных страниц вложений."
 
 
 
 
777
 
778
+ #: admin/pages/double-pages.php:94
779
+ msgid "Removes attachment pages and puts a redirect."
780
+ msgstr "Удаляет страницы вложений и ставит редирект на запись."
781
 
782
+ #: admin/pages/double-pages.php:104
783
+ #, php-format
784
  msgid ""
785
+ "In WordPress, any post can be divided into parts (pages), each part will "
786
+ "have its own address. But this functionality is rarely used, but it can "
787
+ "create trouble for you. For example, you can add a number to the address of "
788
+ "any entry of your blog, %s - the post itself will open, which will be a "
789
+ "duplicate. You can substitute any number."
790
  msgstr ""
791
+ "В WordPress любое содержание можно разделить на части (страницы), каждая "
792
+ "часть будет иметь свой собственный адрес. Эта функциональность используется "
793
+ "редко, но это может создать проблемы для вас. Например вы можете добавить "
794
+ "номер в адрес любой записи вашего блога, %s - откроет текущую страницу, "
795
+ "которая будет дублироваться."
796
 
797
+ #: admin/pages/double-pages.php:104
798
+ #, php-format
799
+ msgid "Removes the pagination from the post and puts a redirect. Example: %s"
800
+ msgstr ""
801
+ "Удаление постраничную навигацию из записи и устанавливет перенаправление. "
802
+ "Пример: %s"
803
 
804
+ #: admin/pages/double-pages.php:114
805
+ #, php-format
806
+ msgid ""
807
+ "WordPress adds %s to the link \"Reply\" in the comments, if you use "
808
+ "hierarchical comments."
809
  msgstr ""
810
+ "WordPress добавляет %s к ссылке «Ответ» в комментариях, если вы используете "
811
+ "иерархические комментарии."
812
 
813
+ #: admin/pages/double-pages.php:114
814
+ msgid "?relpytocom remove and and puts a redirect."
815
+ msgstr "Удаляет ?relpytocom и ставит перенаправление."
816
 
817
  #: admin/pages/privacy.php:64
818
  msgid ""
827
  msgid "Removes the meta tag from the %s section"
828
  msgstr "Удаляет мета-тег из раздел %s"
829
 
 
 
 
 
830
  #: admin/pages/privacy.php:74 admin/pages/privacy.php:85
831
  msgid ""
832
  "To make it more difficult for others to hack your website you can remove the "
846
  "only)."
847
  msgstr "Удаляет номер версии из файлов стилей стилей (только для фронтенда)."
848
 
 
 
 
 
849
  #: admin/pages/privacy.php:86
850
  msgid ""
851
  "Removes wordpress version number from scripts (not logged in user only)."
852
  msgstr "Удаляет номер версии из javascript файлов (только для фронтенда)."
853
 
 
 
 
 
854
  #: admin/pages/privacy.php:96
855
  msgid ""
856
  "Enter Stylesheet/Script file names to exclude from version removal (each "
864
  msgid "Example"
865
  msgstr "Например"
866
 
867
+ #: admin/pages/quick-start.php:27 clearfy.php:63
868
+ msgid "Clearfy - disable unused features"
869
+ msgstr "Clearfy - отключите бесполезные функции"
870
+
871
  #: admin/pages/quick-start.php:61
872
  msgid ""
873
  "On this page you can quickly configure the plug-in without going into "
893
  msgstr "Оптимизация SEO"
894
 
895
  #: admin/pages/quick-start.php:159
896
+ msgid "Disable all updates"
897
+ msgstr "Отключить обновления"
898
+
899
+ #: admin/pages/quick-start.php:160
900
+ msgid "Remove default Widgets"
901
+ msgstr "Удалить виджеты по умолчанию"
902
+
903
+ #: admin/pages/quick-start.php:161
904
  msgid "Reset all settings"
905
  msgstr "Сбросить все настройки"
906
 
907
+ #: admin/pages/quick-start.php:167
908
+ msgid "Are you sure you want to enable the this options?"
909
+ msgstr "Вы действительно хотите включить эти настройки?"
910
 
911
+ #: admin/pages/quick-start.php:170
912
  msgid ""
913
+ "After confirmation, all the settings of the plug-in will return to the "
914
+ "default state. Make backup settings by copying data from the export field."
915
  msgstr ""
916
+ "После подтверждения, все настройки плагина вернутся к состоянию по "
917
+ "умолчанию. Сделайте резервную копию настроек, скопировав данные из поля "
918
+ "экспорта."
919
 
920
+ #: admin/pages/quick-start.php:174
921
+ msgid "Confirm"
922
+ msgstr "Подтвердить"
923
+
924
+ #: admin/pages/quick-start.php:175 admin/pages/quick-start.php:203
925
+ msgid "Cancel"
926
+ msgstr "Отмена"
927
+
928
+ #: admin/pages/quick-start.php:182
929
  msgid ""
930
  "This is the quick plug-in setup mode. Use it if you do not want to "
931
  "understand the settings or do not understand what settings you need to use."
933
  "Это режим быстрой настройки плагина. Используйте его, если вы не хотите "
934
  "разбираться в настройках или не понимаете, какие настройки вам нужны."
935
 
936
+ #: admin/pages/quick-start.php:183
937
  msgid "Select mode"
938
  msgstr "Выберите режим"
939
 
940
+ #: admin/pages/quick-start.php:185
941
  msgid ""
942
  "After selecting the mode, the plug-in automatically activates the necessary "
943
  "settings for the mode."
945
  "Выбрав режим, плагин автоматически активирует необходимые настройки, для "
946
  "выполнения этого режима."
947
 
948
+ #: admin/pages/quick-start.php:213
949
+ msgid "Settings successfully updated!"
950
+ msgstr "Настройки успешно обновлены!"
951
 
952
+ #: admin/pages/quick-start.php:216
953
+ msgid ""
954
+ "During the setup, an unknown error occurred, please try again or contact the "
955
+ "plug-in support."
956
+ msgstr ""
957
+ "Во время установки произошла неизвестная ошибка, повторите попытку или "
958
+ "обратитесь в службу поддержки плагинов."
959
 
960
+ #: admin/pages/quick-start.php:223
961
+ msgid "Import/Export settings"
962
+ msgstr "Импорт/Экспорт настроек"
963
+
964
+ #: admin/pages/quick-start.php:226
965
+ msgid "Import options"
966
+ msgstr "Импортировать настройки"
967
+
968
+ #: admin/pages/quick-start.php:232
969
+ msgid "Support"
970
+ msgstr "Поддержка"
971
+
972
+ #: admin/pages/quick-start.php:234
973
  msgid ""
974
  "If you faced with any issues, please follow the steps below to get quickly "
975
  "quality support:"
977
  "Если вы столкнулись с какими-либо проблемами, выполните следующие действия, "
978
  "чтобы быстро получить качественную поддержку:"
979
 
980
+ #: admin/pages/quick-start.php:237
981
  msgid ""
982
  "Generate a debug report which will contains inforamtion about your "
983
  "configuratin and installed plugins"
985
  "Создайте отчет об ошибках, который будет содержать информацию о вашей "
986
  "конфигурации и установленных плагинах."
987
 
988
+ #: admin/pages/quick-start.php:240
989
  msgid "Generate Debug Report"
990
  msgstr "Сгенерировать отчет об ошибках"
991
 
992
+ #: admin/pages/quick-start.php:244
993
  msgid ""
994
  "Send a message to <b>wordpress.webraftic@gmail.com</b> include the debug "
995
  "report into the message body."
997
  "Отправьте ваше сообщение на <b>wordpress.webraftic@gmail.com</b>, к "
998
  "сообщению прикрепите отчет об ошибках"
999
 
1000
+ #: admin/pages/quick-start.php:247
1001
  msgid "We guarantee to respond you within 7 business day."
1002
  msgstr "Мы гарантируем ответ на ваш вопрос в течении 7 дней."
1003
 
 
 
 
 
 
 
 
 
1004
  #: admin/pages/seo.php:64
1005
  msgid ""
1006
  "The alt attribute is mandatory, so most SEO experts say. If you missed or "
1016
  msgid "Replaces the %s, on attribute with an article name %s"
1017
  msgstr "Заменяет %s, на атрибут с названием статьи %s"
1018
 
 
 
 
 
1019
  #: admin/pages/seo.php:74
1020
  msgid ""
1021
  "Superfluous external links from comments, which can be typed from a dozen "
1031
  "Заменяет ссылки %s, на span тег и устанавливает переход с помощью JavaScript "
1032
  "%s"
1033
 
 
 
 
 
1034
  #: admin/pages/seo.php:84
1035
  msgid ""
1036
  "Up to 90 percent of comments in the blog can be left for the sake of an "
1051
  msgid "In some Wordpress topics this may not work."
1052
  msgstr "В некоторых темах Wordpress это может не сработать."
1053
 
 
 
 
 
1054
  #: admin/pages/seo.php:94
1055
  msgid ""
1056
  "After installation, WP does not contain a robots.txt file and create it "
1065
  msgid "Automatically creates the perfect robots.txt file"
1066
  msgstr "Автоматически создает идеальный robots.txt"
1067
 
1068
+ #: admin/pages/seo.php:119
 
 
 
 
 
 
 
 
1069
  msgid ""
1070
  "If your site uses an SSL certificate, check this box to enable redirection "
1071
  "from http to https."
1073
  "Если ваш сайт использует сертификат SSL, установите этот флажок, чтобы "
1074
  "включить перенаправление с http на https."
1075
 
1076
+ #: admin/pages/seo.php:119
1077
  msgid "Puts the redirect from http to https."
1078
  msgstr "Передает перенаправление с http на https."
1079
 
1080
+ #: admin/pages/seo.php:119
1081
  msgid "Warning! Before activation, make sure your site is open https."
1082
  msgstr ""
1083
  "Внимание! Перед активацией убедитесь, что ваш сайт открывается по https."
1084
 
1085
+ #: admin/pages/seo.php:125
1086
  msgid "Server headers and response"
1087
  msgstr "Заголовки серверов и ответ"
1088
 
1089
+ #: admin/pages/seo.php:125
1090
  msgid ""
1091
  "WordPress does not know how to give the Last Modified header in the server's "
1092
  "responses. You can do this using the settings below."
1094
  "WordPress не знает, как отдать заголовок Last Modified. Вы можете сделать "
1095
  "это с помощью параметров ниже."
1096
 
1097
+ #: admin/pages/seo.php:153
 
 
 
 
 
 
 
 
1098
  #, php-format
1099
  msgid ""
1100
  "You can specify a page mask, for example: %s or %s. All pages that contain "
1104
  "содержат эти строки, будут исключены. Каждое исключение должно начинаться с "
1105
  "новой строки."
1106
 
1107
+ #: admin/pages/seo.php:171
 
 
 
 
1108
  msgid "For the Yoast SEO plugin"
1109
  msgstr "Для плагина Yoast SEO"
1110
 
1111
+ #: admin/pages/seo.php:171
1112
  msgid ""
1113
  "These settings will help you eliminate some problems associated with the "
1114
  "popular Yoast SEO plugin"
1116
  "Эти параметры помогут вам устранить некоторые проблемы, связанные с "
1117
  "популярной Yoast SEO plugin"
1118
 
1119
+ #: admin/pages/seo.php:185
 
 
 
 
1120
  msgid ""
1121
  "The last element in the breadcrumbs in the Yoast SEO plugin duplicates the "
1122
  "title of the article. Some SEO-specialists consider this duplication to be "
1125
  "Последний элемент в хлебных крошках Yoast SEO дублирует название статьи. "
1126
  "Некоторые SEO-специалисты считают это дублирование излишним."
1127
 
1128
+ #: admin/pages/seo.php:185
1129
  msgid ""
1130
  "Removes duplication of the name in the breadcrumbs of the WP SEO plugin from "
1131
  "Yoast."
1132
  msgstr "Удаляет последний элемент в хлебных крошках Yoast SEO."
1133
 
1134
+ #: admin/pages/seo.php:195
 
 
 
 
 
1135
  msgid ""
1136
  "Yandex.Webmaster swears on a standard XML card from the plugin Yoast, tk. it "
1137
  "has a specific tag"
1139
  "Яндекс вебмастер ругается на стандартной карты XML из плагина Yoast SEO, из-"
1140
  "за определенного тега "
1141
 
1142
+ #: admin/pages/seo.php:195
1143
  #, php-format
1144
  msgid "Remove the tag %s from XML site map of the plugin Yoast SEO."
1145
  msgstr "Удаляет тег %s из XML карта сайта плагин Yoast SEO."
1146
 
1147
+ #: admin/pages/seo.php:195
1148
  msgid ""
1149
  "Attention! After activation, turn off the site map and enable it back to "
1150
  "regenerate it."
1152
  "Внимание! После активации, выключите карту сайта и включите ее обратно, "
1153
  "чтобы обновить ее."
1154
 
1155
+ #: admin/pages/seo.php:195
1156
  msgid "In older versions of Yoast SEO may not work - update the plugin Yoast"
1157
  msgstr ""
1158
  "В более старых версиях Yoast SEO не может работать - обновите плагин Yoast "
1159
  "SEO"
1160
 
1161
+ #: admin/pages/seo.php:205
 
 
 
 
 
1162
  #, php-format
1163
  msgid "The Yoast SEO plugin displays a comment of the form %s in %s section"
1164
  msgstr "Yoast SEO плагин отображает комментарий формы %s в секции %s"
1165
 
1166
+ #: admin/pages/seo.php:205
1167
  #, php-format
1168
  msgid "Removes the Yoast SEO plugin comment of their section %s"
1169
  msgstr "Удаляет комментрии Yoast SEO из %s"
1170
 
1171
+ #: admin/pages/updates.php:27
1172
+ msgid "Header cleaning"
1173
+ msgstr "Очистка кода"
1174
+
1175
+ #: admin/pages/updates.php:64
1176
+ msgid "Plugin Updates"
1177
+ msgstr "Обновления плагина"
1178
+
1179
+ #: admin/pages/updates.php:66 admin/pages/updates.php:81
1180
+ msgid "Monual updates"
1181
+ msgstr "Ручные"
1182
+
1183
+ #: admin/pages/updates.php:67 admin/pages/updates.php:82
1184
+ msgid "Enable auto updates"
1185
+ msgstr "Автоматические"
1186
+
1187
+ #: admin/pages/updates.php:68 admin/pages/updates.php:83
1188
+ #: admin/pages/updates.php:104
1189
+ msgid "Disable updates"
1190
+ msgstr "Отключить все"
1191
+
1192
+ #: admin/pages/updates.php:71
1193
+ msgid ""
1194
+ "You can disable all plugin updates or choose manual or automatic update mode."
1195
+ msgstr ""
1196
+ "Вы можете отключить все обновления плагинов или выбрать режим ручного или "
1197
+ "автоматического обновления."
1198
+
1199
+ #: admin/pages/updates.php:79
1200
+ msgid "Theme Updates"
1201
+ msgstr "Обновления тем"
1202
+
1203
+ #: admin/pages/updates.php:86
1204
+ msgid ""
1205
+ "You can disable all themes updates or choose manual or automatic update mode."
1206
+ msgstr ""
1207
+ "Вы можете отключить все обновления тем или выбрать режим ручного или "
1208
+ "автоматического обновления."
1209
+
1210
+ #: admin/pages/updates.php:102
1211
+ msgid "WordPress Core Updates"
1212
+ msgstr "Базовые обновления Wordpress"
1213
+
1214
+ #: admin/pages/updates.php:105
1215
+ msgid "Disable auto updates"
1216
+ msgstr "Отключить автоматические обновления"
1217
+
1218
+ #: admin/pages/updates.php:106
1219
+ msgid "Allow minor auto updates"
1220
+ msgstr "Разрешить незначительные автоматические обновления"
1221
+
1222
+ #: admin/pages/updates.php:107
1223
+ msgid "Allow major auto updates"
1224
+ msgstr "Разрешить основные автоматические обновления"
1225
+
1226
+ #: admin/pages/updates.php:108
1227
+ msgid "Allow development auto updates"
1228
+ msgstr "Разрешить разрабатываемые автоматические обновления"
1229
+
1230
+ #: admin/pages/updates.php:111
1231
+ msgid ""
1232
+ "You can disable all core WordPress updates, or disable only automatic "
1233
+ "updates. Also you can select the update mode. By default (minor)"
1234
+ msgstr ""
1235
+ "Вы можете отключить все основные обновления WordPress или отключить только "
1236
+ "автоматические обновления. Также вы можете выбрать режим обновления. По "
1237
+ "умолчанию (младший)"
1238
+
1239
+ #: admin/pages/updates.php:111
1240
+ msgid "Major - automatically update to major releases (e.g., 4.1, 4.2, 4.3)."
1241
+ msgstr ""
1242
+ "Основные - автоматически обновления основных версий (4.1, 4.2, 4.3 и т.д)."
1243
+
1244
+ #: admin/pages/updates.php:111
1245
+ msgid ""
1246
+ "Minor - automatically update to minor releases (e.g., 4.1.1, 4.1.2, 4.1.3).."
1247
+ msgstr ""
1248
+ "Незначительные - автоматически обновления промежуточных версий (4.1.1, "
1249
+ "4.1.2, 4.1.3 и т.д)."
1250
+
1251
+ #: admin/pages/updates.php:111
1252
+ msgid "Development - update automatically to Bleeding Edge releases."
1253
+ msgstr "Разрабатываемые - автоматические обновления до финальных выпусков."
1254
+
1255
+ #: admin/pages/updates.php:121
1256
+ msgid ""
1257
+ "Enable Automatic Updates even if a VCS folder (.git, .hg, .svn) was found in "
1258
+ "the WordPress directory"
1259
+ msgstr ""
1260
+ "Включить автоматическое обновление, даже если папка VCS (.git, .hg, .svn) "
1261
+ "была найдена в каталоге WordPress"
1262
+
1263
+ #: includes/classes/class.configurate-security.php:39
1264
  msgid "<strong>ERROR</strong>: Wrong login or password"
1265
  msgstr "<strong>Ошибка</strong>: Неправильный логин или пароль"
1266
 
1267
+ #: includes/classes/class.zip-archive.php:10
1268
  msgid "The ZipArchive class does not exist in this version of php."
1269
  msgstr "Класса ZipArchive не существует в этой версии php."
1270
 
1271
+ #~ msgid "Save changes"
1272
+ #~ msgstr "Сохранить настройки"
1273
+
1274
+ #~ msgid ""
1275
+ #~ "This page contains additional settings, usually not listed in the "
1276
+ #~ "recommended list."
1277
+ #~ msgstr ""
1278
+ #~ "Эта страница содержит дополнительные параметры, обычно, не перечисленные "
1279
+ #~ "в списке рекомендованных."
1280
+
1281
+ #~ msgid ""
1282
+ #~ "This page contains the security configuration settings for your site."
1283
+ #~ msgstr ""
1284
+ #~ "Эта страница содержит параметры конфигурации безопасности для вашего "
1285
+ #~ "сайта."
1286
+
1287
+ #~ msgid "This page contains settings for setting up duplicate pages."
1288
+ #~ msgstr "Эта страница содержит параметры для настройки дублирования страниц."
1289
+
1290
+ #~ msgid "On this settings page, you can optimize the source code of the page."
1291
+ #~ msgstr ""
1292
+ #~ "На этой странице настроек вы можете оптимизировать исходный код страницы."
1293
+
1294
+ #~ msgid "On this page you can configure the privacy settings of your site."
1295
+ #~ msgstr ""
1296
+ #~ "На этой странице вы можете установить настройки приватности для скриптов "
1297
+ #~ "на вашем сайте."
1298
+
1299
+ #~ msgid "Ok"
1300
+ #~ msgstr "Принять"
1301
+
1302
+ #~ msgid "This page contains important settings for SEO optimization."
1303
+ #~ msgstr "Эта страница содержит важные настройки SEO оптимизации."
1304
+
1305
  #~ msgid "Header section"
1306
  #~ msgstr "Раздел head"
1307
 
1341
  #~ "Работает со стандартной формой комментирования, если в Вашей теме форма "
1342
  #~ "прописана вручную - скорей всего не сработает!"
1343
 
 
 
 
1344
  #~ msgid "Urls pack"
1345
  #~ msgstr "URL-адреса"
1346
 
readme.txt CHANGED
@@ -1,21 +1,23 @@
1
  === Clearfy - disable unused features ===
2
- Tags: Disable Emoji, Disable Embeds, Remove Querystrings, Disable rest api, remove rss feeds, remove meta generator, Yoast SEO remove comments, Yoast SEO, Yoast SEO breadcrumbs, disable embeds,remove embeds, remove rsd link, dns-prefetch, remove dns-prefetch, meta generator, rsd, rsd link, wlw manifest link, remove wlw manifest link, next link, prev link, remove next link, remove prev link, canonical link, remove canonical link, shortlink link, remove shortlink link, emoji, attachment pages, remove attachment pages, rss feeds, disable rss feeds, rest api, disable rest api, remove rest api, clearfy, archives date, post pagination, archives author, hide login errors, recent comments, tag, rpc, xml, xml rpc, xmlrpc, admin bar, remove querystrings, reduce HTTP requests, disable heartbeat, disable revision, heartbeat, revision, clean, optimize, remove rest-api, remove rest-api, remove jquery migrate, html minify, robots.txt editor
3
  Contributors: webcraftic
 
4
  Requires at least: 4.2
5
  Tested up to: 4.8
6
  Stable tag: trunk
7
  License: GPLv2
8
 
9
- Disable the rest api, emojis, rss, xml-rpc, revision. Remove Yoast SEO Comments, reduce HTTP requests, heartbeat and revision control.
10
 
11
  == Description ==
12
 
13
- We developed the "Clearfy - disable unused features" plugin with simplicity in mind. We use all of these optimizations on our own sites and are excited to provide an easy way for you to now have them too! No messing around with code or your functions.php file. Performance optimizations shouldn’t have to be complicated and so everything can be enabled/disabled with a single click. This plugin will remove query strings from static resources like CSS & JS files inside the HTML <head> element to improve your speed scores in services like Pingdom, GTmetrix, PageSpeed and YSlow.
14
 
15
- +28 points to improve your site, SEO optimization, reduce HTTP requests, delete duplicate pages, cleanup code from garbage, correct redirects, advanced protection and more ...
16
 
17
- Current features include:
18
 
 
19
  * <strong>Remove jQuery Migrate</strong>
20
  * <strong>Remove Querystrings</strong>
21
  * <strong>Disable Embeds</strong>
@@ -42,67 +44,28 @@ Current features include:
42
  * <strong>Remove meta generator</strong>
43
  * <strong>Hide author login</strong>
44
  * <strong>Hide errors when logging into the site</strong>
45
- * <strong>Disable X-Pingback</strong>
46
  * <strong>Disable RSS feeds</strong>
47
  * <strong>Remove field "site" in comment form</strong>
48
  * <strong>Removes links to wordpress.org site from the admin bar</strong>
49
  * <strong>Disable revision and limit Post Revisions</strong>
 
 
 
 
 
 
50
 
51
- == Russian translate ==
52
 
53
- Мы разработали плагин «Clearfy - скрыть бесполезные функции» очень простым и легким, но в тоже время очень полезным для вашего сайта.
54
 
55
- Все оптимизации, которые предоставляет наш плагин, применены на наших собственных сайтах и мы готовы с вами поделиться нашими наработками!
56
- Вам не нужно лезть в код или файл functions.php. Оптимизация производительности не должна быть сложной, поэтому в нашем плагине, все можно включить и отключить одним щелчком мыши.
57
 
58
- Этот плагин удалит ненужные запросы статических ресурсов, таких как CSS и JS-файлы внутри элемента HTML <head>, чтобы улучшить показатели скорости в таких сервисах, как Pingdom, GTmetrix, PageSpeed и YSlow.
59
- Функции плагина не ограничиваются удалением статистических ресурсов, он способен решать проблемы безопасности и seo оптимизации, очищать код и многое другое.
60
 
61
- Вы получите +30 полезных функций для улучшения вашего сайта, SEO оптимизации, сокращения HTTP-запросов, удаления дублей страниц, очистки кода от мусора, правильной переадресации, и т.д.
62
-
63
- Возможности, которые предоставляет плагин:
64
-
65
- * <strong>Remove jQuery Migrate</strong>
66
- * <strong>Удаляет Querystrings (строки запроса)</strong>
67
- * <strong>Отключает Embeds</strong>
68
- * <strong>Отключает Rest API</strong>
69
- * <strong>Отключает Emojis (эмоции)</strong>
70
- * <strong>Удаляет jQuery Migrate</strong>
71
- * <strong>Отключает Embeds</strong>
72
- * <strong>Удаляет dns-prefetch</strong>
73
- * <strong>Удаляет RSD ссылку</strong>
74
- * <strong>Удаляет wlwmanifest Link</strong>
75
- * <strong>Удаляет короткие ссылки</strong>
76
- * <strong>Удаляет ссылки следующая, предыдущая запись</strong>
77
- * <strong>Удаляет стили .recentcomments</strong>
78
- * <strong>Автоматически устанавливать атрибут alt</strong>
79
- * <strong>Заменяет внешние ссылки в комментариях на JavaScript код</strong>
80
- * <strong>Заменяет внешние ссылки от авторов комментариев на код JavaScript</strong>
81
- * <strong>Автоматически вставляет заголовок Last Modified и возвращать заголовок If-Modified-Since</strong>
82
- * <strong>Удаляет дубли имен в хлебных крошках WP SEO Yoast</strong>
83
- * <strong>Удаляет тег &lt;image:image&gt; из XML карты сайта плагин Yoast SEO.</strong>
84
- * <strong>Удаляет Yoast SEO комментарии из секции &lt;head&gt;</strong>
85
- * <strong>Удаляет архивы дат</strong>
86
- * <strong>Удаляет архивы автора</strong>
87
- * <strong>Удаляет метки архивов</strong>
88
- * <strong>Удаляет страницы вложений</strong>
89
- * <strong>Удаляет постраничную навигацию записей</strong>
90
- * <strong>Удаляет ?replytocom</strong>
91
- * <strong>Удаляет meta generator</strong>
92
- * <strong>Убирает возможность узнать логин автора</strong>
93
- * <strong>Спрятать ошибки при входе на сайт</strong>
94
- * <strong>Убирает ссылку на X-Pingback и возможность спамить pingback-ами</strong>
95
- * <strong>Отключить RSS каналы</strong>
96
- * <strong>Удаляет поле "Сайт" в форме комментариев</strong>
97
- * <strong>Удаляет ссылки на wordpress.org сайт из панели администратора</strong>
98
- * <strong>Отключить ревизии и установить лимит</strong>
99
-
100
- Все эти функции абсолютно бесплатны, качайте бесплатный «Clearfy - скрыть бесполезные функции» и наслаждайтесь результами оптимизации вашего сайта.
101
-
102
- <strong>Если вы думаете, что напрямую использовать код для решения этих задач лучше, то это не совсем так. Вы только уменьшите объем php кода, но на производительности это никак не отразится.
103
- А вот недостатки прямого включения кода в том, что это сложно обычному пользователю, большой риск критических ошибок и этот код попросту не обновляется.</strong>
104
-
105
- Поэтому не занимайтесь ерундой. Желаем вам успехов!
106
 
107
  == Translations ==
108
 
@@ -127,6 +90,17 @@ This section describes how to install the plugin and get it working.
127
  4. Features
128
 
129
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
130
  = 1.1.1 =
131
  * Fixed caching of styles and scripts
132
 
@@ -152,5 +126,5 @@ This section describes how to install the plugin and get it working.
152
  * Added uninstall.php
153
 
154
  = 1.0.2 =
155
- * Updated readmy.txt file
156
  * Translated the plugin into Russian
1
  === Clearfy - disable unused features ===
2
+ Tags: disable emoji, disable embeds, remove querystrings, disable rest api, remove rss feeds, remove meta generator, yoast seo remove comments, yoast seo, yoast seo breadcrumbs, disable embeds,remove embeds, remove rsd link, dns-prefetch, remove dns-prefetch, meta generator, rsd, rsd link, wlw manifest link, remove wlw manifest link, next link, prev link, remove next link, remove prev link, canonical link, remove canonical link, shortlink link, remove shortlink link, emoji, attachment pages, remove attachment pages, rss feeds, disable rss feeds, rest api, disable rest api, remove rest api, clearfy, archives date, post pagination, archives author, hide login errors, recent comments, tag, rpc, xml, xml rpc, xmlrpc, admin bar, remove querystrings, reduce HTTP requests, disable heartbeat, disable revision, heartbeat, revision, clean, optimize, remove rest-api, remove rest-api, remove jquery migrate, html minify, robots.txt editor, plugin updates, disable plugin updates, disable core updates, core updates, enable automatic updates, disable widgets, disable default widgets, bicycles by falbar
3
  Contributors: webcraftic
4
+ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VDX7JNTQPNPFW
5
  Requires at least: 4.2
6
  Tested up to: 4.8
7
  Stable tag: trunk
8
  License: GPLv2
9
 
10
+ Disables unused Wordpress features, improves performance and increases SEO rankings, using Clearfy, which makes WordPress very easy.
11
 
12
  == Description ==
13
 
14
+ Our company has been developing plugins and themes for Wordpress for many years and every time we develop a website for our clients, we face a number of problems. Our clients` websites are highly specialized and most of the functions that Wordpress provides are not required for the operation of their sites. These functions are simply not used by our clients, but still they consume hosting resources or create SEO optimization problems, sometimes they just disturb editors in their daily work. Fortunately for you, we made a decision to release a universal plugin to enable and disable unused Wordpress options.
15
 
16
+ Previously, ordinary webmasters had to hire a developer and pay a huge amount of money to solve typical tasks for disabling functions and optimizing Wordpress. Now most of your problems have been shifted to our shoulders and we are ready to solve them. All you need to do is to download the free plugin Cleary. We personally tested all functions of the plugin on our sites and achieved good results of WordPress performance. Testing was done on such popular resources as Pingdom, GTmetrix, PageSpeed and YSlow.
17
 
18
+ We also noticed a very important feature: improvement of pages indexing and increase of the website`s traffic, due to simple seo optimization.
19
 
20
+ All features of the plugin:
21
  * <strong>Remove jQuery Migrate</strong>
22
  * <strong>Remove Querystrings</strong>
23
  * <strong>Disable Embeds</strong>
44
  * <strong>Remove meta generator</strong>
45
  * <strong>Hide author login</strong>
46
  * <strong>Hide errors when logging into the site</strong>
47
+ * <strong>Disable XML-RPC</strong>
48
  * <strong>Disable RSS feeds</strong>
49
  * <strong>Remove field "site" in comment form</strong>
50
  * <strong>Removes links to wordpress.org site from the admin bar</strong>
51
  * <strong>Disable revision and limit Post Revisions</strong>
52
+ * <strong>Disable plugin and theme updates</strong>
53
+ * <strong>Enable plugin and theme automatic updates</strong>
54
+ * <strong>Disable core updates or select the update mode</strong>
55
+ * <strong>Disable automatic translation updates</strong>
56
+ * <strong>Enable updates for VCS Installations</strong>
57
+ * <strong>Remove the default widgets (Links, Arhives, Meta, Search..)</strong>
58
 
59
+ As you can see, the plugin has a huge set of functions, and to disable any function you just need to click the mouse.
60
 
61
+ Forget about opening functions.php and entering code yourself! It is not only inconvenient but also can lead to critical errors and break your site. This code is not updated and as a result becomes obsolete. Use Clearfy to solve the needed tasks, because the plugin does not load your site and is constantly updated by professionals in the Wordpress field.
62
 
63
+ Of course, there are many similar solutions to our plugin, but in order to replace the Clearfy plugin, you will need to install more than 30 plugins, where each plugin plays its small role.
64
+ This amazing plugin will be an excellent helper in SEO optimization, performance optimization and security.
65
 
66
+ Important to know! This plugin does not replace the functions of other plugins in the area of SEO optimization or performance optimization, security, etc. Our plugin complements these functions, so feel free to download free Clearfy and disable unused Wordpress functions.
 
67
 
68
+ Everyone must have this plugin. Tell your friends and colleagues about it, so you will help them to solve a lot of problems connected with Wordpress.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  == Translations ==
71
 
90
  4. Features
91
 
92
  == Changelog ==
93
+ = 1.1.2 =
94
+ * Redesigned plugin interface design
95
+ * Updated quick setup assistant, now it provides you with information about disabled functions.
96
+ * Added plugin import and export settings
97
+ * Added new features "Remove default widgets settings and quick mode"
98
+ * Added new features "Disable and enable automatic updates of plugin or themes"
99
+ * Added new features "Disable and enable auto core updates"
100
+ * Added new features "Disable all updates qick mode"
101
+ * Added donate button
102
+ * Update readme.txt
103
+
104
  = 1.1.1 =
105
  * Fixed caching of styles and scripts
106
 
126
  * Added uninstall.php
127
 
128
  = 1.0.2 =
129
+ * Updated readme.txt file
130
  * Translated the plugin into Russian