Custom Post Types and Custom Fields creator – WCK - Version 2.2.5

Version Description

  • Compatibility with php 7.2
Download this release

Release Info

Developer madalin.ungureanu
Plugin Icon 128x128 Custom Post Types and Custom Fields creator – WCK
Version 2.2.5
Comparing to
See all releases

Code changes from version 2.2.4 to 2.2.5

css/wck-cfc.css CHANGED
@@ -1,149 +1,149 @@
1
- #wck_cfc_fields .row-options,
2
- #wck_cfc_fields .row-labels,
3
- #wck_cfc_fields .row-phone-format,
4
- #wck_cfc_fields .row-min-number-value,
5
- #wck_cfc_fields .row-max-number-value,
6
- #wck_cfc_fields .row-number-step-value,
7
- #wck_cfc_fields .row-attach-upload-to-post,
8
- #wck_cfc_fields .row-cpt,
9
- #wck_cfc_fields .row-number-of-rows,
10
- #wck_cfc_fields .row-readonly,
11
- #wck_cfc_fields .row-html-content,
12
- #wck_cfc_fields .row-default-text,
13
- #wck_cfc_fields .row-map-default-latitude,
14
- #wck_cfc_fields .row-map-default-longitude,
15
- #wck_cfc_fields .row-map-default-zoom,
16
- #wck_cfc_fields .row-map-height,
17
- #wck_cfc_fields .row-date-format{
18
- display:none;
19
- }
20
-
21
- #container_wck_cfc_fields .row-options,
22
- #container_wck_cfc_fields .row-labels,
23
- #container_wck_cfc_fields .row-attach-upload-to-post,
24
- #container_wck_cfc_fields .row-cpt,
25
- #container_wck_cfc_fields .row-number-of-rows,
26
- #container_wck_cfc_fields .row-html-content,
27
- #container_wck_cfc_fields .row-default-text,
28
- #container_wck_cfc_fields .row-phone-format,
29
- #container_wck_cfc_fields .row-min-number-value,
30
- #container_wck_cfc_fields .row-max-number-value,
31
- #container_wck_cfc_fields .row-number-step-value,
32
- #container_wck_cfc_fields .row-readonly,
33
- #container_wck_cfc_fields .row-map-default-latitude,
34
- #container_wck_cfc_fields .row-map-default-longitude,
35
- #container_wck_cfc_fields .row-map-default-zoom,
36
- #container_wck_cfc_fields .row-map-height,
37
- #container_wck_cfc_fields .row-date-format{
38
- display:none;
39
- }
40
-
41
- #container_wck_cfc_fields .element_type_html .row-default-value,
42
- #container_wck_cfc_fields .element_type_html .row-required,
43
- #container_wck_cfc_fields .element_type_html .slug-title,
44
- #container_wck_cfc_fields .element_type_phone .row-default-value,
45
- #container_wck_cfc_fields .element_type_heading .row-required,
46
- #container_wck_cfc_fields .element_type_heading .row-default-value,
47
- #container_wck_cfc_fields .element_type_textarea .row-default-value,
48
- #container_wck_cfc_fields .element_type_heading .slug-title {
49
- display: none;
50
- }
51
-
52
- #container_wck_cfc_fields .element_type_html .row-html-content,
53
- #container_wck_cfc_fields .element_type_phone .row-phone-format,
54
- #container_wck_cfc_fields .element_type_number .row-min-number-value,
55
- #container_wck_cfc_fields .element_type_number .row-max-number-value,
56
- #container_wck_cfc_fields .element_type_number .row-number-step-value,
57
- #container_wck_cfc_fields .element_type_cpt-select .row-cpt,
58
- #container_wck_cfc_fields .element_type_checkbox .row-options,
59
- #container_wck_cfc_fields .element_type_checkbox .row-labels,
60
- #container_wck_cfc_fields .element_type_select .row-options,
61
- #container_wck_cfc_fields .element_type_select .row-labels,
62
- #container_wck_cfc_fields .element_type_select-multiple .row-options,
63
- #container_wck_cfc_fields .element_type_select-multiple .row-labels,
64
- #container_wck_cfc_fields .element_type_radio .row-options,
65
- #container_wck_cfc_fields .element_type_radio .row-labels,
66
- #container_wck_cfc_fields .element_type_upload .row-attach-upload-to-post,
67
- #container_wck_cfc_fields .element_type_textarea .row-number-of-rows,
68
- #container_wck_cfc_fields .element_type_textarea .row-readonly,
69
- #container_wck_cfc_fields .element_type_textarea .row-default-text,
70
- #container_wck_cfc_fields .element_type_map .row-map-default-latitude,
71
- #container_wck_cfc_fields .element_type_map .row-map-default-longitude,
72
- #container_wck_cfc_fields .element_type_map .row-map-default-zoom,
73
- #container_wck_cfc_fields .element_type_map .row-map-height,
74
- #container_wck_cfc_fields .element_type_datepicker .row-date-format{
75
- display:block;
76
- }
77
-
78
- #edit-slug-box{
79
- display:none;
80
- }
81
-
82
- #minor-publishing-actions{
83
- display:none;
84
- }
85
-
86
- #visibility.misc-pub-section {
87
- display:none;
88
- }
89
-
90
- li.slug-title{
91
- margin-top:-6px;
92
- font-size:10px;
93
- }
94
-
95
- li.slug-title span{
96
- padding:0 3px;
97
- background-color:#FFFBCC;
98
- }
99
-
100
- .cfc-message{
101
- margin: 0 0 15px;
102
- background-color: #FFFFE0;
103
- border-color: #E6DB55;
104
- padding: 0 0.6em;
105
- border-radius: 3px 3px 3px 3px;
106
- border-style: solid;
107
- border-width: 1px;
108
- }
109
-
110
- .cfc-message p{
111
- margin: 0.5em 0;
112
- padding: 2px;
113
- }
114
-
115
- #icon-wck-page{
116
- background:url( ../images/wck-32x32.png ) 0 0 no-repeat;;
117
- }
118
-
119
-
120
- .button.wck-cfc-edit-slug{
121
- margin: 2px 0 0 5px;
122
- }
123
-
124
- #wck_cfc_fields #field-slug.doing-ajax{
125
- -webkit-animation-name: ajax-input; /* Chrome, Safari, Opera */
126
- -webkit-animation-duration: 0.5s; /* Chrome, Safari, Opera */
127
- -webkit-animation-iteration-count: infinite; /* Chrome, Safari, Opera */
128
- animation-name: ajax-input;
129
- animation-duration: 0.5s;
130
- animation-iteration-count: infinite;
131
- }
132
- /* Chrome, Safari, Opera */
133
- @-webkit-keyframes ajax-input {
134
- 0% {opacity: 1;}
135
- 50% {opacity: 0.7;}
136
- 100% {opacity: 1;}
137
- }
138
-
139
- /* Standard syntax */
140
- @keyframes ajax-input {
141
- 0% {opacity: 1;}
142
- 50% {opacity: 0.7;}
143
- 100% {opacity: 1;}
144
- }
145
-
146
- .wck-overwrite-slug{
147
- display:inline-block;
148
- padding-left:20px;
149
  }
1
+ #wck_cfc_fields .row-options,
2
+ #wck_cfc_fields .row-labels,
3
+ #wck_cfc_fields .row-phone-format,
4
+ #wck_cfc_fields .row-min-number-value,
5
+ #wck_cfc_fields .row-max-number-value,
6
+ #wck_cfc_fields .row-number-step-value,
7
+ #wck_cfc_fields .row-attach-upload-to-post,
8
+ #wck_cfc_fields .row-cpt,
9
+ #wck_cfc_fields .row-number-of-rows,
10
+ #wck_cfc_fields .row-readonly,
11
+ #wck_cfc_fields .row-html-content,
12
+ #wck_cfc_fields .row-default-text,
13
+ #wck_cfc_fields .row-map-default-latitude,
14
+ #wck_cfc_fields .row-map-default-longitude,
15
+ #wck_cfc_fields .row-map-default-zoom,
16
+ #wck_cfc_fields .row-map-height,
17
+ #wck_cfc_fields .row-date-format{
18
+ display:none;
19
+ }
20
+
21
+ #container_wck_cfc_fields .row-options,
22
+ #container_wck_cfc_fields .row-labels,
23
+ #container_wck_cfc_fields .row-attach-upload-to-post,
24
+ #container_wck_cfc_fields .row-cpt,
25
+ #container_wck_cfc_fields .row-number-of-rows,
26
+ #container_wck_cfc_fields .row-html-content,
27
+ #container_wck_cfc_fields .row-default-text,
28
+ #container_wck_cfc_fields .row-phone-format,
29
+ #container_wck_cfc_fields .row-min-number-value,
30
+ #container_wck_cfc_fields .row-max-number-value,
31
+ #container_wck_cfc_fields .row-number-step-value,
32
+ #container_wck_cfc_fields .row-readonly,
33
+ #container_wck_cfc_fields .row-map-default-latitude,
34
+ #container_wck_cfc_fields .row-map-default-longitude,
35
+ #container_wck_cfc_fields .row-map-default-zoom,
36
+ #container_wck_cfc_fields .row-map-height,
37
+ #container_wck_cfc_fields .row-date-format{
38
+ display:none;
39
+ }
40
+
41
+ #container_wck_cfc_fields .element_type_html .row-default-value,
42
+ #container_wck_cfc_fields .element_type_html .row-required,
43
+ #container_wck_cfc_fields .element_type_html .slug-title,
44
+ #container_wck_cfc_fields .element_type_phone .row-default-value,
45
+ #container_wck_cfc_fields .element_type_heading .row-required,
46
+ #container_wck_cfc_fields .element_type_heading .row-default-value,
47
+ #container_wck_cfc_fields .element_type_textarea .row-default-value,
48
+ #container_wck_cfc_fields .element_type_heading .slug-title {
49
+ display: none;
50
+ }
51
+
52
+ #container_wck_cfc_fields .element_type_html .row-html-content,
53
+ #container_wck_cfc_fields .element_type_phone .row-phone-format,
54
+ #container_wck_cfc_fields .element_type_number .row-min-number-value,
55
+ #container_wck_cfc_fields .element_type_number .row-max-number-value,
56
+ #container_wck_cfc_fields .element_type_number .row-number-step-value,
57
+ #container_wck_cfc_fields .element_type_cpt-select .row-cpt,
58
+ #container_wck_cfc_fields .element_type_checkbox .row-options,
59
+ #container_wck_cfc_fields .element_type_checkbox .row-labels,
60
+ #container_wck_cfc_fields .element_type_select .row-options,
61
+ #container_wck_cfc_fields .element_type_select .row-labels,
62
+ #container_wck_cfc_fields .element_type_select-multiple .row-options,
63
+ #container_wck_cfc_fields .element_type_select-multiple .row-labels,
64
+ #container_wck_cfc_fields .element_type_radio .row-options,
65
+ #container_wck_cfc_fields .element_type_radio .row-labels,
66
+ #container_wck_cfc_fields .element_type_upload .row-attach-upload-to-post,
67
+ #container_wck_cfc_fields .element_type_textarea .row-number-of-rows,
68
+ #container_wck_cfc_fields .element_type_textarea .row-readonly,
69
+ #container_wck_cfc_fields .element_type_textarea .row-default-text,
70
+ #container_wck_cfc_fields .element_type_map .row-map-default-latitude,
71
+ #container_wck_cfc_fields .element_type_map .row-map-default-longitude,
72
+ #container_wck_cfc_fields .element_type_map .row-map-default-zoom,
73
+ #container_wck_cfc_fields .element_type_map .row-map-height,
74
+ #container_wck_cfc_fields .element_type_datepicker .row-date-format{
75
+ display:block;
76
+ }
77
+
78
+ #edit-slug-box{
79
+ display:none;
80
+ }
81
+
82
+ #minor-publishing-actions{
83
+ display:none;
84
+ }
85
+
86
+ #visibility.misc-pub-section {
87
+ display:none;
88
+ }
89
+
90
+ li.slug-title{
91
+ margin-top:-6px;
92
+ font-size:10px;
93
+ }
94
+
95
+ li.slug-title span{
96
+ padding:0 3px;
97
+ background-color:#FFFBCC;
98
+ }
99
+
100
+ .cfc-message{
101
+ margin: 0 0 15px;
102
+ background-color: #FFFFE0;
103
+ border-color: #E6DB55;
104
+ padding: 0 0.6em;
105
+ border-radius: 3px 3px 3px 3px;
106
+ border-style: solid;
107
+ border-width: 1px;
108
+ }
109
+
110
+ .cfc-message p{
111
+ margin: 0.5em 0;
112
+ padding: 2px;
113
+ }
114
+
115
+ #icon-wck-page{
116
+ background:url( ../images/wck-32x32.png ) 0 0 no-repeat;;
117
+ }
118
+
119
+
120
+ .button.wck-cfc-edit-slug{
121
+ margin: 2px 0 0 5px;
122
+ }
123
+
124
+ #wck_cfc_fields #field-slug.doing-ajax{
125
+ -webkit-animation-name: ajax-input; /* Chrome, Safari, Opera */
126
+ -webkit-animation-duration: 0.5s; /* Chrome, Safari, Opera */
127
+ -webkit-animation-iteration-count: infinite; /* Chrome, Safari, Opera */
128
+ animation-name: ajax-input;
129
+ animation-duration: 0.5s;
130
+ animation-iteration-count: infinite;
131
+ }
132
+ /* Chrome, Safari, Opera */
133
+ @-webkit-keyframes ajax-input {
134
+ 0% {opacity: 1;}
135
+ 50% {opacity: 0.7;}
136
+ 100% {opacity: 1;}
137
+ }
138
+
139
+ /* Standard syntax */
140
+ @keyframes ajax-input {
141
+ 0% {opacity: 1;}
142
+ 50% {opacity: 0.7;}
143
+ 100% {opacity: 1;}
144
+ }
145
+
146
+ .wck-overwrite-slug{
147
+ display:inline-block;
148
+ padding-left:20px;
149
  }
css/wck-cptc.css CHANGED
@@ -1,12 +1,12 @@
1
- #wck_cptc .row-supports .mb-right-column > div, #container_wck_cptc .row-supports .mb-right-column > div{
2
- width:200px;
3
- }
4
-
5
- #wck_cptc .row-supports .mb-right-column > div:nth-child(2n), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n){
6
- float:left;
7
- }
8
-
9
- #wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1){
10
- float:left;
11
- clear:left;
12
  }
1
+ #wck_cptc .row-supports .mb-right-column > div, #container_wck_cptc .row-supports .mb-right-column > div{
2
+ width:200px;
3
+ }
4
+
5
+ #wck_cptc .row-supports .mb-right-column > div:nth-child(2n), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n){
6
+ float:left;
7
+ }
8
+
9
+ #wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1), #container_wck_cptc .row-supports .mb-right-column > div:nth-child(2n+1){
10
+ float:left;
11
+ clear:left;
12
  }
css/wck-free-to-pro.css CHANGED
@@ -1,207 +1,207 @@
1
- .wrap > h2{
2
- display:none;
3
- }
4
-
5
- .stp-logo{
6
- float:right;
7
- }
8
- .wck-wrap{
9
- font-size: 15px;
10
- max-width: 1050px;
11
- }
12
- .wck-info-wrap{
13
- max-width:1050px;
14
- margin:25px 40px 0 20px;
15
- }
16
-
17
- .wck-wrap h1 {
18
- color: #333333;
19
- font-size: 2.8em;
20
- font-weight: 300;
21
- line-height: 1.2em;
22
- margin:0;
23
- padding-top:35px;
24
- }
25
-
26
- .wck-wrap p{
27
- font-size:15px;
28
- }
29
- .wck-wrap .wck-callout{
30
- font-size: 2em;
31
- font-weight: 300;
32
- line-height: 1.3;
33
- margin:1.1em 0 0.2em 0;
34
- }
35
-
36
- .wck-wrap hr{
37
- display:block;
38
- clear:both;
39
- margin:20px 0;
40
- }
41
-
42
- .wck-text{
43
- font-size:1.1em;
44
- margin-top:0;
45
- }
46
- #poststuff .wck-wrap h1,
47
- #poststuff .wck-wrap h2,
48
- #poststuff .wck-wrap h3,
49
- #poststuff .wck-wrap h4,
50
- #poststuff .wck-wrap h5 {
51
- padding: 8px 0;
52
- font-weight:300;
53
- }
54
-
55
- #poststuff .wck-wrap h2{
56
- font-size: 2.2em;
57
- font-weight:300;
58
- line-height:1.3em;
59
- }
60
-
61
- #poststuff .wck-wrap h3{
62
- font-size: 1.3em;
63
- }
64
-
65
- #poststuff .wck-wrap h4{
66
- font-size: 1.2em;
67
- }
68
-
69
- .wck-wrap img{
70
- max-width:100%;
71
- }
72
- .wck-wrap img.screenshot{
73
- padding:10px 0;
74
- }
75
-
76
-
77
- .wck-wrap ul{
78
- list-style-type:circle;
79
- list-style-position:inside;
80
- }
81
-
82
- .wck-wrap li.description{
83
- font-style: italic;
84
- }
85
-
86
- /* Extra Stuff */
87
- .nowrap {
88
- white-space: nowrap;
89
- }
90
-
91
- .wck-fields-image{
92
- margin-top:60px;
93
- }
94
-
95
- /* Columns :) */
96
- .wck-row{
97
- overflow:hidden;
98
- }
99
-
100
- .wck-3-col > div {
101
- float:left;
102
- width:28%;
103
- margin-right:5%;
104
- }
105
-
106
- .wck-2-col > div {
107
- float:left;
108
- width:45%;
109
- margin-right:5%;
110
- }
111
-
112
- .wck-3-col > div:last-child,
113
- .wck-2-col > div:last-child{
114
- margin:0;
115
- }
116
-
117
- /* Extra Form Styles */
118
- .wck-select{
119
- min-width:18em;
120
- }
121
-
122
- .wck-wrap .form-table th {
123
- width:250px;
124
- }
125
-
126
- .wck-metabox label{
127
- display:inline-block;
128
- min-width:15em;
129
- }
130
-
131
- /* Admin Bar Page */
132
- .wck-admin-bar label{
133
- margin-right:30px;
134
- padding:5px;
135
- }
136
-
137
- /* Addons Page */
138
- .wck-addons label{
139
- margin-right:30px;
140
- padding:5px;
141
- }
142
-
143
- /* Metabox Clone. We need this in various places to simulate the css of a normal metabox. */
144
- .wck-side{
145
- width:300px;
146
- float:right;
147
- clear:both;
148
- }
149
-
150
- .wck-metabox h3{
151
- font-size: 14px;
152
- line-height: 1.4;
153
- margin: 0;
154
- padding:8px 12px;
155
- cursor:default !important;
156
- }
157
-
158
- .wck-normal{
159
- margin-right:320px;
160
- }
161
-
162
- .wck-metabox textarea{
163
- resize:vertical;
164
- background-color: #ecf8fd;
165
- font-family: Consolas,Monaco,monospace;
166
- font-size: 13px;
167
- }
168
-
169
- .wck-metabox .inline-wrap{
170
- width:280px;
171
- float:left;
172
- }
173
- .wck-highlight{
174
- background:#333333;
175
- background:#222222;
176
- background:#fff;
177
- padding:20px;
178
- }
179
- .wck-userlisting-slider{
180
- display:block;
181
- padding:10px;
182
- border:1px solid #ccc;
183
- font-family: Consolas,Monaco,monospace;
184
- font-size: 13px;
185
- margin-top:20px;
186
- }
187
- #wck_manage_fields .mb-list-entry-fields .row-field .field-label{
188
- width: 177px;
189
- }
190
-
191
- #container_wck_epf_fields .row-id,
192
- #wck_epf_fields .row-id,
193
- #container_wck_rf_fields .row-id,
194
- #wck_rf_fields .row-id{
195
- display:none;
196
- }
197
-
198
- .wp-core-ui .button-free-to-pro{
199
- font-size:24px;
200
- font-weight:bold;
201
- padding:10px 20px;
202
- height:auto;
203
- margin-top:20px;
204
- }
205
- .wck-free-to-pro-call-to-action {
206
- text-align:center;
207
  }
1
+ .wrap > h2{
2
+ display:none;
3
+ }
4
+
5
+ .stp-logo{
6
+ float:right;
7
+ }
8
+ .wck-wrap{
9
+ font-size: 15px;
10
+ max-width: 1050px;
11
+ }
12
+ .wck-info-wrap{
13
+ max-width:1050px;
14
+ margin:25px 40px 0 20px;
15
+ }
16
+
17
+ .wck-wrap h1 {
18
+ color: #333333;
19
+ font-size: 2.8em;
20
+ font-weight: 300;
21
+ line-height: 1.2em;
22
+ margin:0;
23
+ padding-top:35px;
24
+ }
25
+
26
+ .wck-wrap p{
27
+ font-size:15px;
28
+ }
29
+ .wck-wrap .wck-callout{
30
+ font-size: 2em;
31
+ font-weight: 300;
32
+ line-height: 1.3;
33
+ margin:1.1em 0 0.2em 0;
34
+ }
35
+
36
+ .wck-wrap hr{
37
+ display:block;
38
+ clear:both;
39
+ margin:20px 0;
40
+ }
41
+
42
+ .wck-text{
43
+ font-size:1.1em;
44
+ margin-top:0;
45
+ }
46
+ #poststuff .wck-wrap h1,
47
+ #poststuff .wck-wrap h2,
48
+ #poststuff .wck-wrap h3,
49
+ #poststuff .wck-wrap h4,
50
+ #poststuff .wck-wrap h5 {
51
+ padding: 8px 0;
52
+ font-weight:300;
53
+ }
54
+
55
+ #poststuff .wck-wrap h2{
56
+ font-size: 2.2em;
57
+ font-weight:300;
58
+ line-height:1.3em;
59
+ }
60
+
61
+ #poststuff .wck-wrap h3{
62
+ font-size: 1.3em;
63
+ }
64
+
65
+ #poststuff .wck-wrap h4{
66
+ font-size: 1.2em;
67
+ }
68
+
69
+ .wck-wrap img{
70
+ max-width:100%;
71
+ }
72
+ .wck-wrap img.screenshot{
73
+ padding:10px 0;
74
+ }
75
+
76
+
77
+ .wck-wrap ul{
78
+ list-style-type:circle;
79
+ list-style-position:inside;
80
+ }
81
+
82
+ .wck-wrap li.description{
83
+ font-style: italic;
84
+ }
85
+
86
+ /* Extra Stuff */
87
+ .nowrap {
88
+ white-space: nowrap;
89
+ }
90
+
91
+ .wck-fields-image{
92
+ margin-top:60px;
93
+ }
94
+
95
+ /* Columns :) */
96
+ .wck-row{
97
+ overflow:hidden;
98
+ }
99
+
100
+ .wck-3-col > div {
101
+ float:left;
102
+ width:28%;
103
+ margin-right:5%;
104
+ }
105
+
106
+ .wck-2-col > div {
107
+ float:left;
108
+ width:45%;
109
+ margin-right:5%;
110
+ }
111
+
112
+ .wck-3-col > div:last-child,
113
+ .wck-2-col > div:last-child{
114
+ margin:0;
115
+ }
116
+
117
+ /* Extra Form Styles */
118
+ .wck-select{
119
+ min-width:18em;
120
+ }
121
+
122
+ .wck-wrap .form-table th {
123
+ width:250px;
124
+ }
125
+
126
+ .wck-metabox label{
127
+ display:inline-block;
128
+ min-width:15em;
129
+ }
130
+
131
+ /* Admin Bar Page */
132
+ .wck-admin-bar label{
133
+ margin-right:30px;
134
+ padding:5px;
135
+ }
136
+
137
+ /* Addons Page */
138
+ .wck-addons label{
139
+ margin-right:30px;
140
+ padding:5px;
141
+ }
142
+
143
+ /* Metabox Clone. We need this in various places to simulate the css of a normal metabox. */
144
+ .wck-side{
145
+ width:300px;
146
+ float:right;
147
+ clear:both;
148
+ }
149
+
150
+ .wck-metabox h3{
151
+ font-size: 14px;
152
+ line-height: 1.4;
153
+ margin: 0;
154
+ padding:8px 12px;
155
+ cursor:default !important;
156
+ }
157
+
158
+ .wck-normal{
159
+ margin-right:320px;
160
+ }
161
+
162
+ .wck-metabox textarea{
163
+ resize:vertical;
164
+ background-color: #ecf8fd;
165
+ font-family: Consolas,Monaco,monospace;
166
+ font-size: 13px;
167
+ }
168
+
169
+ .wck-metabox .inline-wrap{
170
+ width:280px;
171
+ float:left;
172
+ }
173
+ .wck-highlight{
174
+ background:#333333;
175
+ background:#222222;
176
+ background:#fff;
177
+ padding:20px;
178
+ }
179
+ .wck-userlisting-slider{
180
+ display:block;
181
+ padding:10px;
182
+ border:1px solid #ccc;
183
+ font-family: Consolas,Monaco,monospace;
184
+ font-size: 13px;
185
+ margin-top:20px;
186
+ }
187
+ #wck_manage_fields .mb-list-entry-fields .row-field .field-label{
188
+ width: 177px;
189
+ }
190
+
191
+ #container_wck_epf_fields .row-id,
192
+ #wck_epf_fields .row-id,
193
+ #container_wck_rf_fields .row-id,
194
+ #wck_rf_fields .row-id{
195
+ display:none;
196
+ }
197
+
198
+ .wp-core-ui .button-free-to-pro{
199
+ font-size:24px;
200
+ font-weight:bold;
201
+ padding:10px 20px;
202
+ height:auto;
203
+ margin-top:20px;
204
+ }
205
+ .wck-free-to-pro-call-to-action {
206
+ text-align:center;
207
  }
css/wck-sas.css CHANGED
@@ -1,59 +1,59 @@
1
- .wck-badge{
2
- float: right;
3
- color: #fff;
4
- display: inline-block;
5
- font-size: 14px;
6
- font-weight: 600;
7
- width: 150px;
8
- height: 150px;
9
- margin-bottom: 25px;
10
- text-align: center;
11
- text-rendering: optimizelegibility;
12
- background-size: cover !important;
13
- }
14
-
15
- .wck-badge.Pro{
16
- background:url(../images/wck-logo-pro.png) center no-repeat;
17
- }
18
-
19
- .wck-badge.Hobbyist{
20
- background:url(../images/wck-logo-hobbyist.png) center no-repeat;
21
- }
22
-
23
- .wck-badge.Free{
24
- background:url(../images/wck-logo-free.png) center no-repeat;
25
- }
26
- .wck-badge span {
27
- display: inline-block;
28
- text-transform: uppercase;
29
- color: #fff;
30
- margin-top: 110px;
31
- font-size: 90%;
32
- }
33
- .serial-notification{
34
- padding:10px 20px;
35
- border:1px solid #ccc;
36
- border-radius:3px;
37
- }
38
- .serial-notification.yellow{
39
- background:#FFFFE0;
40
- border-color:#E6DB55;
41
- }
42
- .serial-notification.red{
43
- background:#ffd6d6;
44
- border-color:#cc0000;
45
- }
46
- .serial-notification.green{
47
- background:#eeffe0;
48
- border-color:#4dcc00;
49
- }
50
-
51
- .wck_page_sas-page #poststuff .changelog h2{
52
- font-size:1.4em;
53
- padding-left:0;
54
- }
55
-
56
- .wck_page_sas-page .about-wrap .feature-section p{
57
- margin-right: 0;
58
- margin-left: 0;
59
- }
1
+ .wck-badge{
2
+ float: right;
3
+ color: #fff;
4
+ display: inline-block;
5
+ font-size: 14px;
6
+ font-weight: 600;
7
+ width: 150px;
8
+ height: 150px;
9
+ margin-bottom: 25px;
10
+ text-align: center;
11
+ text-rendering: optimizelegibility;
12
+ background-size: cover !important;
13
+ }
14
+
15
+ .wck-badge.Pro{
16
+ background:url(../images/wck-logo-pro.png) center no-repeat;
17
+ }
18
+
19
+ .wck-badge.Hobbyist{
20
+ background:url(../images/wck-logo-hobbyist.png) center no-repeat;
21
+ }
22
+
23
+ .wck-badge.Free{
24
+ background:url(../images/wck-logo-free.png) center no-repeat;
25
+ }
26
+ .wck-badge span {
27
+ display: inline-block;
28
+ text-transform: uppercase;
29
+ color: #fff;
30
+ margin-top: 110px;
31
+ font-size: 90%;
32
+ }
33
+ .serial-notification{
34
+ padding:10px 20px;
35
+ border:1px solid #ccc;
36
+ border-radius:3px;
37
+ }
38
+ .serial-notification.yellow{
39
+ background:#FFFFE0;
40
+ border-color:#E6DB55;
41
+ }
42
+ .serial-notification.red{
43
+ background:#ffd6d6;
44
+ border-color:#cc0000;
45
+ }
46
+ .serial-notification.green{
47
+ background:#eeffe0;
48
+ border-color:#4dcc00;
49
+ }
50
+
51
+ .wck_page_sas-page #poststuff .changelog h2{
52
+ font-size:1.4em;
53
+ padding-left:0;
54
+ }
55
+
56
+ .wck_page_sas-page .about-wrap .feature-section p{
57
+ margin-right: 0;
58
+ margin-left: 0;
59
+ }
inc/class_notices.php CHANGED
@@ -1,280 +1,280 @@
1
- <?php
2
- /**
3
- * Class that adds a misc notice
4
- *
5
- * @since v.2.0
6
- *
7
- * @return void
8
- */
9
- class WCK_Add_Notices{
10
- public $notificationId = '';
11
- public $notificationMessage = '';
12
- public $notificationClass = '';
13
- public $startDate = '';
14
- public $endDate = '';
15
-
16
- function __construct( $notificationId, $notificationMessage, $notificationClass = 'updated' , $startDate = '', $endDate = '' ){
17
- $this->notificationId = $notificationId;
18
- $this->notificationMessage = $notificationMessage;
19
- $this->notificationClass = $notificationClass;
20
-
21
- if( !empty( $startDate ) && time() < strtotime( $startDate ) )
22
- return;
23
-
24
- if( !empty( $endDate ) && time() > strtotime( $endDate ) )
25
- return;
26
-
27
- add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
28
- add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
29
- }
30
-
31
-
32
- // Display a notice that can be dismissed in case the serial number is inactive
33
- function add_admin_notice() {
34
- global $current_user ;
35
- global $pagenow;
36
-
37
- $user_id = $current_user->ID;
38
- do_action( $this->notificationId.'_before_notification_displayed', $current_user, $pagenow );
39
-
40
- if ( current_user_can( 'manage_options' ) ){
41
- // Check that the user hasn't already clicked to ignore the message
42
- if ( ! get_user_meta($user_id, $this->notificationId.'_dismiss_notification' ) ) {
43
- echo $finalMessage = apply_filters($this->notificationId.'_notification_message','<div class="'. $this->notificationClass .'" >'.$this->notificationMessage.'</div>', $this->notificationMessage);
44
- }
45
- do_action( $this->notificationId.'_notification_displayed', $current_user, $pagenow );
46
- }
47
- do_action( $this->notificationId.'_after_notification_displayed', $current_user, $pagenow );
48
- }
49
-
50
- function dismiss_notification() {
51
- global $current_user;
52
-
53
- $user_id = $current_user->ID;
54
-
55
- do_action( $this->notificationId.'_before_notification_dismissed', $current_user );
56
-
57
- // If user clicks to ignore the notice, add that to their user meta
58
- if ( isset( $_GET[$this->notificationId.'_dismiss_notification']) && '0' == $_GET[$this->notificationId.'_dismiss_notification'] )
59
- add_user_meta( $user_id, $this->notificationId.'_dismiss_notification', 'true', true );
60
-
61
- do_action( $this->notificationId.'_after_notification_dismissed', $current_user );
62
- }
63
- }
64
-
65
- Class WCK_Plugin_Notifications {
66
-
67
- public $notifications = array();
68
- private static $_instance = null;
69
- private $prefix = 'wck';
70
- private $menu_slug = 'wck-page';
71
- public $pluginPages = array( 'sas-page', 'cptc-page', 'ctc-page', 'wck-' );
72
-
73
- protected function __construct() {
74
- add_action( 'admin_init', array( $this, 'dismiss_admin_notifications' ), 200 );
75
- add_action( 'admin_init', array( $this, 'add_admin_menu_notification_counts' ), 1000 );
76
- }
77
-
78
-
79
- function dismiss_admin_notifications() {
80
- if( ! empty( $_GET[$this->prefix.'_dismiss_admin_notification'] ) ) {
81
- $notifications = self::get_instance();
82
- $notifications->dismiss_notification( sanitize_text_field( $_GET[$this->prefix.'_dismiss_admin_notification'] ) );
83
- }
84
-
85
- }
86
-
87
- function add_admin_menu_notification_counts() {
88
-
89
- global $menu, $submenu;
90
-
91
- $notifications = WCK_Plugin_Notifications::get_instance();
92
-
93
- if( ! empty( $menu ) ) {
94
- foreach( $menu as $menu_position => $menu_data ) {
95
- if( ! empty( $menu_data[2] ) && $menu_data[2] == $this->menu_slug ) {
96
- $menu_count = $notifications->get_count_in_menu();
97
- if( ! empty( $menu_count ) )
98
- $menu[$menu_position][0] .= '<span class="update-plugins '.$this->prefix.'-update-plugins"><span class="plugin-count">' . $menu_count . '</span></span>';
99
- }
100
- }
101
- }
102
-
103
- if( ! empty( $submenu[$this->menu_slug] ) ) {
104
- foreach( $submenu[$this->menu_slug] as $menu_position => $menu_data ) {
105
- $menu_count = $notifications->get_count_in_submenu( $menu_data[2] );
106
- if( ! empty( $menu_count ) )
107
- $submenu[$this->menu_slug][$menu_position][0] .= '<span class="update-plugins '.$this->prefix.'-update-plugins"><span class="plugin-count">' . $menu_count . '</span></span>';
108
- }
109
- }
110
- }
111
-
112
- /**
113
- *
114
- *
115
- */
116
- public static function get_instance() {
117
- if( is_null( self::$_instance ) )
118
- self::$_instance = new WCK_Plugin_Notifications();
119
-
120
- return self::$_instance;
121
- }
122
-
123
-
124
- /**
125
- *
126
- *
127
- */
128
- public function add_notification( $notification_id = '', $notification_message = '', $notification_class = 'update-nag', $count_in_menu = true, $count_in_submenu = array() ) {
129
-
130
- if( empty( $notification_id ) )
131
- return;
132
-
133
- if( empty( $notification_message ) )
134
- return;
135
-
136
- global $current_user;
137
-
138
- if( get_user_meta( $current_user->ID, $notification_id . '_dismiss_notification' ) )
139
- return;
140
-
141
- $this->notifications[$notification_id] = array(
142
- 'id' => $notification_id,
143
- 'message' => $notification_message,
144
- 'class' => $notification_class,
145
- 'count_in_menu' => $count_in_menu,
146
- 'count_in_submenu' => $count_in_submenu
147
- );
148
-
149
-
150
- if( $this->is_plugin_page() ) {
151
- new WCK_Add_Notices( $notification_id, $notification_message, $notification_class );
152
- }
153
-
154
- }
155
-
156
-
157
- /**
158
- *
159
- *
160
- */
161
- public function get_notifications() {
162
- return $this->notifications;
163
- }
164
-
165
-
166
- /**
167
- *
168
- *
169
- */
170
- public function get_notification( $notification_id = '' ) {
171
-
172
- if( empty( $notification_id ) )
173
- return null;
174
-
175
- $notifications = $this->get_notifications();
176
-
177
- if( ! empty( $notifications[$notification_id] ) )
178
- return $notifications[$notification_id];
179
- else
180
- return null;
181
-
182
- }
183
-
184
-
185
- /**
186
- *
187
- *
188
- */
189
- public function dismiss_notification( $notification_id = '' ) {
190
- global $current_user;
191
- add_user_meta( $current_user->ID, $notification_id . '_dismiss_notification', 'true', true );
192
- }
193
-
194
-
195
- /**
196
- *
197
- *
198
- */
199
- public function get_count_in_menu() {
200
- $count = 0;
201
-
202
- foreach( $this->notifications as $notification ) {
203
- if( ! empty( $notification['count_in_menu'] ) )
204
- $count++;
205
- }
206
-
207
- return $count;
208
- }
209
-
210
-
211
- /**
212
- *
213
- *
214
- */
215
- public function get_count_in_submenu( $submenu = '' ) {
216
-
217
- if( empty( $submenu ) )
218
- return 0;
219
-
220
- $count = 0;
221
-
222
- foreach( $this->notifications as $notification ) {
223
- if( empty( $notification['count_in_submenu'] ) )
224
- continue;
225
-
226
- if( ! is_array( $notification['count_in_submenu'] ) )
227
- continue;
228
-
229
- if( ! in_array( $submenu, $notification['count_in_submenu'] ) )
230
- continue;
231
-
232
- $count++;
233
- }
234
-
235
- return $count;
236
-
237
- }
238
-
239
-
240
- /**
241
- *
242
- *
243
- */
244
- protected function is_plugin_page() {
245
- if( !empty( $this->pluginPages ) ){
246
- foreach ( $this->pluginPages as $pluginPage ){
247
- if( ! empty( $_GET['page'] ) && false !== strpos( $_GET['page'], $pluginPage ) )
248
- return true;
249
-
250
- if( ! empty( $_GET['post_type'] ) && false !== strpos( $_GET['post_type'], $pluginPage ) )
251
- return true;
252
-
253
- if( ! empty( $_GET['post'] ) && false !== strpos( get_post_type( (int)$_GET['post'] ), $pluginPage ) )
254
- return true;
255
- }
256
- }
257
-
258
- return false;
259
- }
260
-
261
- }
262
-
263
-
264
- function wck_add_plugin_notifications() {
265
-
266
- /*$wck_notifications = WCK_Plugin_Notifications::get_instance();
267
-
268
- // this must be unique
269
- $notification_id = 'wck_new_add_on_invoices';
270
-
271
- $message = '<img style="float: left; margin: 10px 12px 10px 0; max-width: 80px;" src="' . WCK_PLUGIN_DIR_URL . 'images/pb-trp-cross-promotion.png" />';
272
- $message .= '<p style="margin-top: 16px;">' . __( 'This is a content.', 'wck' ) . '</p>';
273
- //make sure to use wck_dismiss_admin_notification as an argument
274
- $message .= '<p><a href="' . add_query_arg( array( 'page' => 'cptc-page', 'wck_dismiss_admin_notification' => $notification_id ), admin_url( 'admin.php' ) ) . '" class="button-primary">' . __( 'Check it out!', 'wck' ) . '</a></p>';
275
- $message .= '<a href="' . add_query_arg( array( 'wck_dismiss_admin_notification' => $notification_id ) ) . '" type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice.', 'wck' ) . '</span></a>';
276
-
277
- $wck_notifications->add_notification( $notification_id, $message, 'wck-notice wck-narrow notice notice-info', true, array( 'cptc-page' ) );*/
278
-
279
- }
280
  add_action( 'admin_init', 'wck_add_plugin_notifications' );
1
+ <?php
2
+ /**
3
+ * Class that adds a misc notice
4
+ *
5
+ * @since v.2.0
6
+ *
7
+ * @return void
8
+ */
9
+ class WCK_Add_Notices{
10
+ public $notificationId = '';
11
+ public $notificationMessage = '';
12
+ public $notificationClass = '';
13
+ public $startDate = '';
14
+ public $endDate = '';
15
+
16
+ function __construct( $notificationId, $notificationMessage, $notificationClass = 'updated' , $startDate = '', $endDate = '' ){
17
+ $this->notificationId = $notificationId;
18
+ $this->notificationMessage = $notificationMessage;
19
+ $this->notificationClass = $notificationClass;
20
+
21
+ if( !empty( $startDate ) && time() < strtotime( $startDate ) )
22
+ return;
23
+
24
+ if( !empty( $endDate ) && time() > strtotime( $endDate ) )
25
+ return;
26
+
27
+ add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
28
+ add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
29
+ }
30
+
31
+
32
+ // Display a notice that can be dismissed in case the serial number is inactive
33
+ function add_admin_notice() {
34
+ global $current_user ;
35
+ global $pagenow;
36
+
37
+ $user_id = $current_user->ID;
38
+ do_action( $this->notificationId.'_before_notification_displayed', $current_user, $pagenow );
39
+
40
+ if ( current_user_can( 'manage_options' ) ){
41
+ // Check that the user hasn't already clicked to ignore the message
42
+ if ( ! get_user_meta($user_id, $this->notificationId.'_dismiss_notification' ) ) {
43
+ echo $finalMessage = apply_filters($this->notificationId.'_notification_message','<div class="'. $this->notificationClass .'" >'.$this->notificationMessage.'</div>', $this->notificationMessage);
44
+ }
45
+ do_action( $this->notificationId.'_notification_displayed', $current_user, $pagenow );
46
+ }
47
+ do_action( $this->notificationId.'_after_notification_displayed', $current_user, $pagenow );
48
+ }
49
+
50
+ function dismiss_notification() {
51
+ global $current_user;
52
+
53
+ $user_id = $current_user->ID;
54
+
55
+ do_action( $this->notificationId.'_before_notification_dismissed', $current_user );
56
+
57
+ // If user clicks to ignore the notice, add that to their user meta
58
+ if ( isset( $_GET[$this->notificationId.'_dismiss_notification']) && '0' == $_GET[$this->notificationId.'_dismiss_notification'] )
59
+ add_user_meta( $user_id, $this->notificationId.'_dismiss_notification', 'true', true );
60
+
61
+ do_action( $this->notificationId.'_after_notification_dismissed', $current_user );
62
+ }
63
+ }
64
+
65
+ Class WCK_Plugin_Notifications {
66
+
67
+ public $notifications = array();
68
+ private static $_instance = null;
69
+ private $prefix = 'wck';
70
+ private $menu_slug = 'wck-page';
71
+ public $pluginPages = array( 'sas-page', 'cptc-page', 'ctc-page', 'wck-' );
72
+
73
+ protected function __construct() {
74
+ add_action( 'admin_init', array( $this, 'dismiss_admin_notifications' ), 200 );
75
+ add_action( 'admin_init', array( $this, 'add_admin_menu_notification_counts' ), 1000 );
76
+ }
77
+
78
+
79
+ function dismiss_admin_notifications() {
80
+ if( ! empty( $_GET[$this->prefix.'_dismiss_admin_notification'] ) ) {
81
+ $notifications = self::get_instance();
82
+ $notifications->dismiss_notification( sanitize_text_field( $_GET[$this->prefix.'_dismiss_admin_notification'] ) );
83
+ }
84
+
85
+ }
86
+
87
+ function add_admin_menu_notification_counts() {
88
+
89
+ global $menu, $submenu;
90
+
91
+ $notifications = WCK_Plugin_Notifications::get_instance();
92
+
93
+ if( ! empty( $menu ) ) {
94
+ foreach( $menu as $menu_position => $menu_data ) {
95
+ if( ! empty( $menu_data[2] ) && $menu_data[2] == $this->menu_slug ) {
96
+ $menu_count = $notifications->get_count_in_menu();
97
+ if( ! empty( $menu_count ) )
98
+ $menu[$menu_position][0] .= '<span class="update-plugins '.$this->prefix.'-update-plugins"><span class="plugin-count">' . $menu_count . '</span></span>';
99
+ }
100
+ }
101
+ }
102
+
103
+ if( ! empty( $submenu[$this->menu_slug] ) ) {
104
+ foreach( $submenu[$this->menu_slug] as $menu_position => $menu_data ) {
105
+ $menu_count = $notifications->get_count_in_submenu( $menu_data[2] );
106
+ if( ! empty( $menu_count ) )
107
+ $submenu[$this->menu_slug][$menu_position][0] .= '<span class="update-plugins '.$this->prefix.'-update-plugins"><span class="plugin-count">' . $menu_count . '</span></span>';
108
+ }
109
+ }
110
+ }
111
+
112
+ /**
113
+ *
114
+ *
115
+ */
116
+ public static function get_instance() {
117
+ if( is_null( self::$_instance ) )
118
+ self::$_instance = new WCK_Plugin_Notifications();
119
+
120
+ return self::$_instance;
121
+ }
122
+
123
+
124
+ /**
125
+ *
126
+ *
127
+ */
128
+ public function add_notification( $notification_id = '', $notification_message = '', $notification_class = 'update-nag', $count_in_menu = true, $count_in_submenu = array() ) {
129
+
130
+ if( empty( $notification_id ) )
131
+ return;
132
+
133
+ if( empty( $notification_message ) )
134
+ return;
135
+
136
+ global $current_user;
137
+
138
+ if( get_user_meta( $current_user->ID, $notification_id . '_dismiss_notification' ) )
139
+ return;
140
+
141
+ $this->notifications[$notification_id] = array(
142
+ 'id' => $notification_id,
143
+ 'message' => $notification_message,
144
+ 'class' => $notification_class,
145
+ 'count_in_menu' => $count_in_menu,
146
+ 'count_in_submenu' => $count_in_submenu
147
+ );
148
+
149
+
150
+ if( $this->is_plugin_page() ) {
151
+ new WCK_Add_Notices( $notification_id, $notification_message, $notification_class );
152
+ }
153
+
154
+ }
155
+
156
+
157
+ /**
158
+ *
159
+ *
160
+ */
161
+ public function get_notifications() {
162
+ return $this->notifications;
163
+ }
164
+
165
+
166
+ /**
167
+ *
168
+ *
169
+ */
170
+ public function get_notification( $notification_id = '' ) {
171
+
172
+ if( empty( $notification_id ) )
173
+ return null;
174
+
175
+ $notifications = $this->get_notifications();
176
+
177
+ if( ! empty( $notifications[$notification_id] ) )
178
+ return $notifications[$notification_id];
179
+ else
180
+ return null;
181
+
182
+ }
183
+
184
+
185
+ /**
186
+ *
187
+ *
188
+ */
189
+ public function dismiss_notification( $notification_id = '' ) {
190
+ global $current_user;
191
+ add_user_meta( $current_user->ID, $notification_id . '_dismiss_notification', 'true', true );
192
+ }
193
+
194
+
195
+ /**
196
+ *
197
+ *
198
+ */
199
+ public function get_count_in_menu() {
200
+ $count = 0;
201
+
202
+ foreach( $this->notifications as $notification ) {
203
+ if( ! empty( $notification['count_in_menu'] ) )
204
+ $count++;
205
+ }
206
+
207
+ return $count;
208
+ }
209
+
210
+
211
+ /**
212
+ *
213
+ *
214
+ */
215
+ public function get_count_in_submenu( $submenu = '' ) {
216
+
217
+ if( empty( $submenu ) )
218
+ return 0;
219
+
220
+ $count = 0;
221
+
222
+ foreach( $this->notifications as $notification ) {
223
+ if( empty( $notification['count_in_submenu'] ) )
224
+ continue;
225
+
226
+ if( ! is_array( $notification['count_in_submenu'] ) )
227
+ continue;
228
+
229
+ if( ! in_array( $submenu, $notification['count_in_submenu'] ) )
230
+ continue;
231
+
232
+ $count++;
233
+ }
234
+
235
+ return $count;
236
+
237
+ }
238
+
239
+
240
+ /**
241
+ *
242
+ *
243
+ */
244
+ public function is_plugin_page() {
245
+ if( !empty( $this->pluginPages ) ){
246
+ foreach ( $this->pluginPages as $pluginPage ){
247
+ if( ! empty( $_GET['page'] ) && false !== strpos( $_GET['page'], $pluginPage ) )
248
+ return true;
249
+
250
+ if( ! empty( $_GET['post_type'] ) && false !== strpos( $_GET['post_type'], $pluginPage ) )
251
+ return true;
252
+
253
+ if( ! empty( $_GET['post'] ) && false !== strpos( get_post_type( (int)$_GET['post'] ), $pluginPage ) )
254
+ return true;
255
+ }
256
+ }
257
+
258
+ return false;
259
+ }
260
+
261
+ }
262
+
263
+
264
+ function wck_add_plugin_notifications() {
265
+
266
+ /*$wck_notifications = WCK_Plugin_Notifications::get_instance();
267
+
268
+ // this must be unique
269
+ $notification_id = 'wck_new_add_on_invoices';
270
+
271
+ $message = '<img style="float: left; margin: 10px 12px 10px 0; max-width: 80px;" src="' . WCK_PLUGIN_DIR_URL . 'images/pb-trp-cross-promotion.png" />';
272
+ $message .= '<p style="margin-top: 16px;">' . __( 'This is a content.', 'wck' ) . '</p>';
273
+ //make sure to use wck_dismiss_admin_notification as an argument
274
+ $message .= '<p><a href="' . add_query_arg( array( 'page' => 'cptc-page', 'wck_dismiss_admin_notification' => $notification_id ), admin_url( 'admin.php' ) ) . '" class="button-primary">' . __( 'Check it out!', 'wck' ) . '</a></p>';
275
+ $message .= '<a href="' . add_query_arg( array( 'wck_dismiss_admin_notification' => $notification_id ) ) . '" type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss this notice.', 'wck' ) . '</span></a>';
276
+
277
+ $wck_notifications->add_notification( $notification_id, $message, 'wck-notice wck-narrow notice notice-info', true, array( 'cptc-page' ) );*/
278
+
279
+ }
280
  add_action( 'admin_init', 'wck_add_plugin_notifications' );
js/wck-cfc.js CHANGED
@@ -1,220 +1,220 @@
1
- jQuery(function(){
2
- jQuery(document).on( 'change', '#wck_cfc_fields #field-type', function () {
3
- value = jQuery(this).val();
4
-
5
- if( value == 'select' || value == 'select multiple' || value == 'checkbox' || value == 'radio' ){
6
- jQuery( '#wck_cfc_fields .row-options' ).show();
7
- jQuery( '#wck_cfc_fields .row-labels' ).show();
8
- }
9
- else{
10
- jQuery( '#wck_cfc_fields .row-options' ).hide();
11
- jQuery( '#wck_cfc_fields .row-labels' ).hide();
12
- }
13
-
14
- if( value == 'upload' ){
15
- jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).show();
16
- }
17
- else{
18
- jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).hide();
19
- }
20
-
21
- if( value == 'cpt select' ){
22
- jQuery( '#wck_cfc_fields .row-cpt' ).show();
23
- }
24
- else{
25
- jQuery( '#wck_cfc_fields .row-cpt' ).hide();
26
- }
27
-
28
- if( value == 'textarea' ){
29
- jQuery( '#wck_cfc_fields .row-number-of-rows' ).show();
30
- jQuery( '#wck_cfc_fields .row-readonly' ).show();
31
- jQuery( '#wck_cfc_fields .row-default-text' ).show();
32
- jQuery( '#wck_cfc_fields .row-default-value' ).hide();
33
- }
34
- else{
35
- jQuery( '#wck_cfc_fields .row-number-of-rows' ).hide();
36
- jQuery( '#wck_cfc_fields .row-readonly' ).hide();
37
- jQuery( '#wck_cfc_fields .row-default-text' ).hide();
38
- }
39
-
40
- if( value == 'heading' ) {
41
- jQuery( '#wck_cfc_fields .row-required' ).hide();
42
- jQuery( '#wck_cfc_fields .row-default-value' ).hide();
43
- }
44
-
45
- if( value != 'textarea' && value != 'heading' ){
46
- jQuery( '#wck_cfc_fields .row-required' ).show();
47
- jQuery( '#wck_cfc_fields .row-default-value' ).show();
48
- }
49
-
50
- if( value == 'phone' ) {
51
- jQuery( '#wck_cfc_fields .row-phone-format' ).show();
52
- jQuery( '#wck_cfc_fields .row-default-value' ).hide();
53
- } else {
54
- jQuery( '#wck_cfc_fields .row-phone-format' ).hide();
55
- }
56
-
57
- if( value == 'number' ) {
58
- jQuery( '#wck_cfc_fields .row-min-number-value' ).show();
59
- jQuery( '#wck_cfc_fields .row-max-number-value' ).show();
60
- jQuery( '#wck_cfc_fields .row-number-step-value' ).show();
61
- } else {
62
- jQuery( '#wck_cfc_fields .row-min-number-value' ).hide();
63
- jQuery( '#wck_cfc_fields .row-max-number-value' ).hide();
64
- jQuery( '#wck_cfc_fields .row-number-step-value' ).hide();
65
- }
66
-
67
- if( value == 'html' ) {
68
- jQuery( '#wck_cfc_fields .row-html-content' ).show();
69
- jQuery( '#wck_cfc_fields .row-default-value' ).hide();
70
- jQuery( '#wck_cfc_fields .row-required' ).hide();
71
- } else {
72
- jQuery( '#wck_cfc_fields .row-html-content' ).hide();
73
- }
74
-
75
- if( value == 'map' ) {
76
- jQuery( '#wck_cfc_fields .row-map-default-latitude' ).show();
77
- jQuery( '#wck_cfc_fields .row-map-default-longitude' ).show();
78
- jQuery( '#wck_cfc_fields .row-map-default-zoom' ).show();
79
- jQuery( '#wck_cfc_fields .row-map-height' ).show();
80
- jQuery( '#wck_cfc_fields .row-default-value' ).hide();
81
- } else {
82
- jQuery( '#wck_cfc_fields .row-map-default-latitude' ).hide();
83
- jQuery( '#wck_cfc_fields .row-map-default-longitude' ).hide();
84
- jQuery( '#wck_cfc_fields .row-map-default-zoom' ).hide();
85
- jQuery( '#wck_cfc_fields .row-map-height' ).hide();
86
- }
87
-
88
- if( value == 'datepicker' ){
89
- jQuery( '#wck_cfc_fields .row-date-format' ).show();
90
- }
91
- else{
92
- jQuery( '#wck_cfc_fields .row-date-format' ).hide();
93
- }
94
-
95
- });
96
-
97
- jQuery(document).on( 'change', '#container_wck_cfc_fields #field-type', function () {
98
- value = jQuery(this).val();
99
- if( value == 'select' || value == 'select multiple' || value == 'checkbox' || value == 'radio' ){
100
- jQuery(this).parent().parent().parent().children(".row-options").show();
101
- jQuery(this).parent().parent().parent().children(".row-labels").show();
102
- }
103
- else{
104
- jQuery(this).parent().parent().parent().children(".row-options").hide();
105
- jQuery(this).parent().parent().parent().children(".row-labels").hide();
106
- }
107
-
108
- if( value == 'upload' ){
109
- jQuery(this).parent().parent().parent().children(".row-attach-upload-to-post").show();
110
- }
111
- else{
112
- jQuery(this).parent().parent().parent().children(".row-attach-upload-to-post").hide();
113
- }
114
-
115
- if( value == 'cpt select' ){
116
- jQuery(this).parent().parent().parent().children(".row-cpt").show();
117
- }
118
- else{
119
- jQuery(this).parent().parent().parent().children(".row-cpt").hide();
120
- }
121
-
122
- if( value == 'textarea' ){
123
- jQuery(this).parent().parent().parent().children(".row-number-of-rows").show();
124
- jQuery(this).parent().parent().parent().children(".row-readonly").show();
125
- jQuery(this).parent().parent().parent().children(".row-default-text").show();
126
- jQuery(this).parent().parent().parent().children(".row-default-value").hide();
127
- }
128
- else{
129
- jQuery(this).parent().parent().parent().children(".row-number-of-rows").hide();
130
- jQuery(this).parent().parent().parent().children(".row-readonly").hide();
131
- jQuery(this).parent().parent().parent().children(".row-default-text").hide();
132
- }
133
-
134
- if( value == 'heading' ) {
135
- jQuery( this ).parent().parent().parent().children( ".row-required" ).hide();
136
- jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
137
- }
138
-
139
- if( value != 'textarea' && value != 'heading' ) {
140
- jQuery( this ).parent().parent().parent().children( ".row-required" ).show();
141
- jQuery( this ).parent().parent().parent().children( ".row-default-value" ).show();
142
- }
143
-
144
- if( value == 'phone' ) {
145
- jQuery( this ).parent().parent().parent().children( ".row-phone-format" ).show();
146
- jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
147
- } else {
148
- jQuery( this ).parent().parent().parent().children( ".row-phone-format" ).hide();
149
- }
150
-
151
- if( value == 'number' ) {
152
- jQuery( this ).parent().parent().parent().children( ".row-min-number-value" ).show();
153
- jQuery( this ).parent().parent().parent().children( ".row-max-number-value" ).show();
154
- jQuery( this ).parent().parent().parent().children( ".row-number-step-value" ).show();
155
- } else {
156
- jQuery( this ).parent().parent().parent().children( ".row-min-number-value" ).hide();
157
- jQuery( this ).parent().parent().parent().children( ".row-max-number-value" ).hide();
158
- jQuery( this ).parent().parent().parent().children( ".row-number-step-value" ).hide();
159
- }
160
-
161
- if( value == 'html' ) {
162
- jQuery( this ).parent().parent().parent().children( ".row-html-content" ).show();
163
- jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
164
- jQuery( this ).parent().parent().parent().children( ".row-required" ).hide();
165
- } else {
166
- jQuery( this ).parent().parent().parent().children( ".row-html-content" ).hide();
167
- }
168
-
169
- if( value == 'map' ) {
170
- jQuery( this ).parent().parent().parent().children( '.row-map-default-latitude' ).show();
171
- jQuery( this ).parent().parent().parent().children( '.row-map-default-longitude' ).show();
172
- jQuery( this ).parent().parent().parent().children( '.row-map-default-zoom' ).show();
173
- jQuery( this ).parent().parent().parent().children( '.row-map-height' ).show();
174
- jQuery( this ).parent().parent().parent().children( '.row-default-value' ).hide();
175
- } else {
176
- jQuery( this ).parent().parent().parent().children( '.row-map-default-latitude' ).hide();
177
- jQuery( this ).parent().parent().parent().children( '.row-map-default-longitude' ).hide();
178
- jQuery( this ).parent().parent().parent().children( '.row-map-default-zoom' ).hide();
179
- jQuery( this ).parent().parent().parent().children( '.row-map-height' ).hide();
180
- }
181
-
182
- if( value == 'datepicker' ) {
183
- jQuery( this ).parent().parent().parent().children( ".row-date-format" ).show();
184
- } else {
185
- jQuery( this ).parent().parent().parent().children( ".row-date-format" ).hide();
186
- }
187
-
188
- });
189
-
190
- /* edit slug functionality */
191
- jQuery( "#wck-cfc-fields" ).on( "click", ".wck-cfc-edit-slug", function(){
192
- jQuery(this).prev( "input[type='text']" ).removeAttr( "readonly" );
193
- });
194
-
195
- jQuery( "#wck-cfc-fields" ).on( "blur", "#wck_cfc_fields.wck-add-form #field-title", function(e){
196
-
197
- fieldTitle = jQuery(this).val();
198
- titleField = jQuery(this);
199
- slugField = jQuery( '#field-slug', titleField.closest( ".mb-list-entry-fields" ) );
200
- addButton = jQuery( '.button-primary', titleField.closest( ".mb-list-entry-fields" ) );
201
-
202
- if( slugField[0].hasAttribute("readonly") ) {
203
- addButton.attr( 'disabled', 'disabled' );
204
- addButton.css( 'pointer-events', 'none' )
205
- slugField.addClass( 'doing-ajax' );
206
- jQuery.post(wckAjaxurl, {action: "wck_generate_slug", field_title: fieldTitle}, function (response) {
207
- if (response != 'failed') {
208
- slugField.val(response);
209
- slugField.removeClass( 'doing-ajax' );
210
- }
211
- addButton.removeAttr( 'disabled' );
212
- addButton.css( 'pointer-events', 'auto' );
213
- });
214
- }
215
-
216
-
217
-
218
- });
219
-
220
  });
1
+ jQuery(function(){
2
+ jQuery(document).on( 'change', '#wck_cfc_fields #field-type', function () {
3
+ value = jQuery(this).val();
4
+
5
+ if( value == 'select' || value == 'select multiple' || value == 'checkbox' || value == 'radio' ){
6
+ jQuery( '#wck_cfc_fields .row-options' ).show();
7
+ jQuery( '#wck_cfc_fields .row-labels' ).show();
8
+ }
9
+ else{
10
+ jQuery( '#wck_cfc_fields .row-options' ).hide();
11
+ jQuery( '#wck_cfc_fields .row-labels' ).hide();
12
+ }
13
+
14
+ if( value == 'upload' ){
15
+ jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).show();
16
+ }
17
+ else{
18
+ jQuery( '#wck_cfc_fields .row-attach-upload-to-post' ).hide();
19
+ }
20
+
21
+ if( value == 'cpt select' ){
22
+ jQuery( '#wck_cfc_fields .row-cpt' ).show();
23
+ }
24
+ else{
25
+ jQuery( '#wck_cfc_fields .row-cpt' ).hide();
26
+ }
27
+
28
+ if( value == 'textarea' ){
29
+ jQuery( '#wck_cfc_fields .row-number-of-rows' ).show();
30
+ jQuery( '#wck_cfc_fields .row-readonly' ).show();
31
+ jQuery( '#wck_cfc_fields .row-default-text' ).show();
32
+ jQuery( '#wck_cfc_fields .row-default-value' ).hide();
33
+ }
34
+ else{
35
+ jQuery( '#wck_cfc_fields .row-number-of-rows' ).hide();
36
+ jQuery( '#wck_cfc_fields .row-readonly' ).hide();
37
+ jQuery( '#wck_cfc_fields .row-default-text' ).hide();
38
+ }
39
+
40
+ if( value == 'heading' ) {
41
+ jQuery( '#wck_cfc_fields .row-required' ).hide();
42
+ jQuery( '#wck_cfc_fields .row-default-value' ).hide();
43
+ }
44
+
45
+ if( value != 'textarea' && value != 'heading' ){
46
+ jQuery( '#wck_cfc_fields .row-required' ).show();
47
+ jQuery( '#wck_cfc_fields .row-default-value' ).show();
48
+ }
49
+
50
+ if( value == 'phone' ) {
51
+ jQuery( '#wck_cfc_fields .row-phone-format' ).show();
52
+ jQuery( '#wck_cfc_fields .row-default-value' ).hide();
53
+ } else {
54
+ jQuery( '#wck_cfc_fields .row-phone-format' ).hide();
55
+ }
56
+
57
+ if( value == 'number' ) {
58
+ jQuery( '#wck_cfc_fields .row-min-number-value' ).show();
59
+ jQuery( '#wck_cfc_fields .row-max-number-value' ).show();
60
+ jQuery( '#wck_cfc_fields .row-number-step-value' ).show();
61
+ } else {
62
+ jQuery( '#wck_cfc_fields .row-min-number-value' ).hide();
63
+ jQuery( '#wck_cfc_fields .row-max-number-value' ).hide();
64
+ jQuery( '#wck_cfc_fields .row-number-step-value' ).hide();
65
+ }
66
+
67
+ if( value == 'html' ) {
68
+ jQuery( '#wck_cfc_fields .row-html-content' ).show();
69
+ jQuery( '#wck_cfc_fields .row-default-value' ).hide();
70
+ jQuery( '#wck_cfc_fields .row-required' ).hide();
71
+ } else {
72
+ jQuery( '#wck_cfc_fields .row-html-content' ).hide();
73
+ }
74
+
75
+ if( value == 'map' ) {
76
+ jQuery( '#wck_cfc_fields .row-map-default-latitude' ).show();
77
+ jQuery( '#wck_cfc_fields .row-map-default-longitude' ).show();
78
+ jQuery( '#wck_cfc_fields .row-map-default-zoom' ).show();
79
+ jQuery( '#wck_cfc_fields .row-map-height' ).show();
80
+ jQuery( '#wck_cfc_fields .row-default-value' ).hide();
81
+ } else {
82
+ jQuery( '#wck_cfc_fields .row-map-default-latitude' ).hide();
83
+ jQuery( '#wck_cfc_fields .row-map-default-longitude' ).hide();
84
+ jQuery( '#wck_cfc_fields .row-map-default-zoom' ).hide();
85
+ jQuery( '#wck_cfc_fields .row-map-height' ).hide();
86
+ }
87
+
88
+ if( value == 'datepicker' ){
89
+ jQuery( '#wck_cfc_fields .row-date-format' ).show();
90
+ }
91
+ else{
92
+ jQuery( '#wck_cfc_fields .row-date-format' ).hide();
93
+ }
94
+
95
+ });
96
+
97
+ jQuery(document).on( 'change', '#container_wck_cfc_fields #field-type', function () {
98
+ value = jQuery(this).val();
99
+ if( value == 'select' || value == 'select multiple' || value == 'checkbox' || value == 'radio' ){
100
+ jQuery(this).parent().parent().parent().children(".row-options").show();
101
+ jQuery(this).parent().parent().parent().children(".row-labels").show();
102
+ }
103
+ else{
104
+ jQuery(this).parent().parent().parent().children(".row-options").hide();
105
+ jQuery(this).parent().parent().parent().children(".row-labels").hide();
106
+ }
107
+
108
+ if( value == 'upload' ){
109
+ jQuery(this).parent().parent().parent().children(".row-attach-upload-to-post").show();
110
+ }
111
+ else{
112
+ jQuery(this).parent().parent().parent().children(".row-attach-upload-to-post").hide();
113
+ }
114
+
115
+ if( value == 'cpt select' ){
116
+ jQuery(this).parent().parent().parent().children(".row-cpt").show();
117
+ }
118
+ else{
119
+ jQuery(this).parent().parent().parent().children(".row-cpt").hide();
120
+ }
121
+
122
+ if( value == 'textarea' ){
123
+ jQuery(this).parent().parent().parent().children(".row-number-of-rows").show();
124
+ jQuery(this).parent().parent().parent().children(".row-readonly").show();
125
+ jQuery(this).parent().parent().parent().children(".row-default-text").show();
126
+ jQuery(this).parent().parent().parent().children(".row-default-value").hide();
127
+ }
128
+ else{
129
+ jQuery(this).parent().parent().parent().children(".row-number-of-rows").hide();
130
+ jQuery(this).parent().parent().parent().children(".row-readonly").hide();
131
+ jQuery(this).parent().parent().parent().children(".row-default-text").hide();
132
+ }
133
+
134
+ if( value == 'heading' ) {
135
+ jQuery( this ).parent().parent().parent().children( ".row-required" ).hide();
136
+ jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
137
+ }
138
+
139
+ if( value != 'textarea' && value != 'heading' ) {
140
+ jQuery( this ).parent().parent().parent().children( ".row-required" ).show();
141
+ jQuery( this ).parent().parent().parent().children( ".row-default-value" ).show();
142
+ }
143
+
144
+ if( value == 'phone' ) {
145
+ jQuery( this ).parent().parent().parent().children( ".row-phone-format" ).show();
146
+ jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
147
+ } else {
148
+ jQuery( this ).parent().parent().parent().children( ".row-phone-format" ).hide();
149
+ }
150
+
151
+ if( value == 'number' ) {
152
+ jQuery( this ).parent().parent().parent().children( ".row-min-number-value" ).show();
153
+ jQuery( this ).parent().parent().parent().children( ".row-max-number-value" ).show();
154
+ jQuery( this ).parent().parent().parent().children( ".row-number-step-value" ).show();
155
+ } else {
156
+ jQuery( this ).parent().parent().parent().children( ".row-min-number-value" ).hide();
157
+ jQuery( this ).parent().parent().parent().children( ".row-max-number-value" ).hide();
158
+ jQuery( this ).parent().parent().parent().children( ".row-number-step-value" ).hide();
159
+ }
160
+
161
+ if( value == 'html' ) {
162
+ jQuery( this ).parent().parent().parent().children( ".row-html-content" ).show();
163
+ jQuery( this ).parent().parent().parent().children( ".row-default-value" ).hide();
164
+ jQuery( this ).parent().parent().parent().children( ".row-required" ).hide();
165
+ } else {
166
+ jQuery( this ).parent().parent().parent().children( ".row-html-content" ).hide();
167
+ }
168
+
169
+ if( value == 'map' ) {
170
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-latitude' ).show();
171
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-longitude' ).show();
172
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-zoom' ).show();
173
+ jQuery( this ).parent().parent().parent().children( '.row-map-height' ).show();
174
+ jQuery( this ).parent().parent().parent().children( '.row-default-value' ).hide();
175
+ } else {
176
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-latitude' ).hide();
177
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-longitude' ).hide();
178
+ jQuery( this ).parent().parent().parent().children( '.row-map-default-zoom' ).hide();
179
+ jQuery( this ).parent().parent().parent().children( '.row-map-height' ).hide();
180
+ }
181
+
182
+ if( value == 'datepicker' ) {
183
+ jQuery( this ).parent().parent().parent().children( ".row-date-format" ).show();
184
+ } else {
185
+ jQuery( this ).parent().parent().parent().children( ".row-date-format" ).hide();
186
+ }
187
+
188
+ });
189
+
190
+ /* edit slug functionality */
191
+ jQuery( "#wck-cfc-fields" ).on( "click", ".wck-cfc-edit-slug", function(){
192
+ jQuery(this).prev( "input[type='text']" ).removeAttr( "readonly" );
193
+ });
194
+
195
+ jQuery( "#wck-cfc-fields" ).on( "blur", "#wck_cfc_fields.wck-add-form #field-title", function(e){
196
+
197
+ fieldTitle = jQuery(this).val();
198
+ titleField = jQuery(this);
199
+ slugField = jQuery( '#field-slug', titleField.closest( ".mb-list-entry-fields" ) );
200
+ addButton = jQuery( '.button-primary', titleField.closest( ".mb-list-entry-fields" ) );
201
+
202
+ if( slugField[0].hasAttribute("readonly") ) {
203
+ addButton.attr( 'disabled', 'disabled' );
204
+ addButton.css( 'pointer-events', 'none' )
205
+ slugField.addClass( 'doing-ajax' );
206
+ jQuery.post(wckAjaxurl, {action: "wck_generate_slug", field_title: fieldTitle}, function (response) {
207
+ if (response != 'failed') {
208
+ slugField.val(response);
209
+ slugField.removeClass( 'doing-ajax' );
210
+ }
211
+ addButton.removeAttr( 'disabled' );
212
+ addButton.css( 'pointer-events', 'auto' );
213
+ });
214
+ }
215
+
216
+
217
+
218
+ });
219
+
220
  });
languages/wck-es_ES.mo DELETED
Binary file
languages/wck-es_ES.po DELETED
@@ -1,1157 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: WCK\n"
4
- "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-06-13 16:28+0200\n"
6
- "PO-Revision-Date: 2014-01-24 11:10+0100\n"
7
- "Last-Translator: jelena kovacevic <jecajeca260@gmail.com>\n"
8
- "Language-Team: \n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Poedit-KeywordsList: _;gettext;gettext_noop;__;_e\n"
13
- "X-Poedit-Basepath: .\n"
14
- "X-Generator: Poedit 1.5.5\n"
15
- "X-Poedit-SearchPath-0: d:\\!!!!!!!!!\\Free Version\\wck\n"
16
-
17
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:26
18
- msgid "Add New Meta Box"
19
- msgstr "Añadir nueva Meta Box"
20
-
21
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:27
22
- msgid "Edit Meta Box"
23
- msgstr "Editar Meta Box"
24
-
25
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:28
26
- msgid "New Meta Box"
27
- msgstr "Nueva Meta Box"
28
-
29
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:29 Version\wck/wck-sas.php:87
30
- msgid "Custom Fields Creator"
31
- msgstr "Creador de Campos Personalizados"
32
-
33
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:30
34
- msgid "View Meta Box"
35
- msgstr "Ver Meta Box"
36
-
37
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:31
38
- msgid "Search Meta Boxes"
39
- msgstr "Buscar Meta Boxes"
40
-
41
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:32
42
- msgid "No Meta Boxes found"
43
- msgstr "No se encontraron Meta Boxes"
44
-
45
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:33
46
- msgid "No Meta Boxes found in Trash"
47
- msgstr "No se encontraron Meta Boxes en la basura"
48
-
49
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:35
50
- msgid "Custom Meta Boxes"
51
- msgstr "Meta Boxes personalizados"
52
-
53
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:84
54
- msgid "Meta name"
55
- msgstr "Nombre Meta"
56
-
57
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:84
58
- msgid ""
59
- "The name of the meta field. It is the name by which you will query the data "
60
- "in the frontend. Must be unique, only lowercase letters, no spaces and no "
61
- "special characters."
62
- msgstr ""
63
- "El nombre del campo de metadatos. Es el nombre con el que podrás consultar "
64
- "los datos en el frontend. Debe ser único, sólo letras minúsculas, sin "
65
- "espacios ni caracteres especiales."
66
-
67
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:85 Version\wck/wck-cfc.php:442
68
- msgid "Post Type"
69
- msgstr "Tipo de Publicación"
70
-
71
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:85
72
- msgid "What post type the meta box should be attached to"
73
- msgstr "A qué tipo de publicación debe adjuntarse el Meta Box"
74
-
75
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:86
76
- msgid "Repeater"
77
- msgstr "Repetidor"
78
-
79
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:86
80
- msgid ""
81
- "Whether the box supports just one entry or if it is a repeater field. By "
82
- "default it is a single field."
83
- msgstr ""
84
- "Si el cuadro es compatible con una sola entrada o si se trata de un campo "
85
- "repetidor. Por defecto es un solo campo."
86
-
87
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:87
88
- msgid "Sortable"
89
- msgstr "Ordenable"
90
-
91
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:87
92
- msgid ""
93
- "Whether the entries are sortable or not. Thsi is valid for repeater fields."
94
- msgstr ""
95
- "Si las entradas se pueden ordenar o no. Esto es válido para los campos de "
96
- "repetidores."
97
-
98
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:88
99
- msgid "Post ID"
100
- msgstr "Identificación de la publicación"
101
-
102
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:88
103
- msgid "ID of a post on which the meta box should appear."
104
- msgstr "Identificación de una publicación en la que debe aparecer el Meta Box."
105
-
106
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:92 Version\wck/wck-cfc.php:443
107
- msgid "Page Template"
108
- msgstr "Plantilla de Página"
109
-
110
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:92
111
- msgid ""
112
- "If post type is \"page\" you can further select a page templete. The meta "
113
- "box will only appear on the page that has that selected page template."
114
- msgstr ""
115
- "Si el tipo de publicación es \"página\" se puede seleccionar además un "
116
- "templete de página. El Meta Box solo se mostrará en la página que tiene esa "
117
- "plantilla de página seleccionada."
118
-
119
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:97 Version\wck/wck-cfc.php:536
120
- msgid "Meta Box Arguments"
121
- msgstr "Argumentos Meta Box"
122
-
123
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:114
124
- msgid "Field Title"
125
- msgstr "Título Campo"
126
-
127
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:114
128
- msgid "Title of the field. A slug will automatically be generated."
129
- msgstr "Título del Campo. Automáticamente se genera un slug."
130
-
131
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:115
132
- msgid "Field Type"
133
- msgstr "Tipo de Campo"
134
-
135
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:115
136
- msgid "The field type"
137
- msgstr "El tipo de campo"
138
-
139
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:116 Version\wck/wck-cptc.php:48
140
- msgid "Description"
141
- msgstr "Descripción"
142
-
143
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:117
144
- msgid "Required"
145
- msgstr "Requerido"
146
-
147
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:117
148
- msgid "Whether the field is required or not"
149
- msgstr "Si el campo es obligatorio o no"
150
-
151
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:118
152
- msgid "Default Value"
153
- msgstr "Valor predeterminado"
154
-
155
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:118
156
- msgid ""
157
- "Default value of the field. For Checkboxes if there are multiple values "
158
- "separete them with a \",\""
159
- msgstr ""
160
- "Valor predeterminado del campo. Para Casillas de verificación, si hay "
161
- "múltiples valores separarlas con un \",\""
162
-
163
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:119
164
- msgid "Options"
165
- msgstr "Opciones"
166
-
167
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:119
168
- msgid ""
169
- "Options for field types \"select\", \"checkbox\" and \"radio\". For multiple "
170
- "options separete them with a \",\". You can use the following structure if "
171
- "you want the label to be different from the value: %LabelOne%valueone,"
172
- "%LabelTwo%valuetwo,%LabelThree%valuethree"
173
- msgstr ""
174
- "Opciones de tipos de campo \"seleccionar\", \"casilla\" y \" radio\". Para "
175
- "múltiples opciones de ellas separarlas con un \",\". Puede utilizar la "
176
- "siguiente estructura, si desea que la etiqueta sea diferente del valor: "
177
- "%LabelOne%valueone,%LabelTwo%valuetwo,%LabelThree%valuethree"
178
-
179
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:120
180
- msgid "Attach upload to post"
181
- msgstr "Adjuntar carga para publicación"
182
-
183
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:120
184
- msgid "Whether or not the uploads should be attached to the post"
185
- msgstr "Si los archivos a subir deben o no estar adjuntos a la publicación"
186
-
187
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:127 Version\wck/wck-cfc.php:542
188
- msgid "Meta Box Fields"
189
- msgstr "Campos Meta Box"
190
-
191
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:140
192
- msgid "Enter below the arguments for the meta box."
193
- msgstr "Escriba aquí los argumentos para la Meta Box"
194
-
195
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:220
196
- msgid "Slug:"
197
- msgstr "Slug:"
198
-
199
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:220
200
- msgid ""
201
- "(Note:changing the slug when you already have a lot of existing entries may "
202
- "result in unexpected behavior.)"
203
- msgstr ""
204
- "(Nota: cambiar el slug cuando ya tiene una gran cantidad de entradas "
205
- "existentes puede provocar un comportamiento inesperado)"
206
-
207
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:355
208
- msgid "Choose a different Meta Name as this one contains spaces\n"
209
- msgstr "Elija un nombre diferente Meta pues éste contiene espacios\n"
210
-
211
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:357
212
- msgid "Choose a different Meta Name as this one already exists\n"
213
- msgstr "Elija un nombre diferente Meta pues ya existe éste\n"
214
-
215
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:441
216
- msgid "Id"
217
- msgstr "Id"
218
-
219
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:506 Version\wck/wck-cptc.php:257
220
- #: Version\wck/wck-ctc.php:215 Version\wck/wck.php:38
221
- msgid "Wordpress Creation Kit"
222
- msgstr "Wordpress Creación Kit"
223
-
224
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:530 Version\wck/wck-cptc.php:282
225
- #: Version\wck/wck-ctc.php:239
226
- msgid "Overview"
227
- msgstr "Descripción general"
228
-
229
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:531
230
- msgid ""
231
- "WCK Custom Fields Creator allows you to easily create custom meta boxes for "
232
- "Wordpress without any programming knowledge."
233
- msgstr ""
234
- "WCK Custom Fields Creator le permite crear fácilmente Meta Boxes para "
235
- "Wordpress sin ningún conocimiento de programación."
236
-
237
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:537
238
- msgid ""
239
- "Define here the rules for the meta box. This rules are used to set up where "
240
- "the meta box will appear, it's type and also the meta key name stored in the "
241
- "database. The name of the entry (Enter title here) will be used as the meta "
242
- "box title."
243
- msgstr ""
244
- "Defina aquí las reglas para la meta box. Estas reglas se usan para "
245
- "establecer donde aparecerá el Meta Box, su tipo y también el nombre de clave "
246
- "meta almacenada en la base de datos. El nombre de la entrada (Introduzca el "
247
- "título aquí) será utilizado como el título del Meta Box."
248
-
249
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:543
250
- msgid ""
251
- "Define here the fields contained in the meta box. From \"Field Title\" a "
252
- "slug will be automatically generated and you will use this slug to display "
253
- "the data in the frontend."
254
- msgstr ""
255
- "Defina aquí los campos contenidos en la caja de meta. . Desde \"Título de "
256
- "Campo\" un slug se ​​generará automáticamente y usted usará este slug para "
257
- "mostrar los datos en el frontend."
258
-
259
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:548
260
- msgid "CFC Frontend Example"
261
- msgstr "Ejemplo de Frontend CFC"
262
-
263
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
264
- msgid ""
265
- "Let's consider we have a meta box with the following arguments:<br /> - Meta "
266
- "name: books <br /> - Post Type: post <br />And we also have two fields "
267
- "deffined:<br /> - A text field with the Field Title: Book name <br /> - And "
268
- "another text field with the Field Title: Author name "
269
- msgstr ""
270
- "Consideremos que tenemos una meta box con los siguientes argumentos: <br /> "
271
- "- Nombre Meta: libros <br /> - Tipo de Publicación: publicación <br /> Y "
272
- "también tenemos dos campos definidos: <br /> - Otro campo de texto con el "
273
- "Título de Campo: Nombre del Libro <br /> - Y otro campo de texto con el "
274
- "título del campo : Nombre del autor"
275
-
276
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
277
- msgid ""
278
- "You will notice that slugs will automatically be created for the two text "
279
- "fields. For \"Book name\" the slug will be \"book-name\" and for \"Author "
280
- "name\" the slug will be \"author-name\""
281
- msgstr ""
282
- "Usted se dará cuenta de que los slugs se crearán automáticamente para los "
283
- "dos campos de texto. Para \"Book name\" el slug será \"book-name \" y para "
284
- "\"Nombre de autor\" el slug será \"author-name\""
285
-
286
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
287
- msgid ""
288
- "Let's see what the code for displaying the meta box values in single.php of "
289
- "your theme would be:"
290
- msgstr ""
291
- "Vamos a ver cuál es el código para mostrar los valores del Meta Box en una "
292
- "sola . php de su tema:"
293
-
294
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:549
295
- msgid ""
296
- "So as you can see the Meta Name \"books\" is used as the $key parameter of "
297
- "the funtion <a href=\"http://codex.wordpress.org/Function_Reference/"
298
- "get_post_meta\" target=\"_blank\">get_post_meta()</a> and the slugs of the "
299
- "text fields are used as keys for the resulting array. Basically CFC stores "
300
- "the entries as post meta in a multidimensioanl array. In our case the array "
301
- "would be: <br /><pre>array( array( \"book-name\" => \"The Hitchhiker's Guide "
302
- "To The Galaxy\", \"author-name\" => \"Douglas Adams\" ), array( \"book-name"
303
- "\" => \"Ender's Game\", \"author-name\" => \"Orson Scott Card\" ) );</pre> "
304
- "This is true even for single entries."
305
- msgstr ""
306
- "Así como usted puede ver el Meta Nombre \"libros\" se utiliza como parámetro "
307
- "$ clave de la función <a href=\"http://codex.wordpress.org/"
308
- "Function_Reference/get_post_meta\" target=\"_blank\">get_post_meta()</a> y "
309
- "los slugs de los campos de texto se utilizan como claves para la matriz "
310
- "resultante. Básicamente CFC almacena las entradas como post meta en una "
311
- "matriz multidimensional. En nuestro caso, la matriz sería: <br /><pre>array"
312
- "( array( \"book-name\" => \"The Hitchhiker's Guide To The Galaxy\", \"author-"
313
- "name\" => \"Douglas Adams\" ), array( \"book-name\" => \"Ender's Game\", "
314
- "\"author-name\" => \"Orson Scott Card\" ) );</pre> Esto es cierto incluso "
315
- "para entradas individuales"
316
-
317
- #: d:\!!!!!!!!!\Free Version\wck/wck-cfc.php:577
318
- msgid "Metabox updated."
319
- msgstr "Metabox actualizada."
320
-
321
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:6
322
- msgid "WCK Post Type Creator"
323
- msgstr "WCK Post Type Creator"
324
-
325
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:7 Version\wck/wck-sas.php:91
326
- msgid "Post Type Creator"
327
- msgstr "Post Type Creator"
328
-
329
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:47
330
- msgid "Post type"
331
- msgstr "Post type"
332
-
333
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:47
334
- msgid ""
335
- "(max. 20 characters, can not contain capital letters, hyphens, or spaces)"
336
- msgstr ""
337
- "(máx. 20 caracteres, no puede contener letras mayúsculas, guiones, ni "
338
- "espacios)"
339
-
340
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:48
341
- msgid "A short descriptive summary of what the post type is."
342
- msgstr "Un resumen descriptivo debajo de lo que el tipo de publicación es."
343
-
344
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:49 Version\wck/wck-ctc.php:36
345
- msgid "Singular Label"
346
- msgstr "Etiqueta Individual"
347
-
348
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:49
349
- msgid "ex. Book"
350
- msgstr "ej. Libro"
351
-
352
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:50 Version\wck/wck-ctc.php:37
353
- msgid "Plural Label"
354
- msgstr "Etiqueta Plural"
355
-
356
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:50
357
- msgid "ex. Books"
358
- msgstr "ej. Libros"
359
-
360
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:51 Version\wck/wck-ctc.php:39
361
- msgid "Hierarchical"
362
- msgstr "Jerárquica"
363
-
364
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:51
365
- msgid "Whether the post type is hierarchical. Allows Parent to be specified."
366
- msgstr ""
367
- "Si el tipo de la publicación es jerárquico. Permite que los padres se "
368
- "determinen."
369
-
370
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:52
371
- msgid "Has Archive"
372
- msgstr "Tiene archivo"
373
-
374
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:52
375
- msgid ""
376
- "Enables post type archives. Will use string as archive slug. Will generate "
377
- "the proper rewrite rules if rewrite is enabled."
378
- msgstr ""
379
- "Permite archivos de tipo de publicación. Utilizará cadena como slug de "
380
- "archivo. Generará las reglas de reescritura adecuadas si reescritura está "
381
- "habilitada."
382
-
383
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:53
384
- msgid "Supports"
385
- msgstr "Soporta"
386
-
387
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:56
388
- msgid "Add New"
389
- msgstr "Añadir Nuevo"
390
-
391
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:56
392
- msgid "ex. Add New"
393
- msgstr "ej. Añadir Nuevo"
394
-
395
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:57 Version\wck/wck-ctc.php:48
396
- msgid "Add New Item"
397
- msgstr "Crear Nuevo Artículo."
398
-
399
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:57
400
- msgid "ex. Add New Book"
401
- msgstr "ej Crear Nuevo Libro"
402
-
403
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:58 Version\wck/wck-ctc.php:46
404
- msgid "Edit Item"
405
- msgstr "Editar Artículo"
406
-
407
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:58
408
- msgid "ex. Edit Book"
409
- msgstr "ej. Editar Libro"
410
-
411
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:59
412
- msgid "New Item"
413
- msgstr "Nuevo Artículo"
414
-
415
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:59
416
- msgid "ex. New Book"
417
- msgstr "ej. Nuevo Libro"
418
-
419
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:60 Version\wck/wck-ctc.php:43
420
- msgid "All Items"
421
- msgstr "Todos los Artículos"
422
-
423
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:60
424
- msgid "ex. All Books"
425
- msgstr "ej. Todos los Libros"
426
-
427
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:61
428
- msgid "View Items"
429
- msgstr "Ver Artículos"
430
-
431
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:61
432
- msgid "ex. View Books"
433
- msgstr "ej. Ver Libros"
434
-
435
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:62 Version\wck/wck-ctc.php:41
436
- msgid "Search Items"
437
- msgstr "Buscar Artículos"
438
-
439
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:62
440
- msgid "ex. Search Books"
441
- msgstr "ej. Buscar Libros"
442
-
443
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:63
444
- msgid "Not Found"
445
- msgstr "No Encontrado"
446
-
447
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:63
448
- msgid "ex. No Books Found"
449
- msgstr "Ej. No hay libros encontrados"
450
-
451
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:64
452
- msgid "Not Found In Trash"
453
- msgstr "No se encuentran en la papelera"
454
-
455
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:64
456
- msgid "ex. No Books found in Trash"
457
- msgstr "ej. No se han encontrado Libros en la basura."
458
-
459
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:65 Version\wck/wck-ctc.php:45
460
- msgid "Parent Item Colon"
461
- msgstr "Colon Artículo Padre"
462
-
463
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:65
464
- msgid ""
465
- "the parent text. This string isn't used on non-hierarchical types. In "
466
- "hierarchical ones the default is Parent Page "
467
- msgstr ""
468
- "el texto padre Esta cadena no se utiliza en los tipos no jerárquicos. En "
469
- "los jerárquicos el valor predeterminado es la Página Padre"
470
-
471
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:66 Version\wck/wck-ctc.php:53
472
- msgid "Menu Name"
473
- msgstr "Nombre Menú"
474
-
475
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:68 Version\wck/wck-ctc.php:55
476
- msgid "Public"
477
- msgstr "Público"
478
-
479
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:68 Version\wck/wck-ctc.php:55
480
- msgid ""
481
- "Meta argument used to define default values for publicly_queriable, show_ui, "
482
- "show_in_nav_menus and exclude_from_search"
483
- msgstr ""
484
- "Meta argumento utilizado para definir valores predeterminados para "
485
- "publicly_queriable, show_ui, show_in_nav_menus y exclude_from_search"
486
-
487
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:69 Version\wck/wck-ctc.php:56
488
- msgid "Show UI"
489
- msgstr "Mostrar la interfaz de usuario"
490
-
491
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:69 Version\wck/wck-ctc.php:56
492
- msgid "Whether to generate a default UI for managing this post type."
493
- msgstr ""
494
- "Si se debe generar una interfaz de usuario predeterminada para gestionar "
495
- "este tipo de publicaciones."
496
-
497
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:70
498
- msgid "Show In Nav Menus"
499
- msgstr "Mostrar En Menús Nav"
500
-
501
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:70
502
- msgid "Whether post_type is available for selection in navigation menus."
503
- msgstr ""
504
- "Si post_type está disponible para la selección en los menús de navegación."
505
-
506
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:71
507
- msgid "Show In Menu"
508
- msgstr "Mostrar En Menú"
509
-
510
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:71
511
- msgid ""
512
- "Whether to show the post type in the admin menu. show_ui must be true. "
513
- "\"false\" - do not display in the admin menu, \"true\" - display as a top "
514
- "level menu, \"some string\" - If an existing top level page such as \"tools."
515
- "php\" or \"edit.php?post_type=page\", the post type will be placed as a sub "
516
- "menu of that."
517
- msgstr ""
518
- "Si debe mostrar el tipo de publicación en el menú de administración. show_ui "
519
- "debe ser cierto. \"false\" - no se muestra en el menú de administración, "
520
- "\"true\" - pantalla como un menú de nivel superior, \"alguna cadena\" - Si "
521
- "una página de nivel superior existente, como \"tools.php\" o \"edit.php? "
522
- "post_type = page\", el tipo de publicación será colocado como un submenú de "
523
- "eso."
524
-
525
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:72
526
- msgid "Menu Position"
527
- msgstr "Posición Menú"
528
-
529
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:72
530
- msgid "The position in the menu order the post type should appear."
531
- msgstr ""
532
- "La posición en el orden de los menús en que el tipo publicación debería "
533
- "aparecer."
534
-
535
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:73
536
- msgid "Menu Icon"
537
- msgstr "Icono Menú"
538
-
539
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:73
540
- msgid "The url to the icon to be used for this menu."
541
- msgstr "La url para el icono que se utilizará para este menú."
542
-
543
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:74
544
- msgid "Capability Type"
545
- msgstr "Tipo de Capacidad"
546
-
547
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:74
548
- msgid "The string to use to build the read, edit, and delete capabilities."
549
- msgstr ""
550
- "La cadena que se utiliza para construir la lectura, editar y eliminar "
551
- "capacidades."
552
-
553
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:75
554
- msgid "Taxonomies"
555
- msgstr "Taxonomías"
556
-
557
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:76
558
- msgid "Rewrite"
559
- msgstr "Reescribir"
560
-
561
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:76
562
- msgid "Rewrite permalinks."
563
- msgstr "Reescribir permalinks."
564
-
565
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:77
566
- msgid "Rewrite Slug"
567
- msgstr "Reescribir Slug"
568
-
569
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:77
570
- msgid "Defaults to post type name."
571
- msgstr "Predeterminados para el nombre del tipo de publicación."
572
-
573
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:83
574
- msgid "Custom Post Type Creation"
575
- msgstr "Creación personalizada Post Type"
576
-
577
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:108 Version\wck/wck-ctc.php:91
578
- msgid "Add New "
579
- msgstr "Añadir Nuevo"
580
-
581
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:109 Version\wck/wck-ctc.php:89
582
- msgid "Edit "
583
- msgstr "Editar"
584
-
585
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:110 Version\wck/wck-ctc.php:92
586
- msgid "New "
587
- msgstr "Nuevo"
588
-
589
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:111 Version\wck/wck-ctc.php:86
590
- msgid "All "
591
- msgstr "Todos"
592
-
593
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:112
594
- msgid "View "
595
- msgstr "Ver"
596
-
597
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:113 Version\wck/wck-ctc.php:84
598
- msgid "Search "
599
- msgstr "Buscar"
600
-
601
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:114 Version\wck/wck-cptc.php:115
602
- msgid "No "
603
- msgstr "No"
604
-
605
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:116
606
- msgid "Parent Page"
607
- msgstr "Página Padre"
608
-
609
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:169 Version\wck/wck-cptc.php:193
610
- #: Version\wck/wck-ctc.php:134 Version\wck/wck-ctc.php:158
611
- msgid "Show Advanced Label Options"
612
- msgstr "Mostrar Opciones Avanzadas de Etiqueta"
613
-
614
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:169 Version\wck/wck-cptc.php:193
615
- #: Version\wck/wck-ctc.php:134 Version\wck/wck-ctc.php:158
616
- msgid "Hide Advanced Label Options"
617
- msgstr "Esconder Opciones Avanzadas de Etiqueta"
618
-
619
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:181 Version\wck/wck-cptc.php:207
620
- #: Version\wck/wck-cptc.php:236 Version\wck/wck-ctc.php:146
621
- #: Version\wck/wck-ctc.php:172 Version\wck/wck-ctc.php:201
622
- msgid "Show Advanced Options"
623
- msgstr "Mostrar opciones avanzadas"
624
-
625
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:181 Version\wck/wck-cptc.php:207
626
- #: Version\wck/wck-cptc.php:236 Version\wck/wck-ctc.php:146
627
- #: Version\wck/wck-ctc.php:172 Version\wck/wck-ctc.php:201
628
- msgid "Hide Advanced Options"
629
- msgstr "Ocultar Opciones Avanzadas"
630
-
631
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:222 Version\wck/wck-ctc.php:187
632
- msgid "Show Advanced Labels"
633
- msgstr "Mostrar Etiquetas Avanzadas"
634
-
635
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:222 Version\wck/wck-ctc.php:187
636
- msgid "Hide Advanced Labels"
637
- msgstr "Ocultar Etiquetas Avanzadas"
638
-
639
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:283
640
- msgid ""
641
- "WCK Custom Post Type Creator allows you to easily create custom post types "
642
- "for Wordpress without any programming knowledge.<br />Most of the common "
643
- "options for creating a post type are displayed by default while the advanced "
644
- "options and label are just one click away."
645
- msgstr ""
646
- "WCK Custom Post Type Creator te permite crear fácilmente los tipos de "
647
- "correos personalizados para Wordpress y sin ningún conocimiento de "
648
- "programación. <br/> La mayoría de las opciones comunes para la creación de "
649
- "un puesto tipo se muestran de forma predeterminada, mientras que las "
650
- "opciones avanzadas y la etiqueta están a sólo un clic de distancia."
651
-
652
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:288 Version\wck/wck-ctc.php:245
653
- msgid "Labels"
654
- msgstr "Etiquetas"
655
-
656
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:289
657
- msgid ""
658
- "For simplicity you are required to introduce only the Singular Label and "
659
- "Plural Label from wchich the rest of the labels will be formed.<br />For a "
660
- "more detailed control of the labels you just have to click the \"Show "
661
- "Advanced Label Options\" link and all the availabel labels will be displayed."
662
- msgstr ""
663
- "Para simplicidad se requiere introducir sólo la etiqueta Singular y Plural "
664
- "desde donde se formará el resto de las etiquetas. <br/> ¡Para un control más "
665
- "detallado de las etiquetas, solo tienes que hacer clic en el enlace "
666
- "\"Mostrar opciones avanzadas etiqueta\" y todas las etiquetas disponibles "
667
- "serán mostradas."
668
-
669
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:294 Version\wck/wck-ctc.php:251
670
- msgid "Advanced Options"
671
- msgstr "Opciones avanzadas"
672
-
673
- #: d:\!!!!!!!!!\Free Version\wck/wck-cptc.php:295
674
- msgid ""
675
- "The Advanced Options are set to the most common defaults for custom post "
676
- "types. To display them click the \"Show Advanced Options\" link."
677
- msgstr ""
678
- "Las opciones avanzadas se establecen en los valores predeterminados más "
679
- "comunes para este tipo de publicación personalizado. Para visualizarlos, "
680
- "haga clic en el enlace \"Mostrar opciones avanzadas\"."
681
-
682
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:6
683
- msgid "WCK Taxonomy Creator"
684
- msgstr "WCK Taxonomy Creador"
685
-
686
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:7 Version\wck/wck-sas.php:95
687
- msgid "Taxonomy Creator"
688
- msgstr "Creador deTaxonomía"
689
-
690
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:35
691
- msgid "Taxonomy"
692
- msgstr "Taxonomía"
693
-
694
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:35
695
- msgid ""
696
- "(The name of the taxonomy. Name must not contain capital letters or spaces.)"
697
- msgstr ""
698
- "(El nombre de la taxonomía. El nombre no debe contener letras mayúsculas o "
699
- "espacios.)"
700
-
701
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:36
702
- msgid "ex. Writer"
703
- msgstr "ej Escritor"
704
-
705
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:37
706
- msgid "ex. Writers"
707
- msgstr "ej. Escritores"
708
-
709
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:38
710
- msgid "Attach to"
711
- msgstr "Adjuntar a"
712
-
713
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:39
714
- msgid ""
715
- "Is this taxonomy hierarchical (have descendants) like categories or not "
716
- "hierarchical like tags."
717
- msgstr ""
718
- "¿Es esta taxonomía jerárquica (tiene descendientes) como categorías o no "
719
- "jerárquica como las etiquetas?"
720
-
721
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:41
722
- msgid "ex. Search Writers"
723
- msgstr "Ej. Buscar Escritores"
724
-
725
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:42
726
- msgid "Popular Items"
727
- msgstr "Artículos populares"
728
-
729
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:42
730
- msgid "ex. Popular Writers"
731
- msgstr "ej. Escritores populares"
732
-
733
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:43
734
- msgid "ex. All Writers"
735
- msgstr "ej. Todos los Escritores"
736
-
737
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:44
738
- msgid "Parent Item"
739
- msgstr "Artículo Padre"
740
-
741
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:44
742
- msgid "ex. Parent Genre"
743
- msgstr "ej. Género Padre"
744
-
745
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:45
746
- msgid "ex. Parent Genre:"
747
- msgstr "ej. Género Padre"
748
-
749
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:46
750
- msgid "ex. Edit Writer"
751
- msgstr "ej. Editar Escritor"
752
-
753
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:47
754
- msgid "Update Item"
755
- msgstr "Actualizar Artículo"
756
-
757
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:47
758
- msgid "ex. Update Writer"
759
- msgstr "ej. Actualizar Escritor"
760
-
761
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:48
762
- msgid "ex. Add New Writer"
763
- msgstr "ej. Añadir Nuevo Escritor"
764
-
765
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:49
766
- msgid "New Item Name"
767
- msgstr "Nuevo Nombre del elemento"
768
-
769
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:49
770
- msgid "ex. New Writer Name"
771
- msgstr "ej. Nuevo Nombre Escritor"
772
-
773
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:50
774
- msgid "Separate Items With Commas"
775
- msgstr "Separe el Nombre con comas"
776
-
777
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:50
778
- msgid "ex. Separate writers with commas"
779
- msgstr "ej. Separe Escritores con comas"
780
-
781
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:51
782
- msgid "Add Or Remove Items"
783
- msgstr "Añadir o eliminar elementos"
784
-
785
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:51
786
- msgid "ex. Add or remove writers"
787
- msgstr "ej. Añadir o eliminar escritores"
788
-
789
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:52
790
- msgid "Choose From Most Used"
791
- msgstr "Elegir de los más usados."
792
-
793
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:52
794
- msgid "ex. Choose from the most used writers"
795
- msgstr "ej Elija uno de los escritores más utilizados"
796
-
797
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:57
798
- msgid "Show Tagcloud"
799
- msgstr "Muestre Tagcloud"
800
-
801
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:57
802
- msgid "Whether to allow the Tag Cloud widget to use this taxonomy."
803
- msgstr "Si permite que el Tag widget de nube utilice esta taxonomía."
804
-
805
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:62
806
- msgid "Custom Taxonomy Creation"
807
- msgstr "Creación de Taxonomía Personalizada"
808
-
809
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:85
810
- msgid "Popular "
811
- msgstr "Popular"
812
-
813
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:87 Version\wck/wck-ctc.php:88
814
- msgid "Parent "
815
- msgstr "Padre"
816
-
817
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:90
818
- msgid "Update "
819
- msgstr "Actualizar"
820
-
821
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:93
822
- msgid "Separate "
823
- msgstr "Separada"
824
-
825
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:94
826
- msgid "Add or remove "
827
- msgstr "Agregar o quitar"
828
-
829
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:95
830
- msgid "Choose from the most used "
831
- msgstr "Elija entre los más utilizados"
832
-
833
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:240
834
- msgid ""
835
- "WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for "
836
- "Wordpress without any programming knowledge.<br />Most of the common options "
837
- "for creating a taxonomy are displayed by default while the advanced and "
838
- "label options are just one click away."
839
- msgstr ""
840
- "WCK Custom Taxonomy Creador le permite crear fácilmente taxonomía "
841
- "personalizada para Wordpress sin ningún conocimientos de programación. <br /"
842
- "> La mayoría de las opciones comunes para la creación de una taxonomía se "
843
- "muestran por defecto, mientras que las opciones avanzadas y etiquetas están "
844
- "a sólo un clic de distancia."
845
-
846
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:246
847
- msgid ""
848
- "For simplicity you are required to introduce only the Singular Label and "
849
- "Plural Label from wchich the rest of the labels will be formed.<br />For a "
850
- "more detailed control of the labels you just have to click the \"Show "
851
- "Advanced Label Options\" link and all the availabel labels will be displayed"
852
- msgstr ""
853
- "Por simplicidad, usted está obligado a introducir sólo la etiqueta Singular "
854
- "y Plural desde donde el resto de las etiquetas se formará. <br /> ¡Para un "
855
- "control más detallado de las etiquetas, solo tienes que hacer clic en el "
856
- "enlace \"Mostrar opciones avanzadas de etiquetas\" y todas las etiquetas "
857
- "disponibles se mostrarán"
858
-
859
- #: d:\!!!!!!!!!\Free Version\wck/wck-ctc.php:252
860
- msgid ""
861
- "The Advanced Options are set to the most common defaults for taxonomies. To "
862
- "display them click the \"Show Advanced Options\" link."
863
- msgstr ""
864
- "Las opciones avanzadas están ajustadas a los valores predeterminados comunes "
865
- "para las taxonomías. Para visualizarlos, haga clic en el enlace \"Mostrar "
866
- "opciones avanzadas\"."
867
-
868
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:15
869
- msgid "Start Here & General Settings"
870
- msgstr "Comience aquí y Ajustes generales"
871
-
872
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:16
873
- msgid "Start and Settings"
874
- msgstr "Inicio y Configuración"
875
-
876
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:34
877
- msgid "Serial Number"
878
- msgstr "Número de serie"
879
-
880
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:34
881
- msgid ""
882
- "Please enter your serial number. For example: (e.g. WCKPRO-11-"
883
- "SN-251r55baa4fbe7bf595b2aabb8d72985)"
884
- msgstr ""
885
- "Introduzca su número de serie. Por ejemplo: (por ejemplo WCKPRO-11-"
886
- "SN-251r55baa4fbe7bf595b2aabb8d72985)"
887
-
888
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:40
889
- msgid "Register Your Version"
890
- msgstr "Registre su Versión"
891
-
892
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:67
893
- #, php-format
894
- msgid "Welcome to %s"
895
- msgstr "Bienvenido a %s"
896
-
897
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:68
898
- msgid ""
899
- "WCK helps you to improve the usability of the sites you build, making them "
900
- "manageable by your clients. Your very own repeater custom fields and groups, "
901
- "custom post type and taxonomy creator with front-end posting."
902
- msgstr ""
903
- "WCK le ayuda a mejorar la usabilidad de los sitios que usted construye, "
904
- "haciéndolos manejables por sus clientes. . Sus propios campos y grupos "
905
- "personalizados repetidor, el tipo de publicación personalizada y creador de "
906
- "taxonomía con fijación frontal"
907
-
908
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:69
909
- #, php-format
910
- msgid "Version %s"
911
- msgstr "Versión %s"
912
-
913
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:83
914
- msgid "Quick Start-Up Guide"
915
- msgstr "Quía Rápida de Inicio"
916
-
917
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:88
918
- msgid ""
919
- "WordPress Creation Kit Pro has support for a wide list of custom fields: "
920
- "WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, "
921
- "Drop-Down, Select, Checkboxes, Radio Buttons"
922
- msgstr ""
923
- "WordPress Creación Kit Pro tiene soporte para una amplia lista de campos "
924
- "personalizados: Editor WYSIWYG, Subi campo, Fecha , Usuario, país, entrada "
925
- "de texto, Área de texto, desplegable, Seleccionar, casillas de verificación, "
926
- "botones de radio"
927
-
928
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:89
929
- msgid ""
930
- "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
931
- "kit/custom-fields-creator/\" target=\"_blank\">here</a> about how to display "
932
- "them in your templates."
933
- msgstr ""
934
- "Documentación de Access <a href = \"http://www.cozmoslabs.com/wordpress-"
935
- "creation-kit/custom-fields-creator/ \"target=\"_blank\"> aquí </a> sobre "
936
- "cómo mostrarlos en sus plantillas."
937
-
938
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:92
939
- msgid "Create & manage all your custom content types"
940
- msgstr "Crear y gestionar todos los tipos de contenido personalizado"
941
-
942
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:93
943
- msgid ""
944
- "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
945
- "kit/custom-post-type-creator/\" target=\"_blank\">here</a> about how to "
946
- "display them in your templates."
947
- msgstr ""
948
- "Documentación de acceso<a href=\"http://www.cozmoslabs.com/ wordpress-"
949
- "creation-kit/custom-post-type-creator/\"target=\" _blank\"> aquí </a> sobre "
950
- "cómo mostrarlos en sus plantillas."
951
-
952
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:96
953
- msgid "Create new taxonomies for filtering your content"
954
- msgstr "Crear nuevas taxonomías para el filtrado de su contenido"
955
-
956
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:97
957
- msgid ""
958
- "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
959
- "kit/custom-taxonomy-creator/\" target=\"_blank\">here</a> about how to "
960
- "display them in your templates."
961
- msgstr ""
962
- "Documentación de acceso a<a href=\"http://www.cozmoslabs.com/wordpress-"
963
- "creation-kit/custom-taxonomy-creator/\" target=\"_blank\"> aquí </a> sobre "
964
- "cómo mostrarlos en sus plantillas"
965
-
966
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:99
967
- msgid "Front-End Posting (available in the Pro version)"
968
- msgstr "Publicación Front-End (disponible en la versión Pro)"
969
-
970
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:100
971
- msgid ""
972
- "Create and edit posts/pages or custom posts directly from the front-end."
973
- msgstr ""
974
- "Crear y editar publicaciones / páginas o publicaciones personalizadas "
975
- "directamente desde el front-end."
976
-
977
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:101
978
- msgid "Available shortcodes:"
979
- msgstr "Códigos cortos disponibles:"
980
-
981
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:103
982
- msgid ""
983
- "[fep form_name=\"front-end-post-name\"] - displayes your form in the front-"
984
- "end"
985
- msgstr ""
986
- "[fep form_name=\"front-end-post-name\"] - muestra su formulario en el front-"
987
- "end"
988
-
989
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:104
990
- msgid ""
991
- "[fep-dashboard] - the quick-dashboard allows: simple profile updates, "
992
- "editing/deletion of posts, pages and custom post types."
993
- msgstr ""
994
- "[fep-dashboard] - el tablero rápido permite: actualizaciones de perfiles "
995
- "simples, edición / borrado de publicaciones, páginas y tipos de publicación "
996
- "personalizados"
997
-
998
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:105
999
- msgid ""
1000
- "[fep-lilo] - login/logout/register widget with the simple usage of a "
1001
- "shortcode. Can be added in a page or text widget."
1002
- msgstr ""
1003
- "[fep-lilo] – widget login/logout/register con el simple uso de un shortcode. "
1004
- "Se puede añadir en una página o widget de texto."
1005
-
1006
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:107
1007
- msgid ""
1008
- "Access documentation <a href=\"http://www.cozmoslabs.com/wordpress-creation-"
1009
- "kit/frontend-posting/\" target=\"_blank\">here</a> about how to display them "
1010
- "in your templates."
1011
- msgstr ""
1012
- "Documentación de Acceso <a href=\"http://www.cozmoslabs.com/wordpress-"
1013
- "creation-kit/frontend-posting/\" target=\"_blank\"> aquí </a> sobre cómo "
1014
- "mostrarlos en sus plantillas."
1015
-
1016
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:109
1017
- msgid "Option Pages (available in the Pro version)"
1018
- msgstr "Páginas de opción (disponible en la versión Pro)"
1019
-
1020
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:110
1021
- msgid ""
1022
- "The Options Page Creator Allows you to create a new menu item called "
1023
- "\"Options\"(for example) which can hold advanced custom field groups. "
1024
- "Perfect for theme options or a simple UI for your custom plugin (like a "
1025
- "simple testimonials section in the front-end)."
1026
- msgstr ""
1027
- "El Options Page Creator Permite crear un nuevo elemento del menú llamado "
1028
- "\"Opciones\" (por ejemplo) que puede albergar grupos de campos "
1029
- "personalizados avanzados. Perfecto para las opciones del tema o una interfaz "
1030
- "de usuario simple para su complemento personalizado (como una sección de "
1031
- "testimonios simple en el front-end)."
1032
-
1033
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:137
1034
- msgid ""
1035
- "Please enter your serial number to get access to automatic updates. If you "
1036
- "do not have one, you can <a href=\"http://www.cozmoslabs.com/wordpress-"
1037
- "creation-kit/\" target=\"_blank\">Get One Here</a>."
1038
- msgstr ""
1039
- "Introduzca, por favor su número de serie para tener acceso a las "
1040
- "actualizaciones automáticas. Si usted no tiene uno, puede <a href=\"http://"
1041
- "www.cozmoslabs.com/wordpress-creation-kit/\" target=\"_blank\"> conseguir "
1042
- "uno aquí </a>."
1043
-
1044
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:139
1045
- msgid "Oups! Our serial verification server is down. Please try again later."
1046
- msgstr ""
1047
- "¡Ups ! Nuestro servidor de verificación de serie se encuentra abajo. Por "
1048
- "favor, inténtelo de nuevo más tarde."
1049
-
1050
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:141
1051
- msgid ""
1052
- "Oups! It seems the serial number you entered was not found in our database. "
1053
- "To find out what's your serial number log-in to <a href=\"http://www."
1054
- "cozmoslabs.com/account/\" target=\"_blank\">your account page</a> over at "
1055
- "Cozmoslabs.com"
1056
- msgstr ""
1057
- "¡Ups! Al parecer, el número de serie que ha puesto no se encuentra en "
1058
- "nuestra base de datos. Para saber cuál es el número de serie ingrese a <a "
1059
- "href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\"> página de su "
1060
- "cuenta </a> sobre al Cozmoslabs.com"
1061
-
1062
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:143
1063
- msgid ""
1064
- "Wohoo! Your serial number is valid and you have access to automatic updates."
1065
- msgstr ""
1066
- "Wohoo! Su número de serie es válido y tiene acceso a las actualizaciones "
1067
- "automáticas."
1068
-
1069
- #: d:\!!!!!!!!!\Free Version\wck/wck-sas.php:145
1070
- msgid ""
1071
- "It seems your serial number has <strong>expired</strong>. You'll continue to "
1072
- "get automatic updates if update your serial number for another year from <a "
1073
- "href=\"http://www.cozmoslabs.com/account/\" target=\"_blank\"><strong>your "
1074
- "account page</strong></a>."
1075
- msgstr ""
1076
- "Parece que su número de serie <strong> ha expirado </ strong>. Tendrá que "
1077
- "continuar para obtener actualizaciones automáticas si actualizar su número "
1078
- "de serie para otro año de <a href=\"http://www.cozmoslabs.com/account/\" "
1079
- "target=\"_blank\"> <strong> su página de cuenta </ strong> </a>."
1080
-
1081
- #: d:\!!!!!!!!!\Free
1082
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:282
1083
- msgid "Add Entry"
1084
- msgstr "Añadir entrada"
1085
-
1086
- #: d:\!!!!!!!!!\Free
1087
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:332
1088
- msgid "Save Changes"
1089
- msgstr "Guardar cambios"
1090
-
1091
- #: d:\!!!!!!!!!\Free
1092
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:333
1093
- msgid "Cancel"
1094
- msgstr "Cancelar"
1095
-
1096
- #: d:\!!!!!!!!!\Free
1097
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1098
- msgid "Content"
1099
- msgstr "Contenido"
1100
-
1101
- #: d:\!!!!!!!!!\Free
1102
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1103
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1104
- msgid "Edit"
1105
- msgstr "Editar"
1106
-
1107
- #: d:\!!!!!!!!!\Free
1108
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:370
1109
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1110
- msgid "Delete"
1111
- msgstr "Borrar"
1112
-
1113
- #: d:\!!!!!!!!!\Free
1114
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:433
1115
- msgid "Edit this item"
1116
- msgstr "Editar este artículo"
1117
-
1118
- #: d:\!!!!!!!!!\Free
1119
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:434
1120
- msgid "Delete this item"
1121
- msgstr "Borrar este artículo"
1122
-
1123
- #: d:\!!!!!!!!!\Free
1124
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:506
1125
- msgid "Please enter a value for the required field "
1126
- msgstr "Por favor, introduzca un valor para el campo requerido"
1127
-
1128
- #: d:\!!!!!!!!!\Free
1129
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:788
1130
- msgid "Select File"
1131
- msgstr "Seleccione Archivo"
1132
-
1133
- #: d:\!!!!!!!!!\Free
1134
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:828
1135
- #: Version\wck/wordpress-creation-kit-api/fields/upload.php:28
1136
- msgid "Remove"
1137
- msgstr "Eliminar"
1138
-
1139
- #: d:\!!!!!!!!!\Free
1140
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:866
1141
- msgid "Syncronize WCK"
1142
- msgstr "Syncronizar WCK"
1143
-
1144
- #: d:\!!!!!!!!!\Free
1145
- #: Version\wck/wordpress-creation-kit-api/wordpress-creation-kit.php:878
1146
- msgid "Syncronize WCK Translation"
1147
- msgstr "Traducción Syncronizar WCK"
1148
-
1149
- #: d:\!!!!!!!!!\Free
1150
- #: Version\wck/wordpress-creation-kit-api/fields/select.php:11
1151
- msgid "...Chose"
1152
- msgstr "... Elija"
1153
-
1154
- #: d:\!!!!!!!!!\Free
1155
- #: Version\wck/wordpress-creation-kit-api/fields/upload.php:40
1156
- msgid "Upload "
1157
- msgstr "Subir"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
languages/wck.catalog.php CHANGED
@@ -402,8 +402,8 @@
402
  <?php __("It seems your serial number has <strong>expired</strong>. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href=\"http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal\" target=\"_blank\"><strong>your account page</strong></a>.", "wck"); ?>
403
  <?php __("Your WordPress Creation Kit serial number is about to expire. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href=\"http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal\" target=\"_blank\"><strong>your account page</strong></a>.", "wck"); ?>
404
  <?php __("<p>Your <strong>WordPress Creation Kit</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s of WCK to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>", "wck"); ?>
405
- <?php __("<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %5$sDismiss%6$s</p>", "wck"); ?>
406
- <?php __("<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %6$sDismiss%7$s</p>", "wck"); ?>
407
  <?php __("Add New Swift Template", "wck"); ?>
408
  <?php __("Edit Swift Template", "wck"); ?>
409
  <?php __("New Swift Template", "wck"); ?>
402
  <?php __("It seems your serial number has <strong>expired</strong>. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href=\"http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal\" target=\"_blank\"><strong>your account page</strong></a>.", "wck"); ?>
403
  <?php __("Your WordPress Creation Kit serial number is about to expire. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href=\"http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal\" target=\"_blank\"><strong>your account page</strong></a>.", "wck"); ?>
404
  <?php __("<p>Your <strong>WordPress Creation Kit</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s of WCK to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>", "wck"); ?>
405
+ <?php __("<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %5$sDismiss%6$s</p>", "wck"); ?>
406
+ <?php __("<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %6$sDismiss%7$s</p>", "wck"); ?>
407
  <?php __("Add New Swift Template", "wck"); ?>
408
  <?php __("Edit Swift Template", "wck"); ?>
409
  <?php __("New Swift Template", "wck"); ?>
languages/wck.pot CHANGED
@@ -1661,11 +1661,11 @@ msgid "<p>Your <strong>WordPress Creation Kit</strong> serial number is invalid
1661
  msgstr ""
1662
 
1663
  #: wck-sas.php:345
1664
- msgid "<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %5$sDismiss%6$s</p>"
1665
  msgstr ""
1666
 
1667
  #: wck-sas.php:349
1668
- msgid "<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %6$sDismiss%7$s</p>"
1669
  msgstr ""
1670
 
1671
  #: wck-stp.php:14
1661
  msgstr ""
1662
 
1663
  #: wck-sas.php:345
1664
+ msgid "<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %5$sDismiss%6$s</p>"
1665
  msgstr ""
1666
 
1667
  #: wck-sas.php:349
1668
+ msgid "<p style=\"position:relative;\">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %6$sDismiss%7$s</p>"
1669
  msgstr ""
1670
 
1671
  #: wck-stp.php:14
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: cozmoslabs, reflectionmedia, madalin.ungureanu, sareiodata, adispi
3
  Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
4
  Tags: custom fields, custom field, wordpress custom fields, custom post type, custom post types, post types, repeater fields, meta box, metabox, custom taxonomy, custom fields creator, post meta
5
  Requires at least: 3.1
6
- Tested up to: 5.1.0
7
- Stable tag: 2.2.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,6 +137,9 @@ Creating a taxonomy generally automatically creates a special query variable usi
137
  10. Taxonomy listing
138
 
139
  == Changelog ==
 
 
 
140
  = 2.2.4 =
141
  * Updated ckeditor for the wysiwyg field
142
  * Fixed an issue with gutenberg paragraphs that loaded ckeditor toolbar in them
3
  Donate link: http://www.cozmoslabs.com/wordpress-creation-kit/
4
  Tags: custom fields, custom field, wordpress custom fields, custom post type, custom post types, post types, repeater fields, meta box, metabox, custom taxonomy, custom fields creator, post meta
5
  Requires at least: 3.1
6
+ Tested up to: 5.3.2
7
+ Stable tag: 2.2.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
  10. Taxonomy listing
138
 
139
  == Changelog ==
140
+ = 2.2.5 =
141
+ * Compatibility with php 7.2
142
+
143
  = 2.2.4 =
144
  * Updated ckeditor for the wysiwyg field
145
  * Fixed an issue with gutenberg paragraphs that loaded ckeditor toolbar in them
wck-cfc.php CHANGED
@@ -1,1349 +1,1334 @@
1
- <?php
2
- /* Creates Custom Meta Box Fields for WordPress. It supports repeater fields and uses AJAX to handle data. */
3
-
4
- /* Add Scripts */
5
- add_action('admin_enqueue_scripts', 'wck_cfc_print_scripts' );
6
- function wck_cfc_print_scripts($hook){
7
- if( isset( $_GET['post_type'] ) || isset( $_GET['post'] ) ){
8
- if( isset( $_GET['post_type'] ) )
9
- $post_type = sanitize_text_field( $_GET['post_type'] );
10
- else if( isset( $_GET['post'] ) )
11
- $post_type = get_post_type( absint( $_GET['post'] ) );
12
-
13
- if( 'wck-meta-box' == $post_type ){
14
- wp_register_style('wck-cfc-css', plugins_url('/css/wck-cfc.css', __FILE__));
15
- wp_enqueue_style('wck-cfc-css');
16
-
17
- wp_register_script('wck-cfc-js', plugins_url('/js/wck-cfc.js', __FILE__), array( 'jquery' ), '1.0' );
18
- wp_enqueue_script('wck-cfc-js');
19
- }
20
- }
21
- }
22
-
23
- /* hook to create custom post types */
24
- add_action( 'init', 'wck_cfc_create_custom_fields_cpt' );
25
-
26
- function wck_cfc_create_custom_fields_cpt(){
27
- if( is_admin() && current_user_can( 'edit_theme_options' ) ){
28
- $labels = array(
29
- 'name' => _x( 'WCK Custom Meta Boxes', 'post type general name'),
30
- 'singular_name' => _x( 'Custom Meta Box', 'post type singular name'),
31
- 'add_new' => _x( 'Add New', 'Custom Meta Box' ),
32
- 'add_new_item' => __( "Add New Meta Box", "wck" ),
33
- 'edit_item' => __( "Edit Meta Box", "wck" ) ,
34
- 'new_item' => __( "New Meta Box", "wck" ),
35
- 'all_items' => __( "Custom Fields Creator", "wck" ),
36
- 'view_item' => __( "View Meta Box", "wck" ),
37
- 'search_items' => __( "Search Meta Boxes", "wck" ),
38
- 'not_found' => __( "No Meta Boxes found", "wck" ),
39
- 'not_found_in_trash' => __( "No Meta Boxes found in Trash", "wck" ),
40
- 'parent_item_colon' => '',
41
- 'menu_name' => __( "Custom Meta Boxes", "wck" )
42
- );
43
- $args = array(
44
- 'labels' => $labels,
45
- 'public' => false,
46
- 'publicly_queryable' => false,
47
- 'show_ui' => true,
48
- 'show_in_menu' => 'wck-page',
49
- 'has_archive' => false,
50
- 'hierarchical' => false,
51
- 'capability_type' => 'post',
52
- 'supports' => array( 'title' )
53
- );
54
-
55
- register_post_type( 'wck-meta-box', $args );
56
- }
57
- }
58
-
59
- /* add admin body class to cfc custom post type */
60
- add_filter( 'admin_body_class', 'wck_cfc_admin_body_class' );
61
- function wck_cfc_admin_body_class( $classes ){
62
- if( isset( $_GET['post_type'] ) || isset( $_GET['post'] ) ){
63
- if( isset( $_GET['post_type'] ) )
64
- $post_type = sanitize_text_field( $_GET['post_type'] );
65
- else if( isset( $_GET['post'] ) )
66
- $post_type = get_post_type( absint( $_GET['post'] ) );
67
-
68
- if( 'wck-meta-box' == $post_type ){
69
- $classes .= ' wck_page_cfc-page ';
70
- }
71
- }
72
- return $classes;
73
- }
74
-
75
- /* Remove view action from post list view */
76
- add_filter('post_row_actions','wck_cfc_remove_view_action');
77
- function wck_cfc_remove_view_action($actions){
78
- global $post;
79
- if ($post->post_type =="wck-meta-box"){
80
- unset( $actions['view'] );
81
- }
82
- return $actions;
83
- }
84
-
85
-
86
- /* create the meta box */
87
- add_action( 'init', 'wck_cfc_create_box', 500 );
88
- function wck_cfc_create_box(){
89
- global $wpdb;
90
-
91
- /* get post types */
92
- $public_cpt_arg = apply_filters( 'wck_cfc_public_cpt_arg', true );
93
- $args = array(
94
- 'public' => $public_cpt_arg
95
- );
96
- $output = 'objects'; // or objects
97
- $post_types = get_post_types($args,$output);
98
- $post_type_names = array();
99
- if( !empty( $post_types ) ){
100
- foreach ($post_types as $post_type ) {
101
- if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' && $post_type->name != 'wck-swift-template' )
102
- $post_type_names[] = $post_type->name;
103
- }
104
- }
105
- /* add CPTC registered with WCK that are not public */
106
- if( $public_cpt_arg ){
107
- $cpts = get_option('wck_cptc');
108
- if( !empty( $cpts ) ){
109
- foreach( $cpts as $cpt ){
110
- if( $cpt['public'] == 'false' )
111
- $post_type_names[] = $cpt['post-type'];
112
- }
113
- }
114
- }
115
-
116
- /* get page templates */
117
- $templates = wck_get_page_templates();
118
-
119
- /* set up the fields array */
120
- $cfc_box_args_fields = array(
121
- array( 'type' => 'text', 'title' => __( 'Group Name', 'wck' ), 'slug' => 'meta-name', 'description' => __( 'The name of the group. Must be unique, only lowercase letters, no spaces and no special characters.', 'wck' ), 'required' => true ),
122
- array( 'type' => 'select', 'title' => __( 'Post Type', 'wck' ), 'slug' => 'post-type', 'options' => $post_type_names, 'default-option' => true, 'description' => __( 'What post type the meta box should be attached to', 'wck' ), 'required' => true ),
123
- array( 'type' => 'select', 'title' => __( 'Repeater', 'wck' ), 'slug' => 'repeater', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the box supports just one entry or if it is a repeater field. By default it is a single field.', 'wck' ) ),
124
- array( 'type' => 'select', 'title' => __( 'Sortable', 'wck' ), 'slug' => 'sortable', 'options' => array( 'true', 'false' ), 'default' => 'false', 'description' => __( 'Whether the entries are sortable or not. This is valid for repeater fields.', 'wck' ) ),
125
- array( 'type' => 'text', 'title' => __( 'Post ID', 'wck' ), 'slug' => 'post-id', 'description' => __( 'ID of a post on which the meta box should appear. You can also input multiple IDs and separate them with ","', 'wck' ) )
126
- );
127
-
128
- /* only in pro version */
129
- if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
130
- $nested_arg = array( array( 'type' => 'select', 'title' => __( 'Nested', 'wck' ), 'options' => array( 'true', 'false' ), 'default' => 'false', 'description' => __( 'Set to true if you want this metabox to be a nested repeater inside another repeater.', 'wck' ) ) );
131
- array_splice( $cfc_box_args_fields, 1, 0, $nested_arg );
132
- }
133
-
134
- if( !empty( $templates ) )
135
- $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Page Template', 'wck' ), 'slug' => 'page-template', 'options' => $templates, 'default-option' => true, 'description' => __( 'If post type is "page" you can further select a page templete. The meta box will only appear on the page that has that selected page template.', 'wck' ) );
136
-
137
- /* added box style in version 2.4.4 */
138
- $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Box Style', 'wck' ), 'slug' => 'box-style', 'options' => array( '%Default (WP meta-box)%default', '%Seamless (no meta-box)%seamless' ), 'default' => 'default', 'description' => __( 'If the fields should be in a meta-box or not', 'wck' ) );
139
-
140
- /* set up the box arguments */
141
- $args = array(
142
- 'metabox_id' => 'wck-cfc-args',
143
- 'metabox_title' => __( 'Meta Box Arguments', 'wck' ),
144
- 'post_type' => 'wck-meta-box',
145
- 'meta_name' => 'wck_cfc_args',
146
- 'meta_array' => $cfc_box_args_fields,
147
- 'sortable' => false,
148
- 'single' => true
149
- );
150
-
151
- /* create the box */
152
- new Wordpress_Creation_Kit( $args );
153
-
154
- /* set up field types */
155
-
156
- $field_types = array( 'heading', 'text', 'number', 'textarea', 'select', 'select multiple', 'checkbox', 'radio', 'phone', 'upload', 'wysiwyg editor', 'datepicker', 'timepicker', 'colorpicker', 'country select', 'user select', 'cpt select', 'currency select', 'html', 'map' );
157
-
158
- $field_types = apply_filters( 'wck_field_types', $field_types );
159
-
160
- /* setup post types */
161
- $post_types = get_post_types( array( 'public' => true ), 'names' );
162
-
163
- /* set up the fields array */
164
- $cfc_box_fields_fields = apply_filters( 'wck_cfc_box_fields_fields', array(
165
- array( 'type' => 'text', 'title' => __( 'Field Title', 'wck' ), 'slug' => 'field-title', 'description' => __( 'Title of the field. A slug will automatically be generated.', 'wck' ), 'required' => true ),
166
- array( 'type' => 'select', 'title' => __( 'Field Type', 'wck' ), 'slug' => 'field-type', 'options' => $field_types, 'default-option' => true, 'description' => __( 'The field type', 'wck' ), 'required' => true ),
167
- array( 'type' => 'text', 'title' => __( 'Field Slug', 'wck' ), 'slug' => 'field-slug', 'readonly' => true, 'description' => __( 'The meta name of the field, generated automatically from the title, by which you can query. Can be changed. Must be unique, only lowercase letters, no spaces and no special characters.', 'wck' ), 'required' => true ),
168
- array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'slug' => 'description', 'description' => 'The description of the field.' ),
169
- array( 'type' => 'select', 'title' => __( 'Required', 'wck' ), 'slug' => 'required', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the field is required or not', 'wck' ) ),
170
- array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'slug' => 'cpt', 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
171
- array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'slug' => 'default-value', 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ",". For an Upload field input an attachment id.', 'wck' ) ),
172
- array( 'type' => 'textarea', 'title' => __( 'Default Text', 'wck' ), 'slug' => 'default-text', 'description' => __( 'Default text of the textarea.', 'wck' ) ),
173
- array( 'type' => 'textarea', 'title' => __( 'HTML Content', 'wck' ), 'slug' => 'html-content', 'description' => __( 'Add your HTML (or text) content.', 'wck' ) ),
174
- array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'slug' => 'options', 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",".', 'wck' ) ),
175
- array( 'type' => 'text', 'title' => __( 'Labels', 'wck' ), 'slug' => 'labels', 'description' => __( 'Labels for field types "select", "checkbox" and "radio". For multiple options separate them with a ",".', 'wck' ) ),
176
- array( 'type' => 'text', 'title' => __( 'Phone Format', 'wck' ), 'slug' => 'phone-format', 'default' => '(###) ###-####', 'description' => __( "You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.", 'wck' ) .'<br>'. __( "Eg. (###) ###-####", 'wck' ) .'<br>'. __( "Empty field won't check for correct phone number.", 'wck' ) ),
177
- array( 'type' => 'text', 'title' => __( 'Min Number Value', 'wck' ), 'slug' => 'min-number-value', 'description' => __( "Min allowed number value (0 to allow only positive numbers)", 'wck' ) .'<br>'. __( "Leave it empty for no min value", 'wck' ) ),
178
- array( 'type' => 'text', 'title' => __( 'Max Number Value', 'wck' ), 'slug' => 'max-number-value', 'description' => __( "Max allowed number value (0 to allow only negative numbers)", 'wck' ) .'<br>'. __( "Leave it empty for no max value", 'wck' ) ),
179
- array( 'type' => 'text', 'title' => __( 'Number Step Value', 'wck' ), 'slug' => 'number-step-value', 'description' => __( "Step value 1 to allow only integers, 0.1 to allow integers and numbers with 1 decimal", 'wck' ) .'<br>'. __( "To allow multiple decimals use for eg. 0.01 (for 2 deciamls) and so on", 'wck' ) .'<br>'. __( "You can also use step value to specify the legal number intervals (eg. step value 2 will allow only -4, -2, 0, 2 and so on)", 'wck' ) .'<br>'. __( "Leave it empty for no restriction", 'wck' ) ),
180
- array( 'type' => 'checkbox', 'title' => __( 'Attach upload to post', 'wck' ), 'slug' => 'attach-upload-to-post', 'description' => __( 'Uploads will be attached to the post if this is checked', 'wck' ), 'options' => array( 'yes' ), 'default' => 'yes' ),
181
- array( 'type' => 'text', 'title' => __( 'Number of rows', 'wck' ), 'slug' => 'number-of-rows', 'description' => __( 'Number of rows for the textarea', 'wck' ), 'default' => '5' ),
182
- array( 'type' => 'select', 'title' => __( 'Readonly', 'wck' ), 'slug' => 'readonly', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the textarea is readonly or not', 'wck' ) ),
183
- array( 'type' => 'text', 'title' => __( 'Default Latitude', 'wck' ), 'slug' => 'map-default-latitude', 'description' => __( 'The latitude at which the map should be displayed when no pins are attached.', 'wck' ), 'default' => 0 ),
184
- array( 'type' => 'text', 'title' => __( 'Default Longitude', 'wck' ), 'slug' => 'map-default-longitude', 'description' => __( 'The longitude at which the map should be displayed when no pins are attached.', 'wck' ), 'default' => 0 ),
185
- array( 'type' => 'text', 'title' => __( 'Default Zoom', 'wck' ), 'slug' => 'map-default-zoom', 'description' => __( 'Add a number from 0 to 19. The higher the number the higher the zoom.', 'wck' ), 'default' => 15 ),
186
- array( 'type' => 'text', 'title' => __( 'Map Height', 'wck' ), 'slug' => 'map-height', 'description' => __( 'The height of the map.', 'wck' ), 'default' => 350 ),
187
- array( 'type' => 'select', 'title' => __( 'Date Format', 'wck' ), 'slug' => 'date-format', 'description' => __( 'The format of the datepicker date', 'wck' ), 'options' => array( '%Default - dd-mm-yy%dd-mm-yy', '%Datepicker default - mm/dd/yy%mm/dd/yy', '%ISO 8601 (extended) - yy-mm-dd%yy-mm-dd', '%ISO 8601 (basic) - yymmdd%yymmdd', '%Short - d M, y%d M, y', '%Medium - d MM, y%d MM, y', '%Full - DD, d MM, yy%DD, d MM, yy', '%With text - \'day\' d \'of\' MM \'in the year\' yy%\'day\' d \'of\' MM \'in the year\' yy' ), 'default' => 'dd-mm-yy' ),
188
- ));
189
-
190
-
191
- /* set up the box arguments */
192
- $args = array(
193
- 'metabox_id' => 'wck-cfc-fields',
194
- 'metabox_title' => __( 'Meta Box Fields', 'wck' ),
195
- 'post_type' => 'wck-meta-box',
196
- 'meta_name' => 'wck_cfc_fields',
197
- 'meta_array' => $cfc_box_fields_fields
198
- );
199
-
200
- /* create the box */
201
- new Wordpress_Creation_Kit( $args );
202
- }
203
-
204
- /* advanced label options container for update form */
205
- add_action( "wck_before_add_form_wck_cfc_args_element_0", 'wck_cfc_description_for_args_box' );
206
- function wck_cfc_description_for_args_box(){
207
- echo '<div class="cfc-message"><p>'. __( 'Enter below the arguments for the meta box.', 'wck' ) .'</p></div>';
208
- }
209
-
210
- /* add css classes on update form. Allows us to show/hide elements based on field type select value */
211
- add_filter( 'wck_update_container_class_wck_cfc_fields', 'wck_cfc_update_container_class', 10, 4 );
212
- function wck_cfc_update_container_class($wck_update_container_css_class, $meta, $results, $element_id) {
213
- $wck_element_type = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]["field-type"] );
214
- return "class='update_container_$meta update_container_$wck_element_type element_type_$wck_element_type'";
215
- }
216
-
217
- add_filter( 'wck_element_class_wck_cfc_fields', 'wck_cfc_element_class', 10, 4 );
218
- function wck_cfc_element_class($wck_element_class, $meta, $results, $element_id){
219
- $wck_element_type = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]["field-type"] );
220
- $wck_element_class = "class='element_type_$wck_element_type'";
221
- return $wck_element_class;
222
- }
223
-
224
- /* add refresh to page */
225
- add_action("wck_refresh_list_wck_cfc", "wck_cfc_after_refresh_list");
226
- function wck_cfc_after_refresh_list(){
227
- echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cfc-page&updated=true' .'";</script>';
228
- }
229
-
230
- /* hook to create custom meta boxes */
231
- add_action( 'admin_init', 'wck_cfc_create_boxes' );
232
-
233
- function wck_cfc_create_boxes_args(){
234
- $all_box_args = wp_cache_get( 'wck_all_box_args', 'wck' );
235
-
236
- if ( $all_box_args !== false )
237
- return $all_box_args;
238
-
239
- $all_box_args = array();
240
-
241
- $args = array(
242
- 'post_type' => 'wck-meta-box',
243
- 'numberposts' => -1
244
- );
245
-
246
- $all_meta_boxes = get_posts( $args );
247
-
248
- if( !empty( $all_meta_boxes ) ){
249
- foreach( $all_meta_boxes as $meta_box ){
250
- $wck_cfc_args = get_post_meta( $meta_box->ID, 'wck_cfc_args', true );
251
- $wck_cfc_fields = get_post_meta( $meta_box->ID, 'wck_cfc_fields', true );
252
-
253
- $box_title = get_the_title( $meta_box->ID );
254
- /* treat case where the post has no title */
255
- if( empty( $box_title ) )
256
- $box_title = '(no title)';
257
-
258
- $fields_array = array();
259
- if( !empty( $wck_cfc_fields ) ){
260
- foreach( $wck_cfc_fields as $wck_cfc_field ){
261
- $fields_inner_array = array( 'type' => $wck_cfc_field['field-type'], 'title' => $wck_cfc_field['field-title'] );
262
-
263
- if( !empty( $wck_cfc_field['field-slug'] ) )
264
- $fields_inner_array['slug'] = $wck_cfc_field['field-slug'];
265
- else
266
- $fields_inner_array['slug'] = Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_field['field-title'] );
267
-
268
- if( !empty( $wck_cfc_field['description'] ) )
269
- $fields_inner_array['description'] = $wck_cfc_field['description'];
270
- if( !empty( $wck_cfc_field['required'] ) )
271
- $fields_inner_array['required'] = $wck_cfc_field['required'] == 'false' ? false : true;
272
- if ( !empty( $wck_cfc_field['cpt'] ) )
273
- $fields_inner_array['cpt'] = $wck_cfc_field['cpt'];
274
- if( isset( $wck_cfc_field['default-value'] ) )
275
- $fields_inner_array['default'] = $wck_cfc_field['default-value'];
276
- if( isset( $wck_cfc_field['default-text'] ) && !empty( $wck_cfc_field['default-text'] ) )
277
- $fields_inner_array['default'] = $wck_cfc_field['default-text'];
278
- if( !empty( $wck_cfc_field['options'] ) ){
279
- $fields_inner_array['options'] = array_map( 'trim', explode( ',', $wck_cfc_field['options'] ) );
280
-
281
- if( !empty( $wck_cfc_field['labels'] ) ){
282
- $labels = array_map( 'trim', explode( ',', $wck_cfc_field['labels'] ) );
283
- }
284
-
285
- if( !empty( $fields_inner_array['options'] ) ){
286
- foreach( $fields_inner_array['options'] as $key => $value ){
287
- $fields_inner_array['options'][$key] = trim( $value );
288
- if( strpos( $value, '%' ) === false && !empty( $labels[$key] ) )
289
- $fields_inner_array['options'][$key] = '%'.$labels[$key].'%'.$value;
290
- }
291
- }
292
-
293
- }
294
- if( !empty( $wck_cfc_field['attach-upload-to-post'] ) )
295
- $fields_inner_array['attach_to_post'] = $wck_cfc_field['attach-upload-to-post'] == 'yes' ? true : false;
296
-
297
- if( !empty( $wck_cfc_field['number-of-rows'] ) )
298
- $fields_inner_array['number_of_rows'] = trim( $wck_cfc_field['number-of-rows'] );
299
-
300
- if( !empty( $wck_cfc_field['readonly'] ) )
301
- $fields_inner_array['readonly'] = $wck_cfc_field['readonly'] == 'true' ? true : false;
302
-
303
- if( ! empty( $wck_cfc_field['phone-format'] ) ) {
304
- $phone_format_description = __( 'Required phone number format: ', 'wck' ) . $wck_cfc_field['phone-format'];
305
- $phone_format_description = apply_filters( 'wck_phone_format_description', $phone_format_description );
306
- if( $wck_cfc_field['field-type'] === 'phone' ) {
307
- $fields_inner_array['phone-format'] = $wck_cfc_field['phone-format'];
308
- if( ! empty( $wck_cfc_field['description'] ) ) {
309
- $fields_inner_array['description'] .= '<br>' . $phone_format_description;
310
- } else {
311
- $fields_inner_array['description'] = $phone_format_description;
312
- }
313
- }
314
- }
315
-
316
-
317
- if( $wck_cfc_field['field-type'] === 'html' && isset( $wck_cfc_field['html-content'] ) ) {
318
- $fields_inner_array['html-content'] = $wck_cfc_field['html-content'];
319
- }
320
-
321
-
322
- if( isset( $wck_cfc_field['map-default-latitude'] ) )
323
- $fields_inner_array['map_default_latitude'] = trim( $wck_cfc_field['map-default-latitude'] );
324
-
325
- if( isset( $wck_cfc_field['map-default-longitude'] ) )
326
- $fields_inner_array['map_default_longitude'] = trim( $wck_cfc_field['map-default-longitude'] );
327
-
328
- if( !empty( $wck_cfc_field['map-default-zoom'] ) )
329
- $fields_inner_array['map_default_zoom'] = trim( $wck_cfc_field['map-default-zoom'] );
330
-
331
- if( !empty( $wck_cfc_field['map-height'] ) )
332
- $fields_inner_array['map_height'] = trim( $wck_cfc_field['map-height'] );
333
-
334
- if( !empty( $wck_cfc_field['min-number-value'] ) || ( isset( $wck_cfc_field['min-number-value'] ) && $wck_cfc_field['min-number-value'] == '0' ) )
335
- $fields_inner_array['min-number-value'] = trim( $wck_cfc_field['min-number-value'] );
336
-
337
- if( !empty( $wck_cfc_field['max-number-value'] ) || ( isset( $wck_cfc_field['max-number-value'] ) && $wck_cfc_field['max-number-value'] == '0' ) )
338
- $fields_inner_array['max-number-value'] = trim( $wck_cfc_field['max-number-value'] );
339
-
340
- if( !empty( $wck_cfc_field['number-step-value'] ) )
341
- $fields_inner_array['number-step-value'] = trim( $wck_cfc_field['number-step-value'] );
342
-
343
- if( $wck_cfc_field['field-type'] === 'datepicker' ) {
344
- if( !empty( $wck_cfc_field['date-format'] ) )
345
- $fields_inner_array['date-format'] = $wck_cfc_field['date-format'];
346
- }
347
-
348
- $fields_array[] = $fields_inner_array;
349
- }
350
- }
351
-
352
- if( !empty( $wck_cfc_args ) ){
353
- foreach( $wck_cfc_args as $wck_cfc_arg ){
354
-
355
- /* metabox_id must be different from meta_name */
356
- $metabox_id = Wordpress_Creation_Kit::wck_generate_slug( $box_title );
357
- if( $wck_cfc_arg['meta-name'] == $metabox_id || 'content' == $metabox_id )
358
- $metabox_id = 'wck-'. $metabox_id;
359
-
360
- $box_args = array(
361
- 'metabox_id' => $metabox_id,
362
- 'metabox_title' => $box_title,
363
- 'post_type' => $wck_cfc_arg['post-type'],
364
- 'meta_name' => $wck_cfc_arg['meta-name'],
365
- 'meta_array' => $fields_array
366
- );
367
- if( !empty( $wck_cfc_arg['sortable'] ) )
368
- $box_args['sortable'] = $wck_cfc_arg['sortable'] == 'false' ? false : true;
369
-
370
- if( !empty( $wck_cfc_arg['repeater'] ) )
371
- $box_args['single'] = $wck_cfc_arg['repeater'] == 'false' ? true : false;
372
-
373
- if( !empty( $wck_cfc_arg['post-id'] ) )
374
- $box_args['post_id'] = $wck_cfc_arg['post-id'];
375
-
376
- if( !empty( $wck_cfc_arg['page-template'] ) )
377
- $box_args['page_template'] = $wck_cfc_arg['page-template'];
378
-
379
- if( !empty( $wck_cfc_arg['box-style'] ) )
380
- $box_args['box_style'] = $wck_cfc_arg['box-style'];
381
-
382
- $box_args['unserialize_fields'] = apply_filters( 'wck_cfc_unserialize_fields_'.$wck_cfc_arg['meta-name'], false );
383
-
384
- /* nested repeater arg for pro version only */
385
- if( !empty( $wck_cfc_arg['nested'] ) )
386
- $box_args['nested'] = $wck_cfc_arg['nested'] == 'false' ? false : true;
387
-
388
- $all_box_args[] = apply_filters( "wck_cfc_box_args_".$wck_cfc_arg['meta-name'], $box_args );
389
- }
390
- }
391
- }
392
- }
393
- wp_cache_set( 'wck_all_box_args', $all_box_args, 'wck');
394
- return $all_box_args;
395
- }
396
-
397
- function wck_cfc_create_boxes(){
398
- $all_box_args = wck_cfc_create_boxes_args();
399
- if( !empty( $all_box_args ) ){
400
- foreach( $all_box_args as $box_args ){
401
- new Wordpress_Creation_Kit( $box_args );
402
- }
403
- }
404
- }
405
-
406
- /* Meta Name Verification */
407
- add_filter( 'wck_required_test_wck_cfc_args_meta-name', 'wck_cfc_check_meta_name', 10, 8 );
408
- add_filter( 'wck_required_test_wck_cfc_fields_field-slug', 'wck_cfc_check_meta_name', 10, 8 );
409
- function wck_cfc_check_meta_name( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
410
- global $wpdb;
411
-
412
- if( current_filter() == 'wck_required_test_wck_cfc_args_meta-name' ){
413
- $wck_cfc_args = get_post_meta( $post_id, 'wck_cfc_args', true );
414
-
415
- if( empty( $wck_cfc_args ) ){
416
- //this is the add case
417
- $check_meta_existance = wck_cfc_check_existence_in_database( $value );
418
- }
419
- else{
420
- //this is the update case
421
- if( $wck_cfc_args[0]['meta-name'] != $value ){
422
- $check_meta_existance = wck_cfc_check_existence_in_database( $value );
423
- }
424
- else
425
- $check_meta_existance = false;
426
- }
427
- }
428
- else if( current_filter() == 'wck_required_test_wck_cfc_fields_field-slug' ){
429
- if( !empty( $values['wck-overwrite-slug'] ) && $values['wck-overwrite-slug'] == 'overwrite' )
430
- $check_meta_existance = false;
431
- else{
432
- $wck_cfc_fields = get_post_meta( $post_id, 'wck_cfc_fields', true );
433
- if( empty( $wck_cfc_fields ) || $elemet_id === false ){
434
- //this is the add case
435
- $check_meta_existance = wck_cfc_check_existence_in_database( $value );
436
- }
437
- else if( $elemet_id !== false ){
438
- //this is the update case
439
- if( !empty( $wck_cfc_fields[$elemet_id]['field-slug'] ) && $wck_cfc_fields[$elemet_id]['field-slug'] != $value ){
440
- $check_meta_existance = wck_cfc_check_existence_in_database( $value );
441
- }
442
- else
443
- $check_meta_existance = false;
444
- }
445
- }
446
- }
447
-
448
- if( strpos( $value, ' ' ) === false )
449
- $contains_spaces = false;
450
- else
451
- $contains_spaces = true;
452
-
453
- if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
454
- $restricted_name = false;
455
- else
456
- $restricted_name = true;
457
-
458
- if ( strtolower($value) == $value )
459
- $has_uppercase = false;
460
- else
461
- $has_uppercase = true;
462
-
463
- return ( $check_meta_existance || empty($value) || $contains_spaces || $restricted_name || $has_uppercase );
464
- }
465
-
466
- add_filter( 'wck_required_message_wck_cfc_args_meta-name', 'wck_cfc_change_meta_message', 10, 3 );
467
- add_filter( 'wck_required_message_wck_cfc_fields_field-slug', 'wck_cfc_change_meta_message', 10, 3 );
468
- function wck_cfc_change_meta_message( $message, $value, $required_field ){
469
-
470
- if( current_filter() == 'wck_required_message_wck_cfc_args_meta-name' )
471
- $field_name = __( "Group Name", 'wck' );
472
- else if( current_filter() == 'wck_required_message_wck_cfc_fields_field-slug' )
473
- $field_name = __( "Field Slug", 'wck' );
474
-
475
- if( empty( $value ) )
476
- return $message;
477
- else if( strpos( $value, ' ' ) !== false )
478
- return sprintf( __( "Choose a different %s as this one contains spaces\n", "wck" ), $field_name );
479
- else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
480
- return sprintf( __( "Choose a different %s as this one is reserved\n", "wck" ), $field_name );
481
- else if ( strtolower($value) != $value )
482
- return sprintf( __( "Choose a different %s as this one contains uppercase letters\n", "wck" ), $field_name );
483
- else
484
- return sprintf( __( "Choose a different %s as this one already exists\n", "wck" ), $field_name );
485
- }
486
-
487
- /* function that check if a group name already exists */
488
- function wck_cfc_check_group_name_exists( $name ){
489
-
490
- $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
491
-
492
- if( !empty( $wck_meta_boxes_ids ) ){
493
- foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
494
- $wck_cfc_args = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_args', true );
495
- if( !empty( $wck_cfc_args ) ){
496
- /* make sure we compare them as slugs */
497
- if( Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_args[0]['meta-name'] ) == Wordpress_Creation_Kit::wck_generate_slug( $name ) ){
498
- return true;
499
- }
500
- }
501
- }
502
- }
503
- return false;
504
- }
505
-
506
- /* function that check if a field slug already exists */
507
- function wck_cfc_check_field_slug_exists( $name ){
508
-
509
- $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
510
-
511
- if( !empty( $wck_meta_boxes_ids ) ){
512
- foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
513
- $wck_cfc_fields = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_fields', true );
514
- if( !empty( $wck_cfc_fields ) ){
515
- foreach( $wck_cfc_fields as $wck_cfc_field ){
516
- /* make sure to compare them as slugs */
517
- if( Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_field['field-slug'] ) == Wordpress_Creation_Kit::wck_generate_slug( $name ) ){
518
- return true;
519
- }
520
- }
521
- }
522
- }
523
- }
524
- return false;
525
- }
526
-
527
- function wck_cfc_check_existence_in_database( $name ){
528
- global $wpdb;
529
- $check_meta_existance = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(meta_key) FROM $wpdb->postmeta WHERE meta_key = %s", $name ) );
530
- /* if we did not find anything yet */
531
- if( !$check_meta_existance ){
532
- $check_meta_existance = wck_cfc_check_group_name_exists( $name );
533
- }
534
- /* if we still did not find anything yet */
535
- if( !$check_meta_existance ){
536
- $check_meta_existance = wck_cfc_check_field_slug_exists( $name );
537
- }
538
-
539
- return $check_meta_existance;
540
- }
541
-
542
-
543
- /* Field Name Verification */
544
- add_filter( 'wck_required_test_wck_cfc_fields_field-title', 'wck_cfc_ceck_field_title', 10, 6 );
545
- function wck_cfc_ceck_field_title( $bool, $value, $post_id, $field, $meta, $fields ){
546
-
547
- if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
548
- $restricted_name = false;
549
- else
550
- $restricted_name = true;
551
-
552
- return ( empty($value) || $restricted_name );
553
- }
554
-
555
- add_filter( 'wck_required_message_wck_cfc_fields_field-title', 'wck_cfc_change_field_title_message', 10, 3 );
556
- function wck_cfc_change_field_title_message( $message, $value, $required_field ){
557
- if( empty( $value ) )
558
- return $message;
559
- else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
560
- return __( "Choose a different Field Title as this one is reserved\n", "wck" );
561
- }
562
-
563
- /* Add the separate meta for post type, post id and page template */
564
- add_action( 'wck_before_add_meta', 'wck_cfc_add_separate_meta', 10, 3 );
565
- function wck_cfc_add_separate_meta( $meta, $id, $values ){
566
- if( $meta == 'wck_cfc_args' ){
567
- // Post Type
568
- if( !empty( $values['post-type'] ) ){
569
- update_post_meta( $id, 'wck_cfc_post_type_arg', $values['post-type'] );
570
- }
571
-
572
- // Post Id
573
- if( !empty( $values['post-id'] ) ){
574
- update_post_meta( $id, 'wck_cfc_post_id_arg', $values['post-id'] );
575
- }
576
-
577
- // Page Template
578
- if( !empty( $values['page-template'] ) ){
579
- update_post_meta( $id, 'wck_cfc_page_template_arg', $values['page-template'] );
580
- }
581
- }
582
- }
583
-
584
- /* Change meta_key in db if field changed and also update the separate meta for post type, post id and page template */
585
- add_action( 'wck_before_update_meta', 'wck_cfc_change_meta_key', 10, 4 );
586
- function wck_cfc_change_meta_key( $meta, $id, $values, $element_id ){
587
- global $wpdb;
588
- if( $meta == 'wck_cfc_args' ){
589
- $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
590
- if( !empty( $wck_cfc_args ) ) {
591
- if ($wck_cfc_args[0]['meta-name'] != $values['meta-name']) {
592
- $wpdb->update(
593
- $wpdb->postmeta,
594
- array('meta_key' => $values['meta-name']),
595
- array('meta_key' => $wck_cfc_args[0]['meta-name'])
596
- );
597
- }
598
-
599
- // Post Type
600
- if ($wck_cfc_args[0]['post-type'] != $values['post-type']) {
601
- update_post_meta($id, 'wck_cfc_post_type_arg', $values['post-type']);
602
- }
603
-
604
- // Post Id
605
- if ($wck_cfc_args[0]['post-id'] != $values['post-id']) {
606
- update_post_meta($id, 'wck_cfc_post_id_arg', $values['post-id']);
607
- }
608
-
609
- // Page Template
610
- if( isset( $wck_cfc_args[0]['page-template'] ) && $values['page-template'] ) {
611
- if ($wck_cfc_args[0]['page-template'] != $values['page-template']) {
612
- update_post_meta($id, 'wck_cfc_page_template_arg', $values['page-template']);
613
- }
614
- }
615
- }
616
- }
617
- }
618
-
619
- /* Change Field Title in db if field changed */
620
- add_action( 'wck_before_update_meta', 'wck_cfc_change_field_title', 10, 4 );
621
- function wck_cfc_change_field_title( $meta, $id, $values, $element_id ){
622
- global $wpdb;
623
- if( $meta == 'wck_cfc_fields' ){
624
- $wck_cfc_fields = get_post_meta( $id, 'wck_cfc_fields', true );
625
- if( !empty( $wck_cfc_fields ) ) {
626
-
627
- if( !empty( $wck_cfc_fields[$element_id]['field-slug'] ) )
628
- $old_slug = $wck_cfc_fields[$element_id]['field-slug'];
629
- else
630
- $old_slug = Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_fields[$element_id]['field-title'] );
631
-
632
- if ( $old_slug != $values['field-slug']) {
633
-
634
- $wck_cfc_args = get_post_meta($id, 'wck_cfc_args', true);
635
- $meta_name = $wck_cfc_args[0]['meta-name'];
636
- $post_id_with_this_meta = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_name));
637
-
638
- if (!empty($post_id_with_this_meta)) {
639
- foreach ($post_id_with_this_meta as $post) {
640
- $results = get_post_meta($post->post_id, $meta_name, true);
641
- if (!empty($results)) {
642
- foreach ($results as $key => $result) {
643
- $results[$key][$values['field-slug']] = $results[$key][$old_slug];
644
-
645
- /* unserialized */
646
- if( $key == 0 )
647
- $suffix = '';
648
- else
649
- $suffix = '_'.$key;
650
- add_post_meta( $post->post_id, $values['field-slug'].$suffix, $results[$key][$old_slug] );
651
- delete_post_meta( $post->post_id, $old_slug.$suffix );
652
-
653
-
654
- unset($results[$key][$old_slug]);
655
- }
656
- }
657
- update_post_meta($post->post_id, $meta_name, $results);
658
- }
659
- }
660
- }
661
- }
662
- }
663
- }
664
-
665
- /* Add Custom columns to listing */
666
- add_filter("manage_wck-meta-box_posts_columns", "wck_cfc_edit_columns" );
667
- function wck_cfc_edit_columns($columns){
668
- $columns['cfc-id'] = __( "Id", "wck" );
669
- $columns['cfc-post-type'] = __( "Post Type", "wck" );
670
- $columns['cfc-page-template'] = __( "Page Template", "wck" );
671
-
672
- /* only in pro version */
673
- if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
674
- $columns['cfc-nested-repeater'] = __( "Nested Repeater", "wck" );
675
- }
676
-
677
- return $columns;
678
- }
679
-
680
- /* Register the column as sortable */
681
- add_filter( 'manage_edit-wck-meta-box_sortable_columns', 'wck_cfc_register_sortable_columns' );
682
- function wck_cfc_register_sortable_columns( $columns ) {
683
- $columns['cfc-id'] = 'cfc-id';
684
- $columns['cfc-post-type'] = 'cfc-post-type';
685
- $columns['cfc-page-template'] = 'cfc-page-template';
686
-
687
- return $columns;
688
- }
689
-
690
- /* Tell WordPress how to handle the sorting */
691
- add_filter( 'request', 'wck_cfc_column_orderby' );
692
- function wck_cfc_column_orderby( $vars ) {
693
- if ( isset( $vars['orderby'] ) && 'cfc-id' == $vars['orderby'] ) {
694
- $vars = array_merge( $vars, array(
695
- 'meta_key' => 'wck_cfc_post_id_arg',
696
- 'orderby' => 'meta_value_num'
697
- ) );
698
- }
699
-
700
- if ( isset( $vars['orderby'] ) && 'cfc-post-type' == $vars['orderby'] ) {
701
- $vars = array_merge( $vars, array(
702
- 'meta_key' => 'wck_cfc_post_type_arg',
703
- 'orderby' => 'meta_value'
704
- ) );
705
- }
706
-
707
- if ( isset( $vars['orderby'] ) && 'cfc-page-template' == $vars['orderby'] ) {
708
- $vars = array_merge( $vars, array(
709
- 'meta_key' => 'wck_cfc_page_template_arg',
710
- 'orderby' => 'meta_value'
711
- ) );
712
- }
713
-
714
- return $vars;
715
- }
716
-
717
- /* Let's set up what to display in the columns */
718
- add_action("manage_wck-meta-box_posts_custom_column", "wck_cfc_custom_columns", 10, 2);
719
- function wck_cfc_custom_columns( $column_name, $post_id ){
720
- if( $column_name == 'cfc-id' ){
721
- $post_id_arg = get_post_meta( $post_id, 'wck_cfc_post_id_arg', true );
722
- echo $post_id_arg;
723
- }
724
-
725
- if( $column_name == 'cfc-post-type' ){
726
- $post_type_arg = get_post_meta( $post_id, 'wck_cfc_post_type_arg', true );
727
- echo $post_type_arg;
728
- }
729
-
730
- if( $column_name == 'cfc-page-template' ){
731
- $page_template_arg = get_post_meta( $post_id, 'wck_cfc_page_template_arg', true );
732
- echo $page_template_arg;
733
- }
734
-
735
- /* only in pro version */
736
- if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
737
- if( $column_name == 'cfc-nested-repeater' ){
738
- $box_args = get_post_meta( $post_id, 'wck_cfc_args', true );
739
- if( !empty( $box_args[0]['nested'] ) )
740
- echo $box_args[0]['nested'];
741
- }
742
- }
743
- }
744
-
745
- /* Add side metaboxes */
746
- if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
747
- add_action('add_meta_boxes', 'wck_cfc_add_side_boxes');
748
- function wck_cfc_add_side_boxes()
749
- {
750
- add_meta_box('wck-cfc-side', __('Wordpress Creation Kit', 'wck'), 'wck_cfc_side_box_one', 'wck-meta-box', 'side', 'low');
751
- }
752
-
753
- function wck_cfc_side_box_one()
754
- {
755
- ?>
756
- <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
757
- src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
758
- alt="WCK-PRO"/></a>
759
- <?php
760
- }
761
- }
762
-
763
- /* add TranslatePress crosspromotion */
764
- add_action('add_meta_boxes', 'wck_cfc_add_trp_side_box');
765
- function wck_cfc_add_trp_side_box()
766
- {
767
- add_meta_box('wck-cfc-side-trp', __('TranslatePress', 'wck'), 'wck_cfc_side_box_trp', 'wck-meta-box', 'side', 'low');
768
- }
769
-
770
- function wck_cfc_side_box_trp()
771
- {
772
- ?>
773
- <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
774
- src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
775
- alt="TranslatePress"/></a>
776
- <h4>Easily translate your entire WordPress website</h4>
777
- <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
778
- It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
779
- <?php
780
- }
781
-
782
-
783
- /* Contextual Help */
784
- add_action('current_screen', 'wck_cfc_help');
785
-
786
- function wck_cfc_help () {
787
- $screen = get_current_screen();
788
- /*
789
- * Check if current screen is wck_page_cptc-page
790
- * Don't add help tab if it's not
791
- */
792
- if ( $screen->id != 'wck-meta-box' )
793
- return;
794
-
795
- // Add help tabs
796
- $screen->add_help_tab( array(
797
- 'id' => 'wck_cfc_overview',
798
- 'title' => __( 'Overview', 'wck' ),
799
- 'content' => '<p>' . __( 'WCK Custom Fields Creator allows you to easily create custom meta boxes for Wordpress without any programming knowledge.', 'wck' ) . '</p>',
800
- ) );
801
-
802
- $screen->add_help_tab( array(
803
- 'id' => 'wck_cfc_arguments',
804
- 'title' => __( 'Meta Box Arguments', 'wck' ),
805
- 'content' => '<p>' . __( 'Define here the rules for the meta box. This rules are used to set up where the meta box will appear, it\'s type and also the meta key name stored in the database. The name of the entry (Enter title here) will be used as the meta box title.', 'wck' ) . '</p>',
806
- ) );
807
-
808
- $screen->add_help_tab( array(
809
- 'id' => 'wck_cfc_fields',
810
- 'title' => __( 'Meta Box Fields', 'wck' ),
811
- 'content' => '<p>' . __( 'Define here the fields contained in the meta box. From "Field Title" a slug will be automatically generated and you will use this slug to display the data in the frontend.', 'wck' ) . '</p>',
812
- ) );
813
-
814
- $screen->add_help_tab( array(
815
- 'id' => 'wck_cfc_example',
816
- 'title' => __( 'CFC Frontend Example', 'wck' ),
817
- 'content' => '<p>' . __( 'Let\'s consider we have a meta box with the following arguments:<br /> - Meta name: books <br /> - Post Type: post <br />And we also have two fields deffined:<br /> - A text field with the Field Title: Book name <br /> - And another text field with the Field Title: Author name ', 'wck' ) . '</p>' . '<p>' . __( 'You will notice that slugs will automatically be created for the two text fields. For "Book name" the slug will be "book-name" and for "Author name" the slug will be "author-name"', 'wck' ) . '</p>' . '<p>' . __( 'Let\'s see what the code for displaying the meta box values in single.php of your theme would be:', 'wck' ) . '</p>' . '<pre>' . '$books = get_post_meta( $post->ID, \'books\', true ); <br />foreach( $books as $book){<br /> echo $book[\'book-name\'];<br / > echo $book[\'author-name\'];<br />}' . '</pre>' . '<p>' . __( 'So as you can see the Meta Name "books" is used as the $key parameter of the funtion <a href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta()</a> and the slugs of the text fields are used as keys for the resulting array. Basically CFC stores the entries as post meta in a multidimensioanl array. In our case the array would be: <br /><pre>array( array( "book-name" => "The Hitchhiker\'s Guide To The Galaxy", "author-name" => "Douglas Adams" ), array( "book-name" => "Ender\'s Game", "author-name" => "Orson Scott Card" ) );</pre> This is true even for single entries.', 'wck' ) . '</p>'
818
- ) );
819
- }
820
-
821
- /**
822
- * Get the Page Templates available in the current theme
823
- *
824
- * Based on wordpress get_page_templates()
825
- *
826
- * @return array Key is the template name, value is the %Template Name%filename string format of the template
827
- */
828
- function wck_get_page_templates() {
829
-
830
- $page_templates = array();
831
- $theme_templates = array_flip(wp_get_theme()->get_page_templates());
832
- if( !empty( $theme_templates ) ){
833
- foreach( $theme_templates as $key => $value){
834
- $page_templates[$key] = "%$key%$value";
835
- }
836
- }
837
- return $page_templates;
838
- }
839
-
840
- /* Filter post update message */
841
- add_filter( 'post_updated_messages', 'wck_cfc_filter_post_update_message' );
842
- function wck_cfc_filter_post_update_message($messages){
843
- $messages['wck-meta-box'] = array(
844
- 0 => '', // Unused. Messages start at index 1.
845
- 1 => __('Metabox updated.', 'wck')
846
- );
847
- return $messages;
848
- }
849
-
850
- /* Filter Field Types for free version */
851
- add_filter( 'wck_field_types', 'wck_cfc_filter_field_types' );
852
- function wck_cfc_filter_field_types( $field_types ){
853
- $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
854
- if ( !file_exists ($wck_premium_update . 'update-checker.php'))
855
- $field_types = array( 'text', 'textarea', 'select', 'select multiple', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'heading', 'colorpicker', 'currency select', 'phone', 'timepicker', 'html', 'number' );
856
-
857
- return $field_types;
858
- }
859
-
860
- /* Mark as required the 'Options' field for checkboxes, radios, selects .. */
861
- add_filter( 'wck_before_test_required', 'wck_cfc_make_options_required', 10, 4 );
862
- function wck_cfc_make_options_required( $meta_array, $meta, $values, $id ) {
863
- if( $meta == 'wck_cfc_fields' ) {
864
- if( $values['field-type'] == 'select' || $values['field-type'] == 'select multiple' || $values['field-type'] == 'radio' || $values['field-type'] == 'checkbox' ) {
865
- foreach( $meta_array as $key => $field ) {
866
- if( $field['slug'] == 'options' ) {
867
- $meta_array[$key]['required'] = true;
868
- }
869
- }
870
- }
871
- }
872
-
873
- foreach( $meta_array as $key => $field ) {
874
- if( isset( $field['type'] ) && $field['type'] == 'phone' ) {
875
- $meta_array[$key]['required'] ? $meta_array[$key]['was_required'] = true : $meta_array[$key]['was_required'] = false;
876
- $meta_array[$key]['required'] = true;
877
- add_filter( "wck_required_test_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field ), 'wck_phone_field_error', 10, 6 );
878
- }
879
-
880
- if( isset( $field['type'] ) && $field['type'] == 'number' ) {
881
- $meta_array[$key]['required'] ? $meta_array[$key]['was_required'] = true : $meta_array[$key]['was_required'] = false;
882
- $meta_array[$key]['required'] = true;
883
- add_filter( "wck_required_test_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field ), 'wck_number_field_error', 10, 6 );
884
- }
885
- }
886
-
887
- return $meta_array;
888
- }
889
-
890
- /* handle Field Slug backwards compatibility */
891
- add_filter( "wck_displayed_value_wck_cfc_fields_field-slug", "wck_cfc_handle_empty_field_slug", 10, 4 );
892
- add_filter( "wck_cfc_filter_edit_form_value_wck_cfc_fields_field-slug", "wck_cfc_handle_empty_field_slug", 10, 4 );
893
- function wck_cfc_handle_empty_field_slug( $value, $results, $element_id, $id ){
894
- if( empty( $value ) ){
895
- $value = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]['field-title'] );
896
- $check_meta_existance = wck_cfc_check_group_name_exists( $value );
897
- if( $check_meta_existance ){
898
- $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
899
- if( !empty( $wck_cfc_args ) ){
900
- if( current_filter() == 'wck_displayed_value_wck_cfc_fields_field-slug' ){
901
- $value = '('.$wck_cfc_args[0]['meta-name'].'_)'.$value;
902
- }
903
- else
904
- $value = $wck_cfc_args[0]['meta-name'].'_'.$value;
905
- }
906
- }
907
- }
908
- else{
909
- if( current_filter() == 'wck_displayed_value_wck_cfc_fields_field-slug' ) {
910
- $check_meta_existance = wck_cfc_check_group_name_exists($value);
911
- if( $check_meta_existance ){
912
- $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
913
- if( !empty( $wck_cfc_args ) ){
914
- $value = '('.$wck_cfc_args[0]['meta-name'].'_)'.$value;
915
- }
916
- }
917
- }
918
- }
919
-
920
- return $value;
921
- }
922
-
923
- add_filter( "wck_field_before_description", "wck_edit_button_for_field_slug", 10, 3 );
924
- function wck_edit_button_for_field_slug( $element, $meta, $details ){
925
- if( $meta == 'wck_cfc_fields' && $details['slug'] == 'field-slug' ){
926
- $element .= '<button type="button" class="wck-cfc-edit-slug button button-small">'. __( "Edit", "wck" ).'</button>';
927
- $element .= '<span class="wck-overwrite-slug"><input type="checkbox" name="wck-overwrite-slug" value="overwrite" class="mb-field">'. __( "Overwrite Existing", "wck" ).'</span>';
928
- }
929
- return $element;
930
- }
931
-
932
- add_action( 'wp_ajax_wck_generate_slug', 'wck_generate_slug' );
933
- function wck_generate_slug(){
934
- if( !empty( $_POST['field_title'] ) ){
935
- $slug = Wordpress_Creation_Kit::wck_generate_slug( $_POST['field_title'] );
936
- die( $slug );
937
- }
938
- die('failed');
939
- }
940
-
941
- function wck_phone_field_error( $bool, $value, $id, $field, $meta, $fields ) {
942
- foreach( $fields as $key => $field_array ) {
943
- $field_slug = Wordpress_Creation_Kit::wck_generate_slug( $field_array['title'], $field_array );
944
- if( $field_slug == $field ) {
945
- if( ! empty( $field_array['phone-format'] ) && ! empty( $value ) ) {
946
- $phone_nb = array();
947
- $length = strlen( $value );
948
-
949
- for( $i=0; $i < $length; $i++ ) {
950
- $phone_nb[$i] = $value[$i];
951
-
952
- if( $value[$i] == '_' ) {
953
- add_filter( "wck_required_message_{$meta}_{$field}", "wck_phone_error_message", 10, 3 );
954
- return true;
955
- }
956
- }
957
- } elseif( isset( $field_array['was_required'] ) && $field_array['was_required'] && empty( $value ) ) {
958
- return true;
959
- }
960
- }
961
- }
962
- }
963
-
964
- function wck_phone_error_message( $message, $value, $required_field ) {
965
- $message = apply_filters( "wck_invalid_phone_message", __( "Please enter a valid phone number for field ", "wck" ) . "$required_field \n" );
966
-
967
- return $message;
968
- }
969
-
970
- function wck_number_field_error( $bool, $value, $id, $field, $meta, $fields ) {
971
- foreach( $fields as $key => $field_array ) {
972
- $field_slug = Wordpress_Creation_Kit::wck_generate_slug( $field_array['title'], $field_array );
973
- if( $field_slug == $field ) {
974
- if( ! empty( $value ) && ! is_numeric( $value ) ) {
975
-
976
- if ( version_compare( phpversion(), '5.4.0', '<' ) )
977
- add_filter( "wck_required_message_{$meta}_{$field_slug}", create_function( '$message, $value, $required_field', '$message = apply_filters( "wck_number_error_message", __( "Please enter numbers only for field ", "wck" ) . "$required_field \n" ); return $message;' ), 10, 3 );
978
- else {
979
- add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) {
980
- return apply_filters( "wck_number_error_message", __( "Please enter numbers only for field ", "wck" ) . "$required_field \n" );
981
- }, 10, 3 );
982
- }
983
-
984
- return true;
985
- }
986
-
987
- if( ! empty( $field_array['number-step-value'] ) && ! empty( $value ) && ( sprintf( round( $value / $field_array['number-step-value'] ) ) != sprintf( $value / $field_array['number-step-value'] ) ) ) {
988
-
989
- if ( version_compare( phpversion(), '5.4.0', '<' ) )
990
- add_filter( "wck_required_message_{$meta}_{$field_slug}", create_function( '$message, $value, $required_field', '$number_step = '. $field_array['number-step-value'] .'; $message = apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be a multiplier of ", "wck" ) . "$number_step \n" ); return $message;' ), 10, 3 );
991
- else {
992
- add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
993
- $number_step = $field_array['number-step-value'];
994
-
995
- return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be a multiplier of ", "wck" ) . "$number_step \n" );
996
- }, 10, 3 );
997
- }
998
-
999
- return true;
1000
- }
1001
-
1002
- if( ( ! empty( $field_array['min-number-value'] ) || (isset($field_array['min-number-value']) && $field_array['min-number-value'] == '0' )) && ( ! empty( $value ) || $value == '0' ) && $value < $field_array['min-number-value'] ) {
1003
-
1004
- if ( version_compare( phpversion(), '5.4.0', '<' ) )
1005
- add_filter( "wck_required_message_{$meta}_{$field_slug}", create_function( '$message, $value, $required_field', '$number_min = '. $field_array['min-number-value'] .'; $message = apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be greater than or equal to ", "wck" ) . "$number_min \n" ); return $message;' ), 10, 3 );
1006
- else {
1007
- add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
1008
- $number_min = $field_array['min-number-value'];
1009
-
1010
- return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be greater than or equal to ", "wck" ) . "$number_min \n" );
1011
- }, 10, 3 );
1012
- }
1013
-
1014
- return true;
1015
- }
1016
-
1017
- if( ( ! empty( $field_array['max-number-value'] ) || (isset($field_array['max-number-value']) && $field_array['max-number-value'] == '0' )) && ( ! empty( $value ) || $value == '0' ) && $value > $field_array['max-number-value'] ) {
1018
- if ( version_compare( phpversion(), '5.4.0', '<' ) )
1019
- add_filter( "wck_required_message_{$meta}_{$field_slug}", create_function( '$message, $value, $required_field', '$number_max = '. $field_array['max-number-value'] .'; $message = apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be less than or equal to ", "wck" ) . "$number_max \n" ); return $message;' ), 10, 3 );
1020
- else {
1021
- add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
1022
- $number_max = $field_array['max-number-value'];
1023
-
1024
- return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be less than or equal to ", "wck" ) . "$number_max \n" );
1025
- }, 10, 3 );
1026
- }
1027
-
1028
- return true;
1029
- }
1030
-
1031
- if( isset( $field_array['was_required'] ) && $field_array['was_required'] && empty( $value ) && $value != '0' ) {
1032
- return true;
1033
- }
1034
- }
1035
- }
1036
- }
1037
-
1038
- /* output a notice that asks the user to go and unserialize the fields */
1039
- $wck_update_unserialized = get_option( 'wck_update_to_unserialized', 'yes' );
1040
- if( $wck_update_unserialized == 'yes' ) {
1041
- new WCK_Add_Notices('wck_update_unserialized_notice',
1042
- sprintf(__('To update the meta information on posts to the new unserialized structure go to %1$sthis page%2$s and follow the instructions. Please make a backup of your database first! %3$sDismiss%4$s', 'wck'), "<a href='" . admin_url('admin.php?page=wck-unserialized') . "'>", "</a>", "<a href='" . esc_url(add_query_arg('wck_update_unserialized_notice_dismiss_notification', '0')) . "'>", "</a>"),
1043
- 'update-nag');
1044
- }
1045
-
1046
- /* add an admin page for the unserialized process */
1047
- add_action('admin_menu', 'wck_register_update_unserialized_submenu_page');
1048
- function wck_register_update_unserialized_submenu_page() {
1049
- add_submenu_page( null, 'WCK Unserialized', 'WCK Unserialized', 'manage_options', 'wck-unserialized', 'wck_unserialized_page_callback' );
1050
- }
1051
-
1052
- /**
1053
- * Function callback for the unserilized page
1054
- */
1055
- function wck_unserialized_page_callback(){
1056
-
1057
- /* set number of posts that are processed in a batch !IMPORTANT IT IS ALSO SET IN THE wck_cfc_process_unserialized_batch() FUNCTION */
1058
- $per_batch = 30;
1059
- $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 0;
1060
- $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
1061
- $finish = isset( $_GET['wckbatch-complete'] ) ? esc_url( $_GET['wckbatch-complete'] ) : false;
1062
- $processed = round( ( $step * $per_batch ), 0 );
1063
- if( $processed > $total )
1064
- $processed = $total;
1065
- ?>
1066
- <div class="wrap">
1067
- <h2><?php _e( 'Processing Unserialized Fields', 'wck' ); ?></h2>
1068
-
1069
- <?php if( !$finish ): ?>
1070
- <div id="wck-unserialized-processing">
1071
- <p><?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'wck' ); ?></p>
1072
- <?php if( ! empty( $total ) ) : ?>
1073
- <p><strong><?php printf( __( '%d posts of %d processed', 'wck' ), $processed, $total ); ?></strong></p>
1074
- <?php endif; ?>
1075
- </div>
1076
- <script type="text/javascript">
1077
- document.location.href = "edit.php?action=wck_unbatch_process&step=<?php echo $step; ?>&total=<?php echo $total; ?>&_wpnonce=<?php echo wp_create_nonce( 'wck-unbatch-nonce' ); ?>";
1078
- </script>
1079
- <?php else: ?>
1080
- <p><?php _e( 'The process has finished.', 'wck' ); ?></p>
1081
- <?php update_option( 'wck_update_to_unserialized', 'no' ) ?>
1082
- <?php endif; ?>
1083
- </div>
1084
- <?php
1085
- }
1086
-
1087
- /**
1088
- * hook to process each bach on the admin_init
1089
- */
1090
- add_action( 'admin_init', 'wck_cfc_process_unserialized_batch' );
1091
-
1092
- /**
1093
- * the function that process each batch
1094
- */
1095
- function wck_cfc_process_unserialized_batch() {
1096
-
1097
- if( empty( $_REQUEST['action'] ) || 'wck_unbatch_process' != $_REQUEST['action'] ) {
1098
- return;
1099
- }
1100
-
1101
- if( ! current_user_can( 'manage_options' ) ) {
1102
- return;
1103
- }
1104
-
1105
- if( ! wp_verify_nonce( $_GET['_wpnonce'], 'wck-unbatch-nonce' ) ) {
1106
- return;
1107
- }
1108
-
1109
- ignore_user_abort( true );
1110
- @set_time_limit( 0 );
1111
-
1112
- /* set number of posts that are processed in a batch !IMPORTANT IT IS ALSO SET IN THE wck_unserialized_page_callback() FUNCTION */
1113
- $per_batch = 30;
1114
- $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 0;
1115
- $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
1116
-
1117
- /* an array with the post types that have metaboxes */
1118
- $post_types_with_metaboxes = array();
1119
- /* an array that contains all the existing meta names */
1120
- $meta_names = array();
1121
-
1122
- /* get all metaboxes */
1123
- $args = array(
1124
- 'posts_per_page' => -1,
1125
- 'numberposts' => -1,
1126
- 'post_type' => 'wck-meta-box',
1127
- 'post_status' => 'any'
1128
- );
1129
- $meta_boxes = get_posts( $args );
1130
- if( !empty( $meta_boxes ) ){
1131
- foreach( $meta_boxes as $meta_box ){
1132
- $cfc_args = get_post_meta( $meta_box->ID, 'wck_cfc_args', true );
1133
- $meta_names[] = $cfc_args[0]['meta-name'];
1134
- if( !in_array( $cfc_args[0]['post-type'], $post_types_with_metaboxes ) ){
1135
- $post_types_with_metaboxes[] = $cfc_args[0]['post-type'];
1136
- }
1137
- }
1138
- }
1139
-
1140
- /* if we don't have a total let's count the posts */
1141
- if( empty( $total ) || $total <= 1 ){
1142
- $total = 0;
1143
- if( !empty( $post_types_with_metaboxes ) ){
1144
- foreach( $post_types_with_metaboxes as $post_type ){
1145
- $posts_count = wp_count_posts( $post_type );
1146
- $posts_count = array_sum( get_object_vars( $posts_count ) );
1147
- $total += $posts_count;
1148
- }
1149
- }
1150
- }
1151
-
1152
-
1153
- global $wpdb;
1154
- /* turn the arrays into strings to use in mysql */
1155
- $post_types_with_metaboxes = join( "','", $post_types_with_metaboxes );
1156
- $meta_names = join( "','", $meta_names );
1157
- $offset = $step*$per_batch;
1158
- /* mysql query to get all post ids that potentially have meta boxes on them */
1159
- $posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type IN ('$post_types_with_metaboxes') LIMIT $per_batch OFFSET $offset" );
1160
-
1161
- /* go through all the post ids */
1162
- if( $posts ) {
1163
- foreach( $posts as $post ) {
1164
- /* get all the meta names associated to the post id */
1165
- $meta_boxes = $wpdb->get_results( "SELECT meta_value,meta_key FROM $wpdb->postmeta WHERE post_id = '$post->ID' AND meta_key IN ('$meta_names')", ARRAY_A );
1166
- /* transform them in unserialized */
1167
- if( !empty( $meta_boxes ) ){
1168
- foreach( $meta_boxes as $meta_box ){
1169
- if( !empty( $meta_box ) ){
1170
- $meta_value = $meta_box['meta_value'];
1171
- $meta_value = maybe_unserialize( $meta_value );
1172
- foreach( $meta_value as $key => $values ){
1173
- if( !empty( $values ) ){
1174
- foreach( $values as $meta_key => $value ){
1175
- if( $key == 0 )
1176
- $suffix = '';
1177
- else
1178
- $suffix = '_'.$key;
1179
- /* check to see if we already have a meta name like this from the old structure to avoid conflicts */
1180
- $meta_key = Wordpress_Creation_Kit::wck_generate_unique_meta_name_for_unserialized_field( $post->ID, $meta_key, $meta_box['meta_key'] );
1181
- update_post_meta( $post->ID, $meta_key.$suffix, $value );
1182
- }
1183
- }
1184
- }
1185
- }
1186
- }
1187
- }
1188
- }
1189
-
1190
- // comments found so delete them
1191
- $step++;
1192
- $redirect = add_query_arg( array(
1193
- 'page' => 'wck-unserialized',
1194
- 'step' => $step,
1195
- 'total' => $total
1196
- ), admin_url( 'admin.php' ) );
1197
- wp_redirect( $redirect ); exit;
1198
-
1199
- } else {
1200
- // No more comments found, finish up
1201
- wp_redirect( admin_url( 'admin.php?page=wck-unserialized&wckbatch-complete=true' ) ); exit;
1202
- }
1203
- }
1204
-
1205
- /* save all the metaboxes id's in an option when we first load the plugin and we don not have the option yet */
1206
- add_action( 'init', 'wck_init_save_meta_boxes' );
1207
- function wck_init_save_meta_boxes(){
1208
- $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', null );
1209
- if( is_null( $wck_meta_boxes_ids ) ){
1210
- $args = array(
1211
- 'posts_per_page' => -1,
1212
- 'numberposts' => -1,
1213
- 'post_type' => 'wck-meta-box',
1214
- 'post_status' => 'any'
1215
- );
1216
- $meta_boxes = get_posts( $args );
1217
- $wck_meta_boxes_ids = array();
1218
- if( !empty( $meta_boxes ) ){
1219
- foreach( $meta_boxes as $meta_box ){
1220
- $wck_meta_boxes_ids[] = $meta_box->ID;
1221
- }
1222
- }
1223
- update_option( 'wck_meta_boxes_ids', $wck_meta_boxes_ids );
1224
- }
1225
- }
1226
-
1227
- /* when adding a new metabox or deleting one make the changes in the option */
1228
- add_action( 'wp_insert_post', 'wck_cpt_save_meta_boxes_ids', 10, 1 );
1229
- add_action( 'before_delete_post', 'wck_cpt_save_meta_boxes_ids' );
1230
- function wck_cpt_save_meta_boxes_ids( $post_id ){
1231
- // We check if the global post type isn't ours and just return
1232
- global $post_type;
1233
- if ( $post_type != 'wck-meta-box' ) return;
1234
-
1235
- $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
1236
- if( current_filter() == 'wp_insert_post' ){
1237
- if( !in_array( $post_id, $wck_meta_boxes_ids ) )
1238
- $wck_meta_boxes_ids[] = $post_id;
1239
- }
1240
-
1241
- if( current_filter() == 'before_delete_post' ){
1242
- if( !empty( $wck_meta_boxes_ids ) ){
1243
- foreach( $wck_meta_boxes_ids as $key => $value ){
1244
- if( $value === $post_id )
1245
- unset( $wck_meta_boxes_ids[$key] );
1246
- }
1247
- }
1248
- }
1249
-
1250
- update_option( 'wck_meta_boxes_ids', $wck_meta_boxes_ids );
1251
- }
1252
-
1253
- /**
1254
- * This filter makes sure that we do not read directly from the serialized field and we reconstruct it from the unserialized fields
1255
- * If there are no unserialized then we return the serialized information
1256
- */
1257
- add_filter( "get_post_metadata", 'wck_serialized_update_from_unserialized', 10, 4 );
1258
- function wck_serialized_update_from_unserialized( $replace, $object_id, $meta_key, $single){
1259
-
1260
- /* if we don't have a meta_key don't do anything */
1261
- if( empty( $meta_key ) || $meta_key == 'wck_cfc_args' || $meta_key == 'wck_cfc_fields' )
1262
- return $replace;
1263
-
1264
- $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
1265
-
1266
- if( !empty( $wck_meta_boxes_ids ) ){
1267
- foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
1268
- $cfc_args = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_args', true );
1269
-
1270
- if( !empty( $cfc_args[0] ) && !empty( $cfc_args[0]['meta-name'] ) && $cfc_args[0]['meta-name'] == $meta_key ){
1271
-
1272
- /* get all post meta for the post id like it is done in get_post_meta() function */
1273
- $meta_cache = wp_cache_get($object_id, 'post_meta');
1274
- if ( !$meta_cache ) {
1275
- $meta_cache = update_meta_cache( 'post', array( $object_id ) );
1276
- $meta_cache = $meta_cache[$object_id];
1277
- }
1278
-
1279
- $replace_with = array();
1280
-
1281
- $cfc_fields = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_fields', true );
1282
- if( !empty( $cfc_fields ) ){
1283
- foreach ( $cfc_fields as $cfc_field ){
1284
-
1285
- if( !empty( $cfc_field['field-slug'] ) )
1286
- $slug = $cfc_field['field-slug'];
1287
- else
1288
- $slug = Wordpress_Creation_Kit::wck_generate_slug( $cfc_field['field-title'] );
1289
-
1290
- /* check to see if we already have a meta name like this from the old structure to avoid conflicts */
1291
- $unserialized_key = Wordpress_Creation_Kit::wck_generate_unique_meta_name_for_unserialized_field( $object_id, $slug, $cfc_args[0]['meta-name'] );
1292
-
1293
- /* I will limit this to maximum 100 repeater field entries */
1294
- for( $i=0; $i<1000;$i++ ){
1295
- /* search for the unseralized form in the db */
1296
- if( $i == 0 )
1297
- $suffix = '';
1298
- else
1299
- $suffix = '_'.$i;
1300
-
1301
- if ( isset($meta_cache[$unserialized_key.$suffix]) ) {
1302
- $unserialized_value = maybe_unserialize( $meta_cache[$unserialized_key.$suffix][0] );
1303
- $replace_with[$i][$slug] = $unserialized_value;
1304
- }
1305
- }
1306
- }
1307
- }
1308
-
1309
- if( !empty( $replace_with ) ){
1310
- $replace_with = array( array( $replace_with ) );
1311
-
1312
- if ( $single ) {
1313
- return $replace_with[0];
1314
- }
1315
- else
1316
- return $replace_with;
1317
- }
1318
- }
1319
- }
1320
- }
1321
-
1322
- return $replace;
1323
- }
1324
-
1325
- /* make wck meta names protected so they are not saved by custom fields */
1326
- add_filter( 'is_protected_meta', 'wck_cfc_protect_meta_keys', 10, 3 );
1327
- function wck_cfc_protect_meta_keys( $protected, $meta_key, $meta_type ){
1328
- global $wck_objects, $post;
1329
-
1330
- //they should be available on frontend and customizer
1331
- if( is_customize_preview() || !is_admin() ){
1332
- return $protected;
1333
- }
1334
-
1335
- if( !empty( $wck_objects ) ){
1336
- foreach( $wck_objects as $wck_object ){
1337
- if( !empty( $wck_object['meta_array'] ) ){
1338
- foreach ( $wck_object['meta_array'] as $field ){
1339
- $field_meta_key = Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field );
1340
- /* take care of suffixes with pregmatch and we could also have the group name as a prefix to be unique */
1341
- if ( $meta_key == $field_meta_key || preg_match( '/'.$field_meta_key.'_\d+\z/', $meta_key ) || $meta_key == $wck_object['meta_name'].'_'.$field_meta_key || preg_match( '/'.$wck_object['meta_name'].'_'.$field_meta_key.'_\d+\z/', $meta_key ) )
1342
- return true;
1343
- }
1344
- }
1345
- }
1346
- }
1347
- return $protected;
1348
- }
1349
- ?>
1
+ <?php
2
+ /* Creates Custom Meta Box Fields for WordPress. It supports repeater fields and uses AJAX to handle data. */
3
+
4
+ /* Add Scripts */
5
+ add_action('admin_enqueue_scripts', 'wck_cfc_print_scripts' );
6
+ function wck_cfc_print_scripts($hook){
7
+ if( isset( $_GET['post_type'] ) || isset( $_GET['post'] ) ){
8
+ if( isset( $_GET['post_type'] ) )
9
+ $post_type = sanitize_text_field( $_GET['post_type'] );
10
+ else if( isset( $_GET['post'] ) )
11
+ $post_type = get_post_type( absint( $_GET['post'] ) );
12
+
13
+ if( 'wck-meta-box' == $post_type ){
14
+ wp_register_style('wck-cfc-css', plugins_url('/css/wck-cfc.css', __FILE__));
15
+ wp_enqueue_style('wck-cfc-css');
16
+
17
+ wp_register_script('wck-cfc-js', plugins_url('/js/wck-cfc.js', __FILE__), array( 'jquery' ), '1.0' );
18
+ wp_enqueue_script('wck-cfc-js');
19
+ }
20
+ }
21
+ }
22
+
23
+ /* hook to create custom post types */
24
+ add_action( 'init', 'wck_cfc_create_custom_fields_cpt' );
25
+
26
+ function wck_cfc_create_custom_fields_cpt(){
27
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
28
+ $labels = array(
29
+ 'name' => _x( 'WCK Custom Meta Boxes', 'post type general name'),
30
+ 'singular_name' => _x( 'Custom Meta Box', 'post type singular name'),
31
+ 'add_new' => _x( 'Add New', 'Custom Meta Box' ),
32
+ 'add_new_item' => __( "Add New Meta Box", "wck" ),
33
+ 'edit_item' => __( "Edit Meta Box", "wck" ) ,
34
+ 'new_item' => __( "New Meta Box", "wck" ),
35
+ 'all_items' => __( "Custom Fields Creator", "wck" ),
36
+ 'view_item' => __( "View Meta Box", "wck" ),
37
+ 'search_items' => __( "Search Meta Boxes", "wck" ),
38
+ 'not_found' => __( "No Meta Boxes found", "wck" ),
39
+ 'not_found_in_trash' => __( "No Meta Boxes found in Trash", "wck" ),
40
+ 'parent_item_colon' => '',
41
+ 'menu_name' => __( "Custom Meta Boxes", "wck" )
42
+ );
43
+ $args = array(
44
+ 'labels' => $labels,
45
+ 'public' => false,
46
+ 'publicly_queryable' => false,
47
+ 'show_ui' => true,
48
+ 'show_in_menu' => 'wck-page',
49
+ 'has_archive' => false,
50
+ 'hierarchical' => false,
51
+ 'capability_type' => 'post',
52
+ 'supports' => array( 'title' )
53
+ );
54
+
55
+ register_post_type( 'wck-meta-box', $args );
56
+ }
57
+ }
58
+
59
+ /* add admin body class to cfc custom post type */
60
+ add_filter( 'admin_body_class', 'wck_cfc_admin_body_class' );
61
+ function wck_cfc_admin_body_class( $classes ){
62
+ if( isset( $_GET['post_type'] ) || isset( $_GET['post'] ) ){
63
+ if( isset( $_GET['post_type'] ) )
64
+ $post_type = sanitize_text_field( $_GET['post_type'] );
65
+ else if( isset( $_GET['post'] ) )
66
+ $post_type = get_post_type( absint( $_GET['post'] ) );
67
+
68
+ if( 'wck-meta-box' == $post_type ){
69
+ $classes .= ' wck_page_cfc-page ';
70
+ }
71
+ }
72
+ return $classes;
73
+ }
74
+
75
+ /* Remove view action from post list view */
76
+ add_filter('post_row_actions','wck_cfc_remove_view_action');
77
+ function wck_cfc_remove_view_action($actions){
78
+ global $post;
79
+ if ($post->post_type =="wck-meta-box"){
80
+ unset( $actions['view'] );
81
+ }
82
+ return $actions;
83
+ }
84
+
85
+
86
+ /* create the meta box */
87
+ add_action( 'init', 'wck_cfc_create_box', 500 );
88
+ function wck_cfc_create_box(){
89
+ global $wpdb;
90
+
91
+ /* get post types */
92
+ $public_cpt_arg = apply_filters( 'wck_cfc_public_cpt_arg', true );
93
+ $args = array(
94
+ 'public' => $public_cpt_arg
95
+ );
96
+ $output = 'objects'; // or objects
97
+ $post_types = get_post_types($args,$output);
98
+ $post_type_names = array();
99
+ if( !empty( $post_types ) ){
100
+ foreach ($post_types as $post_type ) {
101
+ if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' && $post_type->name != 'wck-swift-template' )
102
+ $post_type_names[] = $post_type->name;
103
+ }
104
+ }
105
+ /* add CPTC registered with WCK that are not public */
106
+ if( $public_cpt_arg ){
107
+ $cpts = get_option('wck_cptc');
108
+ if( !empty( $cpts ) ){
109
+ foreach( $cpts as $cpt ){
110
+ if( $cpt['public'] == 'false' )
111
+ $post_type_names[] = $cpt['post-type'];
112
+ }
113
+ }
114
+ }
115
+
116
+ /* get page templates */
117
+ $templates = wck_get_page_templates();
118
+
119
+ /* set up the fields array */
120
+ $cfc_box_args_fields = array(
121
+ array( 'type' => 'text', 'title' => __( 'Group Name', 'wck' ), 'slug' => 'meta-name', 'description' => __( 'The name of the group. Must be unique, only lowercase letters, no spaces and no special characters.', 'wck' ), 'required' => true ),
122
+ array( 'type' => 'select', 'title' => __( 'Post Type', 'wck' ), 'slug' => 'post-type', 'options' => $post_type_names, 'default-option' => true, 'description' => __( 'What post type the meta box should be attached to', 'wck' ), 'required' => true ),
123
+ array( 'type' => 'select', 'title' => __( 'Repeater', 'wck' ), 'slug' => 'repeater', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the box supports just one entry or if it is a repeater field. By default it is a single field.', 'wck' ) ),
124
+ array( 'type' => 'select', 'title' => __( 'Sortable', 'wck' ), 'slug' => 'sortable', 'options' => array( 'true', 'false' ), 'default' => 'false', 'description' => __( 'Whether the entries are sortable or not. This is valid for repeater fields.', 'wck' ) ),
125
+ array( 'type' => 'text', 'title' => __( 'Post ID', 'wck' ), 'slug' => 'post-id', 'description' => __( 'ID of a post on which the meta box should appear. You can also input multiple IDs and separate them with ","', 'wck' ) )
126
+ );
127
+
128
+ /* only in pro version */
129
+ if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
130
+ $nested_arg = array( array( 'type' => 'select', 'title' => __( 'Nested', 'wck' ), 'options' => array( 'true', 'false' ), 'default' => 'false', 'description' => __( 'Set to true if you want this metabox to be a nested repeater inside another repeater.', 'wck' ) ) );
131
+ array_splice( $cfc_box_args_fields, 1, 0, $nested_arg );
132
+ }
133
+
134
+ if( !empty( $templates ) )
135
+ $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Page Template', 'wck' ), 'slug' => 'page-template', 'options' => $templates, 'default-option' => true, 'description' => __( 'If post type is "page" you can further select a page templete. The meta box will only appear on the page that has that selected page template.', 'wck' ) );
136
+
137
+ /* added box style in version 2.4.4 */
138
+ $cfc_box_args_fields[] = array( 'type' => 'select', 'title' => __( 'Box Style', 'wck' ), 'slug' => 'box-style', 'options' => array( '%Default (WP meta-box)%default', '%Seamless (no meta-box)%seamless' ), 'default' => 'default', 'description' => __( 'If the fields should be in a meta-box or not', 'wck' ) );
139
+
140
+ /* set up the box arguments */
141
+ $args = array(
142
+ 'metabox_id' => 'wck-cfc-args',
143
+ 'metabox_title' => __( 'Meta Box Arguments', 'wck' ),
144
+ 'post_type' => 'wck-meta-box',
145
+ 'meta_name' => 'wck_cfc_args',
146
+ 'meta_array' => $cfc_box_args_fields,
147
+ 'sortable' => false,
148
+ 'single' => true
149
+ );
150
+
151
+ /* create the box */
152
+ new Wordpress_Creation_Kit( $args );
153
+
154
+ /* set up field types */
155
+
156
+ $field_types = array( 'heading', 'text', 'number', 'textarea', 'select', 'select multiple', 'checkbox', 'radio', 'phone', 'upload', 'wysiwyg editor', 'datepicker', 'timepicker', 'colorpicker', 'country select', 'user select', 'cpt select', 'currency select', 'html', 'map' );
157
+
158
+ $field_types = apply_filters( 'wck_field_types', $field_types );
159
+
160
+ /* setup post types */
161
+ $post_types = get_post_types( array( 'public' => true ), 'names' );
162
+
163
+ /* set up the fields array */
164
+ $cfc_box_fields_fields = apply_filters( 'wck_cfc_box_fields_fields', array(
165
+ array( 'type' => 'text', 'title' => __( 'Field Title', 'wck' ), 'slug' => 'field-title', 'description' => __( 'Title of the field. A slug will automatically be generated.', 'wck' ), 'required' => true ),
166
+ array( 'type' => 'select', 'title' => __( 'Field Type', 'wck' ), 'slug' => 'field-type', 'options' => $field_types, 'default-option' => true, 'description' => __( 'The field type', 'wck' ), 'required' => true ),
167
+ array( 'type' => 'text', 'title' => __( 'Field Slug', 'wck' ), 'slug' => 'field-slug', 'readonly' => true, 'description' => __( 'The meta name of the field, generated automatically from the title, by which you can query. Can be changed. Must be unique, only lowercase letters, no spaces and no special characters.', 'wck' ), 'required' => true ),
168
+ array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'slug' => 'description', 'description' => 'The description of the field.' ),
169
+ array( 'type' => 'select', 'title' => __( 'Required', 'wck' ), 'slug' => 'required', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the field is required or not', 'wck' ) ),
170
+ array( 'type' => 'select', 'title' => __( 'CPT', 'wck' ), 'slug' => 'cpt', 'options' => $post_types, 'default' => 'post', 'description' => __( 'Select what custom post type should be used in the CPT Select.', 'wck' ) ),
171
+ array( 'type' => 'text', 'title' => __( 'Default Value', 'wck' ), 'slug' => 'default-value', 'description' => __( 'Default value of the field. For Checkboxes if there are multiple values separate them with a ",". For an Upload field input an attachment id.', 'wck' ) ),
172
+ array( 'type' => 'textarea', 'title' => __( 'Default Text', 'wck' ), 'slug' => 'default-text', 'description' => __( 'Default text of the textarea.', 'wck' ) ),
173
+ array( 'type' => 'textarea', 'title' => __( 'HTML Content', 'wck' ), 'slug' => 'html-content', 'description' => __( 'Add your HTML (or text) content.', 'wck' ) ),
174
+ array( 'type' => 'text', 'title' => __( 'Options', 'wck' ), 'slug' => 'options', 'description' => __( 'Options for field types "select", "checkbox" and "radio". For multiple options separate them with a ",".', 'wck' ) ),
175
+ array( 'type' => 'text', 'title' => __( 'Labels', 'wck' ), 'slug' => 'labels', 'description' => __( 'Labels for field types "select", "checkbox" and "radio". For multiple options separate them with a ",".', 'wck' ) ),
176
+ array( 'type' => 'text', 'title' => __( 'Phone Format', 'wck' ), 'slug' => 'phone-format', 'default' => '(###) ###-####', 'description' => __( "You can use: # for numbers, parentheses ( ), - sign, + sign, dot . and spaces.", 'wck' ) .'<br>'. __( "Eg. (###) ###-####", 'wck' ) .'<br>'. __( "Empty field won't check for correct phone number.", 'wck' ) ),
177
+ array( 'type' => 'text', 'title' => __( 'Min Number Value', 'wck' ), 'slug' => 'min-number-value', 'description' => __( "Min allowed number value (0 to allow only positive numbers)", 'wck' ) .'<br>'. __( "Leave it empty for no min value", 'wck' ) ),
178
+ array( 'type' => 'text', 'title' => __( 'Max Number Value', 'wck' ), 'slug' => 'max-number-value', 'description' => __( "Max allowed number value (0 to allow only negative numbers)", 'wck' ) .'<br>'. __( "Leave it empty for no max value", 'wck' ) ),
179
+ array( 'type' => 'text', 'title' => __( 'Number Step Value', 'wck' ), 'slug' => 'number-step-value', 'description' => __( "Step value 1 to allow only integers, 0.1 to allow integers and numbers with 1 decimal", 'wck' ) .'<br>'. __( "To allow multiple decimals use for eg. 0.01 (for 2 deciamls) and so on", 'wck' ) .'<br>'. __( "You can also use step value to specify the legal number intervals (eg. step value 2 will allow only -4, -2, 0, 2 and so on)", 'wck' ) .'<br>'. __( "Leave it empty for no restriction", 'wck' ) ),
180
+ array( 'type' => 'checkbox', 'title' => __( 'Attach upload to post', 'wck' ), 'slug' => 'attach-upload-to-post', 'description' => __( 'Uploads will be attached to the post if this is checked', 'wck' ), 'options' => array( 'yes' ), 'default' => 'yes' ),
181
+ array( 'type' => 'text', 'title' => __( 'Number of rows', 'wck' ), 'slug' => 'number-of-rows', 'description' => __( 'Number of rows for the textarea', 'wck' ), 'default' => '5' ),
182
+ array( 'type' => 'select', 'title' => __( 'Readonly', 'wck' ), 'slug' => 'readonly', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the textarea is readonly or not', 'wck' ) ),
183
+ array( 'type' => 'text', 'title' => __( 'Default Latitude', 'wck' ), 'slug' => 'map-default-latitude', 'description' => __( 'The latitude at which the map should be displayed when no pins are attached.', 'wck' ), 'default' => 0 ),
184
+ array( 'type' => 'text', 'title' => __( 'Default Longitude', 'wck' ), 'slug' => 'map-default-longitude', 'description' => __( 'The longitude at which the map should be displayed when no pins are attached.', 'wck' ), 'default' => 0 ),
185
+ array( 'type' => 'text', 'title' => __( 'Default Zoom', 'wck' ), 'slug' => 'map-default-zoom', 'description' => __( 'Add a number from 0 to 19. The higher the number the higher the zoom.', 'wck' ), 'default' => 15 ),
186
+ array( 'type' => 'text', 'title' => __( 'Map Height', 'wck' ), 'slug' => 'map-height', 'description' => __( 'The height of the map.', 'wck' ), 'default' => 350 ),
187
+ array( 'type' => 'select', 'title' => __( 'Date Format', 'wck' ), 'slug' => 'date-format', 'description' => __( 'The format of the datepicker date', 'wck' ), 'options' => array( '%Default - dd-mm-yy%dd-mm-yy', '%Datepicker default - mm/dd/yy%mm/dd/yy', '%ISO 8601 (extended) - yy-mm-dd%yy-mm-dd', '%ISO 8601 (basic) - yymmdd%yymmdd', '%Short - d M, y%d M, y', '%Medium - d MM, y%d MM, y', '%Full - DD, d MM, yy%DD, d MM, yy', '%With text - \'day\' d \'of\' MM \'in the year\' yy%\'day\' d \'of\' MM \'in the year\' yy', '%Two digit year - dd-mm-y%dd-mm-y' ), 'default' => 'dd-mm-yy' ),
188
+ ));
189
+
190
+
191
+ /* set up the box arguments */
192
+ $args = array(
193
+ 'metabox_id' => 'wck-cfc-fields',
194
+ 'metabox_title' => __( 'Meta Box Fields', 'wck' ),
195
+ 'post_type' => 'wck-meta-box',
196
+ 'meta_name' => 'wck_cfc_fields',
197
+ 'meta_array' => $cfc_box_fields_fields
198
+ );
199
+
200
+ /* create the box */
201
+ new Wordpress_Creation_Kit( $args );
202
+ }
203
+
204
+ /* advanced label options container for update form */
205
+ add_action( "wck_before_add_form_wck_cfc_args_element_0", 'wck_cfc_description_for_args_box' );
206
+ function wck_cfc_description_for_args_box(){
207
+ echo '<div class="cfc-message"><p>'. __( 'Enter below the arguments for the meta box.', 'wck' ) .'</p></div>';
208
+ }
209
+
210
+ /* add css classes on update form. Allows us to show/hide elements based on field type select value */
211
+ add_filter( 'wck_update_container_class_wck_cfc_fields', 'wck_cfc_update_container_class', 10, 4 );
212
+ function wck_cfc_update_container_class($wck_update_container_css_class, $meta, $results, $element_id) {
213
+ $wck_element_type = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]["field-type"] );
214
+ return "class='update_container_$meta update_container_$wck_element_type element_type_$wck_element_type'";
215
+ }
216
+
217
+ add_filter( 'wck_element_class_wck_cfc_fields', 'wck_cfc_element_class', 10, 4 );
218
+ function wck_cfc_element_class($wck_element_class, $meta, $results, $element_id){
219
+ $wck_element_type = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]["field-type"] );
220
+ $wck_element_class = "class='element_type_$wck_element_type'";
221
+ return $wck_element_class;
222
+ }
223
+
224
+ /* add refresh to page */
225
+ add_action("wck_refresh_list_wck_cfc", "wck_cfc_after_refresh_list");
226
+ function wck_cfc_after_refresh_list(){
227
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cfc-page&updated=true' .'";</script>';
228
+ }
229
+
230
+ /* hook to create custom meta boxes */
231
+ add_action( 'admin_init', 'wck_cfc_create_boxes' );
232
+
233
+ function wck_cfc_create_boxes_args(){
234
+ $all_box_args = wp_cache_get( 'wck_all_box_args', 'wck' );
235
+
236
+ if ( $all_box_args !== false )
237
+ return $all_box_args;
238
+
239
+ $all_box_args = array();
240
+
241
+ $args = array(
242
+ 'post_type' => 'wck-meta-box',
243
+ 'numberposts' => -1
244
+ );
245
+
246
+ $all_meta_boxes = get_posts( $args );
247
+
248
+ if( !empty( $all_meta_boxes ) ){
249
+ foreach( $all_meta_boxes as $meta_box ){
250
+ $wck_cfc_args = get_post_meta( $meta_box->ID, 'wck_cfc_args', true );
251
+ $wck_cfc_fields = get_post_meta( $meta_box->ID, 'wck_cfc_fields', true );
252
+
253
+ $box_title = get_the_title( $meta_box->ID );
254
+ /* treat case where the post has no title */
255
+ if( empty( $box_title ) )
256
+ $box_title = '(no title)';
257
+
258
+ $fields_array = array();
259
+ if( !empty( $wck_cfc_fields ) ){
260
+ foreach( $wck_cfc_fields as $wck_cfc_field ){
261
+ $fields_inner_array = array( 'type' => $wck_cfc_field['field-type'], 'title' => $wck_cfc_field['field-title'] );
262
+
263
+ if( !empty( $wck_cfc_field['field-slug'] ) )
264
+ $fields_inner_array['slug'] = $wck_cfc_field['field-slug'];
265
+ else
266
+ $fields_inner_array['slug'] = Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_field['field-title'] );
267
+
268
+ if( !empty( $wck_cfc_field['description'] ) )
269
+ $fields_inner_array['description'] = $wck_cfc_field['description'];
270
+ if( !empty( $wck_cfc_field['required'] ) )
271
+ $fields_inner_array['required'] = $wck_cfc_field['required'] == 'false' ? false : true;
272
+ if ( !empty( $wck_cfc_field['cpt'] ) )
273
+ $fields_inner_array['cpt'] = $wck_cfc_field['cpt'];
274
+ if( isset( $wck_cfc_field['default-value'] ) )
275
+ $fields_inner_array['default'] = $wck_cfc_field['default-value'];
276
+ if( isset( $wck_cfc_field['default-text'] ) && !empty( $wck_cfc_field['default-text'] ) )
277
+ $fields_inner_array['default'] = $wck_cfc_field['default-text'];
278
+ if( !empty( $wck_cfc_field['options'] ) ){
279
+ $fields_inner_array['options'] = array_map( 'trim', explode( ',', $wck_cfc_field['options'] ) );
280
+
281
+ if( !empty( $wck_cfc_field['labels'] ) ){
282
+ $labels = array_map( 'trim', explode( ',', $wck_cfc_field['labels'] ) );
283
+ }
284
+
285
+ if( !empty( $fields_inner_array['options'] ) ){
286
+ foreach( $fields_inner_array['options'] as $key => $value ){
287
+ $fields_inner_array['options'][$key] = trim( $value );
288
+ if( strpos( $value, '%' ) === false && !empty( $labels[$key] ) )
289
+ $fields_inner_array['options'][$key] = '%'.$labels[$key].'%'.$value;
290
+ }
291
+ }
292
+
293
+ }
294
+ if( !empty( $wck_cfc_field['attach-upload-to-post'] ) )
295
+ $fields_inner_array['attach_to_post'] = $wck_cfc_field['attach-upload-to-post'] == 'yes' ? true : false;
296
+
297
+ if( !empty( $wck_cfc_field['number-of-rows'] ) )
298
+ $fields_inner_array['number_of_rows'] = trim( $wck_cfc_field['number-of-rows'] );
299
+
300
+ if( !empty( $wck_cfc_field['readonly'] ) )
301
+ $fields_inner_array['readonly'] = $wck_cfc_field['readonly'] == 'true' ? true : false;
302
+
303
+ if( ! empty( $wck_cfc_field['phone-format'] ) ) {
304
+ $phone_format_description = __( 'Required phone number format: ', 'wck' ) . $wck_cfc_field['phone-format'];
305
+ $phone_format_description = apply_filters( 'wck_phone_format_description', $phone_format_description );
306
+ if( $wck_cfc_field['field-type'] === 'phone' ) {
307
+ $fields_inner_array['phone-format'] = $wck_cfc_field['phone-format'];
308
+ if( ! empty( $wck_cfc_field['description'] ) ) {
309
+ $fields_inner_array['description'] .= '<br>' . $phone_format_description;
310
+ } else {
311
+ $fields_inner_array['description'] = $phone_format_description;
312
+ }
313
+ }
314
+ }
315
+
316
+
317
+ if( $wck_cfc_field['field-type'] === 'html' && isset( $wck_cfc_field['html-content'] ) ) {
318
+ $fields_inner_array['html-content'] = $wck_cfc_field['html-content'];
319
+ }
320
+
321
+
322
+ if( isset( $wck_cfc_field['map-default-latitude'] ) )
323
+ $fields_inner_array['map_default_latitude'] = trim( $wck_cfc_field['map-default-latitude'] );
324
+
325
+ if( isset( $wck_cfc_field['map-default-longitude'] ) )
326
+ $fields_inner_array['map_default_longitude'] = trim( $wck_cfc_field['map-default-longitude'] );
327
+
328
+ if( !empty( $wck_cfc_field['map-default-zoom'] ) )
329
+ $fields_inner_array['map_default_zoom'] = trim( $wck_cfc_field['map-default-zoom'] );
330
+
331
+ if( !empty( $wck_cfc_field['map-height'] ) )
332
+ $fields_inner_array['map_height'] = trim( $wck_cfc_field['map-height'] );
333
+
334
+ if( !empty( $wck_cfc_field['min-number-value'] ) || ( isset( $wck_cfc_field['min-number-value'] ) && $wck_cfc_field['min-number-value'] == '0' ) )
335
+ $fields_inner_array['min-number-value'] = trim( $wck_cfc_field['min-number-value'] );
336
+
337
+ if( !empty( $wck_cfc_field['max-number-value'] ) || ( isset( $wck_cfc_field['max-number-value'] ) && $wck_cfc_field['max-number-value'] == '0' ) )
338
+ $fields_inner_array['max-number-value'] = trim( $wck_cfc_field['max-number-value'] );
339
+
340
+ if( !empty( $wck_cfc_field['number-step-value'] ) )
341
+ $fields_inner_array['number-step-value'] = trim( $wck_cfc_field['number-step-value'] );
342
+
343
+ if( $wck_cfc_field['field-type'] === 'datepicker' ) {
344
+ if( !empty( $wck_cfc_field['date-format'] ) )
345
+ $fields_inner_array['date-format'] = $wck_cfc_field['date-format'];
346
+ }
347
+
348
+ $fields_array[] = $fields_inner_array;
349
+ }
350
+ }
351
+
352
+ if( !empty( $wck_cfc_args ) ){
353
+ foreach( $wck_cfc_args as $wck_cfc_arg ){
354
+
355
+ /* metabox_id must be different from meta_name */
356
+ $metabox_id = Wordpress_Creation_Kit::wck_generate_slug( $box_title );
357
+ if( $wck_cfc_arg['meta-name'] == $metabox_id || 'content' == $metabox_id )
358
+ $metabox_id = 'wck-'. $metabox_id;
359
+
360
+ $box_args = array(
361
+ 'metabox_id' => $metabox_id,
362
+ 'metabox_title' => $box_title,
363
+ 'post_type' => $wck_cfc_arg['post-type'],
364
+ 'meta_name' => $wck_cfc_arg['meta-name'],
365
+ 'meta_array' => $fields_array
366
+ );
367
+ if( !empty( $wck_cfc_arg['sortable'] ) )
368
+ $box_args['sortable'] = $wck_cfc_arg['sortable'] == 'false' ? false : true;
369
+
370
+ if( !empty( $wck_cfc_arg['repeater'] ) )
371
+ $box_args['single'] = $wck_cfc_arg['repeater'] == 'false' ? true : false;
372
+
373
+ if( !empty( $wck_cfc_arg['post-id'] ) )
374
+ $box_args['post_id'] = $wck_cfc_arg['post-id'];
375
+
376
+ if( !empty( $wck_cfc_arg['page-template'] ) )
377
+ $box_args['page_template'] = $wck_cfc_arg['page-template'];
378
+
379
+ if( !empty( $wck_cfc_arg['box-style'] ) )
380
+ $box_args['box_style'] = $wck_cfc_arg['box-style'];
381
+
382
+ $box_args['unserialize_fields'] = apply_filters( 'wck_cfc_unserialize_fields_'.$wck_cfc_arg['meta-name'], false );
383
+
384
+ /* nested repeater arg for pro version only */
385
+ if( !empty( $wck_cfc_arg['nested'] ) )
386
+ $box_args['nested'] = $wck_cfc_arg['nested'] == 'false' ? false : true;
387
+
388
+ $all_box_args[] = apply_filters( "wck_cfc_box_args_".$wck_cfc_arg['meta-name'], $box_args );
389
+ }
390
+ }
391
+ }
392
+ }
393
+ wp_cache_set( 'wck_all_box_args', $all_box_args, 'wck');
394
+ return $all_box_args;
395
+ }
396
+
397
+ function wck_cfc_create_boxes(){
398
+ $all_box_args = wck_cfc_create_boxes_args();
399
+ if( !empty( $all_box_args ) ){
400
+ foreach( $all_box_args as $box_args ){
401
+ new Wordpress_Creation_Kit( $box_args );
402
+ }
403
+ }
404
+ }
405
+
406
+ /* Meta Name Verification */
407
+ add_filter( 'wck_required_test_wck_cfc_args_meta-name', 'wck_cfc_check_meta_name', 10, 8 );
408
+ add_filter( 'wck_required_test_wck_cfc_fields_field-slug', 'wck_cfc_check_meta_name', 10, 8 );
409
+ function wck_cfc_check_meta_name( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
410
+ global $wpdb;
411
+
412
+ if( current_filter() == 'wck_required_test_wck_cfc_args_meta-name' ){
413
+ $wck_cfc_args = get_post_meta( $post_id, 'wck_cfc_args', true );
414
+
415
+ if( empty( $wck_cfc_args ) ){
416
+ //this is the add case
417
+ $check_meta_existance = wck_cfc_check_existence_in_database( $value );
418
+ }
419
+ else{
420
+ //this is the update case
421
+ if( $wck_cfc_args[0]['meta-name'] != $value ){
422
+ $check_meta_existance = wck_cfc_check_existence_in_database( $value );
423
+ }
424
+ else
425
+ $check_meta_existance = false;
426
+ }
427
+ }
428
+ else if( current_filter() == 'wck_required_test_wck_cfc_fields_field-slug' ){
429
+ if( !empty( $values['wck-overwrite-slug'] ) && $values['wck-overwrite-slug'] == 'overwrite' )
430
+ $check_meta_existance = false;
431
+ else{
432
+ $wck_cfc_fields = get_post_meta( $post_id, 'wck_cfc_fields', true );
433
+ if( empty( $wck_cfc_fields ) || $elemet_id === false ){
434
+ //this is the add case
435
+ $check_meta_existance = wck_cfc_check_existence_in_database( $value );
436
+ }
437
+ else if( $elemet_id !== false ){
438
+ //this is the update case
439
+ if( !empty( $wck_cfc_fields[$elemet_id]['field-slug'] ) && $wck_cfc_fields[$elemet_id]['field-slug'] != $value ){
440
+ $check_meta_existance = wck_cfc_check_existence_in_database( $value );
441
+ }
442
+ else
443
+ $check_meta_existance = false;
444
+ }
445
+ }
446
+ }
447
+
448
+ if( strpos( $value, ' ' ) === false )
449
+ $contains_spaces = false;
450
+ else
451
+ $contains_spaces = true;
452
+
453
+ if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
454
+ $restricted_name = false;
455
+ else
456
+ $restricted_name = true;
457
+
458
+ if ( strtolower($value) == $value )
459
+ $has_uppercase = false;
460
+ else
461
+ $has_uppercase = true;
462
+
463
+ return ( $check_meta_existance || empty($value) || $contains_spaces || $restricted_name || $has_uppercase );
464
+ }
465
+
466
+ add_filter( 'wck_required_message_wck_cfc_args_meta-name', 'wck_cfc_change_meta_message', 10, 3 );
467
+ add_filter( 'wck_required_message_wck_cfc_fields_field-slug', 'wck_cfc_change_meta_message', 10, 3 );
468
+ function wck_cfc_change_meta_message( $message, $value, $required_field ){
469
+
470
+ if( current_filter() == 'wck_required_message_wck_cfc_args_meta-name' )
471
+ $field_name = __( "Group Name", 'wck' );
472
+ else if( current_filter() == 'wck_required_message_wck_cfc_fields_field-slug' )
473
+ $field_name = __( "Field Slug", 'wck' );
474
+
475
+ if( empty( $value ) )
476
+ return $message;
477
+ else if( strpos( $value, ' ' ) !== false )
478
+ return sprintf( __( "Choose a different %s as this one contains spaces\n", "wck" ), $field_name );
479
+ else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
480
+ return sprintf( __( "Choose a different %s as this one is reserved\n", "wck" ), $field_name );
481
+ else if ( strtolower($value) != $value )
482
+ return sprintf( __( "Choose a different %s as this one contains uppercase letters\n", "wck" ), $field_name );
483
+ else
484
+ return sprintf( __( "Choose a different %s as this one already exists\n", "wck" ), $field_name );
485
+ }
486
+
487
+ /* function that check if a group name already exists */
488
+ function wck_cfc_check_group_name_exists( $name ){
489
+
490
+ $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
491
+
492
+ if( !empty( $wck_meta_boxes_ids ) ){
493
+ foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
494
+ $wck_cfc_args = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_args', true );
495
+ if( !empty( $wck_cfc_args ) ){
496
+ /* make sure we compare them as slugs */
497
+ if( Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_args[0]['meta-name'] ) == Wordpress_Creation_Kit::wck_generate_slug( $name ) ){
498
+ return true;
499
+ }
500
+ }
501
+ }
502
+ }
503
+ return false;
504
+ }
505
+
506
+ /* function that check if a field slug already exists */
507
+ function wck_cfc_check_field_slug_exists( $name ){
508
+
509
+ $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
510
+
511
+ if( !empty( $wck_meta_boxes_ids ) ){
512
+ foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
513
+ $wck_cfc_fields = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_fields', true );
514
+ if( !empty( $wck_cfc_fields ) ){
515
+ foreach( $wck_cfc_fields as $wck_cfc_field ){
516
+ /* make sure to compare them as slugs */
517
+ if( Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_field['field-slug'] ) == Wordpress_Creation_Kit::wck_generate_slug( $name ) ){
518
+ return true;
519
+ }
520
+ }
521
+ }
522
+ }
523
+ }
524
+ return false;
525
+ }
526
+
527
+ function wck_cfc_check_existence_in_database( $name ){
528
+ global $wpdb;
529
+ $check_meta_existance = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(meta_key) FROM $wpdb->postmeta WHERE meta_key = %s", $name ) );
530
+ /* if we did not find anything yet */
531
+ if( !$check_meta_existance ){
532
+ $check_meta_existance = wck_cfc_check_group_name_exists( $name );
533
+ }
534
+ /* if we still did not find anything yet */
535
+ if( !$check_meta_existance ){
536
+ $check_meta_existance = wck_cfc_check_field_slug_exists( $name );
537
+ }
538
+
539
+ return $check_meta_existance;
540
+ }
541
+
542
+
543
+ /* Field Name Verification */
544
+ add_filter( 'wck_required_test_wck_cfc_fields_field-title', 'wck_cfc_ceck_field_title', 10, 6 );
545
+ function wck_cfc_ceck_field_title( $bool, $value, $post_id, $field, $meta, $fields ){
546
+
547
+ if( trim( strtolower( $value ) ) !== 'content' && trim( strtolower( $value ) ) !== 'action' )
548
+ $restricted_name = false;
549
+ else
550
+ $restricted_name = true;
551
+
552
+ return ( empty($value) || $restricted_name );
553
+ }
554
+
555
+ add_filter( 'wck_required_message_wck_cfc_fields_field-title', 'wck_cfc_change_field_title_message', 10, 3 );
556
+ function wck_cfc_change_field_title_message( $message, $value, $required_field ){
557
+ if( empty( $value ) )
558
+ return $message;
559
+ else if( trim( strtolower( $value ) ) === 'content' || trim( strtolower( $value ) ) === 'action' )
560
+ return __( "Choose a different Field Title as this one is reserved\n", "wck" );
561
+ }
562
+
563
+ /* Add the separate meta for post type, post id and page template */
564
+ add_action( 'wck_before_add_meta', 'wck_cfc_add_separate_meta', 10, 3 );
565
+ function wck_cfc_add_separate_meta( $meta, $id, $values ){
566
+ if( $meta == 'wck_cfc_args' ){
567
+ // Post Type
568
+ if( !empty( $values['post-type'] ) ){
569
+ update_post_meta( $id, 'wck_cfc_post_type_arg', $values['post-type'] );
570
+ }
571
+
572
+ // Post Id
573
+ if( !empty( $values['post-id'] ) ){
574
+ update_post_meta( $id, 'wck_cfc_post_id_arg', $values['post-id'] );
575
+ }
576
+
577
+ // Page Template
578
+ if( !empty( $values['page-template'] ) ){
579
+ update_post_meta( $id, 'wck_cfc_page_template_arg', $values['page-template'] );
580
+ }
581
+ }
582
+ }
583
+
584
+ /* Change meta_key in db if field changed and also update the separate meta for post type, post id and page template */
585
+ add_action( 'wck_before_update_meta', 'wck_cfc_change_meta_key', 10, 4 );
586
+ function wck_cfc_change_meta_key( $meta, $id, $values, $element_id ){
587
+ global $wpdb;
588
+ if( $meta == 'wck_cfc_args' ){
589
+ $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
590
+ if( !empty( $wck_cfc_args ) ) {
591
+ if ($wck_cfc_args[0]['meta-name'] != $values['meta-name']) {
592
+ $wpdb->update(
593
+ $wpdb->postmeta,
594
+ array('meta_key' => $values['meta-name']),
595
+ array('meta_key' => $wck_cfc_args[0]['meta-name'])
596
+ );
597
+ }
598
+
599
+ // Post Type
600
+ if ($wck_cfc_args[0]['post-type'] != $values['post-type']) {
601
+ update_post_meta($id, 'wck_cfc_post_type_arg', $values['post-type']);
602
+ }
603
+
604
+ // Post Id
605
+ if ($wck_cfc_args[0]['post-id'] != $values['post-id']) {
606
+ update_post_meta($id, 'wck_cfc_post_id_arg', $values['post-id']);
607
+ }
608
+
609
+ // Page Template
610
+ if( isset( $wck_cfc_args[0]['page-template'] ) && $values['page-template'] ) {
611
+ if ($wck_cfc_args[0]['page-template'] != $values['page-template']) {
612
+ update_post_meta($id, 'wck_cfc_page_template_arg', $values['page-template']);
613
+ }
614
+ }
615
+ }
616
+ }
617
+ }
618
+
619
+ /* Change Field Title in db if field changed */
620
+ add_action( 'wck_before_update_meta', 'wck_cfc_change_field_title', 10, 4 );
621
+ function wck_cfc_change_field_title( $meta, $id, $values, $element_id ){
622
+ global $wpdb;
623
+ if( $meta == 'wck_cfc_fields' ){
624
+ $wck_cfc_fields = get_post_meta( $id, 'wck_cfc_fields', true );
625
+ if( !empty( $wck_cfc_fields ) ) {
626
+
627
+ if( !empty( $wck_cfc_fields[$element_id]['field-slug'] ) )
628
+ $old_slug = $wck_cfc_fields[$element_id]['field-slug'];
629
+ else
630
+ $old_slug = Wordpress_Creation_Kit::wck_generate_slug( $wck_cfc_fields[$element_id]['field-title'] );
631
+
632
+ if ( $old_slug != $values['field-slug']) {
633
+
634
+ $wck_cfc_args = get_post_meta($id, 'wck_cfc_args', true);
635
+ $meta_name = $wck_cfc_args[0]['meta-name'];
636
+ $post_id_with_this_meta = $wpdb->get_results($wpdb->prepare("SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s", $meta_name));
637
+
638
+ if (!empty($post_id_with_this_meta)) {
639
+ foreach ($post_id_with_this_meta as $post) {
640
+ $results = get_post_meta($post->post_id, $meta_name, true);
641
+ if (!empty($results)) {
642
+ foreach ($results as $key => $result) {
643
+ $results[$key][$values['field-slug']] = $results[$key][$old_slug];
644
+
645
+ /* unserialized */
646
+ if( $key == 0 )
647
+ $suffix = '';
648
+ else
649
+ $suffix = '_'.$key;
650
+ add_post_meta( $post->post_id, $values['field-slug'].$suffix, $results[$key][$old_slug] );
651
+ delete_post_meta( $post->post_id, $old_slug.$suffix );
652
+
653
+
654
+ unset($results[$key][$old_slug]);
655
+ }
656
+ }
657
+ update_post_meta($post->post_id, $meta_name, $results);
658
+ }
659
+ }
660
+ }
661
+ }
662
+ }
663
+ }
664
+
665
+ /* Add Custom columns to listing */
666
+ add_filter("manage_wck-meta-box_posts_columns", "wck_cfc_edit_columns" );
667
+ function wck_cfc_edit_columns($columns){
668
+ $columns['cfc-id'] = __( "Id", "wck" );
669
+ $columns['cfc-post-type'] = __( "Post Type", "wck" );
670
+ $columns['cfc-page-template'] = __( "Page Template", "wck" );
671
+
672
+ /* only in pro version */
673
+ if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
674
+ $columns['cfc-nested-repeater'] = __( "Nested Repeater", "wck" );
675
+ }
676
+
677
+ return $columns;
678
+ }
679
+
680
+ /* Register the column as sortable */
681
+ add_filter( 'manage_edit-wck-meta-box_sortable_columns', 'wck_cfc_register_sortable_columns' );
682
+ function wck_cfc_register_sortable_columns( $columns ) {
683
+ $columns['cfc-id'] = 'cfc-id';
684
+ $columns['cfc-post-type'] = 'cfc-post-type';
685
+ $columns['cfc-page-template'] = 'cfc-page-template';
686
+
687
+ return $columns;
688
+ }
689
+
690
+ /* Tell WordPress how to handle the sorting */
691
+ add_filter( 'request', 'wck_cfc_column_orderby' );
692
+ function wck_cfc_column_orderby( $vars ) {
693
+ if ( isset( $vars['orderby'] ) && 'cfc-id' == $vars['orderby'] ) {
694
+ $vars = array_merge( $vars, array(
695
+ 'meta_key' => 'wck_cfc_post_id_arg',
696
+ 'orderby' => 'meta_value_num'
697
+ ) );
698
+ }
699
+
700
+ if ( isset( $vars['orderby'] ) && 'cfc-post-type' == $vars['orderby'] ) {
701
+ $vars = array_merge( $vars, array(
702
+ 'meta_key' => 'wck_cfc_post_type_arg',
703
+ 'orderby' => 'meta_value'
704
+ ) );
705
+ }
706
+
707
+ if ( isset( $vars['orderby'] ) && 'cfc-page-template' == $vars['orderby'] ) {
708
+ $vars = array_merge( $vars, array(
709
+ 'meta_key' => 'wck_cfc_page_template_arg',
710
+ 'orderby' => 'meta_value'
711
+ ) );
712
+ }
713
+
714
+ return $vars;
715
+ }
716
+
717
+ /* Let's set up what to display in the columns */
718
+ add_action("manage_wck-meta-box_posts_custom_column", "wck_cfc_custom_columns", 10, 2);
719
+ function wck_cfc_custom_columns( $column_name, $post_id ){
720
+ if( $column_name == 'cfc-id' ){
721
+ $post_id_arg = get_post_meta( $post_id, 'wck_cfc_post_id_arg', true );
722
+ echo $post_id_arg;
723
+ }
724
+
725
+ if( $column_name == 'cfc-post-type' ){
726
+ $post_type_arg = get_post_meta( $post_id, 'wck_cfc_post_type_arg', true );
727
+ echo $post_type_arg;
728
+ }
729
+
730
+ if( $column_name == 'cfc-page-template' ){
731
+ $page_template_arg = get_post_meta( $post_id, 'wck_cfc_page_template_arg', true );
732
+ echo $page_template_arg;
733
+ }
734
+
735
+ /* only in pro version */
736
+ if( function_exists( 'wck_nr_add_repeater_boxes' ) ){
737
+ if( $column_name == 'cfc-nested-repeater' ){
738
+ $box_args = get_post_meta( $post_id, 'wck_cfc_args', true );
739
+ if( !empty( $box_args[0]['nested'] ) )
740
+ echo $box_args[0]['nested'];
741
+ }
742
+ }
743
+ }
744
+
745
+ /* Add side metaboxes */
746
+ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
747
+ add_action('add_meta_boxes', 'wck_cfc_add_side_boxes');
748
+ function wck_cfc_add_side_boxes()
749
+ {
750
+ add_meta_box('wck-cfc-side', __('Wordpress Creation Kit', 'wck'), 'wck_cfc_side_box_one', 'wck-meta-box', 'side', 'low');
751
+ }
752
+
753
+ function wck_cfc_side_box_one()
754
+ {
755
+ ?>
756
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
757
+ src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
758
+ alt="WCK-PRO"/></a>
759
+ <?php
760
+ }
761
+ }
762
+
763
+ /* add TranslatePress crosspromotion */
764
+ add_action('add_meta_boxes', 'wck_cfc_add_trp_side_box');
765
+ function wck_cfc_add_trp_side_box()
766
+ {
767
+ add_meta_box('wck-cfc-side-trp', __('TranslatePress', 'wck'), 'wck_cfc_side_box_trp', 'wck-meta-box', 'side', 'low');
768
+ }
769
+
770
+ function wck_cfc_side_box_trp()
771
+ {
772
+ ?>
773
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
774
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
775
+ alt="TranslatePress"/></a>
776
+ <h4>Easily translate your entire WordPress website</h4>
777
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
778
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
779
+ <?php
780
+ }
781
+
782
+
783
+ /* Contextual Help */
784
+ add_action('current_screen', 'wck_cfc_help');
785
+
786
+ function wck_cfc_help () {
787
+ $screen = get_current_screen();
788
+ /*
789
+ * Check if current screen is wck_page_cptc-page
790
+ * Don't add help tab if it's not
791
+ */
792
+ if ( $screen->id != 'wck-meta-box' )
793
+ return;
794
+
795
+ // Add help tabs
796
+ $screen->add_help_tab( array(
797
+ 'id' => 'wck_cfc_overview',
798
+ 'title' => __( 'Overview', 'wck' ),
799
+ 'content' => '<p>' . __( 'WCK Custom Fields Creator allows you to easily create custom meta boxes for Wordpress without any programming knowledge.', 'wck' ) . '</p>',
800
+ ) );
801
+
802
+ $screen->add_help_tab( array(
803
+ 'id' => 'wck_cfc_arguments',
804
+ 'title' => __( 'Meta Box Arguments', 'wck' ),
805
+ 'content' => '<p>' . __( 'Define here the rules for the meta box. This rules are used to set up where the meta box will appear, it\'s type and also the meta key name stored in the database. The name of the entry (Enter title here) will be used as the meta box title.', 'wck' ) . '</p>',
806
+ ) );
807
+
808
+ $screen->add_help_tab( array(
809
+ 'id' => 'wck_cfc_fields',
810
+ 'title' => __( 'Meta Box Fields', 'wck' ),
811
+ 'content' => '<p>' . __( 'Define here the fields contained in the meta box. From "Field Title" a slug will be automatically generated and you will use this slug to display the data in the frontend.', 'wck' ) . '</p>',
812
+ ) );
813
+
814
+ $screen->add_help_tab( array(
815
+ 'id' => 'wck_cfc_example',
816
+ 'title' => __( 'CFC Frontend Example', 'wck' ),
817
+ 'content' => '<p>' . __( 'Let\'s consider we have a meta box with the following arguments:<br /> - Meta name: books <br /> - Post Type: post <br />And we also have two fields deffined:<br /> - A text field with the Field Title: Book name <br /> - And another text field with the Field Title: Author name ', 'wck' ) . '</p>' . '<p>' . __( 'You will notice that slugs will automatically be created for the two text fields. For "Book name" the slug will be "book-name" and for "Author name" the slug will be "author-name"', 'wck' ) . '</p>' . '<p>' . __( 'Let\'s see what the code for displaying the meta box values in single.php of your theme would be:', 'wck' ) . '</p>' . '<pre>' . '$books = get_post_meta( $post->ID, \'books\', true ); <br />foreach( $books as $book){<br /> echo $book[\'book-name\'];<br / > echo $book[\'author-name\'];<br />}' . '</pre>' . '<p>' . __( 'So as you can see the Meta Name "books" is used as the $key parameter of the funtion <a href="http://codex.wordpress.org/Function_Reference/get_post_meta" target="_blank">get_post_meta()</a> and the slugs of the text fields are used as keys for the resulting array. Basically CFC stores the entries as post meta in a multidimensioanl array. In our case the array would be: <br /><pre>array( array( "book-name" => "The Hitchhiker\'s Guide To The Galaxy", "author-name" => "Douglas Adams" ), array( "book-name" => "Ender\'s Game", "author-name" => "Orson Scott Card" ) );</pre> This is true even for single entries.', 'wck' ) . '</p>'
818
+ ) );
819
+ }
820
+
821
+ /**
822
+ * Get the Page Templates available in the current theme
823
+ *
824
+ * Based on wordpress get_page_templates()
825
+ *
826
+ * @return array Key is the template name, value is the %Template Name%filename string format of the template
827
+ */
828
+ function wck_get_page_templates() {
829
+
830
+ $page_templates = array();
831
+ $theme_templates = array_flip(wp_get_theme()->get_page_templates());
832
+ if( !empty( $theme_templates ) ){
833
+ foreach( $theme_templates as $key => $value){
834
+ $page_templates[$key] = "%$key%$value";
835
+ }
836
+ }
837
+ return $page_templates;
838
+ }
839
+
840
+ /* Filter post update message */
841
+ add_filter( 'post_updated_messages', 'wck_cfc_filter_post_update_message' );
842
+ function wck_cfc_filter_post_update_message($messages){
843
+ $messages['wck-meta-box'] = array(
844
+ 0 => '', // Unused. Messages start at index 1.
845
+ 1 => __('Metabox updated.', 'wck')
846
+ );
847
+ return $messages;
848
+ }
849
+
850
+ /* Filter Field Types for free version */
851
+ add_filter( 'wck_field_types', 'wck_cfc_filter_field_types' );
852
+ function wck_cfc_filter_field_types( $field_types ){
853
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
854
+ if ( !file_exists ($wck_premium_update . 'update-checker.php'))
855
+ $field_types = array( 'text', 'textarea', 'select', 'select multiple', 'checkbox', 'radio', 'upload', 'wysiwyg editor', 'heading', 'colorpicker', 'currency select', 'phone', 'timepicker', 'html', 'number' );
856
+
857
+ return $field_types;
858
+ }
859
+
860
+ /* Mark as required the 'Options' field for checkboxes, radios, selects .. */
861
+ add_filter( 'wck_before_test_required', 'wck_cfc_make_options_required', 10, 4 );
862
+ function wck_cfc_make_options_required( $meta_array, $meta, $values, $id ) {
863
+ if( $meta == 'wck_cfc_fields' ) {
864
+ if( $values['field-type'] == 'select' || $values['field-type'] == 'select multiple' || $values['field-type'] == 'radio' || $values['field-type'] == 'checkbox' ) {
865
+ foreach( $meta_array as $key => $field ) {
866
+ if( $field['slug'] == 'options' ) {
867
+ $meta_array[$key]['required'] = true;
868
+ }
869
+ }
870
+ }
871
+ }
872
+
873
+ foreach( $meta_array as $key => $field ) {
874
+ if( isset( $field['type'] ) && $field['type'] == 'phone' ) {
875
+ $meta_array[$key]['required'] ? $meta_array[$key]['was_required'] = true : $meta_array[$key]['was_required'] = false;
876
+ $meta_array[$key]['required'] = true;
877
+ add_filter( "wck_required_test_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field ), 'wck_phone_field_error', 10, 6 );
878
+ }
879
+
880
+ if( isset( $field['type'] ) && $field['type'] == 'number' ) {
881
+ $meta_array[$key]['required'] ? $meta_array[$key]['was_required'] = true : $meta_array[$key]['was_required'] = false;
882
+ $meta_array[$key]['required'] = true;
883
+ add_filter( "wck_required_test_{$meta}_" . Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field ), 'wck_number_field_error', 10, 6 );
884
+ }
885
+ }
886
+
887
+ return $meta_array;
888
+ }
889
+
890
+ /* handle Field Slug backwards compatibility */
891
+ add_filter( "wck_displayed_value_wck_cfc_fields_field-slug", "wck_cfc_handle_empty_field_slug", 10, 4 );
892
+ add_filter( "wck_cfc_filter_edit_form_value_wck_cfc_fields_field-slug", "wck_cfc_handle_empty_field_slug", 10, 4 );
893
+ function wck_cfc_handle_empty_field_slug( $value, $results, $element_id, $id ){
894
+ if( empty( $value ) ){
895
+ $value = Wordpress_Creation_Kit::wck_generate_slug( $results[$element_id]['field-title'] );
896
+ $check_meta_existance = wck_cfc_check_group_name_exists( $value );
897
+ if( $check_meta_existance ){
898
+ $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
899
+ if( !empty( $wck_cfc_args ) ){
900
+ if( current_filter() == 'wck_displayed_value_wck_cfc_fields_field-slug' ){
901
+ $value = '('.$wck_cfc_args[0]['meta-name'].'_)'.$value;
902
+ }
903
+ else
904
+ $value = $wck_cfc_args[0]['meta-name'].'_'.$value;
905
+ }
906
+ }
907
+ }
908
+ else{
909
+ if( current_filter() == 'wck_displayed_value_wck_cfc_fields_field-slug' ) {
910
+ $check_meta_existance = wck_cfc_check_group_name_exists($value);
911
+ if( $check_meta_existance ){
912
+ $wck_cfc_args = get_post_meta( $id, 'wck_cfc_args', true );
913
+ if( !empty( $wck_cfc_args ) ){
914
+ $value = '('.$wck_cfc_args[0]['meta-name'].'_)'.$value;
915
+ }
916
+ }
917
+ }
918
+ }
919
+
920
+ return $value;
921
+ }
922
+
923
+ add_filter( "wck_field_before_description", "wck_edit_button_for_field_slug", 10, 3 );
924
+ function wck_edit_button_for_field_slug( $element, $meta, $details ){
925
+ if( $meta == 'wck_cfc_fields' && $details['slug'] == 'field-slug' ){
926
+ $element .= '<button type="button" class="wck-cfc-edit-slug button button-small">'. __( "Edit", "wck" ).'</button>';
927
+ $element .= '<span class="wck-overwrite-slug"><input type="checkbox" name="wck-overwrite-slug" value="overwrite" class="mb-field">'. __( "Overwrite Existing", "wck" ).'</span>';
928
+ }
929
+ return $element;
930
+ }
931
+
932
+ add_action( 'wp_ajax_wck_generate_slug', 'wck_generate_slug' );
933
+ function wck_generate_slug(){
934
+ if( !empty( $_POST['field_title'] ) ){
935
+ $slug = Wordpress_Creation_Kit::wck_generate_slug( $_POST['field_title'] );
936
+ die( $slug );
937
+ }
938
+ die('failed');
939
+ }
940
+
941
+ function wck_phone_field_error( $bool, $value, $id, $field, $meta, $fields ) {
942
+ foreach( $fields as $key => $field_array ) {
943
+ $field_slug = Wordpress_Creation_Kit::wck_generate_slug( $field_array['title'], $field_array );
944
+ if( $field_slug == $field ) {
945
+ if( ! empty( $field_array['phone-format'] ) && ! empty( $value ) ) {
946
+ $phone_nb = array();
947
+ $length = strlen( $value );
948
+
949
+ for( $i=0; $i < $length; $i++ ) {
950
+ $phone_nb[$i] = $value[$i];
951
+
952
+ if( $value[$i] == '_' ) {
953
+ add_filter( "wck_required_message_{$meta}_{$field}", "wck_phone_error_message", 10, 3 );
954
+ return true;
955
+ }
956
+ }
957
+ } elseif( isset( $field_array['was_required'] ) && $field_array['was_required'] && empty( $value ) ) {
958
+ return true;
959
+ }
960
+ }
961
+ }
962
+ }
963
+
964
+ function wck_phone_error_message( $message, $value, $required_field ) {
965
+ $message = apply_filters( "wck_invalid_phone_message", __( "Please enter a valid phone number for field ", "wck" ) . "$required_field \n" );
966
+
967
+ return $message;
968
+ }
969
+
970
+ function wck_number_field_error( $bool, $value, $id, $field, $meta, $fields ) {
971
+ foreach( $fields as $key => $field_array ) {
972
+ $field_slug = Wordpress_Creation_Kit::wck_generate_slug( $field_array['title'], $field_array );
973
+ if( $field_slug == $field ) {
974
+ if( ! empty( $value ) && ! is_numeric( $value ) ) {
975
+
976
+ add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) {
977
+ return apply_filters( "wck_number_error_message", __( "Please enter numbers only for field ", "wck" ) . "$required_field \n" );
978
+ }, 10, 3 );
979
+
980
+ return true;
981
+ }
982
+
983
+ if( ! empty( $field_array['number-step-value'] ) && ! empty( $value ) && ( sprintf( round( $value / $field_array['number-step-value'] ) ) != sprintf( $value / $field_array['number-step-value'] ) ) ) {
984
+
985
+ add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
986
+ $number_step = $field_array['number-step-value'];
987
+ return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be a multiplier of ", "wck" ) . "$number_step \n" );
988
+ }, 10, 3 );
989
+
990
+ return true;
991
+ }
992
+
993
+ if( ( ! empty( $field_array['min-number-value'] ) || (isset($field_array['min-number-value']) && $field_array['min-number-value'] == '0' )) && ( ! empty( $value ) || $value == '0' ) && $value < $field_array['min-number-value'] ) {
994
+
995
+ add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
996
+ $number_min = $field_array['min-number-value'];
997
+
998
+ return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be greater than or equal to ", "wck" ) . "$number_min \n" );
999
+ }, 10, 3 );
1000
+
1001
+
1002
+ return true;
1003
+ }
1004
+
1005
+ if( ( ! empty( $field_array['max-number-value'] ) || (isset($field_array['max-number-value']) && $field_array['max-number-value'] == '0' )) && ( ! empty( $value ) || $value == '0' ) && $value > $field_array['max-number-value'] ) {
1006
+ add_filter( "wck_required_message_{$meta}_{$field_slug}", function ( $message, $value, $required_field ) use ( $field_array ) {
1007
+ $number_max = $field_array['max-number-value'];
1008
+
1009
+ return apply_filters( "wck_number_error_message", "$required_field" . __( " field value must be less than or equal to ", "wck" ) . "$number_max \n" );
1010
+ }, 10, 3 );
1011
+
1012
+
1013
+ return true;
1014
+ }
1015
+
1016
+ if( isset( $field_array['was_required'] ) && $field_array['was_required'] && empty( $value ) && $value != '0' ) {
1017
+ return true;
1018
+ }
1019
+ }
1020
+ }
1021
+ }
1022
+
1023
+ /* output a notice that asks the user to go and unserialize the fields */
1024
+ $wck_update_unserialized = get_option( 'wck_update_to_unserialized', 'yes' );
1025
+ if( $wck_update_unserialized == 'yes' ) {
1026
+ new WCK_Add_Notices('wck_update_unserialized_notice',
1027
+ sprintf(__('To update the meta information on posts to the new unserialized structure go to %1$sthis page%2$s and follow the instructions. Please make a backup of your database first! %3$sDismiss%4$s', 'wck'), "<a href='" . admin_url('admin.php?page=wck-unserialized') . "'>", "</a>", "<a href='" . esc_url(add_query_arg('wck_update_unserialized_notice_dismiss_notification', '0')) . "'>", "</a>"),
1028
+ 'update-nag');
1029
+ }
1030
+
1031
+ /* add an admin page for the unserialized process */
1032
+ add_action('admin_menu', 'wck_register_update_unserialized_submenu_page');
1033
+ function wck_register_update_unserialized_submenu_page() {
1034
+ add_submenu_page( null, 'WCK Unserialized', 'WCK Unserialized', 'manage_options', 'wck-unserialized', 'wck_unserialized_page_callback' );
1035
+ }
1036
+
1037
+ /**
1038
+ * Function callback for the unserilized page
1039
+ */
1040
+ function wck_unserialized_page_callback(){
1041
+
1042
+ /* set number of posts that are processed in a batch !IMPORTANT IT IS ALSO SET IN THE wck_cfc_process_unserialized_batch() FUNCTION */
1043
+ $per_batch = 30;
1044
+ $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 0;
1045
+ $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
1046
+ $finish = isset( $_GET['wckbatch-complete'] ) ? esc_url( $_GET['wckbatch-complete'] ) : false;
1047
+ $processed = round( ( $step * $per_batch ), 0 );
1048
+ if( $processed > $total )
1049
+ $processed = $total;
1050
+ ?>
1051
+ <div class="wrap">
1052
+ <h2><?php _e( 'Processing Unserialized Fields', 'wck' ); ?></h2>
1053
+
1054
+ <?php if( !$finish ): ?>
1055
+ <div id="wck-unserialized-processing">
1056
+ <p><?php _e( 'The process has started, please be patient. This could take several minutes. You will be automatically redirected when the process is finished.', 'wck' ); ?></p>
1057
+ <?php if( ! empty( $total ) ) : ?>
1058
+ <p><strong><?php printf( __( '%d posts of %d processed', 'wck' ), $processed, $total ); ?></strong></p>
1059
+ <?php endif; ?>
1060
+ </div>
1061
+ <script type="text/javascript">
1062
+ document.location.href = "edit.php?action=wck_unbatch_process&step=<?php echo $step; ?>&total=<?php echo $total; ?>&_wpnonce=<?php echo wp_create_nonce( 'wck-unbatch-nonce' ); ?>";
1063
+ </script>
1064
+ <?php else: ?>
1065
+ <p><?php _e( 'The process has finished.', 'wck' ); ?></p>
1066
+ <?php update_option( 'wck_update_to_unserialized', 'no' ) ?>
1067
+ <?php endif; ?>
1068
+ </div>
1069
+ <?php
1070
+ }
1071
+
1072
+ /**
1073
+ * hook to process each bach on the admin_init
1074
+ */
1075
+ add_action( 'admin_init', 'wck_cfc_process_unserialized_batch' );
1076
+
1077
+ /**
1078
+ * the function that process each batch
1079
+ */
1080
+ function wck_cfc_process_unserialized_batch() {
1081
+
1082
+ if( empty( $_REQUEST['action'] ) || 'wck_unbatch_process' != $_REQUEST['action'] ) {
1083
+ return;
1084
+ }
1085
+
1086
+ if( ! current_user_can( 'manage_options' ) ) {
1087
+ return;
1088
+ }
1089
+
1090
+ if( ! wp_verify_nonce( $_GET['_wpnonce'], 'wck-unbatch-nonce' ) ) {
1091
+ return;
1092
+ }
1093
+
1094
+ ignore_user_abort( true );
1095
+ @set_time_limit( 0 );
1096
+
1097
+ /* set number of posts that are processed in a batch !IMPORTANT IT IS ALSO SET IN THE wck_unserialized_page_callback() FUNCTION */
1098
+ $per_batch = 30;
1099
+ $step = isset( $_GET['step'] ) ? absint( $_GET['step'] ) : 0;
1100
+ $total = isset( $_GET['total'] ) ? absint( $_GET['total'] ) : false;
1101
+
1102
+ /* an array with the post types that have metaboxes */
1103
+ $post_types_with_metaboxes = array();
1104
+ /* an array that contains all the existing meta names */
1105
+ $meta_names = array();
1106
+
1107
+ /* get all metaboxes */
1108
+ $args = array(
1109
+ 'posts_per_page' => -1,
1110
+ 'numberposts' => -1,
1111
+ 'post_type' => 'wck-meta-box',
1112
+ 'post_status' => 'any'
1113
+ );
1114
+ $meta_boxes = get_posts( $args );
1115
+ if( !empty( $meta_boxes ) ){
1116
+ foreach( $meta_boxes as $meta_box ){
1117
+ $cfc_args = get_post_meta( $meta_box->ID, 'wck_cfc_args', true );
1118
+ $meta_names[] = $cfc_args[0]['meta-name'];
1119
+ if( !in_array( $cfc_args[0]['post-type'], $post_types_with_metaboxes ) ){
1120
+ $post_types_with_metaboxes[] = $cfc_args[0]['post-type'];
1121
+ }
1122
+ }
1123
+ }
1124
+
1125
+ /* if we don't have a total let's count the posts */
1126
+ if( empty( $total ) || $total <= 1 ){
1127
+ $total = 0;
1128
+ if( !empty( $post_types_with_metaboxes ) ){
1129
+ foreach( $post_types_with_metaboxes as $post_type ){
1130
+ $posts_count = wp_count_posts( $post_type );
1131
+ $posts_count = array_sum( get_object_vars( $posts_count ) );
1132
+ $total += $posts_count;
1133
+ }
1134
+ }
1135
+ }
1136
+
1137
+
1138
+ global $wpdb;
1139
+ /* turn the arrays into strings to use in mysql */
1140
+ $post_types_with_metaboxes = join( "','", $post_types_with_metaboxes );
1141
+ $meta_names = join( "','", $meta_names );
1142
+ $offset = $step*$per_batch;
1143
+ /* mysql query to get all post ids that potentially have meta boxes on them */
1144
+ $posts = $wpdb->get_results( "SELECT ID FROM $wpdb->posts WHERE post_type IN ('$post_types_with_metaboxes') LIMIT $per_batch OFFSET $offset" );
1145
+
1146
+ /* go through all the post ids */
1147
+ if( $posts ) {
1148
+ foreach( $posts as $post ) {
1149
+ /* get all the meta names associated to the post id */
1150
+ $meta_boxes = $wpdb->get_results( "SELECT meta_value,meta_key FROM $wpdb->postmeta WHERE post_id = '$post->ID' AND meta_key IN ('$meta_names')", ARRAY_A );
1151
+ /* transform them in unserialized */
1152
+ if( !empty( $meta_boxes ) ){
1153
+ foreach( $meta_boxes as $meta_box ){
1154
+ if( !empty( $meta_box ) ){
1155
+ $meta_value = $meta_box['meta_value'];
1156
+ $meta_value = maybe_unserialize( $meta_value );
1157
+ foreach( $meta_value as $key => $values ){
1158
+ if( !empty( $values ) ){
1159
+ foreach( $values as $meta_key => $value ){
1160
+ if( $key == 0 )
1161
+ $suffix = '';
1162
+ else
1163
+ $suffix = '_'.$key;
1164
+ /* check to see if we already have a meta name like this from the old structure to avoid conflicts */
1165
+ $meta_key = Wordpress_Creation_Kit::wck_generate_unique_meta_name_for_unserialized_field( $post->ID, $meta_key, $meta_box['meta_key'] );
1166
+ update_post_meta( $post->ID, $meta_key.$suffix, $value );
1167
+ }
1168
+ }
1169
+ }
1170
+ }
1171
+ }
1172
+ }
1173
+ }
1174
+
1175
+ // comments found so delete them
1176
+ $step++;
1177
+ $redirect = add_query_arg( array(
1178
+ 'page' => 'wck-unserialized',
1179
+ 'step' => $step,
1180
+ 'total' => $total
1181
+ ), admin_url( 'admin.php' ) );
1182
+ wp_redirect( $redirect ); exit;
1183
+
1184
+ } else {
1185
+ // No more comments found, finish up
1186
+ wp_redirect( admin_url( 'admin.php?page=wck-unserialized&wckbatch-complete=true' ) ); exit;
1187
+ }
1188
+ }
1189
+
1190
+ /* save all the metaboxes id's in an option when we first load the plugin and we don not have the option yet */
1191
+ add_action( 'init', 'wck_init_save_meta_boxes' );
1192
+ function wck_init_save_meta_boxes(){
1193
+ $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', null );
1194
+ if( is_null( $wck_meta_boxes_ids ) ){
1195
+ $args = array(
1196
+ 'posts_per_page' => -1,
1197
+ 'numberposts' => -1,
1198
+ 'post_type' => 'wck-meta-box',
1199
+ 'post_status' => 'any'
1200
+ );
1201
+ $meta_boxes = get_posts( $args );
1202
+ $wck_meta_boxes_ids = array();
1203
+ if( !empty( $meta_boxes ) ){
1204
+ foreach( $meta_boxes as $meta_box ){
1205
+ $wck_meta_boxes_ids[] = $meta_box->ID;
1206
+ }
1207
+ }
1208
+ update_option( 'wck_meta_boxes_ids', $wck_meta_boxes_ids );
1209
+ }
1210
+ }
1211
+
1212
+ /* when adding a new metabox or deleting one make the changes in the option */
1213
+ add_action( 'wp_insert_post', 'wck_cpt_save_meta_boxes_ids', 10, 1 );
1214
+ add_action( 'before_delete_post', 'wck_cpt_save_meta_boxes_ids' );
1215
+ function wck_cpt_save_meta_boxes_ids( $post_id ){
1216
+ // We check if the global post type isn't ours and just return
1217
+ global $post_type;
1218
+ if ( $post_type != 'wck-meta-box' ) return;
1219
+
1220
+ $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
1221
+ if( current_filter() == 'wp_insert_post' ){
1222
+ if( !in_array( $post_id, $wck_meta_boxes_ids ) )
1223
+ $wck_meta_boxes_ids[] = $post_id;
1224
+ }
1225
+
1226
+ if( current_filter() == 'before_delete_post' ){
1227
+ if( !empty( $wck_meta_boxes_ids ) ){
1228
+ foreach( $wck_meta_boxes_ids as $key => $value ){
1229
+ if( $value === $post_id )
1230
+ unset( $wck_meta_boxes_ids[$key] );
1231
+ }
1232
+ }
1233
+ }
1234
+
1235
+ update_option( 'wck_meta_boxes_ids', $wck_meta_boxes_ids );
1236
+ }
1237
+
1238
+ /**
1239
+ * This filter makes sure that we do not read directly from the serialized field and we reconstruct it from the unserialized fields
1240
+ * If there are no unserialized then we return the serialized information
1241
+ */
1242
+ add_filter( "get_post_metadata", 'wck_serialized_update_from_unserialized', 10, 4 );
1243
+ function wck_serialized_update_from_unserialized( $replace, $object_id, $meta_key, $single){
1244
+
1245
+ /* if we don't have a meta_key don't do anything */
1246
+ if( empty( $meta_key ) || $meta_key == 'wck_cfc_args' || $meta_key == 'wck_cfc_fields' )
1247
+ return $replace;
1248
+
1249
+ $wck_meta_boxes_ids = get_option( 'wck_meta_boxes_ids', array() );
1250
+
1251
+ if( !empty( $wck_meta_boxes_ids ) ){
1252
+ foreach( $wck_meta_boxes_ids as $wck_meta_boxes_id ){
1253
+ $cfc_args = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_args', true );
1254
+
1255
+ if( !empty( $cfc_args[0] ) && !empty( $cfc_args[0]['meta-name'] ) && $cfc_args[0]['meta-name'] == $meta_key ){
1256
+
1257
+ /* get all post meta for the post id like it is done in get_post_meta() function */
1258
+ $meta_cache = wp_cache_get($object_id, 'post_meta');
1259
+ if ( !$meta_cache ) {
1260
+ $meta_cache = update_meta_cache( 'post', array( $object_id ) );
1261
+ $meta_cache = $meta_cache[$object_id];
1262
+ }
1263
+
1264
+ $replace_with = array();
1265
+
1266
+ $cfc_fields = get_post_meta( $wck_meta_boxes_id, 'wck_cfc_fields', true );
1267
+ if( !empty( $cfc_fields ) ){
1268
+ foreach ( $cfc_fields as $cfc_field ){
1269
+
1270
+ if( !empty( $cfc_field['field-slug'] ) )
1271
+ $slug = $cfc_field['field-slug'];
1272
+ else
1273
+ $slug = Wordpress_Creation_Kit::wck_generate_slug( $cfc_field['field-title'] );
1274
+
1275
+ /* check to see if we already have a meta name like this from the old structure to avoid conflicts */
1276
+ $unserialized_key = Wordpress_Creation_Kit::wck_generate_unique_meta_name_for_unserialized_field( $object_id, $slug, $cfc_args[0]['meta-name'] );
1277
+
1278
+ /* I will limit this to maximum 100 repeater field entries */
1279
+ for( $i=0; $i<1000;$i++ ){
1280
+ /* search for the unseralized form in the db */
1281
+ if( $i == 0 )
1282
+ $suffix = '';
1283
+ else
1284
+ $suffix = '_'.$i;
1285
+
1286
+ if ( isset($meta_cache[$unserialized_key.$suffix]) ) {
1287
+ $unserialized_value = maybe_unserialize( $meta_cache[$unserialized_key.$suffix][0] );
1288
+ $replace_with[$i][$slug] = $unserialized_value;
1289
+ }
1290
+ }
1291
+ }
1292
+ }
1293
+
1294
+ if( !empty( $replace_with ) ){
1295
+ $replace_with = array( array( $replace_with ) );
1296
+
1297
+ if ( $single ) {
1298
+ return $replace_with[0];
1299
+ }
1300
+ else
1301
+ return $replace_with;
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+
1307
+ return $replace;
1308
+ }
1309
+
1310
+ /* make wck meta names protected so they are not saved by custom fields */
1311
+ add_filter( 'is_protected_meta', 'wck_cfc_protect_meta_keys', 10, 3 );
1312
+ function wck_cfc_protect_meta_keys( $protected, $meta_key, $meta_type ){
1313
+ global $wck_objects, $post;
1314
+
1315
+ //they should be available on frontend and customizer
1316
+ if( is_customize_preview() || !is_admin() ){
1317
+ return $protected;
1318
+ }
1319
+
1320
+ if( !empty( $wck_objects ) ){
1321
+ foreach( $wck_objects as $wck_object ){
1322
+ if( !empty( $wck_object['meta_array'] ) ){
1323
+ foreach ( $wck_object['meta_array'] as $field ){
1324
+ $field_meta_key = Wordpress_Creation_Kit::wck_generate_slug( $field['title'], $field );
1325
+ /* take care of suffixes with pregmatch and we could also have the group name as a prefix to be unique */
1326
+ if ( $meta_key == $field_meta_key || preg_match( '/'.$field_meta_key.'_\d+\z/', $meta_key ) || $meta_key == $wck_object['meta_name'].'_'.$field_meta_key || preg_match( '/'.$wck_object['meta_name'].'_'.$field_meta_key.'_\d+\z/', $meta_key ) )
1327
+ return true;
1328
+ }
1329
+ }
1330
+ }
1331
+ }
1332
+ return $protected;
1333
+ }
1334
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wck-cptc.php CHANGED
@@ -1,504 +1,504 @@
1
- <?php
2
- /* Creates Custom Post Types for WordPress */
3
-
4
-
5
- $args = array(
6
- 'page_title' => __( 'WCK Post Type Creator', 'wck' ),
7
- 'menu_title' => __( 'Post Type Creator', 'wck' ),
8
- 'capability' => 'edit_theme_options',
9
- 'menu_slug' => 'cptc-page',
10
- 'page_type' => 'submenu_page',
11
- 'parent_slug' => 'wck-page',
12
- 'priority' => 8,
13
- 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
- );
15
- $cptc_page = new WCK_Page_Creator( $args );
16
-
17
-
18
- /* Add Scripts */
19
- add_action('admin_enqueue_scripts', 'wck_cptc_print_scripts' );
20
- function wck_cptc_print_scripts($hook){
21
- if( 'wck_page_cptc-page' == $hook ){
22
- wp_register_style('wck-cptc-css', plugins_url('/css/wck-cptc.css', __FILE__));
23
- wp_enqueue_style('wck-cptc-css');
24
- }
25
- }
26
-
27
- /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
28
- add_action( 'init', 'wck_cptc_create_box', 11 );
29
- function wck_cptc_create_box(){
30
- global $wp_version;
31
- if( is_admin() && current_user_can( 'edit_theme_options' ) ){
32
- /* get registered taxonomies */
33
- $args = array(
34
- 'public' => true
35
- );
36
- $output = 'objects';
37
- $taxonomies = get_taxonomies($args,$output);
38
- $taxonomie_names = array();
39
-
40
- if( !empty( $taxonomies ) ){
41
- foreach ($taxonomies as $taxonomie ) {
42
- if ( $taxonomie->name != 'nav_menu' && $taxonomie->name != 'post_format')
43
- $taxonomie_names[] = $taxonomie->name;
44
- }
45
- }
46
-
47
- /* set up the fields array */
48
- $cpt_creation_fields = array(
49
- array( 'type' => 'text', 'title' => __( 'Post type', 'wck' ), 'slug' => 'post-type', 'description' => __( '(max. 20 characters, can not contain capital letters, hyphens, or spaces)', 'wck' ), 'required' => true ),
50
- array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'slug' => 'description', 'description' => __( 'A short descriptive summary of what the post type is.', 'wck' ) ),
51
- array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'slug' => 'singular-label', 'required' => true, 'description' => __( 'ex. Book', 'wck' ) ),
52
- array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'slug' => 'plural-label', 'required' => true, 'description' => __( 'ex. Books', 'wck' ) ),
53
- array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'slug' => 'hierarchical', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the post type is hierarchical. Allows Parent to be specified.', 'wck' ) ),
54
- array( 'type' => 'select', 'title' => __( 'Has Archive', 'wck' ), 'slug' => 'has-archive', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.', 'wck' ) ),
55
- array( 'type' => 'checkbox', 'title' => __( 'Supports', 'wck' ), 'slug' => 'supports', 'options' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats' ), 'default' =>'title, editor' ),
56
-
57
-
58
- array( 'type' => 'text', 'title' => __( 'Add New', 'wck' ), 'slug' => 'add-new', 'description' => __( 'ex. Add New', 'wck' ) ),
59
- array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'slug' => 'add-new-item', 'description' => __( 'ex. Add New Book', 'wck' ) ),
60
- array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'slug' => 'edit-item', 'description' => __( 'ex. Edit Book', 'wck' ) ),
61
- array( 'type' => 'text', 'title' => __( 'New Item', 'wck' ), 'slug' => 'new-item', 'description' => __( 'ex. New Book', 'wck' ) ),
62
- array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'slug' => 'all-items', 'description' => __( 'ex. All Books', 'wck' ) ),
63
- array( 'type' => 'text', 'title' => __( 'View Items', 'wck' ), 'slug' => 'view-items', 'description' => __( 'ex. View Books', 'wck' ) ),
64
- array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'slug' => 'search-items', 'description' => __( 'ex. Search Books', 'wck' ) ),
65
- array( 'type' => 'text', 'title' => __( 'Not Found', 'wck' ), 'slug' => 'not-found', 'description' => __( 'ex. No Books Found', 'wck' ) ),
66
- array( 'type' => 'text', 'title' => __( 'Not Found In Trash', 'wck' ), 'slug' => 'not-found-in-trash', 'description' => __( 'ex. No Books found in Trash', 'wck' ) ),
67
- array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'slug' => 'parent-item-colon', 'description' => __( 'the parent text. This string isn\'t used on non-hierarchical types. In hierarchical ones the default is Parent Page ', 'wck' ) ),
68
- array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ), 'slug' => 'menu-name' ),
69
- );
70
-
71
- if( version_compare( $wp_version, '4.3', '>=' ) ) {
72
- $labels_v43 = array(
73
- array( 'type' => 'text', 'title' => __( 'Featured Image', 'wck' ), 'slug' => 'featured_image', 'description' => __( 'ex. Featured Image', 'wck' ) ),
74
- array( 'type' => 'text', 'title' => __( 'Set Featured Image', 'wck' ), 'slug' => 'set_featured_image', 'description' => __( 'ex. Set Featured Image', 'wck' ) ),
75
- array( 'type' => 'text', 'title' => __( 'Remove Featured Image', 'wck' ), 'slug' => 'remove_featured_image', 'description' => __( 'ex. Remove Featured Image', 'wck' ) ),
76
- array( 'type' => 'text', 'title' => __( 'Use Featured Image', 'wck' ), 'slug' => 'use_featured_image', 'description' => __( 'ex. Use Featured Image', 'wck' ) )
77
- );
78
-
79
- foreach( $labels_v43 as $label_v43 ) {
80
- array_push( $cpt_creation_fields, $label_v43 );
81
- }
82
- }
83
-
84
- if( version_compare( $wp_version, '4.4', '>=' ) ) {
85
- $labels_v44 = array(
86
- array( 'type' => 'text', 'title' => __( 'Archives', 'wck' ), 'slug' => 'archives', 'description' => __( 'ex. Archives', 'wck' ) ),
87
- array( 'type' => 'text', 'title' => __( 'Inser Into Item', 'wck' ), 'slug' => 'insert_into_item', 'description' => __( 'ex. Inser Into Item', 'wck' ) ),
88
- array( 'type' => 'text', 'title' => __( 'Uploaded to this Item', 'wck' ), 'slug' => 'uploaded_to_this_item', 'description' => __( 'ex. Uploaded to this Item', 'wck' ) ),
89
- array( 'type' => 'text', 'title' => __( 'Filter Items List', 'wck' ), 'slug' => 'filter_items_list', 'description' => __( 'ex. Filter Items List', 'wck' ) ),
90
- array( 'type' => 'text', 'title' => __( 'Items List Navigation', 'wck' ), 'slug' => 'items_list_navigation', 'description' => __( 'ex. Items List Navigation', 'wck' ) ),
91
- array( 'type' => 'text', 'title' => __( 'Items List', 'wck' ), 'slug' => 'items_list', 'description' => __( 'ex. Items List', 'wck' ) ),
92
- );
93
-
94
- foreach( $labels_v44 as $label_v44 ) {
95
- array_push( $cpt_creation_fields, $label_v44 );
96
- }
97
- }
98
-
99
- $cpt_creation_fields2 = array(
100
- array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'slug' => 'public', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
101
- array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'slug' => 'show-ui', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
102
- array( 'type' => 'select', 'title' => __( 'Show In Nav Menus', 'wck' ), 'slug' => 'show-in-nav-menus', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether post_type is available for selection in navigation menus.', 'wck' ) ),
103
- array( 'type' => 'text', 'title' => __( 'Show In Menu', 'wck' ), 'slug' => 'show-in-menu', 'default' => 'true', 'description' => __( 'Whether to show the post type in the admin menu. show_ui must be true. "false" - do not display in the admin menu, "true" - display as a top level menu, "some string" - If an existing top level page such as "tools.php" or "edit.php?post_type=page", the post type will be placed as a sub menu of that.', 'wck' ) ),
104
- array( 'type' => 'text', 'title' => __( 'Menu Position', 'wck' ), 'slug' => 'menu-position', 'description' => __( 'The position in the menu order the post type should appear.', 'wck' ) ),
105
- array( 'type' => 'text', 'title' => __( 'Menu Icon', 'wck' ), 'slug' => 'menu-icon', 'description' => __( 'The url to the icon to be used for this menu.', 'wck' ) ),
106
- array( 'type' => 'text', 'title' => __( 'Capability Type', 'wck' ), 'slug' => 'capability-type', 'description' => __( 'The string to use to build the read, edit, and delete capabilities.', 'wck' ), 'default' => 'post' ),
107
- array( 'type' => 'checkbox', 'title' => __( 'Taxonomies', 'wck' ), 'slug' => 'taxonomies', 'options' => $taxonomie_names ),
108
- array( 'type' => 'select', 'title' => __( 'Rewrite', 'wck' ), 'slug' => 'rewrite', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Rewrite permalinks.', 'wck' ) ),
109
- array( 'type' => 'select', 'title' => __( 'With Front', 'wck' ), 'slug' => 'with_front', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Use the defined base for permalinks.', 'wck' ) ),
110
- array( 'type' => 'text', 'title' => __( 'Rewrite Slug', 'wck' ), 'slug' => 'rewrite-slug', 'description' => __( 'Defaults to post type name.', 'wck' ) ),
111
- array( 'type' => 'select', 'title' => __( 'Show in REST API', 'wck'), 'slug' => 'show-in-rest', 'options' => array( 'false', 'true'), 'default' => 'false', 'description' => __('Make this post type available via WP REST API ', 'wck' ) )
112
- );
113
-
114
- foreach( $cpt_creation_fields2 as $cpt_creation_field ) {
115
- array_push( $cpt_creation_fields, $cpt_creation_field );
116
- }
117
-
118
- /* set up the box arguments */
119
- $args = array(
120
- 'metabox_id' => 'option_page',
121
- 'metabox_title' => __( 'Custom Post Type Creation', 'wck' ),
122
- 'post_type' => 'cptc-page',
123
- 'meta_name' => 'wck_cptc',
124
- 'meta_array' => $cpt_creation_fields,
125
- 'context' => 'option',
126
- 'sortable' => false
127
- );
128
-
129
- /* create the box */
130
- new Wordpress_Creation_Kit( $args );
131
- }
132
- }
133
-
134
- /* hook to create custom post types */
135
- add_action( 'init', 'wck_cptc_create_cpts', 8 );
136
-
137
- function wck_cptc_create_cpts(){
138
- global $wp_version;
139
-
140
- $cpts = get_option('wck_cptc');
141
-
142
- if( !empty( $cpts ) ){
143
- foreach( $cpts as $cpt ){
144
-
145
- $labels = array(
146
- 'name' => _x( $cpt['plural-label'], 'post type general name'),
147
- 'singular_name' => _x( $cpt['singular-label'], 'post type singular name'),
148
- 'add_new' => _x( $cpt['add-new'] ? $cpt['add-new'] : 'Add New', strtolower( $cpt['singular-label'] ) ),
149
- 'add_new_item' => __( $cpt['add-new-item'] ? $cpt['add-new-item'] : "Add New ".$cpt['singular-label']),
150
- 'edit_item' => __( $cpt['edit-item'] ? $cpt['edit-item'] : "Edit ".$cpt['singular-label'], 'wck' ) ,
151
- 'new_item' => __( $cpt['new-item'] ? $cpt['new-item'] : "New ".$cpt['singular-label'], 'wck' ),
152
- 'all_items' => __( $cpt['all-items'] ? $cpt['all-items'] : "All ".$cpt['plural-label'] , 'wck'),
153
- 'view_item' => __( !empty( $cpt['view-item'] ) ? $cpt['view-item'] : "View ".$cpt['singular-label'] , 'wck'),
154
- 'search_items' => __( $cpt['search-items'] ? $cpt['search-items'] : "Search ".$cpt['plural-label'], 'wck' ),
155
- 'not_found' => __( $cpt['not-found'] ? $cpt['not-found'] : "No ". strtolower( $cpt['plural-label'] ) ." found", 'wck' ),
156
- 'not_found_in_trash' => __( $cpt['not-found-in-trash'] ? $cpt['not-found-in-trash'] : "No ". strtolower( $cpt['plural-label'] ) ." found in Trash", 'wck' ),
157
- 'parent_item_colon' => __( !empty( $cpt['parent-item-colon'] ) ? $cpt['parent-item-colon'] : "Parent Page", 'wck' ),
158
- 'menu_name' => $cpt['menu-name'] ? $cpt['menu-name'] : $cpt['plural-label']
159
- );
160
-
161
- if( version_compare( $wp_version, '4.3', '>=' ) ) {
162
- $labels_v43 = array(
163
- 'featured_image' => __( !empty( $cpt['featured_image'] ) ? $cpt['featured_image'] : "Featured Image" ),
164
- 'set_featured_image' => __( !empty( $cpt['set_featured_image'] ) ? $cpt['set_featured_image'] : "Set featured image" ),
165
- 'remove_featured_image' => __( !empty( $cpt['remove_featured_image'] ) ? $cpt['remove_featured_image'] : "Remove featured image" ),
166
- 'use_featured_image' => __( !empty( $cpt['use_featured_image'] ) ? $cpt['use_featured_image'] : "Use as featured image" )
167
- );
168
-
169
- foreach( $labels_v43 as $label_v43 ) {
170
- array_push( $labels, $label_v43 );
171
- }
172
- }
173
-
174
- if( version_compare( $wp_version, '4.4', '>=' ) ) {
175
- $labels_v44 = array(
176
- 'archives' => __( !empty( $cpt['archives'] ) ? $cpt['archives'] : $cpt['singular-label'] . " Archives" ),
177
- 'insert_into_item' => __( !empty( $cpt['insert_into_item'] ) ? $cpt['insert_into_item'] : "Insert Into " . $cpt['singular-label'] ),
178
- 'uploaded_to_this_item' => __( !empty( $cpt['uploaded_to_this_item'] ) ? $cpt['uploaded_to_this_item'] : "Uploaded to this " . $cpt['singular-label'] ),
179
- 'filter_items_list' => __( !empty( $cpt['filter_items_list'] ) ? $cpt['filter_items_list'] : "Filter Items List" ),
180
- 'items_list_navigation' => __( !empty( $cpt['items_list_navigation'] ) ? $cpt['items_list_navigation'] : "Items List Navigation" ),
181
- 'items_list' => __( !empty( $cpt['items_list'] ) ? $cpt['items_list'] : "Items List" )
182
- );
183
-
184
- foreach( $labels_v44 as $label_v44 ) {
185
- array_push( $labels, $label_v44 );
186
- }
187
- }
188
-
189
- $args = array(
190
- 'labels' => $labels,
191
- 'public' => $cpt['public'] == 'false' ? false : true,
192
- 'description' => $cpt['description'],
193
- 'show_ui' => $cpt['show-ui'] == 'false' ? false : true,
194
- 'show_in_nav_menus' => !empty( $cpt['show-in-nav-menus'] ) && $cpt['show-in-nav-menus'] == 'false' ? false : true,
195
- 'has_archive' => $cpt['has-archive'] == 'false' ? false : true,
196
- 'hierarchical' => $cpt['hierarchical'] == 'false' ? false : true,
197
- 'supports' => explode( ', ', $cpt['supports'] ) ,
198
- 'show_in_rest' => !empty($cpt['show-in-rest']) ? $cpt['show-in-rest'] : false,
199
- );
200
-
201
- if( !empty( $cpt['show-in-menu'] ) ){
202
- $args['show_in_menu'] = $cpt['show-in-menu'] == 'true' ? true : $cpt['show-in-menu'];
203
- }
204
-
205
- if( !empty( $cpt['menu-position'] ) )
206
- $args['menu_position'] = intval( $cpt['menu-position'] );
207
-
208
- if( has_filter( "wck_cptc_capabilities_{$cpt['post-type']}" ) )
209
- $args['capabilities'] = apply_filters( "wck_cptc_capabilities_{$cpt['post-type']}", $cpt['capability-type'] );
210
- else
211
- $args['capability_type'] = $cpt['capability-type'];
212
-
213
- if( !empty( $cpt['taxonomies'] ) )
214
- $args['taxonomies'] = explode( ', ', $cpt['taxonomies'] );
215
-
216
- if( !empty( $cpt['menu-icon'] ) )
217
- $args['menu_icon'] = $cpt['menu-icon'];
218
-
219
- if( $cpt['rewrite'] == 'false' )
220
- $args['rewrite'] = $cpt['rewrite'] == 'false' ? false : true;
221
- else{
222
- $rewrite_array = array();
223
-
224
- if( !empty( $cpt['rewrite-slug'] ) )
225
- $rewrite_array['slug'] = $cpt['rewrite-slug'];
226
-
227
- if( !empty( $cpt['with_front'] ) && $cpt['with_front'] == 'false' )
228
- $rewrite_array['with_front'] = false;
229
-
230
- if ( count( $rewrite_array ) > 0 ) {
231
- $args['rewrite'] = $rewrite_array;
232
- }
233
- }
234
-
235
- register_post_type( $cpt['post-type'], apply_filters( 'wck_cptc_register_post_type_args', $args, $cpt['post-type'] ) );
236
- }
237
- }
238
- }
239
-
240
- /* Flush rewrite rules */
241
- add_action('init', 'cptc_flush_rules', 20);
242
- function cptc_flush_rules(){
243
- if( isset( $_GET['page'] ) && $_GET['page'] == 'cptc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
244
- flush_rewrite_rules( false );
245
- }
246
-
247
- /* advanced labels container for add form */
248
- add_action( "wck_before_add_form_wck_cptc_element_7", 'wck_cptc_form_label_wrapper_start' );
249
- function wck_cptc_form_label_wrapper_start(){
250
- echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __('Show Advanced Label Options', 'wck' ) .'</a></li>';
251
- echo '<li id="cptc-advanced-label-options-container" style="display:none;"><ul>';
252
- }
253
-
254
- add_action( "wck_after_add_form_wck_cptc_element_27", 'wck_cptc_form_label_wrapper_end' );
255
- function wck_cptc_form_label_wrapper_end(){
256
- echo '</ul></li>';
257
- }
258
-
259
- /* advanced options container for add form */
260
- add_action( "wck_before_add_form_wck_cptc_element_28", 'wck_cptc_form_wrapper_start' );
261
- function wck_cptc_form_wrapper_start(){
262
- echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __('Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\'Hide Advanced Options\'); else if( jQuery(this).text() == \''. __('Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __('Show Advanced Options', 'wck' ) .'\');">'. __('Show Advanced Options', 'wck' ) .'</a></li>';
263
- echo '<li id="cptc-advanced-options-container" style="display:none;"><ul>';
264
- }
265
-
266
- add_action( "wck_after_add_form_wck_cptc_element_38", 'wck_cptc_form_wrapper_end' );
267
- function wck_cptc_form_wrapper_end(){
268
- echo '</ul></li>';
269
- }
270
-
271
- /* advanced label options container for update form */
272
- add_filter( "wck_before_update_form_wck_cptc_element_7", 'wck_cptc_update_form_label_wrapper_start', 10, 2 );
273
- function wck_cptc_update_form_label_wrapper_start( $form, $i ){
274
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
275
- $form .= '<li id="cptc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
276
- return $form;
277
- }
278
-
279
- add_filter( "wck_after_update_form_wck_cptc_element_27", 'wck_cptc_update_form_label_wrapper_end', 10, 2 );
280
- function wck_cptc_update_form_label_wrapper_end( $form, $i ){
281
- $form .= '</ul></li>';
282
- return $form;
283
- }
284
-
285
- /* advanced options container for update form */
286
- add_filter( "wck_before_update_form_wck_cptc_element_28", 'wck_cptc_update_form_wrapper_start', 10, 2 );
287
- function wck_cptc_update_form_wrapper_start( $form, $i ){
288
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
289
- $form .= '<li id="cptc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
290
- return $form;
291
- }
292
-
293
- add_filter( "wck_after_update_form_wck_cptc_element_38", 'wck_cptc_update_form_wrapper_end', 10, 2 );
294
- function wck_cptc_update_form_wrapper_end( $form, $i ){
295
- $form .= '</ul></li>';
296
- return $form;
297
- }
298
-
299
-
300
- /* advanced label options container for display */
301
- add_filter( "wck_before_listed_wck_cptc_element_7", 'wck_cptc_display_label_wrapper_start', 10, 2 );
302
- function wck_cptc_display_label_wrapper_start( $form, $i ){
303
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
304
- $form .= '<li id="cptc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
305
- return $form;
306
- }
307
-
308
- add_filter( "wck_after_listed_wck_cptc_element_27", 'wck_cptc_display_label_wrapper_end', 10, 2 );
309
- function wck_cptc_display_label_wrapper_end( $form, $i ){
310
- $form .= '</ul></li>';
311
- return $form;
312
- }
313
-
314
- /* advanced options container for display */
315
- add_filter( "wck_before_listed_wck_cptc_element_28", 'wck_cptc_display_adv_wrapper_start', 10, 2 );
316
- function wck_cptc_display_adv_wrapper_start( $form, $i ){
317
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
318
- $form .= '<li id="cptc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
319
- return $form;
320
- }
321
-
322
- add_filter( "wck_after_listed_wck_cptc_element_38", 'wck_cptc_display_adv_wrapper_end', 10, 2 );
323
- function wck_cptc_display_adv_wrapper_end( $form, $i ){
324
- $form .= '</ul></li>';
325
- return $form;
326
- }
327
-
328
- /* add refresh to page */
329
- add_action("wck_refresh_list_wck_cptc", "wck_cptc_after_refresh_list");
330
- add_action("wck_refresh_entry_wck_cptc", "wck_cptc_after_refresh_list");
331
- function wck_cptc_after_refresh_list(){
332
- echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cptc-page&updated=true' .'";</script>';
333
- }
334
-
335
- /* Add side metaboxes */
336
- if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
337
- add_action('add_meta_boxes', 'wck_cptc_add_side_boxes');
338
- function wck_cptc_add_side_boxes()
339
- {
340
- add_meta_box('wck-cptc-side', __('Wordpress Creation Kit', 'wck'), 'wck_cptc_side_box_one', 'wck_page_cptc-page', 'side', 'high');
341
- }
342
-
343
- function wck_cptc_side_box_one()
344
- {
345
- ?>
346
- <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
347
- src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
348
- alt="WCK-PRO"/></a>
349
- <?php
350
- }
351
- }
352
-
353
- /* add TranslatePress crosspromotion */
354
- add_action('add_meta_boxes', 'wck_cptc_add_trp_side_box');
355
- function wck_cptc_add_trp_side_box()
356
- {
357
- add_meta_box('wck-cptc-side-trp', __('TranslatePress', 'wck'), 'wck_cptc_side_box_trp', 'wck_page_cptc-page', 'side', 'low');
358
- }
359
-
360
- function wck_cptc_side_box_trp()
361
- {
362
- ?>
363
- <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
364
- src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
365
- alt="TranslatePress"/></a>
366
- <h4>Easily translate your entire WordPress website</h4>
367
- <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
368
- It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
369
- <?php
370
- }
371
-
372
- /* Contextual Help */
373
- add_action('load-wck_page_cptc-page', 'wck_cptc_help');
374
-
375
- function wck_cptc_help () {
376
- $screen = get_current_screen();
377
-
378
- /*
379
- * Check if current screen is wck_page_cptc-page
380
- * Don't add help tab if it's not
381
- */
382
- if ( $screen->id != 'wck_page_cptc-page' )
383
- return;
384
-
385
- // Add help tabs
386
- $screen->add_help_tab( array(
387
- 'id' => 'wck_cptc_overview',
388
- 'title' => __('Overview', 'wck' ),
389
- 'content' => '<p>' . __( 'WCK Custom Post Type Creator allows you to easily create custom post types for Wordpress without any programming knowledge.<br />Most of the common options for creating a post type are displayed by default while the advanced options and label are just one click away.', 'wck' ) . '</p>',
390
- ) );
391
-
392
- $screen->add_help_tab( array(
393
- 'id' => 'wck_cptc_labels',
394
- 'title' => __( 'Labels', 'wck' ),
395
- 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed.', 'wck' ) . '</p>',
396
- ) );
397
-
398
- $screen->add_help_tab( array(
399
- 'id' => 'wck_cptc_advanced',
400
- 'title' => __('Advanced Options', 'wck' ),
401
- 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for custom post types. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
402
- ) );
403
- }
404
-
405
- add_action( 'init', 'wck_cpt_make_sure_thumbnail_support_works', 11 );
406
- function wck_cpt_make_sure_thumbnail_support_works(){
407
- global $_wp_theme_features;
408
-
409
- if( isset( $_wp_theme_features["post-thumbnails"] ) && is_array( $_wp_theme_features["post-thumbnails"] ) ){
410
- $post_types_with_thumbnails = $_wp_theme_features["post-thumbnails"][0];
411
-
412
- $cpts = get_option('wck_cptc');
413
- if( !empty( $cpts ) ) {
414
- foreach ($cpts as $cpt) {
415
- $cpt_supports = explode( ', ', $cpt['supports'] );
416
- if( in_array( 'thumbnail', $cpt_supports ) ){
417
- $post_types_with_thumbnails[] = $cpt['post-type'];
418
- }
419
- }
420
- }
421
-
422
- $_wp_theme_features["post-thumbnails"][0] = $post_types_with_thumbnails;
423
- }
424
- }
425
-
426
- /* when renaming a post type make sure the posts get ported as well */
427
- add_action( 'wck_before_update_meta', 'wck_cptc_update_post_type', 10, 4 );
428
- function wck_cptc_update_post_type( $meta, $id, $values, $element_id ){
429
- if( $meta == 'wck_cptc' ){
430
- $old_values = get_option( $meta );
431
- if( !empty( $old_values[$element_id] ) ){
432
- if( $old_values[$element_id]['post-type'] != $values['post-type'] ){
433
- global $wpdb;
434
- $wpdb->update(
435
- $wpdb->posts,
436
- array(
437
- 'post_type' => $values['post-type'], // string
438
- ),
439
- array( 'post_type' => $old_values[$element_id]['post-type'] ),
440
- array(
441
- '%s',
442
- )
443
- );
444
- }
445
- }
446
- }
447
- }
448
-
449
- /* Post Type Name Verification */
450
- add_filter( 'wck_required_test_wck_cptc_post-type', 'wck_cptc_check_post_type', 10, 8 );
451
- function wck_cptc_check_post_type( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
452
- //Make sure it doesn't contain capital letters or spaces
453
- $no_spaces_value = str_replace(' ', '', $value);
454
- $no_hyphens_value = str_replace('-', '', $value);
455
- $lowercase_value = strtolower($value);
456
-
457
- /* make sure it's not reserved and avoid doing this on the update case for backwards compatibility */
458
- $old_values = get_option( 'wck_cptc' );
459
- $reserved_vars = array();
460
- if( empty( $old_values[$elemet_id]['post-type'] ) || $value != $old_values[$elemet_id]['post-type'] )
461
- $reserved_vars = wck_cpt_get_reserved_names();
462
-
463
- if ( ( $no_spaces_value == $value ) && ( $lowercase_value == $value ) && ( $no_hyphens_value == $value ) && !in_array( $value, $reserved_vars ) )
464
- $checked = false;
465
- else
466
- $checked = true;
467
-
468
- return ( empty($value) || $checked );
469
- }
470
-
471
- add_filter( 'wck_required_message_wck_cptc_post-type', 'wck_cptc_change_post_type_message', 10, 3 );
472
- function wck_cptc_change_post_type_message( $message, $value, $required_field ){
473
- // change error message
474
- $no_spaces_value = str_replace(' ', '', $value);
475
- $no_hyphens_value = str_replace('-', '', $value);
476
- $lowercase_value = strtolower($value);
477
- $reserved_vars = wck_cpt_get_reserved_names();
478
-
479
- if( empty( $value ) )
480
- return $message;
481
- else if( $no_spaces_value != $value )
482
- return __("Post Type name must not contain any spaces\n", "wck" );
483
- else if ($lowercase_value != $value)
484
- return __( "Post Type name must not contain any capital letters\n", "wck" );
485
- else if ($no_hyphens_value != $value)
486
- return __( "Post Type name must not contain any hyphens\n", "wck" );
487
- else if( in_array( $value, $reserved_vars ) )
488
- return __( "Please chose a different Post Type name as this one is reserved\n", "wck" );
489
- }
490
-
491
- function wck_cpt_get_reserved_names(){
492
- $reserved_vars = Wordpress_Creation_Kit::wck_get_reserved_variable_names();
493
- /* add to reserved names existing taxonomy slugs created with wck */
494
- $wck_taxonomies = get_option( 'wck_ctc' );
495
- if( !empty( $wck_taxonomies ) ){
496
- foreach ($wck_taxonomies as $wck_taxonomy) {
497
- $reserved_vars[] = $wck_taxonomy['taxonomy'];
498
- }
499
- }
500
-
501
- return $reserved_vars;
502
- }
503
-
504
- ?>
1
+ <?php
2
+ /* Creates Custom Post Types for WordPress */
3
+
4
+
5
+ $args = array(
6
+ 'page_title' => __( 'WCK Post Type Creator', 'wck' ),
7
+ 'menu_title' => __( 'Post Type Creator', 'wck' ),
8
+ 'capability' => 'edit_theme_options',
9
+ 'menu_slug' => 'cptc-page',
10
+ 'page_type' => 'submenu_page',
11
+ 'parent_slug' => 'wck-page',
12
+ 'priority' => 8,
13
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
+ );
15
+ $cptc_page = new WCK_Page_Creator( $args );
16
+
17
+
18
+ /* Add Scripts */
19
+ add_action('admin_enqueue_scripts', 'wck_cptc_print_scripts' );
20
+ function wck_cptc_print_scripts($hook){
21
+ if( 'wck_page_cptc-page' == $hook ){
22
+ wp_register_style('wck-cptc-css', plugins_url('/css/wck-cptc.css', __FILE__));
23
+ wp_enqueue_style('wck-cptc-css');
24
+ }
25
+ }
26
+
27
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
28
+ add_action( 'init', 'wck_cptc_create_box', 11 );
29
+ function wck_cptc_create_box(){
30
+ global $wp_version;
31
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
32
+ /* get registered taxonomies */
33
+ $args = array(
34
+ 'public' => true
35
+ );
36
+ $output = 'objects';
37
+ $taxonomies = get_taxonomies($args,$output);
38
+ $taxonomie_names = array();
39
+
40
+ if( !empty( $taxonomies ) ){
41
+ foreach ($taxonomies as $taxonomie ) {
42
+ if ( $taxonomie->name != 'nav_menu' && $taxonomie->name != 'post_format')
43
+ $taxonomie_names[] = $taxonomie->name;
44
+ }
45
+ }
46
+
47
+ /* set up the fields array */
48
+ $cpt_creation_fields = array(
49
+ array( 'type' => 'text', 'title' => __( 'Post type', 'wck' ), 'slug' => 'post-type', 'description' => __( '(max. 20 characters, can not contain capital letters, hyphens, or spaces)', 'wck' ), 'required' => true ),
50
+ array( 'type' => 'textarea', 'title' => __( 'Description', 'wck' ), 'slug' => 'description', 'description' => __( 'A short descriptive summary of what the post type is.', 'wck' ) ),
51
+ array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'slug' => 'singular-label', 'required' => true, 'description' => __( 'ex. Book', 'wck' ) ),
52
+ array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'slug' => 'plural-label', 'required' => true, 'description' => __( 'ex. Books', 'wck' ) ),
53
+ array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'slug' => 'hierarchical', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether the post type is hierarchical. Allows Parent to be specified.', 'wck' ) ),
54
+ array( 'type' => 'select', 'title' => __( 'Has Archive', 'wck' ), 'slug' => 'has-archive', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Enables post type archives. Will use string as archive slug. Will generate the proper rewrite rules if rewrite is enabled.', 'wck' ) ),
55
+ array( 'type' => 'checkbox', 'title' => __( 'Supports', 'wck' ), 'slug' => 'supports', 'options' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions', 'page-attributes', 'post-formats' ), 'default' =>'title, editor' ),
56
+
57
+
58
+ array( 'type' => 'text', 'title' => __( 'Add New', 'wck' ), 'slug' => 'add-new', 'description' => __( 'ex. Add New', 'wck' ) ),
59
+ array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'slug' => 'add-new-item', 'description' => __( 'ex. Add New Book', 'wck' ) ),
60
+ array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'slug' => 'edit-item', 'description' => __( 'ex. Edit Book', 'wck' ) ),
61
+ array( 'type' => 'text', 'title' => __( 'New Item', 'wck' ), 'slug' => 'new-item', 'description' => __( 'ex. New Book', 'wck' ) ),
62
+ array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'slug' => 'all-items', 'description' => __( 'ex. All Books', 'wck' ) ),
63
+ array( 'type' => 'text', 'title' => __( 'View Items', 'wck' ), 'slug' => 'view-items', 'description' => __( 'ex. View Books', 'wck' ) ),
64
+ array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'slug' => 'search-items', 'description' => __( 'ex. Search Books', 'wck' ) ),
65
+ array( 'type' => 'text', 'title' => __( 'Not Found', 'wck' ), 'slug' => 'not-found', 'description' => __( 'ex. No Books Found', 'wck' ) ),
66
+ array( 'type' => 'text', 'title' => __( 'Not Found In Trash', 'wck' ), 'slug' => 'not-found-in-trash', 'description' => __( 'ex. No Books found in Trash', 'wck' ) ),
67
+ array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'slug' => 'parent-item-colon', 'description' => __( 'the parent text. This string isn\'t used on non-hierarchical types. In hierarchical ones the default is Parent Page ', 'wck' ) ),
68
+ array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ), 'slug' => 'menu-name' ),
69
+ );
70
+
71
+ if( version_compare( $wp_version, '4.3', '>=' ) ) {
72
+ $labels_v43 = array(
73
+ array( 'type' => 'text', 'title' => __( 'Featured Image', 'wck' ), 'slug' => 'featured_image', 'description' => __( 'ex. Featured Image', 'wck' ) ),
74
+ array( 'type' => 'text', 'title' => __( 'Set Featured Image', 'wck' ), 'slug' => 'set_featured_image', 'description' => __( 'ex. Set Featured Image', 'wck' ) ),
75
+ array( 'type' => 'text', 'title' => __( 'Remove Featured Image', 'wck' ), 'slug' => 'remove_featured_image', 'description' => __( 'ex. Remove Featured Image', 'wck' ) ),
76
+ array( 'type' => 'text', 'title' => __( 'Use Featured Image', 'wck' ), 'slug' => 'use_featured_image', 'description' => __( 'ex. Use Featured Image', 'wck' ) )
77
+ );
78
+
79
+ foreach( $labels_v43 as $label_v43 ) {
80
+ array_push( $cpt_creation_fields, $label_v43 );
81
+ }
82
+ }
83
+
84
+ if( version_compare( $wp_version, '4.4', '>=' ) ) {
85
+ $labels_v44 = array(
86
+ array( 'type' => 'text', 'title' => __( 'Archives', 'wck' ), 'slug' => 'archives', 'description' => __( 'ex. Archives', 'wck' ) ),
87
+ array( 'type' => 'text', 'title' => __( 'Inser Into Item', 'wck' ), 'slug' => 'insert_into_item', 'description' => __( 'ex. Inser Into Item', 'wck' ) ),
88
+ array( 'type' => 'text', 'title' => __( 'Uploaded to this Item', 'wck' ), 'slug' => 'uploaded_to_this_item', 'description' => __( 'ex. Uploaded to this Item', 'wck' ) ),
89
+ array( 'type' => 'text', 'title' => __( 'Filter Items List', 'wck' ), 'slug' => 'filter_items_list', 'description' => __( 'ex. Filter Items List', 'wck' ) ),
90
+ array( 'type' => 'text', 'title' => __( 'Items List Navigation', 'wck' ), 'slug' => 'items_list_navigation', 'description' => __( 'ex. Items List Navigation', 'wck' ) ),
91
+ array( 'type' => 'text', 'title' => __( 'Items List', 'wck' ), 'slug' => 'items_list', 'description' => __( 'ex. Items List', 'wck' ) ),
92
+ );
93
+
94
+ foreach( $labels_v44 as $label_v44 ) {
95
+ array_push( $cpt_creation_fields, $label_v44 );
96
+ }
97
+ }
98
+
99
+ $cpt_creation_fields2 = array(
100
+ array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'slug' => 'public', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
101
+ array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'slug' => 'show-ui', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
102
+ array( 'type' => 'select', 'title' => __( 'Show In Nav Menus', 'wck' ), 'slug' => 'show-in-nav-menus', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether post_type is available for selection in navigation menus.', 'wck' ) ),
103
+ array( 'type' => 'text', 'title' => __( 'Show In Menu', 'wck' ), 'slug' => 'show-in-menu', 'default' => 'true', 'description' => __( 'Whether to show the post type in the admin menu. show_ui must be true. "false" - do not display in the admin menu, "true" - display as a top level menu, "some string" - If an existing top level page such as "tools.php" or "edit.php?post_type=page", the post type will be placed as a sub menu of that.', 'wck' ) ),
104
+ array( 'type' => 'text', 'title' => __( 'Menu Position', 'wck' ), 'slug' => 'menu-position', 'description' => __( 'The position in the menu order the post type should appear.', 'wck' ) ),
105
+ array( 'type' => 'text', 'title' => __( 'Menu Icon', 'wck' ), 'slug' => 'menu-icon', 'description' => __( 'The url to the icon to be used for this menu.', 'wck' ) ),
106
+ array( 'type' => 'text', 'title' => __( 'Capability Type', 'wck' ), 'slug' => 'capability-type', 'description' => __( 'The string to use to build the read, edit, and delete capabilities.', 'wck' ), 'default' => 'post' ),
107
+ array( 'type' => 'checkbox', 'title' => __( 'Taxonomies', 'wck' ), 'slug' => 'taxonomies', 'options' => $taxonomie_names ),
108
+ array( 'type' => 'select', 'title' => __( 'Rewrite', 'wck' ), 'slug' => 'rewrite', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Rewrite permalinks.', 'wck' ) ),
109
+ array( 'type' => 'select', 'title' => __( 'With Front', 'wck' ), 'slug' => 'with_front', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Use the defined base for permalinks.', 'wck' ) ),
110
+ array( 'type' => 'text', 'title' => __( 'Rewrite Slug', 'wck' ), 'slug' => 'rewrite-slug', 'description' => __( 'Defaults to post type name.', 'wck' ) ),
111
+ array( 'type' => 'select', 'title' => __( 'Show in REST API', 'wck'), 'slug' => 'show-in-rest', 'options' => array( 'false', 'true'), 'default' => 'false', 'description' => __('Make this post type available via WP REST API ', 'wck' ) )
112
+ );
113
+
114
+ foreach( $cpt_creation_fields2 as $cpt_creation_field ) {
115
+ array_push( $cpt_creation_fields, $cpt_creation_field );
116
+ }
117
+
118
+ /* set up the box arguments */
119
+ $args = array(
120
+ 'metabox_id' => 'option_page',
121
+ 'metabox_title' => __( 'Custom Post Type Creation', 'wck' ),
122
+ 'post_type' => 'cptc-page',
123
+ 'meta_name' => 'wck_cptc',
124
+ 'meta_array' => $cpt_creation_fields,
125
+ 'context' => 'option',
126
+ 'sortable' => false
127
+ );
128
+
129
+ /* create the box */
130
+ new Wordpress_Creation_Kit( $args );
131
+ }
132
+ }
133
+
134
+ /* hook to create custom post types */
135
+ add_action( 'init', 'wck_cptc_create_cpts', 8 );
136
+
137
+ function wck_cptc_create_cpts(){
138
+ global $wp_version;
139
+
140
+ $cpts = get_option('wck_cptc');
141
+
142
+ if( !empty( $cpts ) ){
143
+ foreach( $cpts as $cpt ){
144
+
145
+ $labels = array(
146
+ 'name' => _x( $cpt['plural-label'], 'post type general name'),
147
+ 'singular_name' => _x( $cpt['singular-label'], 'post type singular name'),
148
+ 'add_new' => _x( $cpt['add-new'] ? $cpt['add-new'] : 'Add New', strtolower( $cpt['singular-label'] ) ),
149
+ 'add_new_item' => __( $cpt['add-new-item'] ? $cpt['add-new-item'] : "Add New ".$cpt['singular-label']),
150
+ 'edit_item' => __( $cpt['edit-item'] ? $cpt['edit-item'] : "Edit ".$cpt['singular-label'], 'wck' ) ,
151
+ 'new_item' => __( $cpt['new-item'] ? $cpt['new-item'] : "New ".$cpt['singular-label'], 'wck' ),
152
+ 'all_items' => __( $cpt['all-items'] ? $cpt['all-items'] : "All ".$cpt['plural-label'] , 'wck'),
153
+ 'view_item' => __( !empty( $cpt['view-item'] ) ? $cpt['view-item'] : "View ".$cpt['singular-label'] , 'wck'),
154
+ 'search_items' => __( $cpt['search-items'] ? $cpt['search-items'] : "Search ".$cpt['plural-label'], 'wck' ),
155
+ 'not_found' => __( $cpt['not-found'] ? $cpt['not-found'] : "No ". strtolower( $cpt['plural-label'] ) ." found", 'wck' ),
156
+ 'not_found_in_trash' => __( $cpt['not-found-in-trash'] ? $cpt['not-found-in-trash'] : "No ". strtolower( $cpt['plural-label'] ) ." found in Trash", 'wck' ),
157
+ 'parent_item_colon' => __( !empty( $cpt['parent-item-colon'] ) ? $cpt['parent-item-colon'] : "Parent Page", 'wck' ),
158
+ 'menu_name' => $cpt['menu-name'] ? $cpt['menu-name'] : $cpt['plural-label']
159
+ );
160
+
161
+ if( version_compare( $wp_version, '4.3', '>=' ) ) {
162
+ $labels_v43 = array(
163
+ 'featured_image' => __( !empty( $cpt['featured_image'] ) ? $cpt['featured_image'] : "Featured Image" ),
164
+ 'set_featured_image' => __( !empty( $cpt['set_featured_image'] ) ? $cpt['set_featured_image'] : "Set featured image" ),
165
+ 'remove_featured_image' => __( !empty( $cpt['remove_featured_image'] ) ? $cpt['remove_featured_image'] : "Remove featured image" ),
166
+ 'use_featured_image' => __( !empty( $cpt['use_featured_image'] ) ? $cpt['use_featured_image'] : "Use as featured image" )
167
+ );
168
+
169
+ foreach( $labels_v43 as $label_v43 ) {
170
+ array_push( $labels, $label_v43 );
171
+ }
172
+ }
173
+
174
+ if( version_compare( $wp_version, '4.4', '>=' ) ) {
175
+ $labels_v44 = array(
176
+ 'archives' => __( !empty( $cpt['archives'] ) ? $cpt['archives'] : $cpt['singular-label'] . " Archives" ),
177
+ 'insert_into_item' => __( !empty( $cpt['insert_into_item'] ) ? $cpt['insert_into_item'] : "Insert Into " . $cpt['singular-label'] ),
178
+ 'uploaded_to_this_item' => __( !empty( $cpt['uploaded_to_this_item'] ) ? $cpt['uploaded_to_this_item'] : "Uploaded to this " . $cpt['singular-label'] ),
179
+ 'filter_items_list' => __( !empty( $cpt['filter_items_list'] ) ? $cpt['filter_items_list'] : "Filter Items List" ),
180
+ 'items_list_navigation' => __( !empty( $cpt['items_list_navigation'] ) ? $cpt['items_list_navigation'] : "Items List Navigation" ),
181
+ 'items_list' => __( !empty( $cpt['items_list'] ) ? $cpt['items_list'] : "Items List" )
182
+ );
183
+
184
+ foreach( $labels_v44 as $label_v44 ) {
185
+ array_push( $labels, $label_v44 );
186
+ }
187
+ }
188
+
189
+ $args = array(
190
+ 'labels' => $labels,
191
+ 'public' => $cpt['public'] == 'false' ? false : true,
192
+ 'description' => $cpt['description'],
193
+ 'show_ui' => $cpt['show-ui'] == 'false' ? false : true,
194
+ 'show_in_nav_menus' => !empty( $cpt['show-in-nav-menus'] ) && $cpt['show-in-nav-menus'] == 'false' ? false : true,
195
+ 'has_archive' => $cpt['has-archive'] == 'false' ? false : true,
196
+ 'hierarchical' => $cpt['hierarchical'] == 'false' ? false : true,
197
+ 'supports' => explode( ', ', $cpt['supports'] ) ,
198
+ 'show_in_rest' => !empty($cpt['show-in-rest']) ? $cpt['show-in-rest'] : false,
199
+ );
200
+
201
+ if( !empty( $cpt['show-in-menu'] ) ){
202
+ $args['show_in_menu'] = $cpt['show-in-menu'] == 'true' ? true : $cpt['show-in-menu'];
203
+ }
204
+
205
+ if( !empty( $cpt['menu-position'] ) )
206
+ $args['menu_position'] = intval( $cpt['menu-position'] );
207
+
208
+ if( has_filter( "wck_cptc_capabilities_{$cpt['post-type']}" ) )
209
+ $args['capabilities'] = apply_filters( "wck_cptc_capabilities_{$cpt['post-type']}", $cpt['capability-type'] );
210
+ else
211
+ $args['capability_type'] = $cpt['capability-type'];
212
+
213
+ if( !empty( $cpt['taxonomies'] ) )
214
+ $args['taxonomies'] = explode( ', ', $cpt['taxonomies'] );
215
+
216
+ if( !empty( $cpt['menu-icon'] ) )
217
+ $args['menu_icon'] = $cpt['menu-icon'];
218
+
219
+ if( $cpt['rewrite'] == 'false' )
220
+ $args['rewrite'] = $cpt['rewrite'] == 'false' ? false : true;
221
+ else{
222
+ $rewrite_array = array();
223
+
224
+ if( !empty( $cpt['rewrite-slug'] ) )
225
+ $rewrite_array['slug'] = $cpt['rewrite-slug'];
226
+
227
+ if( !empty( $cpt['with_front'] ) && $cpt['with_front'] == 'false' )
228
+ $rewrite_array['with_front'] = false;
229
+
230
+ if ( count( $rewrite_array ) > 0 ) {
231
+ $args['rewrite'] = $rewrite_array;
232
+ }
233
+ }
234
+
235
+ register_post_type( $cpt['post-type'], apply_filters( 'wck_cptc_register_post_type_args', $args, $cpt['post-type'] ) );
236
+ }
237
+ }
238
+ }
239
+
240
+ /* Flush rewrite rules */
241
+ add_action('init', 'cptc_flush_rules', 20);
242
+ function cptc_flush_rules(){
243
+ if( isset( $_GET['page'] ) && $_GET['page'] == 'cptc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
244
+ flush_rewrite_rules( false );
245
+ }
246
+
247
+ /* advanced labels container for add form */
248
+ add_action( "wck_before_add_form_wck_cptc_element_7", 'wck_cptc_form_label_wrapper_start' );
249
+ function wck_cptc_form_label_wrapper_start(){
250
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __('Show Advanced Label Options', 'wck' ) .'</a></li>';
251
+ echo '<li id="cptc-advanced-label-options-container" style="display:none;"><ul>';
252
+ }
253
+
254
+ add_action( "wck_after_add_form_wck_cptc_element_27", 'wck_cptc_form_label_wrapper_end' );
255
+ function wck_cptc_form_label_wrapper_end(){
256
+ echo '</ul></li>';
257
+ }
258
+
259
+ /* advanced options container for add form */
260
+ add_action( "wck_before_add_form_wck_cptc_element_28", 'wck_cptc_form_wrapper_start' );
261
+ function wck_cptc_form_wrapper_start(){
262
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __('Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\'Hide Advanced Options\'); else if( jQuery(this).text() == \''. __('Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __('Show Advanced Options', 'wck' ) .'\');">'. __('Show Advanced Options', 'wck' ) .'</a></li>';
263
+ echo '<li id="cptc-advanced-options-container" style="display:none;"><ul>';
264
+ }
265
+
266
+ add_action( "wck_after_add_form_wck_cptc_element_38", 'wck_cptc_form_wrapper_end' );
267
+ function wck_cptc_form_wrapper_end(){
268
+ echo '</ul></li>';
269
+ }
270
+
271
+ /* advanced label options container for update form */
272
+ add_filter( "wck_before_update_form_wck_cptc_element_7", 'wck_cptc_update_form_label_wrapper_start', 10, 2 );
273
+ function wck_cptc_update_form_label_wrapper_start( $form, $i ){
274
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
275
+ $form .= '<li id="cptc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
276
+ return $form;
277
+ }
278
+
279
+ add_filter( "wck_after_update_form_wck_cptc_element_27", 'wck_cptc_update_form_label_wrapper_end', 10, 2 );
280
+ function wck_cptc_update_form_label_wrapper_end( $form, $i ){
281
+ $form .= '</ul></li>';
282
+ return $form;
283
+ }
284
+
285
+ /* advanced options container for update form */
286
+ add_filter( "wck_before_update_form_wck_cptc_element_28", 'wck_cptc_update_form_wrapper_start', 10, 2 );
287
+ function wck_cptc_update_form_wrapper_start( $form, $i ){
288
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
289
+ $form .= '<li id="cptc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
290
+ return $form;
291
+ }
292
+
293
+ add_filter( "wck_after_update_form_wck_cptc_element_38", 'wck_cptc_update_form_wrapper_end', 10, 2 );
294
+ function wck_cptc_update_form_wrapper_end( $form, $i ){
295
+ $form .= '</ul></li>';
296
+ return $form;
297
+ }
298
+
299
+
300
+ /* advanced label options container for display */
301
+ add_filter( "wck_before_listed_wck_cptc_element_7", 'wck_cptc_display_label_wrapper_start', 10, 2 );
302
+ function wck_cptc_display_label_wrapper_start( $form, $i ){
303
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
304
+ $form .= '<li id="cptc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
305
+ return $form;
306
+ }
307
+
308
+ add_filter( "wck_after_listed_wck_cptc_element_27", 'wck_cptc_display_label_wrapper_end', 10, 2 );
309
+ function wck_cptc_display_label_wrapper_end( $form, $i ){
310
+ $form .= '</ul></li>';
311
+ return $form;
312
+ }
313
+
314
+ /* advanced options container for display */
315
+ add_filter( "wck_before_listed_wck_cptc_element_28", 'wck_cptc_display_adv_wrapper_start', 10, 2 );
316
+ function wck_cptc_display_adv_wrapper_start( $form, $i ){
317
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#cptc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
318
+ $form .= '<li id="cptc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
319
+ return $form;
320
+ }
321
+
322
+ add_filter( "wck_after_listed_wck_cptc_element_38", 'wck_cptc_display_adv_wrapper_end', 10, 2 );
323
+ function wck_cptc_display_adv_wrapper_end( $form, $i ){
324
+ $form .= '</ul></li>';
325
+ return $form;
326
+ }
327
+
328
+ /* add refresh to page */
329
+ add_action("wck_refresh_list_wck_cptc", "wck_cptc_after_refresh_list");
330
+ add_action("wck_refresh_entry_wck_cptc", "wck_cptc_after_refresh_list");
331
+ function wck_cptc_after_refresh_list(){
332
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=cptc-page&updated=true' .'";</script>';
333
+ }
334
+
335
+ /* Add side metaboxes */
336
+ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
337
+ add_action('add_meta_boxes', 'wck_cptc_add_side_boxes');
338
+ function wck_cptc_add_side_boxes()
339
+ {
340
+ add_meta_box('wck-cptc-side', __('Wordpress Creation Kit', 'wck'), 'wck_cptc_side_box_one', 'wck_page_cptc-page', 'side', 'high');
341
+ }
342
+
343
+ function wck_cptc_side_box_one()
344
+ {
345
+ ?>
346
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
347
+ src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
348
+ alt="WCK-PRO"/></a>
349
+ <?php
350
+ }
351
+ }
352
+
353
+ /* add TranslatePress crosspromotion */
354
+ add_action('add_meta_boxes', 'wck_cptc_add_trp_side_box');
355
+ function wck_cptc_add_trp_side_box()
356
+ {
357
+ add_meta_box('wck-cptc-side-trp', __('TranslatePress', 'wck'), 'wck_cptc_side_box_trp', 'wck_page_cptc-page', 'side', 'low');
358
+ }
359
+
360
+ function wck_cptc_side_box_trp()
361
+ {
362
+ ?>
363
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
364
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
365
+ alt="TranslatePress"/></a>
366
+ <h4>Easily translate your entire WordPress website</h4>
367
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
368
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
369
+ <?php
370
+ }
371
+
372
+ /* Contextual Help */
373
+ add_action('load-wck_page_cptc-page', 'wck_cptc_help');
374
+
375
+ function wck_cptc_help () {
376
+ $screen = get_current_screen();
377
+
378
+ /*
379
+ * Check if current screen is wck_page_cptc-page
380
+ * Don't add help tab if it's not
381
+ */
382
+ if ( $screen->id != 'wck_page_cptc-page' )
383
+ return;
384
+
385
+ // Add help tabs
386
+ $screen->add_help_tab( array(
387
+ 'id' => 'wck_cptc_overview',
388
+ 'title' => __('Overview', 'wck' ),
389
+ 'content' => '<p>' . __( 'WCK Custom Post Type Creator allows you to easily create custom post types for Wordpress without any programming knowledge.<br />Most of the common options for creating a post type are displayed by default while the advanced options and label are just one click away.', 'wck' ) . '</p>',
390
+ ) );
391
+
392
+ $screen->add_help_tab( array(
393
+ 'id' => 'wck_cptc_labels',
394
+ 'title' => __( 'Labels', 'wck' ),
395
+ 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed.', 'wck' ) . '</p>',
396
+ ) );
397
+
398
+ $screen->add_help_tab( array(
399
+ 'id' => 'wck_cptc_advanced',
400
+ 'title' => __('Advanced Options', 'wck' ),
401
+ 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for custom post types. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
402
+ ) );
403
+ }
404
+
405
+ add_action( 'init', 'wck_cpt_make_sure_thumbnail_support_works', 11 );
406
+ function wck_cpt_make_sure_thumbnail_support_works(){
407
+ global $_wp_theme_features;
408
+
409
+ if( isset( $_wp_theme_features["post-thumbnails"] ) && is_array( $_wp_theme_features["post-thumbnails"] ) ){
410
+ $post_types_with_thumbnails = $_wp_theme_features["post-thumbnails"][0];
411
+
412
+ $cpts = get_option('wck_cptc');
413
+ if( !empty( $cpts ) ) {
414
+ foreach ($cpts as $cpt) {
415
+ $cpt_supports = explode( ', ', $cpt['supports'] );
416
+ if( in_array( 'thumbnail', $cpt_supports ) ){
417
+ $post_types_with_thumbnails[] = $cpt['post-type'];
418
+ }
419
+ }
420
+ }
421
+
422
+ $_wp_theme_features["post-thumbnails"][0] = $post_types_with_thumbnails;
423
+ }
424
+ }
425
+
426
+ /* when renaming a post type make sure the posts get ported as well */
427
+ add_action( 'wck_before_update_meta', 'wck_cptc_update_post_type', 10, 4 );
428
+ function wck_cptc_update_post_type( $meta, $id, $values, $element_id ){
429
+ if( $meta == 'wck_cptc' ){
430
+ $old_values = get_option( $meta );
431
+ if( !empty( $old_values[$element_id] ) ){
432
+ if( $old_values[$element_id]['post-type'] != $values['post-type'] ){
433
+ global $wpdb;
434
+ $wpdb->update(
435
+ $wpdb->posts,
436
+ array(
437
+ 'post_type' => $values['post-type'], // string
438
+ ),
439
+ array( 'post_type' => $old_values[$element_id]['post-type'] ),
440
+ array(
441
+ '%s',
442
+ )
443
+ );
444
+ }
445
+ }
446
+ }
447
+ }
448
+
449
+ /* Post Type Name Verification */
450
+ add_filter( 'wck_required_test_wck_cptc_post-type', 'wck_cptc_check_post_type', 10, 8 );
451
+ function wck_cptc_check_post_type( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
452
+ //Make sure it doesn't contain capital letters or spaces
453
+ $no_spaces_value = str_replace(' ', '', $value);
454
+ $no_hyphens_value = str_replace('-', '', $value);
455
+ $lowercase_value = strtolower($value);
456
+
457
+ /* make sure it's not reserved and avoid doing this on the update case for backwards compatibility */
458
+ $old_values = get_option( 'wck_cptc' );
459
+ $reserved_vars = array();
460
+ if( empty( $old_values[$elemet_id]['post-type'] ) || $value != $old_values[$elemet_id]['post-type'] )
461
+ $reserved_vars = wck_cpt_get_reserved_names();
462
+
463
+ if ( ( $no_spaces_value == $value ) && ( $lowercase_value == $value ) && ( $no_hyphens_value == $value ) && !in_array( $value, $reserved_vars ) )
464
+ $checked = false;
465
+ else
466
+ $checked = true;
467
+
468
+ return ( empty($value) || $checked );
469
+ }
470
+
471
+ add_filter( 'wck_required_message_wck_cptc_post-type', 'wck_cptc_change_post_type_message', 10, 3 );
472
+ function wck_cptc_change_post_type_message( $message, $value, $required_field ){
473
+ // change error message
474
+ $no_spaces_value = str_replace(' ', '', $value);
475
+ $no_hyphens_value = str_replace('-', '', $value);
476
+ $lowercase_value = strtolower($value);
477
+ $reserved_vars = wck_cpt_get_reserved_names();
478
+
479
+ if( empty( $value ) )
480
+ return $message;
481
+ else if( $no_spaces_value != $value )
482
+ return __("Post Type name must not contain any spaces\n", "wck" );
483
+ else if ($lowercase_value != $value)
484
+ return __( "Post Type name must not contain any capital letters\n", "wck" );
485
+ else if ($no_hyphens_value != $value)
486
+ return __( "Post Type name must not contain any hyphens\n", "wck" );
487
+ else if( in_array( $value, $reserved_vars ) )
488
+ return __( "Please chose a different Post Type name as this one is reserved\n", "wck" );
489
+ }
490
+
491
+ function wck_cpt_get_reserved_names(){
492
+ $reserved_vars = Wordpress_Creation_Kit::wck_get_reserved_variable_names();
493
+ /* add to reserved names existing taxonomy slugs created with wck */
494
+ $wck_taxonomies = get_option( 'wck_ctc' );
495
+ if( !empty( $wck_taxonomies ) ){
496
+ foreach ($wck_taxonomies as $wck_taxonomy) {
497
+ $reserved_vars[] = $wck_taxonomy['taxonomy'];
498
+ }
499
+ }
500
+
501
+ return $reserved_vars;
502
+ }
503
+
504
+ ?>
wck-ctc.php CHANGED
@@ -1,492 +1,467 @@
1
- <?php
2
- /* Creates Custom Taxonomies for WordPress */
3
-
4
- /* Create the CTC Page only for admins ( 'capability' => 'edit_theme_options' ) */
5
- $args = array(
6
- 'page_title' => __( 'WCK Taxonomy Creator', 'wck' ),
7
- 'menu_title' => __( 'Taxonomy Creator', 'wck' ),
8
- 'capability' => 'edit_theme_options',
9
- 'menu_slug' => 'ctc-page',
10
- 'page_type' => 'submenu_page',
11
- 'parent_slug' => 'wck-page',
12
- 'priority' => 9,
13
- 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
- );
15
- new WCK_Page_Creator( $args );
16
-
17
- /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
18
- add_action( 'init', 'wck_ctc_create_box', 11 );
19
- function wck_ctc_create_box(){
20
- global $wp_version;
21
- if( is_admin() && current_user_can( 'edit_theme_options' ) ){
22
- $args = array(
23
- 'public' => true
24
- );
25
- $output = 'objects'; // or objects
26
- $post_types = get_post_types($args,$output);
27
- $post_type_names = array();
28
- if( !empty( $post_types ) ){
29
- foreach ( $post_types as $post_type ) {
30
- if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' && $post_type->name != 'wck-swift-template' )
31
- $post_type_names[] = $post_type->name;
32
- }
33
- }
34
-
35
-
36
- $ct_creation_fields = array(
37
- array( 'type' => 'text', 'title' => __( 'Taxonomy', 'wck' ), 'slug' => 'taxonomy', 'description' => __( '(The name of the taxonomy. Name must not contain capital letters or spaces.)', 'wck' ), 'required' => true ),
38
- array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'slug' => 'singular-label', 'required' => true, 'description' => __( 'ex. Writer', 'wck' ) ),
39
- array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'slug' => 'plural-label', 'required' => true, 'description' => __( 'ex. Writers', 'wck' ) ),
40
- array( 'type' => 'checkbox', 'title' => __( 'Attach to', 'wck' ), 'slug' => 'attach-to', 'options' => $post_type_names ),
41
- array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'slug' => 'hierarchical', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.', 'wck' ) ),
42
-
43
- array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'slug' => 'search-items', 'description' => __( 'ex. Search Writers', 'wck' ) ),
44
- array( 'type' => 'text', 'title' => __( 'Popular Items', 'wck' ), 'slug' => 'popular-items', 'description' => __( 'ex. Popular Writers', 'wck' ) ),
45
- array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'slug' => 'all-items', 'description' => __( 'ex. All Writers', 'wck' ) ),
46
- array( 'type' => 'text', 'title' => __( 'Parent Item', 'wck' ), 'slug' => 'parent-item', 'description' => __( 'ex. Parent Genre', 'wck' ) ),
47
- array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'slug' => 'parent-item-colon', 'description' => __( 'ex. Parent Genre:', 'wck' ) ),
48
- array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'slug' => 'edit-item', 'description' => __( 'ex. Edit Writer', 'wck' ) ),
49
- array( 'type' => 'text', 'title' => __( 'Update Item', 'wck' ), 'slug' => 'update-item', 'description' => __( 'ex. Update Writer', 'wck' ) ),
50
- array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'slug' => 'add-new-item', 'description' => __( 'ex. Add New Writer', 'wck' ) ),
51
- array( 'type' => 'text', 'title' => __( 'New Item Name', 'wck' ), 'slug' => 'new-item-name', 'description' => __( 'ex. New Writer Name', 'wck' ) ),
52
- array( 'type' => 'text', 'title' => __( 'Separate Items With Commas', 'wck' ), 'slug' => 'separate-items-with-commas', 'description' => __( 'ex. Separate writers with commas', 'wck' ) ),
53
- array( 'type' => 'text', 'title' => __( 'Add Or Remove Items', 'wck' ), 'slug' => 'add-or-remove-items', 'description' => __( 'ex. Add or remove writers', 'wck' ) ),
54
- array( 'type' => 'text', 'title' => __( 'Choose From Most Used', 'wck' ), 'slug' => 'choose-from-most-used', 'description' => __( 'ex. Choose from the most used writers', 'wck' ) ),
55
- array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ), 'slug' => 'menu-name' ),
56
- );
57
-
58
- if( version_compare( $wp_version, '4.3', '>=' ) ) {
59
- $label_v43 = array( 'type' => 'text', 'title' => __( 'No Terms', 'wck' ), 'slug' => 'no_terms', 'description' => __( 'ex. No Terms', 'wck' ) );
60
-
61
- array_push( $ct_creation_fields, $label_v43 );
62
- }
63
-
64
- if( version_compare( $wp_version, '4.4', '>=' ) ) {
65
- $labels_v44 = array(
66
- array( 'type' => 'text', 'title' => __( 'Items List Navigation', 'wck' ), 'slug' => 'items_list_navigation', 'description' => __( 'ex. Items List Navigation', 'wck' ) ),
67
- array( 'type' => 'text', 'title' => __( 'Items List', 'wck' ), 'slug' => 'items_list', 'description' => __( 'ex. Items List', 'wck' ) ),
68
- );
69
-
70
- foreach( $labels_v44 as $label_v44 ) {
71
- array_push( $ct_creation_fields, $label_v44 );
72
- }
73
- }
74
-
75
- $ct_creation_fields2 = array(
76
- array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'slug' => 'public', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
77
- array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'slug' => 'show-ui', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
78
- array( 'type' => 'select', 'title' => __( 'Show Tagcloud', 'wck' ), 'slug' => 'show-tagcloud', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to allow the Tag Cloud widget to use this taxonomy.', 'wck' ) ),
79
- array( 'type' => 'select', 'title' => __( 'Show Admin Column', 'wck' ), 'slug' => 'show-admin-column', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to allow automatic creation of taxonomy columns on associated post-types.', 'wck' ) ),
80
- array( 'type' => 'select', 'title' => __( 'Sortable Admin Column', 'wck' ), 'slug' => 'sortable-admin-column', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to make the columns sortable or not. WARNING: on a large number of posts the performance can be severely affected', 'wck' ) ),
81
- array( 'type' => 'select', 'title' => __( 'Show in Quick Edit', 'wck' ), 'slug' => 'show-in-quick-edit', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to show the taxonomy in the quick/bulk edit panel.', 'wck' ) ),
82
- array( 'type' => 'select', 'title' => __( 'Show in REST API', 'wck'), 'slug' => 'show-in-rest', 'options' => array( 'false', 'true'), 'default' => 'false', 'description' => __('Make this taxonomy available via WP REST API ', 'wck' ) ),
83
- array( 'type' => 'select', 'title' => __( 'Rewrite', 'wck' ), 'slug' => 'rewrite', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Rewrite permalinks.', 'wck' ) ),
84
- array( 'type' => 'select', 'title' => __( 'With Front', 'wck' ), 'slug' => 'with_front', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Use the defined base for permalinks.', 'wck' ) ),
85
- array( 'type' => 'text', 'title' => __( 'Rewrite Slug', 'wck' ), 'slug' => 'rewrite-slug', 'description' => __( 'Defaults to post type name.', 'wck' ) ),
86
- );
87
-
88
- foreach( $ct_creation_fields2 as $ct_creation_field ) {
89
- array_push( $ct_creation_fields, $ct_creation_field );
90
- }
91
-
92
- $args = array(
93
- 'metabox_id' => 'ctc_creation_box',
94
- 'metabox_title' => __( 'Custom Taxonomy Creation', 'wck' ),
95
- 'post_type' => 'ctc-page',
96
- 'meta_name' => 'wck_ctc',
97
- 'meta_array' => $ct_creation_fields,
98
- 'context' => 'option',
99
- 'sortable' => false
100
- );
101
-
102
-
103
- new Wordpress_Creation_Kit( $args );
104
- }
105
- }
106
-
107
- add_action( 'init', 'wck_ctc_create_taxonomy', 8 );
108
-
109
- function wck_ctc_create_taxonomy(){
110
- global $wp_version;
111
- $cts = get_option('wck_ctc');
112
- if( !empty( $cts ) ){
113
- foreach( $cts as $ct ){
114
-
115
- $labels = array(
116
- 'name' => _x( $ct['plural-label'], 'taxonomy general name' ),
117
- 'singular_name' => _x( $ct['singular-label'], 'taxonomy singular name'),
118
- 'search_items' => __( $ct['search-items'] ? $ct['search-items'] : 'Search '.$ct['plural-label'], 'wck' ),
119
- 'popular_items' => __( $ct['popular-items'] ? $ct['popular-items'] : "Popular ".$ct['plural-label'], 'wck' ),
120
- 'all_items' => __( $ct['all-items'] ? $ct['all-items'] : "All ".$ct['plural-label'], 'wck' ) ,
121
- 'parent_item' => __( $ct['parent-item'] ? $ct['parent-item'] : "Parent ".$ct['singular-label'], 'wck' ),
122
- 'parent_item_colon' => __( $ct['parent-item-colon'] ? $ct['parent-item-colon'] : "Parent ".$ct['singular-label'].':', 'wck' ),
123
- 'edit_item' => __( $ct['edit-item'] ? $ct['edit-item'] : "Edit ".$ct['singular-label'], 'wck' ),
124
- 'update_item' => __( $ct['update-item'] ? $ct['update-item'] : "Update ".$ct['singular-label'], 'wck' ),
125
- 'add_new_item' => __( $ct['add-new-item'] ? $ct['add-new-item'] : "Add New ". $ct['singular-label'], 'wck' ),
126
- 'new_item_name' => __( $ct['new-item-name'] ? $ct['new-item-name'] : "New ". $ct['singular-label']. ' Name', 'wck' ),
127
- 'separate_items_with_commas' => __( $ct['separate-items-with-commas'] ? $ct['separate-items-with-commas'] : "Separate ". strtolower( $ct['plural-label'] ). ' with commas', 'wck' ),
128
- 'add_or_remove_items' => __( $ct['add-or-remove-items'] ? $ct['add-or-remove-items'] : "Add or remove " .strtolower( $ct['plural-label'] ), 'wck' ),
129
- 'choose_from_most_used' => __( $ct['choose-from-most-used'] ? $ct['choose-from-most-used'] : "Choose from the most used " .strtolower( $ct['plural-label'] ), 'wck' ),
130
- 'menu_name' => $ct['menu-name'] ? $ct['menu-name'] : $ct['plural-label']
131
- );
132
-
133
- if( version_compare( $wp_version, '4.3', '>=' ) ) {
134
- $labels_v43 = array( 'no_terms' => __( !empty( $ct['no_terms'] ) ? $ct['no_terms'] : "No Terms" ) );
135
-
136
- array_push( $labels, $labels_v43 );
137
- }
138
-
139
- if( version_compare( $wp_version, '4.4', '>=' ) ) {
140
- $labels_v44 = array(
141
- 'items_list_navigation' => __( !empty( $ct['items_list_navigation'] ) ? $ct['items_list_navigation'] : "Items List Navigation" ),
142
- 'items_list' => __( !empty( $ct['items_list'] ) ? $ct['items_list'] : "Items List" )
143
- );
144
-
145
- foreach( $labels_v44 as $label_v44 ) {
146
- array_push( $labels, $label_v44 );
147
- }
148
- }
149
-
150
- $args = array(
151
- 'labels' => $labels,
152
- 'public' => $ct['public'] == 'false' ? false : true,
153
- 'show_ui' => $ct['show-ui'] == 'false' ? false : true,
154
- 'hierarchical' => $ct['hierarchical'] == 'false' ? false : true,
155
- 'show_tagcloud' => $ct['show-tagcloud'] == 'false' ? false : true,
156
- 'show_in_rest' => !empty($ct['show-in-rest']) ? $ct['show-in-rest'] : false,
157
- 'rewrite' => apply_filters( 'wck_ctc_register_taxonomy_rewrite_arg', true, $ct ),
158
- );
159
-
160
- if( !empty( $ct['show-admin-column'] ) ){
161
- $args['show_admin_column'] = $ct['show-admin-column'] == 'false' ? false : true;
162
- }
163
-
164
- if( !empty( $ct['show-in-quick-edit'] ) ){
165
- $args['show_in_quick_edit'] = $ct['show-in-quick-edit'] == 'false' ? false : true;
166
- }
167
-
168
- if( !empty( $ct['attach-to'] ) )
169
- $object_type = explode( ', ', $ct['attach-to'] );
170
- else
171
- $object_type = '';
172
-
173
- if( !empty( $ct['rewrite'] ) ) {
174
- if ($ct['rewrite'] == 'false') {
175
- $args['rewrite'] = $ct['rewrite'] == 'false' ? false : true;
176
- }
177
- else {
178
- $rewrite_array = array();
179
-
180
- if( !empty( $ct['rewrite-slug'] ) )
181
- $rewrite_array['slug'] = $ct['rewrite-slug'];
182
-
183
- if( !empty( $ct['with_front']) && $ct['with_front'] == 'false' )
184
- $rewrite_array['with_front'] = false;
185
-
186
- if ( count( $rewrite_array ) > 0 ) {
187
- $args['rewrite'] = $rewrite_array;
188
- }
189
- }
190
- }
191
-
192
- register_taxonomy( $ct['taxonomy'], $object_type, apply_filters( 'wck_ctc_register_taxonomy_args', $args, $ct['taxonomy'] ) );
193
-
194
- if( !empty( $object_type ) && !empty( $args['show_admin_column'] ) && $args['show_admin_column'] == true && !empty( $ct['sortable-admin-column'] ) && $ct['sortable-admin-column'] === 'true' ) {
195
-
196
- if ( version_compare( phpversion(), '5.4.0', '<' ) ) {
197
-
198
- foreach( $object_type as $post_type ) {
199
- add_filter("manage_edit-{$post_type}_sortable_columns", create_function('$columns', '$columns["taxonomy-' . $ct["taxonomy"] . '"] = "taxonomy-' . $ct["taxonomy"] . '";return $columns;'));
200
- }
201
-
202
- add_filter( 'posts_clauses', create_function( '$clauses, $wp_query', 'global $wpdb;
203
- if ( is_admin() && isset( $wp_query->query[\'orderby\'] ) && \'taxonomy-'.$ct["taxonomy"].'\' == $wp_query->query[\'orderby\'] ) {
204
-
205
- $clauses[\'join\'] .= <<<SQL
206
- LEFT OUTER JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID={$wpdb->term_relationships}.object_id
207
- LEFT OUTER JOIN {$wpdb->term_taxonomy} USING (term_taxonomy_id)
208
- LEFT OUTER JOIN {$wpdb->terms} USING (term_id)
209
- SQL;
210
-
211
- $clauses[\'where\'] .= " AND (taxonomy = \''.$ct["taxonomy"].'\' OR taxonomy IS NULL)";
212
- $clauses[\'groupby\'] = "object_id";
213
- $clauses[\'orderby\'] = "GROUP_CONCAT({$wpdb->terms}.name ORDER BY name ASC) ";
214
- $clauses[\'orderby\'] .= ( \'ASC\' == strtoupper( $wp_query->get(\'order\') ) ) ? \'ASC\' : \'DESC\';
215
- }
216
-
217
- return $clauses;' ), 10, 2 );
218
-
219
- } else {
220
-
221
- foreach( $object_type as $post_type ) {
222
- add_filter("manage_edit-{$post_type}_sortable_columns", function ( $columns ) use ( $ct ) {
223
- $columns['taxonomy-' . $ct['taxonomy']] = 'taxonomy-' . $ct['taxonomy'];
224
-
225
- return $columns;
226
- });
227
- }
228
-
229
- add_filter( 'posts_clauses', function ( $clauses, $wp_query ) use ( $ct ) {
230
- global $wpdb;
231
-
232
- if ( is_admin() && isset( $wp_query->query['orderby']) && 'taxonomy-' . $ct['taxonomy'] == $wp_query->query['orderby'] ) {
233
- $clauses['join'] .= 'LEFT OUTER JOIN '.$wpdb->term_relationships.' ON '.$wpdb->posts.'.ID='.$wpdb->term_relationships.'.object_id';
234
- $clauses['join'] .= ' LEFT OUTER JOIN '.$wpdb->term_taxonomy.' USING (term_taxonomy_id)';
235
- $clauses['join'] .= ' LEFT OUTER JOIN '.$wpdb->terms.' USING (term_id)';
236
-
237
- $clauses['where'] .= ' AND (taxonomy = \'' . $ct["taxonomy"] . '\' OR taxonomy IS NULL)';
238
- $clauses['groupby'] = 'object_id';
239
- $clauses['orderby'] = 'GROUP_CONCAT('.$wpdb->terms.'.name ORDER BY name ASC) ';
240
- $clauses['orderby'] .= ( 'ASC' == strtoupper( $wp_query->get('order') ) ) ? 'ASC' : 'DESC';
241
- }
242
-
243
- return $clauses;
244
- }, 10, 2);
245
-
246
- }
247
- }
248
- }
249
- }
250
- }
251
-
252
- /* Taxonomy Name Verification */
253
-
254
- add_filter( 'wck_required_test_wck_ctc_taxonomy', 'wck_ctc_check_taxonomy', 10, 8 );
255
- function wck_ctc_check_taxonomy( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
256
- //Make sure it doesn't contain capital letters or spaces
257
- $no_spaces_value = str_replace(' ', '', $value);
258
- $lowercase_value = strtolower($value);
259
-
260
- /* make sure it's not reserved and avoid doing this on the update case for backwards compatibility */
261
- $old_values = get_option( 'wck_ctc' );
262
- $reserved_vars = array();
263
- if( empty( $old_values[$elemet_id]['taxonomy'] ) || $value != $old_values[$elemet_id]['taxonomy'] )
264
- $reserved_vars = wck_ctc_get_reserved_names();
265
-
266
- if ( ( $no_spaces_value == $value ) && ( $lowercase_value == $value ) && !in_array( $value, $reserved_vars ) )
267
- $checked = false;
268
- else
269
- $checked = true;
270
-
271
- return ( empty($value) || $checked );
272
-
273
- }
274
-
275
- add_filter( 'wck_required_message_wck_ctc_taxonomy', 'wck_ctc_change_taxonomy_message', 10, 3 );
276
- function wck_ctc_change_taxonomy_message( $message, $value, $required_field ){
277
- // change error message
278
- $no_spaces_value = str_replace(' ', '', $value);
279
- $lowercase_value = strtolower($value);
280
- $reserved_vars = wck_ctc_get_reserved_names();
281
-
282
- if( empty( $value ) )
283
- return $message;
284
- else if( $no_spaces_value != $value )
285
- return __("Taxonomy name must not contain any spaces\n", "wck" );
286
- else if ($lowercase_value != $value)
287
- return __( "Tanomony name must not contain any capital letters\n", "wck" );
288
- else if( in_array( $value, $reserved_vars ) )
289
- return __( "Please chose a different Tanomony name as this one is reserved\n", "wck" );
290
- }
291
-
292
- function wck_ctc_get_reserved_names(){
293
- $reserved_vars = Wordpress_Creation_Kit::wck_get_reserved_variable_names();
294
- /* add to reserved names existing taxonomy slugs created with wck */
295
- $wck_post_types = get_option( 'wck_cptc' );
296
- if( !empty( $wck_post_types ) ){
297
- foreach ($wck_post_types as $wck_post_type) {
298
- $reserved_vars[] = $wck_post_type['post-type'];
299
- }
300
- }
301
-
302
- return $reserved_vars;
303
- }
304
-
305
- /* Flush rewrite rules */
306
- add_action('init', 'ctc_flush_rules', 20);
307
- function ctc_flush_rules(){
308
- if( isset( $_GET['page'] ) && $_GET['page'] == 'ctc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
309
- flush_rewrite_rules( false );
310
- }
311
-
312
- /* add refresh to page */
313
- add_action("wck_refresh_list_wck_ctc", "wck_ctc_after_refresh_list");
314
- add_action("wck_refresh_entry_wck_ctc", "wck_ctc_after_refresh_list");
315
- function wck_ctc_after_refresh_list(){
316
- echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=ctc-page&updated=true' .'";</script>';
317
- }
318
-
319
- /* advanced labels container for add form */
320
- add_action( "wck_before_add_form_wck_ctc_element_5", 'wck_ctc_form_label_wrapper_start' );
321
- function wck_ctc_form_label_wrapper_start(){
322
- echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
323
- echo '<li id="ctc-advanced-label-options-container" style="display:none;"><ul>';
324
- }
325
-
326
- add_action( "wck_after_add_form_wck_ctc_element_20", 'wck_ctc_form_label_wrapper_end' );
327
- function wck_ctc_form_label_wrapper_end(){
328
- echo '</ul></li>';
329
- }
330
-
331
- /* advanced options container for add form */
332
- add_action( "wck_before_add_form_wck_ctc_element_21", 'wck_ctc_form_wrapper_start' );
333
- function wck_ctc_form_wrapper_start(){
334
- echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
335
- echo '<li id="ctc-advanced-options-container" style="display:none;"><ul>';
336
- }
337
-
338
- add_action( "wck_after_add_form_wck_ctc_element_29", 'wck_ctc_form_wrapper_end' );
339
- function wck_ctc_form_wrapper_end(){
340
- echo '</ul></li>';
341
- }
342
-
343
- /* advanced label options container for update form */
344
- add_filter( "wck_before_update_form_wck_ctc_element_5", 'wck_ctc_update_form_label_wrapper_start', 10, 2 );
345
- function wck_ctc_update_form_label_wrapper_start( $form, $i ){
346
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
347
- $form .= '<li id="ctc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
348
- return $form;
349
- }
350
-
351
- add_filter( "wck_after_update_form_wck_ctc_element_20", 'wck_ctc_update_form_label_wrapper_end', 10, 2 );
352
- function wck_ctc_update_form_label_wrapper_end( $form, $i ){
353
- $form .= '</ul></li>';
354
- return $form;
355
- }
356
-
357
- /* advanced options container for update form */
358
- add_filter( "wck_before_update_form_wck_ctc_element_21", 'wck_ctc_update_form_wrapper_start', 10, 2 );
359
- function wck_ctc_update_form_wrapper_start( $form, $i ){
360
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
361
- $form .= '<li id="ctc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
362
- return $form;
363
- }
364
-
365
- add_filter( "wck_after_update_form_wck_ctc_element_29", 'wck_ctc_update_form_wrapper_end', 10, 2 );
366
- function wck_ctc_update_form_wrapper_end( $form, $i ){
367
- $form .= '</ul></li>';
368
- return $form;
369
- }
370
-
371
-
372
- /* advanced label options container for display */
373
- add_filter( "wck_before_listed_wck_ctc_element_5", 'wck_ctc_display_label_wrapper_start', 10, 2 );
374
- function wck_ctc_display_label_wrapper_start( $form, $i ){
375
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
376
- $form .= '<li id="ctc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
377
- return $form;
378
- }
379
-
380
- add_filter( "wck_after_listed_wck_ctc_element_20", 'wck_ctc_display_label_wrapper_end', 10, 2 );
381
- function wck_ctc_display_label_wrapper_end( $form, $i ){
382
- $form .= '</ul></li>';
383
- return $form;
384
- }
385
-
386
- /* advanced options container for display */
387
- add_filter( "wck_before_listed_wck_ctc_element_21", 'wck_ctc_display_adv_wrapper_start', 10, 2 );
388
- function wck_ctc_display_adv_wrapper_start( $form, $i ){
389
- $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
390
- $form .= '<li id="ctc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
391
- return $form;
392
- }
393
-
394
- add_filter( "wck_after_listed_wck_ctc_element_29", 'wck_ctc_display_adv_wrapper_end', 10, 2 );
395
- function wck_ctc_display_adv_wrapper_end( $form, $i ){
396
- $form .= '</ul></li>';
397
- return $form;
398
- }
399
-
400
- /* Add side metaboxes */
401
- if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
402
- add_action('add_meta_boxes', 'wck_ctc_add_side_boxes');
403
- function wck_ctc_add_side_boxes()
404
- {
405
- add_meta_box('wck-ctc-side', __('Wordpress Creation Kit', 'wck'), 'wck_ctc_side_box_one', 'wck_page_ctc-page', 'side', 'high');
406
- }
407
-
408
- function wck_ctc_side_box_one()
409
- {
410
- ?>
411
- <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
412
- src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
413
- alt="WCK-PRO"/></a>
414
- <?php
415
- }
416
- }
417
-
418
- /* add TranslatePress crosspromotion */
419
- add_action('add_meta_boxes', 'wck_ctc_add_trp_side_box');
420
- function wck_ctc_add_trp_side_box()
421
- {
422
- add_meta_box('wck-ctc-side-trp', __('TranslatePress', 'wck'), 'wck_ctc_side_box_trp', 'wck_page_ctc-page', 'side', 'low');
423
- }
424
-
425
- function wck_ctc_side_box_trp()
426
- {
427
- ?>
428
- <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
429
- src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
430
- alt="TranslatePress"/></a>
431
- <h4>Easily translate your entire WordPress website</h4>
432
- <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
433
- It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
434
- <?php
435
- }
436
-
437
- /* Contextual Help */
438
- add_action('load-wck_page_ctc-page', 'wck_ctc_help');
439
-
440
- function wck_ctc_help () {
441
- $screen = get_current_screen();
442
-
443
- /*
444
- * Check if current screen is wck_page_cptc-page
445
- * Don't add help tab if it's not
446
- */
447
- if ( $screen->id != 'wck_page_ctc-page' )
448
- return;
449
-
450
- // Add help tabs
451
- $screen->add_help_tab( array(
452
- 'id' => 'wck_ctc_overview',
453
- 'title' => __( 'Overview', 'wck' ),
454
- 'content' => '<p>' . __( 'WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for Wordpress without any programming knowledge.<br />Most of the common options for creating a taxonomy are displayed by default while the advanced and label options are just one click away.', 'wck' ) . '</p>',
455
- ) );
456
-
457
- $screen->add_help_tab( array(
458
- 'id' => 'wck_ctc_labels',
459
- 'title' => __( 'Labels', 'wck' ),
460
- 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed', 'wck' ) . '</p>',
461
- ) );
462
-
463
- $screen->add_help_tab( array(
464
- 'id' => 'wck_ctc_advanced',
465
- 'title' => __( 'Advanced Options', 'wck' ),
466
- 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for taxonomies. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
467
- ) );
468
- }
469
-
470
-
471
- /* when renaming a taxonomy make sure the terms get ported as well */
472
- add_action( 'wck_before_update_meta', 'wck_ctc_update_taxonomies', 10, 4 );
473
- function wck_ctc_update_taxonomies( $meta, $id, $values, $element_id ){
474
- if( $meta == 'wck_ctc' ){
475
- $old_values = get_option( $meta );
476
- if( !empty( $old_values[$element_id] ) ){
477
- if( $old_values[$element_id]['taxonomy'] != $values['taxonomy'] ){
478
- global $wpdb;
479
- $wpdb->update(
480
- $wpdb->term_taxonomy,
481
- array(
482
- 'taxonomy' => $values['taxonomy'], // string
483
- ),
484
- array( 'taxonomy' => $old_values[$element_id]['taxonomy'] ),
485
- array(
486
- '%s',
487
- )
488
- );
489
- }
490
- }
491
- }
492
- }
1
+ <?php
2
+ /* Creates Custom Taxonomies for WordPress */
3
+
4
+ /* Create the CTC Page only for admins ( 'capability' => 'edit_theme_options' ) */
5
+ $args = array(
6
+ 'page_title' => __( 'WCK Taxonomy Creator', 'wck' ),
7
+ 'menu_title' => __( 'Taxonomy Creator', 'wck' ),
8
+ 'capability' => 'edit_theme_options',
9
+ 'menu_slug' => 'ctc-page',
10
+ 'page_type' => 'submenu_page',
11
+ 'parent_slug' => 'wck-page',
12
+ 'priority' => 9,
13
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
14
+ );
15
+ new WCK_Page_Creator( $args );
16
+
17
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
18
+ add_action( 'init', 'wck_ctc_create_box', 11 );
19
+ function wck_ctc_create_box(){
20
+ global $wp_version;
21
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
22
+ $args = array(
23
+ 'public' => true
24
+ );
25
+ $output = 'objects'; // or objects
26
+ $post_types = get_post_types($args,$output);
27
+ $post_type_names = array();
28
+ if( !empty( $post_types ) ){
29
+ foreach ( $post_types as $post_type ) {
30
+ if ( $post_type->name != 'attachment' && $post_type->name != 'wck-meta-box' && $post_type->name != 'wck-frontend-posting' && $post_type->name != 'wck-option-page' && $post_type->name != 'wck-option-field' && $post_type->name != 'wck-swift-template' )
31
+ $post_type_names[] = $post_type->name;
32
+ }
33
+ }
34
+
35
+
36
+ $ct_creation_fields = array(
37
+ array( 'type' => 'text', 'title' => __( 'Taxonomy', 'wck' ), 'slug' => 'taxonomy', 'description' => __( '(The name of the taxonomy. Name must not contain capital letters or spaces.)', 'wck' ), 'required' => true ),
38
+ array( 'type' => 'text', 'title' => __( 'Singular Label', 'wck' ), 'slug' => 'singular-label', 'required' => true, 'description' => __( 'ex. Writer', 'wck' ) ),
39
+ array( 'type' => 'text', 'title' => __( 'Plural Label', 'wck' ), 'slug' => 'plural-label', 'required' => true, 'description' => __( 'ex. Writers', 'wck' ) ),
40
+ array( 'type' => 'checkbox', 'title' => __( 'Attach to', 'wck' ), 'slug' => 'attach-to', 'options' => $post_type_names ),
41
+ array( 'type' => 'select', 'title' => __( 'Hierarchical', 'wck' ), 'slug' => 'hierarchical', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Is this taxonomy hierarchical (have descendants) like categories or not hierarchical like tags.', 'wck' ) ),
42
+
43
+ array( 'type' => 'text', 'title' => __( 'Search Items', 'wck' ), 'slug' => 'search-items', 'description' => __( 'ex. Search Writers', 'wck' ) ),
44
+ array( 'type' => 'text', 'title' => __( 'Popular Items', 'wck' ), 'slug' => 'popular-items', 'description' => __( 'ex. Popular Writers', 'wck' ) ),
45
+ array( 'type' => 'text', 'title' => __( 'All Items', 'wck' ), 'slug' => 'all-items', 'description' => __( 'ex. All Writers', 'wck' ) ),
46
+ array( 'type' => 'text', 'title' => __( 'Parent Item', 'wck' ), 'slug' => 'parent-item', 'description' => __( 'ex. Parent Genre', 'wck' ) ),
47
+ array( 'type' => 'text', 'title' => __( 'Parent Item Colon', 'wck' ), 'slug' => 'parent-item-colon', 'description' => __( 'ex. Parent Genre:', 'wck' ) ),
48
+ array( 'type' => 'text', 'title' => __( 'Edit Item', 'wck' ), 'slug' => 'edit-item', 'description' => __( 'ex. Edit Writer', 'wck' ) ),
49
+ array( 'type' => 'text', 'title' => __( 'Update Item', 'wck' ), 'slug' => 'update-item', 'description' => __( 'ex. Update Writer', 'wck' ) ),
50
+ array( 'type' => 'text', 'title' => __( 'Add New Item', 'wck' ), 'slug' => 'add-new-item', 'description' => __( 'ex. Add New Writer', 'wck' ) ),
51
+ array( 'type' => 'text', 'title' => __( 'New Item Name', 'wck' ), 'slug' => 'new-item-name', 'description' => __( 'ex. New Writer Name', 'wck' ) ),
52
+ array( 'type' => 'text', 'title' => __( 'Separate Items With Commas', 'wck' ), 'slug' => 'separate-items-with-commas', 'description' => __( 'ex. Separate writers with commas', 'wck' ) ),
53
+ array( 'type' => 'text', 'title' => __( 'Add Or Remove Items', 'wck' ), 'slug' => 'add-or-remove-items', 'description' => __( 'ex. Add or remove writers', 'wck' ) ),
54
+ array( 'type' => 'text', 'title' => __( 'Choose From Most Used', 'wck' ), 'slug' => 'choose-from-most-used', 'description' => __( 'ex. Choose from the most used writers', 'wck' ) ),
55
+ array( 'type' => 'text', 'title' => __( 'Menu Name', 'wck' ), 'slug' => 'menu-name' ),
56
+ );
57
+
58
+ if( version_compare( $wp_version, '4.3', '>=' ) ) {
59
+ $label_v43 = array( 'type' => 'text', 'title' => __( 'No Terms', 'wck' ), 'slug' => 'no_terms', 'description' => __( 'ex. No Terms', 'wck' ) );
60
+
61
+ array_push( $ct_creation_fields, $label_v43 );
62
+ }
63
+
64
+ if( version_compare( $wp_version, '4.4', '>=' ) ) {
65
+ $labels_v44 = array(
66
+ array( 'type' => 'text', 'title' => __( 'Items List Navigation', 'wck' ), 'slug' => 'items_list_navigation', 'description' => __( 'ex. Items List Navigation', 'wck' ) ),
67
+ array( 'type' => 'text', 'title' => __( 'Items List', 'wck' ), 'slug' => 'items_list', 'description' => __( 'ex. Items List', 'wck' ) ),
68
+ );
69
+
70
+ foreach( $labels_v44 as $label_v44 ) {
71
+ array_push( $ct_creation_fields, $label_v44 );
72
+ }
73
+ }
74
+
75
+ $ct_creation_fields2 = array(
76
+ array( 'type' => 'select', 'title' => __( 'Public', 'wck' ), 'slug' => 'public', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Meta argument used to define default values for publicly_queriable, show_ui, show_in_nav_menus and exclude_from_search', 'wck' ) ),
77
+ array( 'type' => 'select', 'title' => __( 'Show UI', 'wck' ), 'slug' => 'show-ui', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to generate a default UI for managing this post type.', 'wck' ) ),
78
+ array( 'type' => 'select', 'title' => __( 'Show Tagcloud', 'wck' ), 'slug' => 'show-tagcloud', 'options' => array( 'false', 'true' ), 'default' => 'true', 'description' => __( 'Whether to allow the Tag Cloud widget to use this taxonomy.', 'wck' ) ),
79
+ array( 'type' => 'select', 'title' => __( 'Show Admin Column', 'wck' ), 'slug' => 'show-admin-column', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to allow automatic creation of taxonomy columns on associated post-types.', 'wck' ) ),
80
+ array( 'type' => 'select', 'title' => __( 'Sortable Admin Column', 'wck' ), 'slug' => 'sortable-admin-column', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to make the columns sortable or not. WARNING: on a large number of posts the performance can be severely affected', 'wck' ) ),
81
+ array( 'type' => 'select', 'title' => __( 'Show in Quick Edit', 'wck' ), 'slug' => 'show-in-quick-edit', 'options' => array( 'false', 'true' ), 'default' => 'false', 'description' => __( 'Whether to show the taxonomy in the quick/bulk edit panel.', 'wck' ) ),
82
+ array( 'type' => 'select', 'title' => __( 'Show in REST API', 'wck'), 'slug' => 'show-in-rest', 'options' => array( 'false', 'true'), 'default' => 'false', 'description' => __('Make this taxonomy available via WP REST API ', 'wck' ) ),
83
+ array( 'type' => 'select', 'title' => __( 'Rewrite', 'wck' ), 'slug' => 'rewrite', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Rewrite permalinks.', 'wck' ) ),
84
+ array( 'type' => 'select', 'title' => __( 'With Front', 'wck' ), 'slug' => 'with_front', 'options' => array( 'true', 'false' ), 'default' => 'true', 'description' => __( 'Use the defined base for permalinks.', 'wck' ) ),
85
+ array( 'type' => 'text', 'title' => __( 'Rewrite Slug', 'wck' ), 'slug' => 'rewrite-slug', 'description' => __( 'Defaults to post type name.', 'wck' ) ),
86
+ );
87
+
88
+ foreach( $ct_creation_fields2 as $ct_creation_field ) {
89
+ array_push( $ct_creation_fields, $ct_creation_field );
90
+ }
91
+
92
+ $args = array(
93
+ 'metabox_id' => 'ctc_creation_box',
94
+ 'metabox_title' => __( 'Custom Taxonomy Creation', 'wck' ),
95
+ 'post_type' => 'ctc-page',
96
+ 'meta_name' => 'wck_ctc',
97
+ 'meta_array' => $ct_creation_fields,
98
+ 'context' => 'option',
99
+ 'sortable' => false
100
+ );
101
+
102
+
103
+ new Wordpress_Creation_Kit( $args );
104
+ }
105
+ }
106
+
107
+ add_action( 'init', 'wck_ctc_create_taxonomy', 8 );
108
+
109
+ function wck_ctc_create_taxonomy(){
110
+ global $wp_version;
111
+ $cts = get_option('wck_ctc');
112
+ if( !empty( $cts ) ){
113
+ foreach( $cts as $ct ){
114
+
115
+ $labels = array(
116
+ 'name' => _x( $ct['plural-label'], 'taxonomy general name' ),
117
+ 'singular_name' => _x( $ct['singular-label'], 'taxonomy singular name'),
118
+ 'search_items' => __( $ct['search-items'] ? $ct['search-items'] : 'Search '.$ct['plural-label'], 'wck' ),
119
+ 'popular_items' => __( $ct['popular-items'] ? $ct['popular-items'] : "Popular ".$ct['plural-label'], 'wck' ),
120
+ 'all_items' => __( $ct['all-items'] ? $ct['all-items'] : "All ".$ct['plural-label'], 'wck' ) ,
121
+ 'parent_item' => __( $ct['parent-item'] ? $ct['parent-item'] : "Parent ".$ct['singular-label'], 'wck' ),
122
+ 'parent_item_colon' => __( $ct['parent-item-colon'] ? $ct['parent-item-colon'] : "Parent ".$ct['singular-label'].':', 'wck' ),
123
+ 'edit_item' => __( $ct['edit-item'] ? $ct['edit-item'] : "Edit ".$ct['singular-label'], 'wck' ),
124
+ 'update_item' => __( $ct['update-item'] ? $ct['update-item'] : "Update ".$ct['singular-label'], 'wck' ),
125
+ 'add_new_item' => __( $ct['add-new-item'] ? $ct['add-new-item'] : "Add New ". $ct['singular-label'], 'wck' ),
126
+ 'new_item_name' => __( $ct['new-item-name'] ? $ct['new-item-name'] : "New ". $ct['singular-label']. ' Name', 'wck' ),
127
+ 'separate_items_with_commas' => __( $ct['separate-items-with-commas'] ? $ct['separate-items-with-commas'] : "Separate ". strtolower( $ct['plural-label'] ). ' with commas', 'wck' ),
128
+ 'add_or_remove_items' => __( $ct['add-or-remove-items'] ? $ct['add-or-remove-items'] : "Add or remove " .strtolower( $ct['plural-label'] ), 'wck' ),
129
+ 'choose_from_most_used' => __( $ct['choose-from-most-used'] ? $ct['choose-from-most-used'] : "Choose from the most used " .strtolower( $ct['plural-label'] ), 'wck' ),
130
+ 'menu_name' => $ct['menu-name'] ? $ct['menu-name'] : $ct['plural-label']
131
+ );
132
+
133
+ if( version_compare( $wp_version, '4.3', '>=' ) ) {
134
+ $labels_v43 = array( 'no_terms' => __( !empty( $ct['no_terms'] ) ? $ct['no_terms'] : "No Terms" ) );
135
+
136
+ array_push( $labels, $labels_v43 );
137
+ }
138
+
139
+ if( version_compare( $wp_version, '4.4', '>=' ) ) {
140
+ $labels_v44 = array(
141
+ 'items_list_navigation' => __( !empty( $ct['items_list_navigation'] ) ? $ct['items_list_navigation'] : "Items List Navigation" ),
142
+ 'items_list' => __( !empty( $ct['items_list'] ) ? $ct['items_list'] : "Items List" )
143
+ );
144
+
145
+ foreach( $labels_v44 as $label_v44 ) {
146
+ array_push( $labels, $label_v44 );
147
+ }
148
+ }
149
+
150
+ $args = array(
151
+ 'labels' => $labels,
152
+ 'public' => $ct['public'] == 'false' ? false : true,
153
+ 'show_ui' => $ct['show-ui'] == 'false' ? false : true,
154
+ 'hierarchical' => $ct['hierarchical'] == 'false' ? false : true,
155
+ 'show_tagcloud' => $ct['show-tagcloud'] == 'false' ? false : true,
156
+ 'show_in_rest' => !empty($ct['show-in-rest']) ? $ct['show-in-rest'] : false,
157
+ 'rewrite' => apply_filters( 'wck_ctc_register_taxonomy_rewrite_arg', true, $ct ),
158
+ );
159
+
160
+ if( !empty( $ct['show-admin-column'] ) ){
161
+ $args['show_admin_column'] = $ct['show-admin-column'] == 'false' ? false : true;
162
+ }
163
+
164
+ if( !empty( $ct['show-in-quick-edit'] ) ){
165
+ $args['show_in_quick_edit'] = $ct['show-in-quick-edit'] == 'false' ? false : true;
166
+ }
167
+
168
+ if( !empty( $ct['attach-to'] ) )
169
+ $object_type = explode( ', ', $ct['attach-to'] );
170
+ else
171
+ $object_type = '';
172
+
173
+ if( !empty( $ct['rewrite'] ) ) {
174
+ if ($ct['rewrite'] == 'false') {
175
+ $args['rewrite'] = $ct['rewrite'] == 'false' ? false : true;
176
+ }
177
+ else {
178
+ $rewrite_array = array();
179
+
180
+ if( !empty( $ct['rewrite-slug'] ) )
181
+ $rewrite_array['slug'] = $ct['rewrite-slug'];
182
+
183
+ if( !empty( $ct['with_front']) && $ct['with_front'] == 'false' )
184
+ $rewrite_array['with_front'] = false;
185
+
186
+ if ( count( $rewrite_array ) > 0 ) {
187
+ $args['rewrite'] = $rewrite_array;
188
+ }
189
+ }
190
+ }
191
+
192
+ register_taxonomy( $ct['taxonomy'], $object_type, apply_filters( 'wck_ctc_register_taxonomy_args', $args, $ct['taxonomy'] ) );
193
+
194
+ if( !empty( $object_type ) && !empty( $args['show_admin_column'] ) && $args['show_admin_column'] == true && !empty( $ct['sortable-admin-column'] ) && $ct['sortable-admin-column'] === 'true' ) {
195
+
196
+ foreach( $object_type as $post_type ) {
197
+ add_filter("manage_edit-{$post_type}_sortable_columns", function ( $columns ) use ( $ct ) {
198
+ $columns['taxonomy-' . $ct['taxonomy']] = 'taxonomy-' . $ct['taxonomy'];
199
+
200
+ return $columns;
201
+ });
202
+ }
203
+
204
+ add_filter( 'posts_clauses', function ( $clauses, $wp_query ) use ( $ct ) {
205
+ global $wpdb;
206
+
207
+ if ( is_admin() && isset( $wp_query->query['orderby']) && 'taxonomy-' . $ct['taxonomy'] == $wp_query->query['orderby'] ) {
208
+ $clauses['join'] .= 'LEFT OUTER JOIN '.$wpdb->term_relationships.' ON '.$wpdb->posts.'.ID='.$wpdb->term_relationships.'.object_id';
209
+ $clauses['join'] .= ' LEFT OUTER JOIN '.$wpdb->term_taxonomy.' USING (term_taxonomy_id)';
210
+ $clauses['join'] .= ' LEFT OUTER JOIN '.$wpdb->terms.' USING (term_id)';
211
+
212
+ $clauses['where'] .= ' AND (taxonomy = \'' . $ct["taxonomy"] . '\' OR taxonomy IS NULL)';
213
+ $clauses['groupby'] = 'object_id';
214
+ $clauses['orderby'] = 'GROUP_CONCAT('.$wpdb->terms.'.name ORDER BY name ASC) ';
215
+ $clauses['orderby'] .= ( 'ASC' == strtoupper( $wp_query->get('order') ) ) ? 'ASC' : 'DESC';
216
+ }
217
+
218
+ return $clauses;
219
+ }, 10, 2);
220
+
221
+
222
+ }
223
+ }
224
+ }
225
+ }
226
+
227
+ /* Taxonomy Name Verification */
228
+
229
+ add_filter( 'wck_required_test_wck_ctc_taxonomy', 'wck_ctc_check_taxonomy', 10, 8 );
230
+ function wck_ctc_check_taxonomy( $bool, $value, $post_id, $field, $meta, $fields, $values, $elemet_id ){
231
+ //Make sure it doesn't contain capital letters or spaces
232
+ $no_spaces_value = str_replace(' ', '', $value);
233
+ $lowercase_value = strtolower($value);
234
+
235
+ /* make sure it's not reserved and avoid doing this on the update case for backwards compatibility */
236
+ $old_values = get_option( 'wck_ctc' );
237
+ $reserved_vars = array();
238
+ if( empty( $old_values[$elemet_id]['taxonomy'] ) || $value != $old_values[$elemet_id]['taxonomy'] )
239
+ $reserved_vars = wck_ctc_get_reserved_names();
240
+
241
+ if ( ( $no_spaces_value == $value ) && ( $lowercase_value == $value ) && !in_array( $value, $reserved_vars ) )
242
+ $checked = false;
243
+ else
244
+ $checked = true;
245
+
246
+ return ( empty($value) || $checked );
247
+
248
+ }
249
+
250
+ add_filter( 'wck_required_message_wck_ctc_taxonomy', 'wck_ctc_change_taxonomy_message', 10, 3 );
251
+ function wck_ctc_change_taxonomy_message( $message, $value, $required_field ){
252
+ // change error message
253
+ $no_spaces_value = str_replace(' ', '', $value);
254
+ $lowercase_value = strtolower($value);
255
+ $reserved_vars = wck_ctc_get_reserved_names();
256
+
257
+ if( empty( $value ) )
258
+ return $message;
259
+ else if( $no_spaces_value != $value )
260
+ return __("Taxonomy name must not contain any spaces\n", "wck" );
261
+ else if ($lowercase_value != $value)
262
+ return __( "Tanomony name must not contain any capital letters\n", "wck" );
263
+ else if( in_array( $value, $reserved_vars ) )
264
+ return __( "Please chose a different Tanomony name as this one is reserved\n", "wck" );
265
+ }
266
+
267
+ function wck_ctc_get_reserved_names(){
268
+ $reserved_vars = Wordpress_Creation_Kit::wck_get_reserved_variable_names();
269
+ /* add to reserved names existing taxonomy slugs created with wck */
270
+ $wck_post_types = get_option( 'wck_cptc' );
271
+ if( !empty( $wck_post_types ) ){
272
+ foreach ($wck_post_types as $wck_post_type) {
273
+ $reserved_vars[] = $wck_post_type['post-type'];
274
+ }
275
+ }
276
+
277
+ return $reserved_vars;
278
+ }
279
+
280
+ /* Flush rewrite rules */
281
+ add_action('init', 'ctc_flush_rules', 20);
282
+ function ctc_flush_rules(){
283
+ if( isset( $_GET['page'] ) && $_GET['page'] == 'ctc-page' && isset( $_GET['updated'] ) && $_GET['updated'] == 'true' )
284
+ flush_rewrite_rules( false );
285
+ }
286
+
287
+ /* add refresh to page */
288
+ add_action("wck_refresh_list_wck_ctc", "wck_ctc_after_refresh_list");
289
+ add_action("wck_refresh_entry_wck_ctc", "wck_ctc_after_refresh_list");
290
+ function wck_ctc_after_refresh_list(){
291
+ echo '<script type="text/javascript">window.location="'. get_admin_url() . 'admin.php?page=ctc-page&updated=true' .'";</script>';
292
+ }
293
+
294
+ /* advanced labels container for add form */
295
+ add_action( "wck_before_add_form_wck_ctc_element_5", 'wck_ctc_form_label_wrapper_start' );
296
+ function wck_ctc_form_label_wrapper_start(){
297
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
298
+ echo '<li id="ctc-advanced-label-options-container" style="display:none;"><ul>';
299
+ }
300
+
301
+ add_action( "wck_after_add_form_wck_ctc_element_20", 'wck_ctc_form_label_wrapper_end' );
302
+ function wck_ctc_form_label_wrapper_end(){
303
+ echo '</ul></li>';
304
+ }
305
+
306
+ /* advanced options container for add form */
307
+ add_action( "wck_before_add_form_wck_ctc_element_21", 'wck_ctc_form_wrapper_start' );
308
+ function wck_ctc_form_wrapper_start(){
309
+ echo '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-container\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
310
+ echo '<li id="ctc-advanced-options-container" style="display:none;"><ul>';
311
+ }
312
+
313
+ add_action( "wck_after_add_form_wck_ctc_element_29", 'wck_ctc_form_wrapper_end' );
314
+ function wck_ctc_form_wrapper_end(){
315
+ echo '</ul></li>';
316
+ }
317
+
318
+ /* advanced label options container for update form */
319
+ add_filter( "wck_before_update_form_wck_ctc_element_5", 'wck_ctc_update_form_label_wrapper_start', 10, 2 );
320
+ function wck_ctc_update_form_label_wrapper_start( $form, $i ){
321
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Label Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Label Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Label Options', 'wck' ) .'\');">'. __( 'Show Advanced Label Options', 'wck' ) .'</a></li>';
322
+ $form .= '<li id="ctc-advanced-label-options-update-container-'.$i.'" style="display:none;"><ul>';
323
+ return $form;
324
+ }
325
+
326
+ add_filter( "wck_after_update_form_wck_ctc_element_20", 'wck_ctc_update_form_label_wrapper_end', 10, 2 );
327
+ function wck_ctc_update_form_label_wrapper_end( $form, $i ){
328
+ $form .= '</ul></li>';
329
+ return $form;
330
+ }
331
+
332
+ /* advanced options container for update form */
333
+ add_filter( "wck_before_update_form_wck_ctc_element_21", 'wck_ctc_update_form_wrapper_start', 10, 2 );
334
+ function wck_ctc_update_form_wrapper_start( $form, $i ){
335
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-update-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
336
+ $form .= '<li id="ctc-advanced-options-update-container-'.$i.'" style="display:none;"><ul>';
337
+ return $form;
338
+ }
339
+
340
+ add_filter( "wck_after_update_form_wck_ctc_element_29", 'wck_ctc_update_form_wrapper_end', 10, 2 );
341
+ function wck_ctc_update_form_wrapper_end( $form, $i ){
342
+ $form .= '</ul></li>';
343
+ return $form;
344
+ }
345
+
346
+
347
+ /* advanced label options container for display */
348
+ add_filter( "wck_before_listed_wck_ctc_element_5", 'wck_ctc_display_label_wrapper_start', 10, 2 );
349
+ function wck_ctc_display_label_wrapper_start( $form, $i ){
350
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-label-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Labels', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Labels', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Labels', 'wck' ) .'\');">'. __( 'Show Advanced Labels', 'wck' ) .'</a></li>';
351
+ $form .= '<li id="ctc-advanced-label-options-display-container-'.$i.'" style="display:none;"><ul>';
352
+ return $form;
353
+ }
354
+
355
+ add_filter( "wck_after_listed_wck_ctc_element_20", 'wck_ctc_display_label_wrapper_end', 10, 2 );
356
+ function wck_ctc_display_label_wrapper_end( $form, $i ){
357
+ $form .= '</ul></li>';
358
+ return $form;
359
+ }
360
+
361
+ /* advanced options container for display */
362
+ add_filter( "wck_before_listed_wck_ctc_element_21", 'wck_ctc_display_adv_wrapper_start', 10, 2 );
363
+ function wck_ctc_display_adv_wrapper_start( $form, $i ){
364
+ $form .= '<li><a href="javascript:void(0)" onclick="jQuery(\'#ctc-advanced-options-display-container-'.$i.'\').toggle(); if( jQuery(this).text() == \''. __( 'Show Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Hide Advanced Options', 'wck' ) .'\'); else if( jQuery(this).text() == \''. __( 'Hide Advanced Options', 'wck' ) .'\' ) jQuery(this).text(\''. __( 'Show Advanced Options', 'wck' ) .'\');">'. __( 'Show Advanced Options', 'wck' ) .'</a></li>';
365
+ $form .= '<li id="ctc-advanced-options-display-container-'.$i.'" style="display:none;"><ul>';
366
+ return $form;
367
+ }
368
+
369
+ add_filter( "wck_after_listed_wck_ctc_element_29", 'wck_ctc_display_adv_wrapper_end', 10, 2 );
370
+ function wck_ctc_display_adv_wrapper_end( $form, $i ){
371
+ $form .= '</ul></li>';
372
+ return $form;
373
+ }
374
+
375
+ /* Add side metaboxes */
376
+ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) ) {
377
+ add_action('add_meta_boxes', 'wck_ctc_add_side_boxes');
378
+ function wck_ctc_add_side_boxes()
379
+ {
380
+ add_meta_box('wck-ctc-side', __('Wordpress Creation Kit', 'wck'), 'wck_ctc_side_box_one', 'wck_page_ctc-page', 'side', 'high');
381
+ }
382
+
383
+ function wck_ctc_side_box_one()
384
+ {
385
+ ?>
386
+ <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree"><img
387
+ src="<?php echo plugins_url('/images/banner_pro.png', __FILE__) ?>?v=1" width="254" height="448"
388
+ alt="WCK-PRO"/></a>
389
+ <?php
390
+ }
391
+ }
392
+
393
+ /* add TranslatePress crosspromotion */
394
+ add_action('add_meta_boxes', 'wck_ctc_add_trp_side_box');
395
+ function wck_ctc_add_trp_side_box()
396
+ {
397
+ add_meta_box('wck-ctc-side-trp', __('TranslatePress', 'wck'), 'wck_ctc_side_box_trp', 'wck_page_ctc-page', 'side', 'low');
398
+ }
399
+
400
+ function wck_ctc_side_box_trp()
401
+ {
402
+ ?>
403
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img
404
+ src="<?php echo plugins_url('/images/banner_trp.png', __FILE__) ?>?v=1" width="254"
405
+ alt="TranslatePress"/></a>
406
+ <h4>Easily translate your entire WordPress website</h4>
407
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank">Translate</a> your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.<br/><br/>
408
+ It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
409
+ <?php
410
+ }
411
+
412
+ /* Contextual Help */
413
+ add_action('load-wck_page_ctc-page', 'wck_ctc_help');
414
+
415
+ function wck_ctc_help () {
416
+ $screen = get_current_screen();
417
+
418
+ /*
419
+ * Check if current screen is wck_page_cptc-page
420
+ * Don't add help tab if it's not
421
+ */
422
+ if ( $screen->id != 'wck_page_ctc-page' )
423
+ return;
424
+
425
+ // Add help tabs
426
+ $screen->add_help_tab( array(
427
+ 'id' => 'wck_ctc_overview',
428
+ 'title' => __( 'Overview', 'wck' ),
429
+ 'content' => '<p>' . __( 'WCK Custom Taxonomy Creator allows you to easily create custom taxonomy for Wordpress without any programming knowledge.<br />Most of the common options for creating a taxonomy are displayed by default while the advanced and label options are just one click away.', 'wck' ) . '</p>',
430
+ ) );
431
+
432
+ $screen->add_help_tab( array(
433
+ 'id' => 'wck_ctc_labels',
434
+ 'title' => __( 'Labels', 'wck' ),
435
+ 'content' => '<p>' . __( 'For simplicity you are required to introduce only the Singular Label and Plural Label from wchich the rest of the labels will be formed.<br />For a more detailed control of the labels you just have to click the "Show Advanced Label Options" link and all the availabel labels will be displayed', 'wck' ) . '</p>',
436
+ ) );
437
+
438
+ $screen->add_help_tab( array(
439
+ 'id' => 'wck_ctc_advanced',
440
+ 'title' => __( 'Advanced Options', 'wck' ),
441
+ 'content' => '<p>' . __( 'The Advanced Options are set to the most common defaults for taxonomies. To display them click the "Show Advanced Options" link.', 'wck' ) . '</p>',
442
+ ) );
443
+ }
444
+
445
+
446
+ /* when renaming a taxonomy make sure the terms get ported as well */
447
+ add_action( 'wck_before_update_meta', 'wck_ctc_update_taxonomies', 10, 4 );
448
+ function wck_ctc_update_taxonomies( $meta, $id, $values, $element_id ){
449
+ if( $meta == 'wck_ctc' ){
450
+ $old_values = get_option( $meta );
451
+ if( !empty( $old_values[$element_id] ) ){
452
+ if( $old_values[$element_id]['taxonomy'] != $values['taxonomy'] ){
453
+ global $wpdb;
454
+ $wpdb->update(
455
+ $wpdb->term_taxonomy,
456
+ array(
457
+ 'taxonomy' => $values['taxonomy'], // string
458
+ ),
459
+ array( 'taxonomy' => $old_values[$element_id]['taxonomy'] ),
460
+ array(
461
+ '%s',
462
+ )
463
+ );
464
+ }
465
+ }
466
+ }
467
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wck-free-to-pro.php CHANGED
@@ -1,167 +1,167 @@
1
- <?php
2
- /* Add Scripts */
3
- add_action('admin_enqueue_scripts', 'wck_free_to_pro_print_scripts' );
4
- function wck_free_to_pro_print_scripts($hook){
5
- if( 'wck_page_free-to-pro-stp' == $hook || 'wck_page_free-to-pro-fep' == $hook ){
6
- wp_register_style('wck-sas-css', plugins_url('/css/wck-free-to-pro.css', __FILE__));
7
- wp_enqueue_style('wck-sas-css');
8
- }
9
- }
10
-
11
- /* Create the WCK "Front End Posting" Page only for admins ( 'capability' => 'edit_theme_options' ) */
12
- $args = array(
13
- 'page_title' => __( 'Front End Posting', 'wck' ),
14
- 'menu_title' => __( 'Front End Posting', 'wck' ),
15
- 'capability' => 'edit_theme_options',
16
- 'menu_slug' => 'free-to-pro-fep',
17
- 'page_type' => 'submenu_page',
18
- 'parent_slug' => 'wck-page',
19
- 'priority' => 15,
20
- 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
21
- );
22
- $sas_page = new WCK_Page_Creator( $args );
23
-
24
- /* Create the WCK "Swift Templates" Page only for admins ( 'capability' => 'edit_theme_options' ) */
25
- $args = array(
26
- 'page_title' => __( 'Swift Templates', 'wck' ),
27
- 'menu_title' => __( 'Swift Templates', 'wck' ),
28
- 'capability' => 'edit_theme_options',
29
- 'menu_slug' => 'free-to-pro-stp',
30
- 'page_type' => 'submenu_page',
31
- 'parent_slug' => 'wck-page',
32
- 'priority' => 17,
33
- 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
34
- );
35
- $sas_page = new WCK_Page_Creator( $args );
36
-
37
- /**
38
- * Function that adds content to the "Swift Templates" page for the free version
39
- *
40
- * @since v.2.0.8
41
- *
42
- * @return string
43
- */
44
- add_action( 'wck_before_meta_boxes', 'wck_free_to_pro_stp' );
45
- function wck_free_to_pro_stp( $hook ) {
46
- if( 'wck_page_free-to-pro-stp' != $hook ){
47
- return ;
48
- }
49
-
50
- ?>
51
- <div class="wck-wrap wck-info-wrap">
52
- <img class="stp-logo" src="<?php echo plugins_url( 'images/swift-template-logo.png' , __FILE__ ); ?>" alt="Swift Templates" />
53
- <h1><?php _e( 'Swift Templates', 'wck' ); ?></h1>
54
- <p class="wck-info-text"><?php _e( 'A straight forward alternative to WordPress templates', 'wck' ); ?></p>
55
- <hr />
56
- <h2>You're not a programmer. You keep delaying work with any of the templates in fear of making a bigger mess than where you started.</h2>
57
- <p><strong>When you're starting out it's just painful. You would do anything BUT custom code your WordPress templates:</strong></p>
58
- <ul>
59
- <li>research 10+ plugins wishing they can solve your problem</li>
60
- <li>start using a lot of shortcodes inside the content area that will break the moment the client wants to edit the content</li>
61
- <li>consider spending at least a week on that 5 parts HUGE article explaining how to custom code your own WordPress templates</li>
62
- </ul>
63
-
64
- <h3>Wouldn't it be nice to be able to simply:</h3>
65
- <ul>
66
- <li>create listings of all your custom post types</li>
67
- <li>create single page templates that take into account your custom fields previously defined with WCK</li>
68
- <li>all of this without writing PHP and messing with any of the template files</li>
69
- </ul>
70
-
71
- <h2>Swift Templates helps you build front-end templates directly from the WordPress admin UI, without writing a single line of PHP code.</h2>
72
- <p>It turns a time consuming and error prone process that was previously only accessible to developers into a straight forward UI that with a little bit of HTML and CSS allows you to:</p>
73
- <ul>
74
- <li>create archive listings for your custom post types, pages or posts</li>
75
- <li>modify the single CPT page template to include ALL your custom fields and metaboxes</li>
76
- <li>display your custom fields in any page, post or custom post type</li>
77
- <li>query, filter and load any content type</li>
78
- <ul>
79
- <br/>
80
-
81
- <h3 class="wck-free-to-pro-call-to-action">Swift Templates is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
82
- <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
83
-
84
- <h2>Screenshots</h2>
85
- <p><strong>1. Creating a Custom Post Type Archive page</strong></p>
86
- <img class="screenshot" src="<?php echo plugins_url( 'images/swift-templates.png' , __FILE__ ); ?>" alt="Custom Post Type Archive page" />
87
-
88
- <p><strong>2. Build your Archive and Single Templates for any Custom Post Type by simply selecting from the list of available variables. </strong></p>
89
- <img class="screenshot" src="<?php echo plugins_url( 'images/swift-templates-code.png' , __FILE__ ); ?>" alt="Swift Templates - Archive and Single Templates" />
90
-
91
- <p><strong>3. Create individual templates for pages, posts or custom post types that include all your custom fields.</strong></p>
92
- <img class="screenshot" src="<?php echo plugins_url( 'images/swift_single_team_page.png' , __FILE__ ); ?>" alt="individual page template" />
93
-
94
- <p><strong>3. Here's how the Team page will look in the front-end.</strong> It now includes the post content as well as the all custom fields data.</p>
95
- <img class="screenshot" src="<?php echo plugins_url( 'images/team-page-final.jpg' , __FILE__ ); ?>" alt="team page" />
96
-
97
- <h3 class="wck-free-to-pro-call-to-action">Swift Templates is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
98
- <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
99
- </div>
100
- <?php
101
- }
102
-
103
- /**
104
- * Function that adds content to the "Front End Posting" page for the free version
105
- *
106
- * @since v.2.0.8
107
- *
108
- * @return string
109
- */
110
- add_action( 'wck_before_meta_boxes', 'wck_free_to_pro_fep' );
111
- function wck_free_to_pro_fep( $hook ) {
112
- if( 'wck_page_free-to-pro-fep' != $hook ){
113
- return;
114
- }
115
-
116
- ?>
117
- <div class="wck-wrap wck-info-wrap">
118
- <img class="stp-logo" src="<?php echo plugins_url( 'images/fep_logo.png' , __FILE__ ); ?>" alt="Front End Posting" />
119
- <h1><?php _e( 'Front End Posting', 'wck' ); ?></h1>
120
- <p class="wck-info-text"><?php _e( 'An easy way to add and edit content from the front-end', 'wck' ); ?></p>
121
- <hr />
122
- <h2>Wouldn't it be nice to allow your users to post content directly from the front-end without ever seeing the backend?</h2>
123
- <p><strong>If you've been looking for an easy way to:</strong></p>
124
- <ul>
125
- <li>allow visitors to submit posts or images</li>
126
- <li>transform part of your website's visitors into contributors</li>
127
- <li>keep WordPress users out of the dashboard and put everything they need on the front-end</li>
128
- </ul>
129
- <p> Now you can.</p>
130
-
131
- <h2>With WCK Front-end Posting you can create and edit posts, pages or custom post types, directly from the front-end. No coding required.</h2>
132
- <p></p>
133
-
134
- <h3>You can build a flexible <strong>Front-end Posting form</strong> in minutes, that can contain:</h3>
135
- <ul>
136
- <li>Any of the available fields in the WordPress backend: <strong>Title, Content, Excerpt, Categories, Tags, Custom Taxonomies, Featured Image</strong> etc.</li>
137
- <li>Any <strong>Custom Fields</strong> that are attached to the post type</li>
138
- <li>Any <strong>Taxonomy</strong> that is attached to the post type</li>
139
- </ul>
140
- <br/>
141
-
142
- <h3><strong>Frontend Posting Features:</strong></h3>
143
- <ul>
144
- <li>Post articles in ANY Custom Post Type</li>
145
- <li>Taxonomies and Custom Fields available for the front-end form</li>
146
- <li>Edit all your content directly from the front-end (you'll get access to a <strong>Front-end Dashboard</strong>)</li>
147
- <li><strong>WYSIWYG Editor</strong> for adding and editing content</li>
148
- <li><strong>Anonymous Posting</strong> and <strong>Admin Approval</strong></li>
149
- <li>Easy to integrate by using shortcodes</li>
150
-
151
- </ul>
152
- <h3 class="wck-free-to-pro-call-to-action">Frontend Posting is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
153
- <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
154
-
155
- <h2>Screenshots</h2>
156
- <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_setup.png' , __FILE__ ); ?>" alt="form setup screenshot" />
157
- <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_fields.png' , __FILE__ ); ?>" alt="form fields screenshot" />
158
- <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_example.png' , __FILE__ ); ?>" alt="fep screenshot" /><br/>
159
- <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_dashboard.png' , __FILE__ ); ?>" alt="fep dashboard" /><br/>
160
- <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_dashboard_edit.png' , __FILE__ ); ?>" alt="fep dashboard" /><br/>
161
-
162
- <h3 class="wck-free-to-pro-call-to-action">Frontend Posting is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
163
- <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
164
-
165
- </div>
166
- <?php
167
  }
1
+ <?php
2
+ /* Add Scripts */
3
+ add_action('admin_enqueue_scripts', 'wck_free_to_pro_print_scripts' );
4
+ function wck_free_to_pro_print_scripts($hook){
5
+ if( 'wck_page_free-to-pro-stp' == $hook || 'wck_page_free-to-pro-fep' == $hook ){
6
+ wp_register_style('wck-sas-css', plugins_url('/css/wck-free-to-pro.css', __FILE__));
7
+ wp_enqueue_style('wck-sas-css');
8
+ }
9
+ }
10
+
11
+ /* Create the WCK "Front End Posting" Page only for admins ( 'capability' => 'edit_theme_options' ) */
12
+ $args = array(
13
+ 'page_title' => __( 'Front End Posting', 'wck' ),
14
+ 'menu_title' => __( 'Front End Posting', 'wck' ),
15
+ 'capability' => 'edit_theme_options',
16
+ 'menu_slug' => 'free-to-pro-fep',
17
+ 'page_type' => 'submenu_page',
18
+ 'parent_slug' => 'wck-page',
19
+ 'priority' => 15,
20
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
21
+ );
22
+ $sas_page = new WCK_Page_Creator( $args );
23
+
24
+ /* Create the WCK "Swift Templates" Page only for admins ( 'capability' => 'edit_theme_options' ) */
25
+ $args = array(
26
+ 'page_title' => __( 'Swift Templates', 'wck' ),
27
+ 'menu_title' => __( 'Swift Templates', 'wck' ),
28
+ 'capability' => 'edit_theme_options',
29
+ 'menu_slug' => 'free-to-pro-stp',
30
+ 'page_type' => 'submenu_page',
31
+ 'parent_slug' => 'wck-page',
32
+ 'priority' => 17,
33
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
34
+ );
35
+ $sas_page = new WCK_Page_Creator( $args );
36
+
37
+ /**
38
+ * Function that adds content to the "Swift Templates" page for the free version
39
+ *
40
+ * @since v.2.0.8
41
+ *
42
+ * @return string
43
+ */
44
+ add_action( 'wck_before_meta_boxes', 'wck_free_to_pro_stp' );
45
+ function wck_free_to_pro_stp( $hook ) {
46
+ if( 'wck_page_free-to-pro-stp' != $hook ){
47
+ return ;
48
+ }
49
+
50
+ ?>
51
+ <div class="wck-wrap wck-info-wrap">
52
+ <img class="stp-logo" src="<?php echo plugins_url( 'images/swift-template-logo.png' , __FILE__ ); ?>" alt="Swift Templates" />
53
+ <h1><?php _e( 'Swift Templates', 'wck' ); ?></h1>
54
+ <p class="wck-info-text"><?php _e( 'A straight forward alternative to WordPress templates', 'wck' ); ?></p>
55
+ <hr />
56
+ <h2>You're not a programmer. You keep delaying work with any of the templates in fear of making a bigger mess than where you started.</h2>
57
+ <p><strong>When you're starting out it's just painful. You would do anything BUT custom code your WordPress templates:</strong></p>
58
+ <ul>
59
+ <li>research 10+ plugins wishing they can solve your problem</li>
60
+ <li>start using a lot of shortcodes inside the content area that will break the moment the client wants to edit the content</li>
61
+ <li>consider spending at least a week on that 5 parts HUGE article explaining how to custom code your own WordPress templates</li>
62
+ </ul>
63
+
64
+ <h3>Wouldn't it be nice to be able to simply:</h3>
65
+ <ul>
66
+ <li>create listings of all your custom post types</li>
67
+ <li>create single page templates that take into account your custom fields previously defined with WCK</li>
68
+ <li>all of this without writing PHP and messing with any of the template files</li>
69
+ </ul>
70
+
71
+ <h2>Swift Templates helps you build front-end templates directly from the WordPress admin UI, without writing a single line of PHP code.</h2>
72
+ <p>It turns a time consuming and error prone process that was previously only accessible to developers into a straight forward UI that with a little bit of HTML and CSS allows you to:</p>
73
+ <ul>
74
+ <li>create archive listings for your custom post types, pages or posts</li>
75
+ <li>modify the single CPT page template to include ALL your custom fields and metaboxes</li>
76
+ <li>display your custom fields in any page, post or custom post type</li>
77
+ <li>query, filter and load any content type</li>
78
+ <ul>
79
+ <br/>
80
+
81
+ <h3 class="wck-free-to-pro-call-to-action">Swift Templates is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
82
+ <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
83
+
84
+ <h2>Screenshots</h2>
85
+ <p><strong>1. Creating a Custom Post Type Archive page</strong></p>
86
+ <img class="screenshot" src="<?php echo plugins_url( 'images/swift-templates.png' , __FILE__ ); ?>" alt="Custom Post Type Archive page" />
87
+
88
+ <p><strong>2. Build your Archive and Single Templates for any Custom Post Type by simply selecting from the list of available variables. </strong></p>
89
+ <img class="screenshot" src="<?php echo plugins_url( 'images/swift-templates-code.png' , __FILE__ ); ?>" alt="Swift Templates - Archive and Single Templates" />
90
+
91
+ <p><strong>3. Create individual templates for pages, posts or custom post types that include all your custom fields.</strong></p>
92
+ <img class="screenshot" src="<?php echo plugins_url( 'images/swift_single_team_page.png' , __FILE__ ); ?>" alt="individual page template" />
93
+
94
+ <p><strong>3. Here's how the Team page will look in the front-end.</strong> It now includes the post content as well as the all custom fields data.</p>
95
+ <img class="screenshot" src="<?php echo plugins_url( 'images/team-page-final.jpg' , __FILE__ ); ?>" alt="team page" />
96
+
97
+ <h3 class="wck-free-to-pro-call-to-action">Swift Templates is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
98
+ <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
99
+ </div>
100
+ <?php
101
+ }
102
+
103
+ /**
104
+ * Function that adds content to the "Front End Posting" page for the free version
105
+ *
106
+ * @since v.2.0.8
107
+ *
108
+ * @return string
109
+ */
110
+ add_action( 'wck_before_meta_boxes', 'wck_free_to_pro_fep' );
111
+ function wck_free_to_pro_fep( $hook ) {
112
+ if( 'wck_page_free-to-pro-fep' != $hook ){
113
+ return;
114
+ }
115
+
116
+ ?>
117
+ <div class="wck-wrap wck-info-wrap">
118
+ <img class="stp-logo" src="<?php echo plugins_url( 'images/fep_logo.png' , __FILE__ ); ?>" alt="Front End Posting" />
119
+ <h1><?php _e( 'Front End Posting', 'wck' ); ?></h1>
120
+ <p class="wck-info-text"><?php _e( 'An easy way to add and edit content from the front-end', 'wck' ); ?></p>
121
+ <hr />
122
+ <h2>Wouldn't it be nice to allow your users to post content directly from the front-end without ever seeing the backend?</h2>
123
+ <p><strong>If you've been looking for an easy way to:</strong></p>
124
+ <ul>
125
+ <li>allow visitors to submit posts or images</li>
126
+ <li>transform part of your website's visitors into contributors</li>
127
+ <li>keep WordPress users out of the dashboard and put everything they need on the front-end</li>
128
+ </ul>
129
+ <p> Now you can.</p>
130
+
131
+ <h2>With WCK Front-end Posting you can create and edit posts, pages or custom post types, directly from the front-end. No coding required.</h2>
132
+ <p></p>
133
+
134
+ <h3>You can build a flexible <strong>Front-end Posting form</strong> in minutes, that can contain:</h3>
135
+ <ul>
136
+ <li>Any of the available fields in the WordPress backend: <strong>Title, Content, Excerpt, Categories, Tags, Custom Taxonomies, Featured Image</strong> etc.</li>
137
+ <li>Any <strong>Custom Fields</strong> that are attached to the post type</li>
138
+ <li>Any <strong>Taxonomy</strong> that is attached to the post type</li>
139
+ </ul>
140
+ <br/>
141
+
142
+ <h3><strong>Frontend Posting Features:</strong></h3>
143
+ <ul>
144
+ <li>Post articles in ANY Custom Post Type</li>
145
+ <li>Taxonomies and Custom Fields available for the front-end form</li>
146
+ <li>Edit all your content directly from the front-end (you'll get access to a <strong>Front-end Dashboard</strong>)</li>
147
+ <li><strong>WYSIWYG Editor</strong> for adding and editing content</li>
148
+ <li><strong>Anonymous Posting</strong> and <strong>Admin Approval</strong></li>
149
+ <li>Easy to integrate by using shortcodes</li>
150
+
151
+ </ul>
152
+ <h3 class="wck-free-to-pro-call-to-action">Frontend Posting is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
153
+ <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
154
+
155
+ <h2>Screenshots</h2>
156
+ <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_setup.png' , __FILE__ ); ?>" alt="form setup screenshot" />
157
+ <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_fields.png' , __FILE__ ); ?>" alt="form fields screenshot" />
158
+ <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_form_example.png' , __FILE__ ); ?>" alt="fep screenshot" /><br/>
159
+ <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_dashboard.png' , __FILE__ ); ?>" alt="fep dashboard" /><br/>
160
+ <img class="screenshot" src="<?php echo plugins_url( 'images/FEP_dashboard_edit.png' , __FILE__ ); ?>" alt="fep dashboard" /><br/>
161
+
162
+ <h3 class="wck-free-to-pro-call-to-action">Frontend Posting is available in <br/><a class="button button-primary button-free-to-pro" href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCK-FreetoPRO">WordPress Creation Kit PRO</a></h3>
163
+ <p class="wck-free-to-pro-call-to-action">* Simply deactivate the free version before installing WCK PRO and all your existing settings/setup will be ported over.</p>
164
+
165
+ </div>
166
+ <?php
167
  }
wck-sas.php CHANGED
@@ -1,358 +1,374 @@
1
- <?php
2
- /* Start and settings page */
3
-
4
- /* Add Scripts */
5
- add_action('admin_enqueue_scripts', 'wck_sas_print_scripts' );
6
- function wck_sas_print_scripts($hook){
7
- if( 'wck_page_sas-page' == $hook ){
8
- wp_register_style('wck-sas-css', plugins_url('/css/wck-sas.css', __FILE__));
9
- wp_enqueue_style('wck-sas-css');
10
- }
11
- }
12
-
13
- /* Create the WCK "Start & Settings" Page only for admins ( 'capability' => 'edit_theme_options' ) */
14
- $args = array(
15
- 'page_title' => __( 'Start Here & General Settings', 'wck' ),
16
- 'menu_title' => __( 'Start and Settings', 'wck' ),
17
- 'capability' => 'edit_theme_options',
18
- 'menu_slug' => 'sas-page',
19
- 'page_type' => 'submenu_page',
20
- 'parent_slug' => 'wck-page',
21
- 'priority' => 7,
22
- 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
23
- );
24
- $sas_page = new WCK_Page_Creator( $args );
25
-
26
- /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
27
- add_action( 'init', 'wck_sas_create_box', 11 );
28
- function wck_sas_create_box(){
29
-
30
- if( is_admin() && current_user_can( 'edit_theme_options' ) ){
31
-
32
- /* set up the fields array */
33
- $sas_serial_fields = array(
34
- array( 'type' => 'text', 'title' => __( 'Serial Number', 'wck' ), 'slug' => 'serial-number', 'description' => __( 'Please enter your serial number. (e.g. WCKPRO-11-SN-251r55baa4fbe7bf595b2aabb8d72985)', 'wck' ), 'required' => true )
35
- );
36
-
37
- /* set up the box arguments */
38
- $args = array(
39
- 'metabox_id' => 'option_page',
40
- 'metabox_title' => __( 'Register Your Version', 'wck' ),
41
- 'post_type' => 'sas-page',
42
- 'meta_name' => 'wck_serial',
43
- 'meta_array' => $sas_serial_fields,
44
- 'context' => 'option',
45
- 'single' => true,
46
- 'sortable' => false
47
- );
48
-
49
- /* create the box */
50
- $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
51
- if (file_exists ($wck_premium_update . 'update-checker.php'))
52
- new Wordpress_Creation_Kit( $args );
53
-
54
- /* set up the tools array */
55
- $sas_tools_activate = array(
56
- array( 'type' => 'radio', 'title' => __( 'Custom Fields Creator', 'wck' ), 'slug' => 'custom-fields-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
57
- array( 'type' => 'radio', 'title' => __( 'Custom Post Type Creator', 'wck' ), 'slug' => 'custom-post-type-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
58
- array( 'type' => 'radio', 'title' => __( 'Custom Taxonomy Creator', 'wck' ), 'slug' => 'custom-taxonomy-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
59
- );
60
- if( file_exists( dirname(__FILE__).'/wck-fep.php' ) )
61
- $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Frontend Posting', 'wck' ), 'slug' => 'frontend-posting', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
62
- if( file_exists( dirname(__FILE__).'/wck-opc.php' ) )
63
- $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Option Pages Creator', 'wck' ), 'slug' => 'option-pages-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
64
- if( file_exists( dirname(__FILE__).'/wck-stp.php' ) )
65
- $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Swift Templates', 'wck' ), 'slug' => 'swift-templates', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
66
- if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) && !file_exists( dirname(__FILE__).'/wck-fep.php' ) )
67
- $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Swift Templates and Front End Posting', 'wck' ), 'slug' => 'swift-templates-and-front-end-posting', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
68
-
69
- /* set up the box arguments */
70
- $args = array(
71
- 'metabox_id' => 'wck_tools_activate',
72
- 'metabox_title' => __( 'WordPress Creation Kit Tools: enable or disable the tools you want', 'wck' ),
73
- 'post_type' => 'sas-page',
74
- 'meta_name' => 'wck_tools',
75
- 'meta_array' => $sas_tools_activate,
76
- 'context' => 'option',
77
- 'single' => true
78
- );
79
-
80
- /* create the box */
81
- new Wordpress_Creation_Kit( $args );
82
-
83
-
84
- /* set up the extra settings array */
85
- $sas_extra_options = array();
86
-
87
- if( file_exists( dirname( __FILE__ ) . '/wordpress-creation-kit-api/fields/map.php' ) )
88
- $sas_extra_options[] = array( 'type' => 'text', 'title' => __( 'Google Maps API', 'wck' ), 'description' => __( 'Enter your Google Maps API key ( <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend" target="_blank">Get your API key</a> )', 'wck' ), 'required' => false );
89
-
90
- /* if there are extra options add the box */
91
- if( !empty( $sas_extra_options ) ) {
92
-
93
- /* set up the box arguments */
94
- $args = array(
95
- 'metabox_id' => 'wck_extra_options',
96
- 'metabox_title' => __( 'Extra Settings', 'wck' ),
97
- 'post_type' => 'sas-page',
98
- 'meta_name' => 'wck_extra_options',
99
- 'meta_array' => $sas_extra_options,
100
- 'context' => 'option',
101
- 'single' => true,
102
- 'sortable' => false
103
- );
104
-
105
- /* create the box */
106
- if (file_exists ($wck_premium_update . 'update-checker.php'))
107
- new Wordpress_Creation_Kit( $args );
108
-
109
- }
110
-
111
- }
112
- }
113
-
114
- /* Add the welcoming text on WCK Start and Settings Page */
115
- add_action( 'wck_before_meta_boxes', 'wck_sas_welcome');
116
- function wck_sas_welcome($hook){
117
- if('wck_page_sas-page' == $hook ){
118
- $plugin_path = dirname( __FILE__ ) . '/wck.php';
119
- $default_plugin_headers = get_plugin_data($plugin_path);
120
- $plugin_name = $default_plugin_headers['Name'];
121
- $plugin_version = $default_plugin_headers['Version'];
122
- $plugin_name_class = ( strpos( strtolower($plugin_name), 'pro' ) !== false ? 'Pro' : ( strpos( strtolower($plugin_name), 'hobbyist' ) !== false ? 'Hobbyist' : 'Free' ) );
123
-
124
- if( version_compare(PHP_VERSION, '5.3.0') < 0 ) { ?>
125
- <div class="notice-error notice">
126
- <p>
127
- <?php _e('<strong>You are using a very old version of PHP</strong> (5.2.x or older) which has serious security and performance issues. Please ask your hoster to provide you with an upgrade path to 5.6 or 7.0','wck'); ?>
128
- </p>
129
- </div>
130
- <?php }
131
- ?>
132
- <div class="wrap about-wrap">
133
- <div class="wck-badge <?php echo $plugin_name_class; ?>"><span><?php printf( __( 'Version %s' ), $plugin_version ); ?></span></div>
134
- <h1><?php printf( __( 'Welcome to %s', 'wck' ), $plugin_name ); ?></h1>
135
- <div class="about-text"><?php _e( 'WCK helps you create <strong>repeater custom fields, custom post types</strong> and <strong>taxonomies</strong> in just a couple of clicks, directly from the WordPress admin interface. WCK content types will improve the usability of the sites you build, making them easy to manage by your clients. ', 'wck' ); ?></div>
136
- </div>
137
-
138
- <?php
139
- }
140
- }
141
-
142
- /* Add the Quick Start-Up Guide text on WCK Start and Settings Page */
143
- add_action( 'wck_after_meta_boxes', 'wck_sas_quickintro', 12);
144
- function wck_sas_quickintro($hook){
145
- if('wck_page_sas-page' == $hook ){
146
- ?>
147
-
148
-
149
-
150
- <div class="wrap about-wrap" style="clear:both;">
151
-
152
- <div>
153
- <div style="float:right">
154
- <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img src="<?php echo plugins_url( './images/pb-trp-cross-promotion.png', __FILE__ ); ?>" alt="TranslatePress Logo"/></a>
155
- </div>
156
- <div>
157
- <h3>Easily translate your entire WordPress website</h3>
158
- <p>Translate your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.</p>
159
- <p>It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
160
- <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" class="button" target="_blank">Find out how</a></p>
161
-
162
- </div>
163
- </div>
164
-
165
-
166
- <div class="changelog">
167
- <h2><?php _e( 'Quick Start-Up Guide', 'wck' ); ?></h2>
168
-
169
- <div class="feature-section">
170
-
171
- <h4><?php _e( 'Custom Fields Creator', 'wck' ); ?></h4>
172
- <p><?php _e( 'WordPress Creation Kit Pro has support for a wide list of custom fields: WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, Drop-Down, Select, Checkboxes, Radio Buttons', 'wck' ); ?></p>
173
- <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Fields_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
174
-
175
- <h4><?php _e( 'Post Type Creator', 'wck' ); ?></h4>
176
- <p><?php _e( 'Create & manage all your custom content types', 'wck' ); ?></p>
177
- <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Post_Type_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
178
-
179
- <h4><?php _e( 'Taxonomy Creator', 'wck' ); ?></h4>
180
- <p><?php _e( 'Create new taxonomies for filtering your content', 'wck' ); ?></p>
181
- <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Taxonomy_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
182
-
183
- <h4><?php _e( 'Swift Templates (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
184
- <p><?php _e( 'Build your front-end templates directly from the WordPress admin UI, without writing any PHP code.', 'wck' ); ?></p>
185
- <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Swift_Templates" target="_blank">here</a> on how to easily display registered custom post types, custom fields and taxonomies in your theme.', 'wck' ); ?></p>
186
-
187
- <h4><?php _e( 'Front-End Posting (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
188
- <p><?php _e( 'Create and edit posts/pages or custom posts directly from the front-end.', 'wck' ); ?></p>
189
- <p><?php _e( 'Available shortcodes:', 'wck' ); ?></p>
190
- <ul>
191
- <li><?php _e( '[fep form_name="front-end-post-name"] - displays your form in the front-end', 'wck' ); ?></li>
192
- <li><?php _e( '[fep-dashboard] - the quick-dashboard allows: simple profile updates, editing/deletion of posts, pages and custom post types.', 'wck' ); ?></li>
193
- <li><?php _e( '[fep-lilo] - login/logout/register widget with the simple usage of a shortcode. Can be added in a page or text widget.', 'wck' ); ?></li>
194
- </ul>
195
- <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/frontend-posting/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
196
-
197
- <h4><?php _e( 'Option Pages (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
198
- <p><?php _e( 'The Options Page Creator Allows you to create a new menu item called "Options"(for example) which can hold advanced custom field groups. Perfect for theme options or a simple UI for your custom plugin (like a simple testimonials section in the front-end).', 'wck' ); ?></p>
199
-
200
- </div>
201
- </div>
202
- </div>
203
-
204
- <?php
205
- }
206
- }
207
-
208
- /* Notify user of when he enters his serial number.
209
- * Also Check if serial is valid on meta_name creation and update
210
- */
211
- add_action( "wck_after_add_form_wck_serial_element_0", 'wck_sas_serial_notification' );
212
- function wck_sas_serial_notification(){
213
-
214
- wck_sas_check_serial_number();
215
- $status = get_option('wck_serial_status');
216
-
217
- if ( $status == 'noserial') $notif = '<p class="serial-notification red">' . __( 'Please enter your serial number to receive access to automatic updates and support. Need a license key? <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-SN-Purchase" target="_blank">Get One Here</a>.', 'wck' ) . ' </p>';
218
-
219
- if ( $status == 'serverDown') $notif = '<p class="serial-notification yellow">' . __( 'Oops! Our serial verification server is down. Please try again later.', 'wck' ) . ' </p>';
220
-
221
- if ( $status == 'notFound') $notif = '<p class="serial-notification red">' . __( 'Oops! It seems the serial number you entered was not found in our database. To find out what\'s your serial number log-in to <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank">your account page</a> over at Cozmoslabs.com', 'wck' ) . ' </p>';
222
-
223
- if ( $status == 'found') $notif = '<p class="serial-notification green">' . __( 'Wohoo! Your serial number is valid and you have access to automatic updates.', 'wck' ) . ' </p>';
224
-
225
- if ( $status == 'expired') $notif = '<p class="serial-notification red">' . __( 'It seems your serial number has <strong>expired</strong>. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank"><strong>your account page</strong></a>.', 'wck' ) . ' </p>';
226
-
227
- if ( strpos( $status, 'about' ) === 0 ) $notif = '<p class="serial-notification yellow">' . __( 'Your WordPress Creation Kit serial number is about to expire. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank"><strong>your account page</strong></a>.', 'wck' ) . ' </p>';
228
-
229
- if( !empty( $notif ) )
230
- echo $notif;
231
- }
232
-
233
- /* Check if serial is valid on Start and Settings page load.
234
- * We're tying to the admin_enque_scripts because it returns the current page $hook
235
- */
236
- add_action( 'admin_enqueue_scripts', 'wck_retest_serial_on_load');
237
- function wck_retest_serial_on_load($hook){
238
- if('wck_page_sas-page' == $hook )
239
- wck_sas_check_serial_number();
240
- }
241
-
242
- /* Checks local serial number against our serial-number database. */
243
- function wck_sas_check_serial_number(){
244
- // take into account the Free version doesn't need an update check and serial.
245
- $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
246
- if (!file_exists($wck_premium_update . 'update-checker.php'))
247
- return;
248
-
249
- $serial = get_option('wck_serial');
250
- if( !empty( $serial[0] ) )
251
- $serial = urlencode( $serial[0]['serial-number'] );
252
- if(empty($serial) || $serial == '') {
253
- update_option( 'wck_serial_status', 'noserial' ); //server down
254
- } else {
255
- $response = wp_remote_get( 'http://updatemetadata.cozmoslabs.com/checkserial/?serialNumberSent='.$serial );
256
-
257
- if (is_wp_error($response)){
258
- update_option( 'wck_serial_status', 'serverDown' ); //server down
259
-
260
- }elseif( (trim($response['body']) != 'notFound') && (trim($response['body']) != 'found') && (trim($response['body']) != 'expired') && strpos( trim($response['body']), 'aboutToExpire') === false ){
261
- update_option( 'wck_serial_status', 'serverDown' ); //unknown response parameter
262
- }else{
263
- update_option( 'wck_serial_status', trim($response['body']) ); //either found, notFound or expired
264
- }
265
- }
266
- }
267
-
268
- /**
269
- * Class that adds a notice when either the serial number wasn't found, or it has expired
270
- *
271
- * @since v.2.1.1
272
- *
273
- * @return void
274
- */
275
- class wck_add_serial_notices{
276
- public $pluginPrefix = '';
277
- public $notificaitonMessage = '';
278
- public $pluginSerialStatus = '';
279
-
280
- function __construct( $pluginPrefix, $notificaitonMessage, $pluginSerialStatus ){
281
- $this->pluginPrefix = $pluginPrefix;
282
- $this->notificaitonMessage = $notificaitonMessage;
283
- $this->pluginSerialStatus = $pluginSerialStatus;
284
-
285
- add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
286
- add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
287
- }
288
-
289
-
290
- // Display a notice that can be dismissed in case the serial number is inactive
291
- function add_admin_notice() {
292
- global $current_user ;
293
- global $pagenow;
294
-
295
- $user_id = $current_user->ID;
296
-
297
- do_action( $this->pluginPrefix.'_before_notification_displayed', $current_user, $pagenow );
298
-
299
- if ( current_user_can( 'manage_options' ) ){
300
-
301
- $plugin_serial_status = get_option( $this->pluginSerialStatus );
302
- if ( $plugin_serial_status != 'found' ){
303
- // Check that the user hasn't already clicked to ignore the message
304
- if ( ! get_user_meta($user_id, $this->pluginPrefix.'_dismiss_notification' ) ) {
305
- echo $finalMessage = apply_filters($this->pluginPrefix.'_notification_message','<div class="error wck-serial-notification" >'.$this->notificaitonMessage.'</div>', $this->notificaitonMessage);
306
- }
307
- }
308
-
309
- do_action( $this->pluginPrefix.'_notification_displayed', $current_user, $pagenow, $plugin_serial_status );
310
-
311
- }
312
-
313
- do_action( $this->pluginPrefix.'_after_notification_displayed', $current_user, $pagenow );
314
-
315
- }
316
-
317
- function dismiss_notification() {
318
- global $current_user;
319
-
320
- $user_id = $current_user->ID;
321
-
322
- do_action( $this->pluginPrefix.'_before_notification_dismissed', $current_user );
323
-
324
- // If user clicks to ignore the notice, add that to their user meta
325
- if ( isset( $_GET[$this->pluginPrefix.'_dismiss_notification']) && '0' == $_GET[$this->pluginPrefix.'_dismiss_notification'] )
326
- add_user_meta( $user_id, $this->pluginPrefix.'_dismiss_notification', 'true', true );
327
-
328
- do_action( $this->pluginPrefix.'_after_notification_dismissed', $current_user );
329
- }
330
- }
331
-
332
- // Verify if it's a premium version and display serial notifications
333
- $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
334
- if (file_exists ($wck_premium_update . 'update-checker.php')) {
335
- $wck_serial_status = get_option('wck_serial_status');
336
-
337
- if (file_exists ( WCK_PLUGIN_DIR . '/wordpress-creation-kit-api/wck-fep/wck-fep.php' ))
338
- $wck_version = 'pro';
339
- else
340
- $wck_version = 'hobbyist';
341
-
342
- if ($wck_serial_status == 'notFound' || $wck_serial_status == 'noserial' || $wck_serial_status == '') {
343
- new wck_add_serial_notices('wck', sprintf(__('<p>Your <strong>WordPress Creation Kit</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s of WCK to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>', 'wck'), "<a href='admin.php?page=sas-page'>", "</a>", "<a href='http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-SN-Purchase' target='_blank' class='button-primary'>", "</a>"), 'wck_serial_status');
344
- } elseif ($wck_serial_status == 'expired') {
345
- new wck_add_serial_notices('wck_expired', sprintf(__('<p style="position:relative;">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %5$sDismiss%6$s</p>', 'wck'), "<a href='http://www.cozmoslabs.com/downloads/wordpress-creation-kit-".$wck_version."-yearly-renewal/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal' target='_blank'>", "</a>", "<a href='". esc_url( "http://www.cozmoslabs.com/downloads/wordpress-creation-kit-".$wck_version."-yearly-renewal/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal") ."' target='_blank' class='button-primary'>", "</a>", "<a href='" . esc_url( add_query_arg('wck_expired_dismiss_notification', '0') ) . "' class='wck-dismiss-notification' style='position:absolute; right:0px; top:50%; margin-top:-7px;'>", "</a>"), 'wck_serial_status');
346
- } elseif (strpos($wck_serial_status, 'aboutToExpire') === 0) {
347
- $serial_status_parts = explode( '#', $wck_serial_status );
348
- $date = $serial_status_parts[1];
349
- new wck_add_serial_notices('wck_about_to_expire', sprintf(__('<p style="position:relative;">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now and get 40&#37; off %4$s %6$sDismiss%7$s</p>', 'wck'), "<a href='http://www.cozmoslabs.com/downloads/wordpress-creation-kit-".$wck_version."-yearly-renewal/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal'>", "</a>", "<a href='". esc_url( "http://www.cozmoslabs.com/downloads/wordpress-creation-kit-".$wck_version."-yearly-renewal/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal" ) ."' target='_blank' class='button-primary'>", "</a>", $date, "<a href='" . esc_url( add_query_arg('wck_about_to_expire_dismiss_notification', '0') ) . "' class='wck-dismiss-notification' style='position:absolute; right:0px; top:50%; margin-top:-7px;'>", "</a>"), 'wck_serial_status');
350
- }
351
-
352
- /* change serial field type to password */
353
- add_filter( 'wck_text_input_type_attribute_wck_serial_serial-number', 'wck_sas_change_serial_field_type' );
354
- function wck_sas_change_serial_field_type( $type ){
355
- return 'password';
356
- }
357
-
358
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Start and settings page */
3
+
4
+ /* Add Scripts */
5
+ add_action('admin_enqueue_scripts', 'wck_sas_print_scripts' );
6
+ function wck_sas_print_scripts($hook){
7
+ if( 'wck_page_sas-page' == $hook ){
8
+ wp_register_style('wck-sas-css', plugins_url('/css/wck-sas.css', __FILE__));
9
+ wp_enqueue_style('wck-sas-css');
10
+ }
11
+ }
12
+
13
+ /* Create the WCK "Start & Settings" Page only for admins ( 'capability' => 'edit_theme_options' ) */
14
+ $args = array(
15
+ 'page_title' => __( 'Start Here & General Settings', 'wck' ),
16
+ 'menu_title' => __( 'Start and Settings', 'wck' ),
17
+ 'capability' => 'edit_theme_options',
18
+ 'menu_slug' => 'sas-page',
19
+ 'page_type' => 'submenu_page',
20
+ 'parent_slug' => 'wck-page',
21
+ 'priority' => 7,
22
+ 'page_icon' => plugins_url('/images/wck-32x32.png', __FILE__)
23
+ );
24
+ $sas_page = new WCK_Page_Creator( $args );
25
+
26
+ /* create the meta box only for admins ( 'capability' => 'edit_theme_options' ) */
27
+ add_action( 'init', 'wck_sas_create_box', 11 );
28
+ function wck_sas_create_box(){
29
+
30
+ if( is_admin() && current_user_can( 'edit_theme_options' ) ){
31
+
32
+ /* set up the fields array */
33
+ $sas_serial_fields = array(
34
+ array( 'type' => 'text', 'title' => __( 'Serial Number', 'wck' ), 'slug' => 'serial-number', 'description' => __( 'Please enter your serial number. (e.g. WCKPRO-11-SN-251r55baa4fbe7bf595b2aabb8d72985)', 'wck' ), 'required' => true )
35
+ );
36
+
37
+ /* set up the box arguments */
38
+ $args = array(
39
+ 'metabox_id' => 'option_page',
40
+ 'metabox_title' => __( 'Register Your Version', 'wck' ),
41
+ 'post_type' => 'sas-page',
42
+ 'meta_name' => 'wck_serial',
43
+ 'meta_array' => $sas_serial_fields,
44
+ 'context' => 'option',
45
+ 'single' => true,
46
+ 'sortable' => false
47
+ );
48
+
49
+ /* create the box */
50
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
51
+ if (file_exists ($wck_premium_update . 'update-checker.php'))
52
+ new Wordpress_Creation_Kit( $args );
53
+
54
+ /* set up the tools array */
55
+ $sas_tools_activate = array(
56
+ array( 'type' => 'radio', 'title' => __( 'Custom Fields Creator', 'wck' ), 'slug' => 'custom-fields-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
57
+ array( 'type' => 'radio', 'title' => __( 'Custom Post Type Creator', 'wck' ), 'slug' => 'custom-post-type-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
58
+ array( 'type' => 'radio', 'title' => __( 'Custom Taxonomy Creator', 'wck' ), 'slug' => 'custom-taxonomy-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' ),
59
+ );
60
+ if( file_exists( dirname(__FILE__).'/wck-fep.php' ) )
61
+ $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Frontend Posting', 'wck' ), 'slug' => 'frontend-posting', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
62
+ if( file_exists( dirname(__FILE__).'/wck-opc.php' ) )
63
+ $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Option Pages Creator', 'wck' ), 'slug' => 'option-pages-creator', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
64
+ if( file_exists( dirname(__FILE__).'/wck-stp.php' ) )
65
+ $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Swift Templates', 'wck' ), 'slug' => 'swift-templates', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
66
+ if( !file_exists( dirname(__FILE__).'/wck-stp.php' ) && !file_exists( dirname(__FILE__).'/wck-fep.php' ) )
67
+ $sas_tools_activate[] = array( 'type' => 'radio', 'title' => __( 'Swift Templates and Front End Posting', 'wck' ), 'slug' => 'swift-templates-and-front-end-posting', 'options' => array( 'enabled', 'disabled' ), 'default' => 'enabled' );
68
+
69
+ /* set up the box arguments */
70
+ $args = array(
71
+ 'metabox_id' => 'wck_tools_activate',
72
+ 'metabox_title' => __( 'WordPress Creation Kit Tools: enable or disable the tools you want', 'wck' ),
73
+ 'post_type' => 'sas-page',
74
+ 'meta_name' => 'wck_tools',
75
+ 'meta_array' => $sas_tools_activate,
76
+ 'context' => 'option',
77
+ 'single' => true
78
+ );
79
+
80
+ /* create the box */
81
+ new Wordpress_Creation_Kit( $args );
82
+
83
+
84
+ /* set up the extra settings array */
85
+ $sas_extra_options = array();
86
+
87
+ if( file_exists( dirname( __FILE__ ) . '/wordpress-creation-kit-api/fields/map.php' ) )
88
+ $sas_extra_options[] = array( 'type' => 'text', 'title' => __( 'Google Maps API', 'wck' ), 'description' => __( 'Enter your Google Maps API key ( <a href="https://console.developers.google.com/flows/enableapi?apiid=maps_backend" target="_blank">Get your API key</a> )', 'wck' ), 'required' => false );
89
+
90
+ /* if there are extra options add the box */
91
+ if( !empty( $sas_extra_options ) ) {
92
+
93
+ /* set up the box arguments */
94
+ $args = array(
95
+ 'metabox_id' => 'wck_extra_options',
96
+ 'metabox_title' => __( 'Extra Settings', 'wck' ),
97
+ 'post_type' => 'sas-page',
98
+ 'meta_name' => 'wck_extra_options',
99
+ 'meta_array' => $sas_extra_options,
100
+ 'context' => 'option',
101
+ 'single' => true,
102
+ 'sortable' => false
103
+ );
104
+
105
+ /* create the box */
106
+ if (file_exists ($wck_premium_update . 'update-checker.php'))
107
+ new Wordpress_Creation_Kit( $args );
108
+
109
+ }
110
+
111
+ }
112
+ }
113
+
114
+ /* Add the welcoming text on WCK Start and Settings Page */
115
+ add_action( 'wck_before_meta_boxes', 'wck_sas_welcome');
116
+ function wck_sas_welcome($hook){
117
+ if('wck_page_sas-page' == $hook ){
118
+ $plugin_path = dirname( __FILE__ ) . '/wck.php';
119
+ $default_plugin_headers = get_plugin_data($plugin_path);
120
+ $plugin_name = $default_plugin_headers['Name'];
121
+ $plugin_version = $default_plugin_headers['Version'];
122
+ $plugin_name_class = ( strpos( strtolower($plugin_name), 'pro' ) !== false ? 'Pro' : ( strpos( strtolower($plugin_name), 'hobbyist' ) !== false ? 'Hobbyist' : 'Free' ) );
123
+
124
+ if( version_compare(PHP_VERSION, '5.3.0') < 0 ) { ?>
125
+ <div class="notice-error notice">
126
+ <p>
127
+ <?php _e('<strong>You are using a very old version of PHP</strong> (5.2.x or older) which has serious security and performance issues. Please ask your hoster to provide you with an upgrade path to 5.6 or 7.0','wck'); ?>
128
+ </p>
129
+ </div>
130
+ <?php }
131
+ ?>
132
+ <div class="wrap about-wrap">
133
+ <div class="wck-badge <?php echo $plugin_name_class; ?>"><span><?php printf( __( 'Version %s' ), $plugin_version ); ?></span></div>
134
+ <h1><?php printf( __( 'Welcome to %s', 'wck' ), $plugin_name ); ?></h1>
135
+ <div class="about-text"><?php _e( 'WCK helps you create <strong>repeater custom fields, custom post types</strong> and <strong>taxonomies</strong> in just a couple of clicks, directly from the WordPress admin interface. WCK content types will improve the usability of the sites you build, making them easy to manage by your clients. ', 'wck' ); ?></div>
136
+ </div>
137
+
138
+ <?php
139
+ }
140
+ }
141
+
142
+ /* Add the Quick Start-Up Guide text on WCK Start and Settings Page */
143
+ add_action( 'wck_after_meta_boxes', 'wck_sas_quickintro', 12);
144
+ function wck_sas_quickintro($hook){
145
+ if('wck_page_sas-page' == $hook ){
146
+ ?>
147
+
148
+
149
+
150
+ <div class="wrap about-wrap" style="clear:both;">
151
+
152
+ <div>
153
+ <div style="float:right">
154
+ <a href="https://wordpress.org/plugins/translatepress-multilingual/" target="_blank"><img src="<?php echo plugins_url( './images/pb-trp-cross-promotion.png', __FILE__ ); ?>" alt="TranslatePress Logo"/></a>
155
+ </div>
156
+ <div>
157
+ <h3>Easily translate your entire WordPress website</h3>
158
+ <p>Translate your Custom Post Types and Custom Fields with a WordPress translation plugin that anyone can use.</p>
159
+ <p>It offers a simpler way to translate WordPress sites, with full support for WooCommerce and site builders.</p>
160
+ <p><a href="https://wordpress.org/plugins/translatepress-multilingual/" class="button" target="_blank">Find out how</a></p>
161
+
162
+ </div>
163
+ </div>
164
+
165
+
166
+ <div class="changelog">
167
+ <h2><?php _e( 'Quick Start-Up Guide', 'wck' ); ?></h2>
168
+
169
+ <div class="feature-section">
170
+
171
+ <h4><?php _e( 'Custom Fields Creator', 'wck' ); ?></h4>
172
+ <p><?php _e( 'WordPress Creation Kit Pro has support for a wide list of custom fields: WYSIWYG Editor, Upload Field, Date, User, Country, Text Input, Textarea, Drop-Down, Select, Checkboxes, Radio Buttons', 'wck' ); ?></p>
173
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Fields_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
174
+
175
+ <h4><?php _e( 'Post Type Creator', 'wck' ); ?></h4>
176
+ <p><?php _e( 'Create & manage all your custom content types', 'wck' ); ?></p>
177
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Post_Type_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
178
+
179
+ <h4><?php _e( 'Taxonomy Creator', 'wck' ); ?></h4>
180
+ <p><?php _e( 'Create new taxonomies for filtering your content', 'wck' ); ?></p>
181
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Custom_Taxonomy_Creator" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
182
+
183
+ <h4><?php _e( 'Swift Templates (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
184
+ <p><?php _e( 'Build your front-end templates directly from the WordPress admin UI, without writing any PHP code.', 'wck' ); ?></p>
185
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/#Swift_Templates" target="_blank">here</a> on how to easily display registered custom post types, custom fields and taxonomies in your theme.', 'wck' ); ?></p>
186
+
187
+ <h4><?php _e( 'Front-End Posting (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
188
+ <p><?php _e( 'Create and edit posts/pages or custom posts directly from the front-end.', 'wck' ); ?></p>
189
+ <p><?php _e( 'Available shortcodes:', 'wck' ); ?></p>
190
+ <ul>
191
+ <li><?php _e( '[fep form_name="front-end-post-name"] - displays your form in the front-end', 'wck' ); ?></li>
192
+ <li><?php _e( '[fep-dashboard] - the quick-dashboard allows: simple profile updates, editing/deletion of posts, pages and custom post types.', 'wck' ); ?></li>
193
+ <li><?php _e( '[fep-lilo] - login/logout/register widget with the simple usage of a shortcode. Can be added in a page or text widget.', 'wck' ); ?></li>
194
+ </ul>
195
+ <p><?php _e( 'Access documentation <a href="http://www.cozmoslabs.com/docs/wordpress-creation-kit-documentation/frontend-posting/" target="_blank">here</a> about how to display them in your templates.', 'wck' ); ?></p>
196
+
197
+ <h4><?php _e( 'Option Pages (available in the <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=wpbackend&utm_medium=clientsite&utm_campaign=WCKFree-SAS" target="_blank">PRO</a> version)', 'wck' ); ?></h4>
198
+ <p><?php _e( 'The Options Page Creator Allows you to create a new menu item called "Options"(for example) which can hold advanced custom field groups. Perfect for theme options or a simple UI for your custom plugin (like a simple testimonials section in the front-end).', 'wck' ); ?></p>
199
+
200
+ </div>
201
+ </div>
202
+ </div>
203
+
204
+ <?php
205
+ }
206
+ }
207
+
208
+ /* Notify user of when he enters his serial number.
209
+ * Also Check if serial is valid on meta_name creation and update
210
+ */
211
+ add_action( "wck_after_add_form_wck_serial_element_0", 'wck_sas_serial_notification' );
212
+ function wck_sas_serial_notification(){
213
+
214
+ wck_sas_check_serial_number();
215
+ $status = get_option('wck_serial_status');
216
+
217
+ if ( $status == 'noserial') $notif = '<p class="serial-notification red">' . __( 'Please enter your serial number to receive access to automatic updates and support. Need a license key? <a href="http://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-SN-Purchase" target="_blank">Get One Here</a>.', 'wck' ) . ' </p>';
218
+
219
+ if ( $status == 'serverDown') $notif = '<p class="serial-notification yellow">' . __( 'Oops! Our serial verification server is down. Please try again later.', 'wck' ) . ' </p>';
220
+
221
+ if ( $status == 'notFound') $notif = '<p class="serial-notification red">' . __( 'Oops! It seems the serial number you entered was not found in our database. To find out what\'s your serial number log-in to <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank">your account page</a> over at Cozmoslabs.com', 'wck' ) . ' </p>';
222
+
223
+ if ( $status == 'found') $notif = '<p class="serial-notification green">' . __( 'Wohoo! Your serial number is valid and you have access to automatic updates.', 'wck' ) . ' </p>';
224
+
225
+ if ( $status == 'expired') $notif = '<p class="serial-notification red">' . __( 'It seems your serial number has <strong>expired</strong>. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank"><strong>your account page</strong></a>.', 'wck' ) . ' </p>';
226
+
227
+ if ( strpos( $status, 'about' ) === 0 ) $notif = '<p class="serial-notification yellow">' . __( 'Your WordPress Creation Kit serial number is about to expire. To continue receiving access to product downloads, automatic updates and support please update your serial number for another year from <a href="http://www.cozmoslabs.com/account/?utm_source=WCK-sas&utm_medium=dashboard&utm_campaign=WCK-Renewal" target="_blank"><strong>your account page</strong></a>.', 'wck' ) . ' </p>';
228
+
229
+ if( !empty( $notif ) )
230
+ echo $notif;
231
+ }
232
+
233
+ /* Check if serial is valid on Start and Settings page load.
234
+ * We're tying to the admin_enque_scripts because it returns the current page $hook
235
+ */
236
+ add_action( 'admin_enqueue_scripts', 'wck_retest_serial_on_load');
237
+ function wck_retest_serial_on_load($hook){
238
+ if('wck_page_sas-page' == $hook )
239
+ wck_sas_check_serial_number();
240
+ }
241
+
242
+ /* Checks local serial number against our serial-number database. */
243
+ function wck_sas_check_serial_number(){
244
+ // take into account the Free version doesn't need an update check and serial.
245
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
246
+ if (!file_exists($wck_premium_update . 'update-checker.php'))
247
+ return;
248
+
249
+ $serial = get_option('wck_serial');
250
+ if( !empty( $serial[0] ) )
251
+ $serial = urlencode( $serial[0]['serial-number'] );
252
+ if(empty($serial) || $serial == '') {
253
+ update_option( 'wck_serial_status', 'noserial' ); //server down
254
+ } else {
255
+ $response = wp_remote_get( 'http://updatemetadata.cozmoslabs.com/checkserial/?serialNumberSent='.$serial );
256
+
257
+ if (is_wp_error($response)){
258
+ update_option( 'wck_serial_status', 'serverDown' ); //server down
259
+
260
+ }elseif( (trim($response['body']) != 'notFound') && (trim($response['body']) != 'found') && (trim($response['body']) != 'expired') && strpos( trim($response['body']), 'aboutToExpire') === false ){
261
+ update_option( 'wck_serial_status', 'serverDown' ); //unknown response parameter
262
+ }else{
263
+ update_option( 'wck_serial_status', trim($response['body']) ); //either found, notFound or expired
264
+ }
265
+ }
266
+ }
267
+
268
+ /**
269
+ * Class that adds a notice when either the serial number wasn't found, or it has expired
270
+ *
271
+ * @since v.2.1.1
272
+ *
273
+ * @return void
274
+ */
275
+ class wck_add_serial_notices{
276
+ public $pluginPrefix = '';
277
+ public $notificaitonMessage = '';
278
+ public $pluginSerialStatus = '';
279
+
280
+ function __construct( $pluginPrefix, $notificaitonMessage, $pluginSerialStatus ){
281
+ $this->pluginPrefix = $pluginPrefix;
282
+ $this->notificaitonMessage = $notificaitonMessage;
283
+ $this->pluginSerialStatus = $pluginSerialStatus;
284
+
285
+ add_action( 'admin_notices', array( $this, 'add_admin_notice' ) );
286
+ add_action( 'admin_init', array( $this, 'dismiss_notification' ) );
287
+ }
288
+
289
+
290
+ // Display a notice that can be dismissed in case the serial number is inactive
291
+ function add_admin_notice() {
292
+ global $current_user ;
293
+ global $pagenow;
294
+
295
+ $user_id = $current_user->ID;
296
+
297
+ do_action( $this->pluginPrefix.'_before_notification_displayed', $current_user, $pagenow );
298
+
299
+ if ( current_user_can( 'manage_options' ) ){
300
+
301
+ $plugin_serial_status = get_option( $this->pluginSerialStatus );
302
+ if ( $plugin_serial_status != 'found' ){
303
+
304
+ //we want to show the expiration notice on our plugin pages even if the user dismissed it on the rest of the site
305
+ $force_show = false;
306
+ if ( $plugin_serial_status == 'expired' ) {
307
+ $notification_instance = WCK_Plugin_Notifications::get_instance();
308
+ if ($notification_instance->is_plugin_page()) {
309
+ $force_show = true;
310
+ }
311
+ }
312
+
313
+ // Check that the user hasn't already clicked to ignore the message
314
+ if ( ! get_user_meta($user_id, $this->pluginPrefix.'_dismiss_notification' ) || $force_show ) {
315
+ echo $finalMessage = apply_filters($this->pluginPrefix.'_notification_message','<div class="error wck-serial-notification" >'.$this->notificaitonMessage.'</div>', $this->notificaitonMessage);
316
+ }
317
+ }
318
+
319
+ do_action( $this->pluginPrefix.'_notification_displayed', $current_user, $pagenow, $plugin_serial_status );
320
+
321
+ }
322
+
323
+ do_action( $this->pluginPrefix.'_after_notification_displayed', $current_user, $pagenow );
324
+
325
+ }
326
+
327
+ function dismiss_notification() {
328
+ global $current_user;
329
+
330
+ $user_id = $current_user->ID;
331
+
332
+ do_action( $this->pluginPrefix.'_before_notification_dismissed', $current_user );
333
+
334
+ // If user clicks to ignore the notice, add that to their user meta
335
+ if ( isset( $_GET[$this->pluginPrefix.'_dismiss_notification']) && '0' == $_GET[$this->pluginPrefix.'_dismiss_notification'] )
336
+ add_user_meta( $user_id, $this->pluginPrefix.'_dismiss_notification', 'true', true );
337
+
338
+ do_action( $this->pluginPrefix.'_after_notification_dismissed', $current_user );
339
+ }
340
+ }
341
+
342
+ // Verify if it's a premium version and display serial notifications
343
+ $wck_premium_update = WCK_PLUGIN_DIR.'/update/';
344
+ if (file_exists ($wck_premium_update . 'update-checker.php')) {
345
+ $wck_serial_status = get_option('wck_serial_status');
346
+
347
+ if (file_exists ( WCK_PLUGIN_DIR . '/wordpress-creation-kit-api/wck-fep/wck-fep.php' ))
348
+ $wck_version = 'pro';
349
+ else
350
+ $wck_version = 'hobbyist';
351
+
352
+ if ($wck_serial_status == 'notFound' || $wck_serial_status == 'noserial' || $wck_serial_status == '') {
353
+ new wck_add_serial_notices('wck', sprintf(__('<p>Your <strong>WordPress Creation Kit</strong> serial number is invalid or missing. <br/>Please %1$sregister your copy%2$s of WCK to receive access to automatic updates and support. Need a license key? %3$sPurchase one now%4$s</p>', 'wck'), "<a href='admin.php?page=sas-page'>", "</a>", "<a href='https://www.cozmoslabs.com/wck-custom-fields-custom-post-types-plugin/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-SN-Purchase' target='_blank' class='button-primary'>", "</a>"), 'wck_serial_status');
354
+ } elseif ($wck_serial_status == 'expired') {
355
+ /* on our plugin pages do not add the dismiss button for the expired notification*/
356
+ $wck_notifications = WCK_Plugin_Notifications::get_instance();
357
+ if( $wck_notifications->is_plugin_page() )
358
+ $message = __('<p style="position:relative;">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s</p>', 'wck');
359
+ else
360
+ $message = __('<p style="position:relative;">Your <strong>WordPress Creation Kit</strong> licence has expired. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %5$sDismiss%6$s</p>', 'wck');
361
+ new wck_add_serial_notices('wck_expired', sprintf( $message, "<a href='https://www.cozmoslabs.com/account/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal' target='_blank'>", "</a>", "<a href='". esc_url( "https://www.cozmoslabs.com/account/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal") ."' target='_blank' class='button-primary'>", "</a>", "<a href='" . esc_url( add_query_arg('wck_expired_dismiss_notification', '0') ) . "' class='wck-dismiss-notification' style='position:absolute; right:0px; top:50%; margin-top:-7px;'>", "</a>"), 'wck_serial_status');
362
+ } elseif (strpos($wck_serial_status, 'aboutToExpire') === 0) {
363
+ $serial_status_parts = explode( '#', $wck_serial_status );
364
+ $date = $serial_status_parts[1];
365
+ new wck_add_serial_notices('wck_about_to_expire', sprintf(__('<p style="position:relative;">Your <strong>WordPress Creation Kit</strong> serial number is about to expire on %5$s. <br/>Please %1$sRenew Your Licence%2$s to continue receiving access to product downloads, automatic updates and support. %3$sRenew now %4$s %6$sDismiss%7$s</p>', 'wck'), "<a href='https://www.cozmoslabs.com/account/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal'>", "</a>", "<a href='". esc_url( "https://www.cozmoslabs.com/account/?utm_source=WCK&utm_medium=dashboard&utm_campaign=WCK-Renewal" ) ."' target='_blank' class='button-primary'>", "</a>", $date, "<a href='" . esc_url( add_query_arg('wck_about_to_expire_dismiss_notification', '0') ) . "' class='wck-dismiss-notification' style='position:absolute; right:0px; top:50%; margin-top:-7px;'>", "</a>"), 'wck_serial_status');
366
+ }
367
+
368
+ /* change serial field type to password */
369
+ add_filter( 'wck_text_input_type_attribute_wck_serial_serial-number', 'wck_sas_change_serial_field_type' );
370
+ function wck_sas_change_serial_field_type( $type ){
371
+ return 'password';
372
+ }
373
+
374
+ }
wck-template-api/index.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
  //silence is golden
1
+ <?php
2
  //silence is golden
wck-template-api/wck-field-preprocess.php CHANGED
@@ -1,245 +1,245 @@
1
- <?php
2
- /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
- This program is free software; you can redistribute it and/or modify
4
- it under the terms of the GNU General Public License as published by
5
- the Free Software Foundation; either version 2 of the License, or
6
- (at your option) any later version.
7
- This program is distributed in the hope that it will be useful,
8
- but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- GNU General Public License for more details.
11
- You should have received a copy of the GNU General Public License
12
- along with this program; if not, write to the Free Software
13
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
- */
15
-
16
-
17
- /**
18
- * Preprocess the textarea field types.
19
- * We're converting new lines to <br /> tags
20
- *
21
- * @since 1.1.5
22
- *
23
- * @param string $field The actual field content
24
- * @return string $field The processed field
25
- */
26
- add_filter( 'wck_output_get_field_textarea', 'wck_preprocess_field_textarea', 10 );
27
- function wck_preprocess_field_textarea( $field ){
28
- return nl2br( $field );
29
- }
30
-
31
- /**
32
- * Preprocess the checkbox field types.
33
- * We're returnig an array with the selected checkboxes
34
- *
35
- * @since 1.1.5
36
- *
37
- * @param string $field The actual field content
38
- * @return string $checkbox The processed field
39
- */
40
- add_filter( 'wck_output_get_field_checkbox', 'wck_preprocess_field_checkbox', 10 );
41
- function wck_preprocess_field_checkbox( $field ){
42
- if( !empty( $field ) ){
43
- $checkbox = explode( ', ', $field );
44
- return $checkbox;
45
- }
46
- return array();
47
- }
48
-
49
- /**
50
- * Preprocess the checkbox field types in the the_cfc_field .
51
- * We're returnig a coma separated list with the selected values - not labels
52
- *
53
- * @since 1.1.5
54
- *
55
- * @param string $field The actual field content
56
- * @return string $checkbox The processed field
57
- */
58
- add_filter( 'wck_output_the_field_checkbox', 'wck_preprocess_the_field_checkbox', 10 );
59
- function wck_preprocess_the_field_checkbox( $field ){
60
- if( !empty( $field ) ){
61
- $checkbox_list = implode( ', ', $field );
62
- return $checkbox_list;
63
- }
64
- return '';
65
- }
66
-
67
- /**
68
- * Preprocess the upload field types.
69
- * We're returning an array for images and an object for normal files
70
- *
71
- * @since 1.1.5
72
- *
73
- * @param string $field The actual field content
74
- * @return string $upload The processed field
75
- */
76
- add_filter( 'wck_output_get_field_upload', 'wck_preprocess_field_upload', 10 );
77
- function wck_preprocess_field_upload( $field ){
78
-
79
- if ( $field == '' || !is_numeric( $field ) )
80
- return false;
81
-
82
- if ( is_null( get_post( $field ) ) )
83
- return false;
84
-
85
- $attachment = get_post( $field );
86
-
87
- // create array to hold value data
88
- $value = array(
89
- 'id' => $attachment->ID,
90
- 'alt' => get_post_meta($attachment->ID, '_wp_attachment_image_alt', true),
91
- 'title' => $attachment->post_title,
92
- 'caption' => $attachment->post_excerpt,
93
- 'description' => $attachment->post_content
94
- );
95
-
96
- if ( wp_attachment_is_image( $field ) ) {
97
-
98
- $src = wp_get_attachment_image_src( $attachment->ID, 'full' );
99
-
100
- $value['url'] = $src[0];
101
- $value['width'] = $src[1];
102
- $value['height'] = $src[2];
103
-
104
- // find all image sizes
105
- $image_sizes = get_intermediate_image_sizes();
106
-
107
- if( $image_sizes ) {
108
- foreach( $image_sizes as $image_size ) {
109
- // find src
110
- $src = wp_get_attachment_image_src( $attachment->ID, $image_size );
111
-
112
- // add src
113
- $value[ 'sizes' ][ $image_size ] = $src[0];
114
- $value[ 'sizes' ][ $image_size . '-width' ] = $src[1];
115
- $value[ 'sizes' ][ $image_size . '-height' ] = $src[2];
116
- }
117
- }
118
- } else
119
- $value['url'] = wp_get_attachment_url( $attachment->ID );
120
-
121
- return $value;
122
- }
123
-
124
- /**
125
- * Preprocess the upload field types in the_cfc_field function.
126
- * We're returnig an url.
127
- *
128
- * @since 1.1.5
129
- *
130
- */
131
- add_filter( 'wck_output_the_field_upload', 'wck_preprocess_the_field_upload', 10 );
132
- function wck_preprocess_the_field_upload( $field ){
133
-
134
- if( $field === false ){
135
- return;
136
- }
137
-
138
- if ( is_object( $field ) ){
139
- return $field->guid;
140
- }
141
-
142
- if ( is_array( $field ) ){
143
- return $field['url'];
144
- }
145
-
146
- }
147
-
148
-
149
- /**
150
- * Preprocess the user select field types.
151
- * We're returnig an array with user related information
152
- *
153
- * @since 1.1.5
154
- *
155
- * @param string $field The actual field content
156
- * @return string $user The processed field
157
- */
158
- add_filter( 'wck_output_get_field_user-select', 'wck_preprocess_field_user_select', 10 );
159
- function wck_preprocess_field_user_select( $uid ){
160
- $user_data = get_userdata( $uid );
161
-
162
- if ( $user_data ){
163
- $user_array = array();
164
- $user_array['ID'] = $uid;
165
- $user_array['user_firstname'] = $user_data->user_firstname;
166
- $user_array['user_lastname'] = $user_data->user_lastname;
167
- $user_array['nickname'] = $user_data->nickname;
168
- $user_array['user_nicename'] = $user_data->user_nicename;
169
- $user_array['display_name'] = $user_data->display_name;
170
- $user_array['user_email'] = $user_data->user_email;
171
- $user_array['user_url'] = $user_data->user_url;
172
- $user_array['user_registered'] = $user_data->user_registered;
173
- $user_array['user_description'] = $user_data->user_description;
174
- $user_array['user_avatar'] = get_avatar( $uid );
175
-
176
- return $user_array;
177
-
178
- } else {
179
-
180
- return false;
181
-
182
- }
183
- }
184
-
185
- /**
186
- * Preprocess the user select field types for the_cfc_field.
187
- * We're returnig the Display Name
188
- *
189
- * @since 1.1.5
190
- *
191
- */
192
- add_filter( 'wck_output_the_field_user-select', 'wck_preprocess_the_field_user_select', 10 );
193
- function wck_preprocess_the_field_user_select( $user ){
194
-
195
- if( $user === false ){
196
- return;
197
- }
198
-
199
- if( is_array( $user ) ){
200
- return $user['display_name'];
201
- }
202
-
203
- }
204
-
205
- /**
206
- * Preprocess the cpt select field types.
207
- * We're returnig a post object
208
- *
209
- * @since 1.1.5
210
- *
211
- * @param string $field The actual field content
212
- * @return string $user The processed field
213
- */
214
- add_filter( 'wck_output_get_field_cpt-select', 'wck_preprocess_field_cpt_select', 10 );
215
- function wck_preprocess_field_cpt_select( $id ){
216
-
217
- if ( $id == '' || !is_numeric( $id ) )
218
- return false;
219
-
220
- $post = get_post( $id );
221
- if( is_null( $post ) )
222
- return false;
223
-
224
- return $post;
225
- }
226
-
227
- /**
228
- * Preprocess the cpt select field types for the_cpt_field.
229
- * We're returnig the post title.
230
- *
231
- * @since 1.1.5
232
- *
233
- */
234
- add_filter( 'wck_output_the_field_cpt-select', 'wck_preprocess_the_field_cpt_select', 10 );
235
- function wck_preprocess_the_field_cpt_select( $post ){
236
-
237
- if( $post == false ){
238
- return;
239
- }
240
-
241
- if( is_object( $post ) ){
242
- return $post->post_title;
243
- }
244
-
245
- }
1
+ <?php
2
+ /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
+ This program is free software; you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation; either version 2 of the License, or
6
+ (at your option) any later version.
7
+ This program is distributed in the hope that it will be useful,
8
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ GNU General Public License for more details.
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+ */
15
+
16
+
17
+ /**
18
+ * Preprocess the textarea field types.
19
+ * We're converting new lines to <br /> tags
20
+ *
21
+ * @since 1.1.5
22
+ *
23
+ * @param string $field The actual field content
24
+ * @return string $field The processed field
25
+ */
26
+ add_filter( 'wck_output_get_field_textarea', 'wck_preprocess_field_textarea', 10 );
27
+ function wck_preprocess_field_textarea( $field ){
28
+ return nl2br( $field );
29
+ }
30
+
31
+ /**
32
+ * Preprocess the checkbox field types.
33
+ * We're returnig an array with the selected checkboxes
34
+ *
35
+ * @since 1.1.5
36
+ *
37
+ * @param string $field The actual field content
38
+ * @return string $checkbox The processed field
39
+ */
40
+ add_filter( 'wck_output_get_field_checkbox', 'wck_preprocess_field_checkbox', 10 );
41
+ function wck_preprocess_field_checkbox( $field ){
42
+ if( !empty( $field ) ){
43
+ $checkbox = explode( ', ', $field );
44
+ return $checkbox;
45
+ }
46
+ return array();
47
+ }
48
+
49
+ /**
50
+ * Preprocess the checkbox field types in the the_cfc_field .
51
+ * We're returnig a coma separated list with the selected values - not labels
52
+ *
53
+ * @since 1.1.5
54
+ *
55
+ * @param string $field The actual field content
56
+ * @return string $checkbox The processed field
57
+ */
58
+ add_filter( 'wck_output_the_field_checkbox', 'wck_preprocess_the_field_checkbox', 10 );
59
+ function wck_preprocess_the_field_checkbox( $field ){
60
+ if( !empty( $field ) ){
61
+ $checkbox_list = implode( ', ', $field );
62
+ return $checkbox_list;
63
+ }
64
+ return '';
65
+ }
66
+
67
+ /**
68
+ * Preprocess the upload field types.
69
+ * We're returning an array for images and an object for normal files
70
+ *
71
+ * @since 1.1.5
72
+ *
73
+ * @param string $field The actual field content
74
+ * @return string $upload The processed field
75
+ */
76
+ add_filter( 'wck_output_get_field_upload', 'wck_preprocess_field_upload', 10 );
77
+ function wck_preprocess_field_upload( $field ){
78
+
79
+ if ( $field == '' || !is_numeric( $field ) )
80
+ return false;
81
+
82
+ if ( is_null( get_post( $field ) ) )
83
+ return false;
84
+
85
+ $attachment = get_post( $field );
86
+
87
+ // create array to hold value data
88
+ $value = array(
89
+ 'id' => $attachment->ID,
90
+ 'alt' => get_post_meta($attachment->ID, '_wp_attachment_image_alt', true),
91
+ 'title' => $attachment->post_title,
92
+ 'caption' => $attachment->post_excerpt,
93
+ 'description' => $attachment->post_content
94
+ );
95
+
96
+ if ( wp_attachment_is_image( $field ) ) {
97
+
98
+ $src = wp_get_attachment_image_src( $attachment->ID, 'full' );
99
+
100
+ $value['url'] = $src[0];
101
+ $value['width'] = $src[1];
102
+ $value['height'] = $src[2];
103
+
104
+ // find all image sizes
105
+ $image_sizes = get_intermediate_image_sizes();
106
+
107
+ if( $image_sizes ) {
108
+ foreach( $image_sizes as $image_size ) {
109
+ // find src
110
+ $src = wp_get_attachment_image_src( $attachment->ID, $image_size );
111
+
112
+ // add src
113
+ $value[ 'sizes' ][ $image_size ] = $src[0];
114
+ $value[ 'sizes' ][ $image_size . '-width' ] = $src[1];
115
+ $value[ 'sizes' ][ $image_size . '-height' ] = $src[2];
116
+ }
117
+ }
118
+ } else
119
+ $value['url'] = wp_get_attachment_url( $attachment->ID );
120
+
121
+ return $value;
122
+ }
123
+
124
+ /**
125
+ * Preprocess the upload field types in the_cfc_field function.
126
+ * We're returnig an url.
127
+ *
128
+ * @since 1.1.5
129
+ *
130
+ */
131
+ add_filter( 'wck_output_the_field_upload', 'wck_preprocess_the_field_upload', 10 );
132
+ function wck_preprocess_the_field_upload( $field ){
133
+
134
+ if( $field === false ){
135
+ return;
136
+ }
137
+
138
+ if ( is_object( $field ) ){
139
+ return $field->guid;
140
+ }
141
+
142
+ if ( is_array( $field ) ){
143
+ return $field['url'];
144
+ }
145
+
146
+ }
147
+
148
+
149
+ /**
150
+ * Preprocess the user select field types.
151
+ * We're returnig an array with user related information
152
+ *
153
+ * @since 1.1.5
154
+ *
155
+ * @param string $field The actual field content
156
+ * @return string $user The processed field
157
+ */
158
+ add_filter( 'wck_output_get_field_user-select', 'wck_preprocess_field_user_select', 10 );
159
+ function wck_preprocess_field_user_select( $uid ){
160
+ $user_data = get_userdata( $uid );
161
+
162
+ if ( $user_data ){
163
+ $user_array = array();
164
+ $user_array['ID'] = $uid;
165
+ $user_array['user_firstname'] = $user_data->user_firstname;
166
+ $user_array['user_lastname'] = $user_data->user_lastname;
167
+ $user_array['nickname'] = $user_data->nickname;
168
+ $user_array['user_nicename'] = $user_data->user_nicename;
169
+ $user_array['display_name'] = $user_data->display_name;
170
+ $user_array['user_email'] = $user_data->user_email;
171
+ $user_array['user_url'] = $user_data->user_url;
172
+ $user_array['user_registered'] = $user_data->user_registered;
173
+ $user_array['user_description'] = $user_data->user_description;
174
+ $user_array['user_avatar'] = get_avatar( $uid );
175
+
176
+ return $user_array;
177
+
178
+ } else {
179
+
180
+ return false;
181
+
182
+ }
183
+ }
184
+
185
+ /**
186
+ * Preprocess the user select field types for the_cfc_field.
187
+ * We're returnig the Display Name
188
+ *
189
+ * @since 1.1.5
190
+ *
191
+ */
192
+ add_filter( 'wck_output_the_field_user-select', 'wck_preprocess_the_field_user_select', 10 );
193
+ function wck_preprocess_the_field_user_select( $user ){
194
+
195
+ if( $user === false ){
196
+ return;
197
+ }
198
+
199
+ if( is_array( $user ) ){
200
+ return $user['display_name'];
201
+ }
202
+
203
+ }
204
+
205
+ /**
206
+ * Preprocess the cpt select field types.
207
+ * We're returnig a post object
208
+ *
209
+ * @since 1.1.5
210
+ *
211
+ * @param string $field The actual field content
212
+ * @return string $user The processed field
213
+ */
214
+ add_filter( 'wck_output_get_field_cpt-select', 'wck_preprocess_field_cpt_select', 10 );
215
+ function wck_preprocess_field_cpt_select( $id ){
216
+
217
+ if ( $id == '' || !is_numeric( $id ) )
218
+ return false;
219
+
220
+ $post = get_post( $id );
221
+ if( is_null( $post ) )
222
+ return false;
223
+
224
+ return $post;
225
+ }
226
+
227
+ /**
228
+ * Preprocess the cpt select field types for the_cpt_field.
229
+ * We're returnig the post title.
230
+ *
231
+ * @since 1.1.5
232
+ *
233
+ */
234
+ add_filter( 'wck_output_the_field_cpt-select', 'wck_preprocess_the_field_cpt_select', 10 );
235
+ function wck_preprocess_the_field_cpt_select( $post ){
236
+
237
+ if( $post == false ){
238
+ return;
239
+ }
240
+
241
+ if( is_object( $post ) ){
242
+ return $post->post_title;
243
+ }
244
+
245
+ }
wck-template-api/wck-template-api-class.php CHANGED
@@ -1,135 +1,135 @@
1
- <?php
2
- /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
- This program is free software; you can redistribute it and/or modify
4
- it under the terms of the GNU General Public License as published by
5
- the Free Software Foundation; either version 2 of the License, or
6
- (at your option) any later version.
7
- This program is distributed in the hope that it will be useful,
8
- but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- GNU General Public License for more details.
11
- You should have received a copy of the GNU General Public License
12
- along with this program; if not, write to the Free Software
13
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
- */
15
-
16
- class WCK_Template_API{
17
-
18
- /**
19
- * Helper function for post ID
20
- *
21
- * @post_id
22
- */
23
-
24
- static function get_post_id( $post_id = false ){
25
-
26
- // set post_id to global
27
- if( !$post_id )
28
- {
29
- global $post;
30
-
31
- if( $post )
32
- {
33
- $post_id = $post->ID;
34
- }
35
- }
36
-
37
- // return
38
- return $post_id;
39
- }
40
-
41
-
42
- /**
43
- * Returns the value of a post_meta created with CFC or empty.
44
- *
45
- * @meta_name
46
- * @post_id
47
- */
48
-
49
- static function get_meta( $meta_name = false, $post_id = false ){
50
-
51
- $post_id = WCK_Template_API::get_post_id($post_id);
52
-
53
- $post_meta = get_post_meta( $post_id, $meta_name, true );
54
-
55
- if ( is_array( $post_meta ) )
56
- return $post_meta;
57
-
58
- // get_post_meta with the 3'rd param true returns an empty string if nothing found.
59
- // We'll overwrite that so we get an empty array.
60
- return array();
61
- }
62
-
63
-
64
- /**
65
- * Returns the value of a field from CFC single and repeater.
66
- *
67
- */
68
-
69
- static function get_field( $meta_name = false, $field_name = false, $post_id = false, $key = 0 ){
70
- $post_meta = WCK_Template_API::get_meta( $meta_name, $post_id );
71
-
72
- if ( isset( $post_meta[$key][$field_name] ) ){
73
- $field_type = WCK_Template_API::generate_slug( WCK_Template_API::get_field_type( $meta_name, $field_name ) );
74
-
75
- // use this filter to modify the return var in order to output text, arrays or objects
76
- $output = apply_filters('wck_output_get_field_' . $field_type, $post_meta[$key][$field_name] );
77
-
78
- return $output;
79
- }
80
- return '';
81
- }
82
-
83
- /**
84
- * Find out what type of field the user asks for.
85
- *
86
- */
87
-
88
- static function get_field_type( $meta_name = false, $field_name = false ){
89
-
90
- // get all CFC's
91
- $args = array(
92
- 'post_type' => 'wck-meta-box',
93
- 'posts_per_page' => -1,
94
- 'post_status' => array( 'publish' ),
95
- 'fields' => 'ids',
96
- );
97
- $all_cfc = get_posts( $args );
98
-
99
- foreach( $all_cfc as $post_id ) {
100
- $queried_meta_name = WCK_Template_API::get_meta('wck_cfc_args', $post_id );
101
- if( isset( $queried_meta_name[0]['meta-name'] ) )
102
- $queried_meta_name = $queried_meta_name[0]['meta-name'];
103
- else
104
- $queried_meta_name = '';
105
-
106
- if ( $meta_name == $queried_meta_name ) {
107
- $available_fields = WCK_Template_API::get_meta( 'wck_cfc_fields', $post_id );
108
-
109
- foreach ( $available_fields as $key => $field_data ){
110
- $current_field = WCK_Template_API::generate_slug( $field_data['field-title'] );
111
- if ( $current_field == $field_name ){
112
- return $field_data['field-type'];
113
- }
114
- }
115
- }
116
- }
117
-
118
- return 'text';
119
- }
120
-
121
-
122
- /**
123
- * The function used to generate slugs in WCK
124
- * It's a copy from WCK-API so the template API is stand-alone
125
- *
126
- * @since 1.1.5
127
- *
128
- * @param string $string The input string from which we generate the slug
129
- * @return string $slug The henerated slug
130
- */
131
- static function generate_slug( $string ){
132
- $slug = rawurldecode( sanitize_title_with_dashes( remove_accents( $string ) ) );
133
- return $slug;
134
- }
135
- }
1
+ <?php
2
+ /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
+ This program is free software; you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation; either version 2 of the License, or
6
+ (at your option) any later version.
7
+ This program is distributed in the hope that it will be useful,
8
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ GNU General Public License for more details.
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+ */
15
+
16
+ class WCK_Template_API{
17
+
18
+ /**
19
+ * Helper function for post ID
20
+ *
21
+ * @post_id
22
+ */
23
+
24
+ static function get_post_id( $post_id = false ){
25
+
26
+ // set post_id to global
27
+ if( !$post_id )
28
+ {
29
+ global $post;
30
+
31
+ if( $post )
32
+ {
33
+ $post_id = $post->ID;
34
+ }
35
+ }
36
+
37
+ // return
38
+ return $post_id;
39
+ }
40
+
41
+
42
+ /**
43
+ * Returns the value of a post_meta created with CFC or empty.
44
+ *
45
+ * @meta_name
46
+ * @post_id
47
+ */
48
+
49
+ static function get_meta( $meta_name = false, $post_id = false ){
50
+
51
+ $post_id = WCK_Template_API::get_post_id($post_id);
52
+
53
+ $post_meta = get_post_meta( $post_id, $meta_name, true );
54
+
55
+ if ( is_array( $post_meta ) )
56
+ return $post_meta;
57
+
58
+ // get_post_meta with the 3'rd param true returns an empty string if nothing found.
59
+ // We'll overwrite that so we get an empty array.
60
+ return array();
61
+ }
62
+
63
+
64
+ /**
65
+ * Returns the value of a field from CFC single and repeater.
66
+ *
67
+ */
68
+
69
+ static function get_field( $meta_name = false, $field_name = false, $post_id = false, $key = 0 ){
70
+ $post_meta = WCK_Template_API::get_meta( $meta_name, $post_id );
71
+
72
+ if ( isset( $post_meta[$key][$field_name] ) ){
73
+ $field_type = WCK_Template_API::generate_slug( WCK_Template_API::get_field_type( $meta_name, $field_name ) );
74
+
75
+ // use this filter to modify the return var in order to output text, arrays or objects
76
+ $output = apply_filters('wck_output_get_field_' . $field_type, $post_meta[$key][$field_name] );
77
+
78
+ return $output;
79
+ }
80
+ return '';
81
+ }
82
+
83
+ /**
84
+ * Find out what type of field the user asks for.
85
+ *
86
+ */
87
+
88
+ static function get_field_type( $meta_name = false, $field_name = false ){
89
+
90
+ // get all CFC's
91
+ $args = array(
92
+ 'post_type' => 'wck-meta-box',
93
+ 'posts_per_page' => -1,
94
+ 'post_status' => array( 'publish' ),
95
+ 'fields' => 'ids',
96
+ );
97
+ $all_cfc = get_posts( $args );
98
+
99
+ foreach( $all_cfc as $post_id ) {
100
+ $queried_meta_name = WCK_Template_API::get_meta('wck_cfc_args', $post_id );
101
+ if( isset( $queried_meta_name[0]['meta-name'] ) )
102
+ $queried_meta_name = $queried_meta_name[0]['meta-name'];
103
+ else
104
+ $queried_meta_name = '';
105
+
106
+ if ( $meta_name == $queried_meta_name ) {
107
+ $available_fields = WCK_Template_API::get_meta( 'wck_cfc_fields', $post_id );
108
+
109
+ foreach ( $available_fields as $key => $field_data ){
110
+ $current_field = WCK_Template_API::generate_slug( $field_data['field-title'] );
111
+ if ( $current_field == $field_name ){
112
+ return $field_data['field-type'];
113
+ }
114
+ }
115
+ }
116
+ }
117
+
118
+ return 'text';
119
+ }
120
+
121
+
122
+ /**
123
+ * The function used to generate slugs in WCK
124
+ * It's a copy from WCK-API so the template API is stand-alone
125
+ *
126
+ * @since 1.1.5
127
+ *
128
+ * @param string $string The input string from which we generate the slug
129
+ * @return string $slug The henerated slug
130
+ */
131
+ static function generate_slug( $string ){
132
+ $slug = rawurldecode( sanitize_title_with_dashes( remove_accents( $string ) ) );
133
+ return $slug;
134
+ }
135
+ }
wck-template-api/wck-template-api.php CHANGED
@@ -1,85 +1,85 @@
1
- <?php
2
- /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
- This program is free software; you can redistribute it and/or modify
4
- it under the terms of the GNU General Public License as published by
5
- the Free Software Foundation; either version 2 of the License, or
6
- (at your option) any later version.
7
- This program is distributed in the hope that it will be useful,
8
- but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- GNU General Public License for more details.
11
- You should have received a copy of the GNU General Public License
12
- along with this program; if not, write to the Free Software
13
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
- */
15
-
16
-
17
- // Load the WCK_Template_API class
18
- require_once( 'wck-template-api-class.php' );
19
-
20
- // Load the functions that will preprocess our field data
21
- require_once( 'wck-field-preprocess.php' );
22
-
23
- /**
24
- * Front-end function that returns an entire non-processed post meta
25
- *
26
- * @since 1.1.5
27
- *
28
- */
29
- if( !function_exists( 'get_cfc_meta' ) ){
30
- function get_cfc_meta( $meta_name = false, $post_id = false ){
31
- return WCK_Template_API::get_meta( $meta_name, $post_id );
32
- }
33
- }
34
-
35
- /**
36
- * Front-end function that returns a pre-processed CFC field
37
- *
38
- * @since 1.1.5
39
- *
40
- */
41
- if( !function_exists( 'get_cfc_field' ) ){
42
- function get_cfc_field( $meta_name, $field_name, $post_id = false, $key = 0 ){
43
- return WCK_Template_API::get_field( $meta_name, $field_name, $post_id, $key );
44
- }
45
- }
46
-
47
- /**
48
- * Front-end function that echo out information found inside the field
49
- *
50
- * @since 1.1.5
51
- *
52
- */
53
- if( !function_exists( 'the_cfc_field' ) ){
54
- function the_cfc_field( $meta_name, $field_name, $post_id = false, $key = 0, $do_echo = true ){
55
-
56
- $current_field = WCK_Template_API::get_field( $meta_name, $field_name, $post_id, $key );
57
-
58
- $field_type = WCK_Template_API::generate_slug( WCK_Template_API::get_field_type( $meta_name, $field_name ) );
59
-
60
- // use this filter to modify the return var in order to output text, links or urls
61
- $current_field = apply_filters('wck_output_the_field_' . $field_type, $current_field );
62
-
63
- if( $current_field === false ){
64
- return;
65
- }
66
-
67
- // Echoing objects with error out.
68
- // Thus we're echoing an empty string so we don't brake the front-end,
69
- if ( is_object( $current_field ) ){
70
- return;
71
- }
72
-
73
- // Echoing arrays will echo 'Array'.
74
- // Thus we're echoing an empty string so we don't brake the front-end.
75
- if ( is_array( $current_field ) ){
76
- return;
77
- }
78
-
79
- if ( $do_echo ){
80
- echo $current_field;
81
- } else {
82
- return $current_field;
83
- }
84
- }
85
- }
1
+ <?php
2
+ /* Copyright 2013 cozmoslabs.com (email : hello@cozmoslabs.com)
3
+ This program is free software; you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation; either version 2 of the License, or
6
+ (at your option) any later version.
7
+ This program is distributed in the hope that it will be useful,
8
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
+ GNU General Public License for more details.
11
+ You should have received a copy of the GNU General Public License
12
+ along with this program; if not, write to the Free Software
13
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
14
+ */
15
+
16
+
17
+ // Load the WCK_Template_API class
18
+ require_once( 'wck-template-api-class.php' );
19
+
20
+ // Load the functions that will preprocess our field data
21
+ require_once( 'wck-field-preprocess.php' );
22
+
23
+ /**
24
+ * Front-end function that returns an entire non-processed post meta
25
+ *
26
+ * @since 1.1.5
27
+ *
28
+ */
29
+ if( !function_exists( 'get_cfc_meta' ) ){
30
+ function get_cfc_meta( $meta_name = false, $post_id = false ){
31
+ return WCK_Template_API::get_meta( $meta_name, $post_id );
32
+ }
33
+ }
34
+
35
+ /**
36
+ * Front-end function that returns a pre-processed CFC field
37
+ *
38
+ * @since 1.1.5
39
+ *
40
+ */
41
+ if( !function_exists( 'get_cfc_field' ) ){
42
+ function get_cfc_field( $meta_name, $field_name, $post_id = false, $key = 0 ){
43
+ return WCK_Template_API::get_field( $meta_name, $field_name, $post_id, $key );
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Front-end function that echo out information found inside the field
49
+ *
50
+ * @since 1.1.5
51
+ *
52
+ */
53
+ if( !function_exists( 'the_cfc_field' ) ){
54
+ function the_cfc_field( $meta_name, $field_name, $post_id = false, $key = 0, $do_echo = true ){
55
+
56
+ $current_field = WCK_Template_API::get_field( $meta_name, $field_name, $post_id, $key );
57
+
58
+ $field_type = WCK_Template_API::generate_slug( WCK_Template_API::get_field_type( $meta_name, $field_name ) );
59
+
60
+ // use this filter to modify the return var in order to output text, links or urls
61
+ $current_field = apply_filters('wck_output_the_field_' . $field_type, $current_field );
62
+
63
+ if( $current_field === false ){
64
+ return;
65
+ }
66
+
67
+ // Echoing objects with error out.
68
+ // Thus we're echoing an empty string so we don't brake the front-end,
69
+ if ( is_object( $current_field ) ){
70
+ return;
71
+ }
72
+
73
+ // Echoing arrays will echo 'Array'.
74
+ // Thus we're echoing an empty string so we don't brake the front-end.
75
+ if ( is_array( $current_field ) ){
76
+ return;
77
+ }
78
+
79
+ if ( $do_echo ){
80
+ echo $current_field;
81
+ } else {
82
+ return $current_field;
83
+ }
84
+ }
85
+ }
wck.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Cozmoslabs, Madalin Ungureanu, Cristian Antohe
6
- Version: 2.2.4
7
  Author URI: http://www.cozmoslabs.com
8
  Text Domain: wck
9
  Domain Path: /languages
@@ -28,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28
 
29
  define( 'WCK_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
30
  define( 'WCK_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
31
- define( 'WCK_PLUGIN_VERSION', '2.5.8' );
32
 
33
  /* ready for localization */
34
  $current_theme = wp_get_theme();
3
  Plugin Name: WCK - Custom Fields and Custom Post Types Creator
4
  Description: WordPress Creation Kit consists of three tools that can help you create and maintain custom post types, custom taxonomies and most importantly, custom fields and metaboxes for your posts, pages or CPT's.
5
  Author: Cozmoslabs, Madalin Ungureanu, Cristian Antohe
6
+ Version: 2.2.5
7
  Author URI: http://www.cozmoslabs.com
8
  Text Domain: wck
9
  Domain Path: /languages
28
 
29
  define( 'WCK_PLUGIN_DIR', WP_PLUGIN_DIR . '/' . dirname( plugin_basename( __FILE__ ) ) );
30
  define( 'WCK_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
31
+ define( 'WCK_PLUGIN_VERSION', '2.6.0' );
32
 
33
  /* ready for localization */
34
  $current_theme = wp_get_theme();
wordpress-creation-kit-api/assets/colorpicker/colorpicker.css CHANGED
@@ -1,4 +1,4 @@
1
- .iris-picker {
2
- z-index: 999 !important;
3
- position: absolute !important;
4
  }
1
+ .iris-picker {
2
+ z-index: 999 !important;
3
+ position: absolute !important;
4
  }
wordpress-creation-kit-api/assets/currency/currency-select.php CHANGED
@@ -1,313 +1,313 @@
1
- <?php
2
-
3
- /*
4
- * Array with the currency ISO code and associated currency name
5
- *
6
- * @return array
7
- *
8
- */
9
- function wck_get_currencies() {
10
-
11
- $currencies = array(
12
- 'ALL' => __( 'Albania Lek', 'wck' ),
13
- 'AFN' => __( 'Afghanistan Afghani', 'wck' ),
14
- 'ARS' => __( 'Argentina Peso', 'wck' ),
15
- 'AWG' => __( 'Aruba Guilder', 'wkc' ),
16
- 'AUD' => __( 'Australia Dollar', 'wck' ),
17
- 'AZN' => __( 'Azerbaijan New Manat', 'wck' ),
18
- 'BSD' => __( 'Bahamas Dollar', 'wck' ),
19
- 'BBD' => __( 'Barbados Dollar','wck' ),
20
- 'BDT' => __( 'Bangladeshi taka','wck' ),
21
- 'BYR' => __( 'Belarus Ruble','wck' ),
22
- 'BZD' => __( 'Belize Dollar','wck' ),
23
- 'BMD' => __( 'Bermuda Dollar','wck' ),
24
- 'BOB' => __( 'Bolivia Boliviano','wck' ),
25
- 'BAM' => __( 'Bosnia and Herzegovina Convertible Marka','wck' ),
26
- 'BWP' => __( 'Botswana Pula','wck' ),
27
- 'BGN' => __( 'Bulgaria Lev','wck' ),
28
- 'BRL' => __( 'Brazil Real','wck' ),
29
- 'BND' => __( 'Brunei Darussalam Dollar','wck' ),
30
- 'KHR' => __( 'Cambodia Riel','wck' ),
31
- 'CAD' => __( 'Canada Dollar','wck' ),
32
- 'KYD' => __( 'Cayman Islands Dollar','wck' ),
33
- 'CLP' => __( 'Chile Peso','wck' ),
34
- 'CNY' => __( 'China Yuan Renminbi','wck' ),
35
- 'COP' => __( 'Colombia Peso','wck' ),
36
- 'CRC' => __( 'Costa Rica Colon','wck' ),
37
- 'HRK' => __( 'Croatia Kuna','wck' ),
38
- 'CUP' => __( 'Cuba Peso','wck' ),
39
- 'CZK' => __( 'Czech Republic Koruna','wck' ),
40
- 'DKK' => __( 'Denmark Krone','wck' ),
41
- 'DOP' => __( 'Dominican Republic Peso','wck' ),
42
- 'XCD' => __( 'East Caribbean Dollar','wck' ),
43
- 'EGP' => __( 'Egypt Pound','wck' ),
44
- 'SVC' => __( 'El Salvador Colon','wck' ),
45
- 'EEK' => __( 'Estonia Kroon','wck' ),
46
- 'EUR' => __( 'Euro','wck' ),
47
- 'FKP' => __( 'Falkland Islands (Malvinas) Pound','wck' ),
48
- 'FJD' => __( 'Fiji Dollar','wck' ),
49
- 'GHC' => __( 'Ghana Cedis','wck' ),
50
- 'GIP' => __( 'Gibraltar Pound','wck' ),
51
- 'GTQ' => __( 'Guatemala Quetzal','wck' ),
52
- 'GGP' => __( 'Guernsey Pound','wck' ),
53
- 'GYD' => __( 'Guyana Dollar','wck' ),
54
- 'HNL' => __( 'Honduras Lempira','wck' ),
55
- 'HKD' => __( 'Hong Kong Dollar','wck' ),
56
- 'HUF' => __( 'Hungary Forint','wck' ),
57
- 'ISK' => __( 'Iceland Krona','wck' ),
58
- 'INR' => __( 'India Rupee','wck' ),
59
- 'IDR' => __( 'Indonesia Rupiah','wck' ),
60
- 'IRR' => __( 'Iran Rial','wck' ),
61
- 'IMP' => __( 'Isle of Man Pound','wck' ),
62
- 'ILS' => __( 'Israel Shekel','wck' ),
63
- 'JMD' => __( 'Jamaica Dollar','wck' ),
64
- 'JPY' => __( 'Japan Yen','wck' ),
65
- 'JEP' => __( 'Jersey Pound','wck' ),
66
- 'JOD' => __( 'Jordanian Dinar','wck' ),
67
- 'KZT' => __( 'Kazakhstan Tenge','wck' ),
68
- 'KPW' => __( 'Korea (North) Won','wck' ),
69
- 'KRW' => __( 'Korea (South) Won','wck' ),
70
- 'KGS' => __( 'Kyrgyzstan Som','wck' ),
71
- 'LAK' => __( 'Laos Kip','wck' ),
72
- 'LVL' => __( 'Latvia Lat','wck' ),
73
- 'LBP' => __( 'Lebanon Pound','wck' ),
74
- 'LRD' => __( 'Liberia Dollar','wck' ),
75
- 'LTL' => __( 'Lithuania Litas','wck' ),
76
- 'MOP' => __( 'Macau Pataca','wck' ),
77
- 'MKD' => __( 'Macedonia Denar','wck' ),
78
- 'MYR' => __( 'Malaysia Ringgit','wck' ),
79
- 'MUR' => __( 'Mauritius Rupee','wck' ),
80
- 'MXN' => __( 'Mexico Peso','wck' ),
81
- 'MNT' => __( 'Mongolia Tughrik','wck' ),
82
- 'MZN' => __( 'Mozambique Metical','wck' ),
83
- 'NAD' => __( 'Namibia Dollar','wck' ),
84
- 'NPR' => __( 'Nepal Rupee','wck' ),
85
- 'ANG' => __( 'Netherlands Antilles Guilder','wck' ),
86
- 'NZD' => __( 'New Zealand Dollar','wck' ),
87
- 'NIO' => __( 'Nicaragua Cordoba','wck' ),
88
- 'NGN' => __( 'Nigeria Naira','wck' ),
89
- 'NOK' => __( 'Norway Krone','wck' ),
90
- 'OMR' => __( 'Oman Rial', 'wck' ),
91
- 'PKR' => __( 'Pakistan Rupee', 'wck' ),
92
- 'PAB' => __( 'Panama Balboa', 'wck' ),
93
- 'PYG' => __( 'Paraguay Guarani', 'wck' ),
94
- 'PEN' => __( 'Peru Nuevo Sol', 'wck' ),
95
- 'PHP' => __( 'Philippines Peso', 'wck' ),
96
- 'PLN' => __( 'Poland Zloty', 'wck' ),
97
- 'QAR' => __( 'Qatar Riyal', 'wck' ),
98
- 'RON' => __( 'Romania New Leu', 'wck' ),
99
- 'RUB' => __( 'Russia Ruble', 'wck' ),
100
- 'SHP' => __( 'Saint Helena Pound', 'wck' ),
101
- 'SAR' => __( 'Saudi Arabia Riyal', 'wck' ),
102
- 'RSD' => __( 'Serbia Dinar', 'wck' ),
103
- 'SCR' => __( 'Seychelles Rupee', 'wck' ),
104
- 'SGD' => __( 'Singapore Dollar', 'wck' ),
105
- 'SBD' => __( 'Solomon Islands Dollar', 'wck' ),
106
- 'SOS' => __( 'Somalia Shilling', 'wck' ),
107
- 'ZAR' => __( 'South Africa Rand', 'wck' ),
108
- 'LKR' => __( 'Sri Lanka Rupee', 'wck' ),
109
- 'SEK' => __( 'Sweden Krona', 'wck' ),
110
- 'CHF' => __( 'Switzerland Franc', 'wck' ),
111
- 'SRD' => __( 'Suriname Dollar', 'wck' ),
112
- 'SYP' => __( 'Syria Pound', 'wck' ),
113
- 'TWD' => __( 'Taiwan New Dollar', 'wck' ),
114
- 'THB' => __( 'Thailand Baht', 'wck' ),
115
- 'TTD' => __( 'Trinidad and Tobago Dollar', 'wck' ),
116
- 'TRY' => __( 'Turkey Lira', 'wck' ),
117
- 'TRL' => __( 'Turkey Lira', 'wck' ),
118
- 'TVD' => __( 'Tuvalu Dollar', 'wck' ),
119
- 'UAH' => __( 'Ukraine Hryvna', 'wck' ),
120
- 'GBP' => __( 'United Kingdom Pound', 'wck' ),
121
- 'UGX' => __( 'Uganda Shilling', 'wck' ),
122
- 'USD' => __( 'US Dollar', 'wck' ),
123
- 'UYU' => __( 'Uruguay Peso', 'wck' ),
124
- 'UZS' => __( 'Uzbekistan Som', 'wck' ),
125
- 'VEF' => __( 'Venezuela Bolivar', 'wck' ),
126
- 'VND' => __( 'Viet Nam Dong', 'wck' ),
127
- 'YER' => __( 'Yemen Rial', 'wck' ),
128
- 'ZWD' => __( 'Zimbabwe Dollar', 'wck' )
129
- );
130
-
131
- return apply_filters( 'wck_get_currencies', $currencies );
132
-
133
- }
134
-
135
-
136
- /*
137
- * Returns the currency symbol for a given currency code
138
- *
139
- * @param string $currency_code
140
- *
141
- * @return string
142
- *
143
- */
144
- function wck_get_currency_symbol( $currency_code ) {
145
-
146
- $currency_symbols = array(
147
- 'AED' => '&#1583;.&#1573;', // ?
148
- 'AFN' => '&#65;&#102;',
149
- 'ALL' => '&#76;&#101;&#107;',
150
- 'AMD' => '',
151
- 'ANG' => '&#402;',
152
- 'AOA' => '&#75;&#122;', // ?
153
- 'ARS' => '&#36;',
154
- 'AUD' => '&#36;',
155
- 'AWG' => '&#402;',
156
- 'AZN' => '&#1084;&#1072;&#1085;',
157
- 'BAM' => '&#75;&#77;',
158
- 'BBD' => '&#36;',
159
- 'BDT' => '&#2547;', // ?
160
- 'BGN' => '&#1083;&#1074;',
161
- 'BHD' => '.&#1583;.&#1576;', // ?
162
- 'BIF' => '&#70;&#66;&#117;', // ?
163
- 'BMD' => '&#36;',
164
- 'BND' => '&#36;',
165
- 'BOB' => '&#36;&#98;',
166
- 'BRL' => '&#82;&#36;',
167
- 'BSD' => '&#36;',
168
- 'BTN' => '&#78;&#117;&#46;', // ?
169
- 'BWP' => '&#80;',
170
- 'BYR' => '&#112;&#46;',
171
- 'BZD' => '&#66;&#90;&#36;',
172
- 'CAD' => '&#36;',
173
- 'CDF' => '&#70;&#67;',
174
- 'CHF' => '&#67;&#72;&#70;',
175
- 'CLF' => '', // ?
176
- 'CLP' => '&#36;',
177
- 'CNY' => '&#165;',
178
- 'COP' => '&#36;',
179
- 'CRC' => '&#8353;',
180
- 'CUP' => '&#8396;',
181
- 'CVE' => '&#36;', // ?
182
- 'CZK' => '&#75;&#269;',
183
- 'DJF' => '&#70;&#100;&#106;', // ?
184
- 'DKK' => '&#107;&#114;',
185
- 'DOP' => '&#82;&#68;&#36;',
186
- 'DZD' => '&#1583;&#1580;', // ?
187
- 'EGP' => '&#163;',
188
- 'ETB' => '&#66;&#114;',
189
- 'EUR' => '&#8364;',
190
- 'FJD' => '&#36;',
191
- 'FKP' => '&#163;',
192
- 'GBP' => '&#163;',
193
- 'GEL' => '&#4314;', // ?
194
- 'GHS' => '&#162;',
195
- 'GIP' => '&#163;',
196
- 'GMD' => '&#68;', // ?
197
- 'GNF' => '&#70;&#71;', // ?
198
- 'GTQ' => '&#81;',
199
- 'GYD' => '&#36;',
200
- 'HKD' => '&#36;',
201
- 'HNL' => '&#76;',
202
- 'HRK' => '&#107;&#110;',
203
- 'HTG' => '&#71;', // ?
204
- 'HUF' => '&#70;&#116;',
205
- 'IDR' => '&#82;&#112;',
206
- 'ILS' => '&#8362;',
207
- 'INR' => '&#8377;',
208
- 'IQD' => '&#1593;.&#1583;', // ?
209
- 'IRR' => '&#65020;',
210
- 'ISK' => '&#107;&#114;',
211
- 'JEP' => '&#163;',
212
- 'JMD' => '&#74;&#36;',
213
- 'JOD' => '&#74;&#68;', // ?
214
- 'JPY' => '&#165;',
215
- 'KES' => '&#75;&#83;&#104;', // ?
216
- 'KGS' => '&#1083;&#1074;',
217
- 'KHR' => '&#6107;',
218
- 'KMF' => '&#67;&#70;', // ?
219
- 'KPW' => '&#8361;',
220
- 'KRW' => '&#8361;',
221
- 'KWD' => '&#1583;.&#1603;', // ?
222
- 'KYD' => '&#36;',
223
- 'KZT' => '&#1083;&#1074;',
224
- 'LAK' => '&#8365;',
225
- 'LBP' => '&#163;',
226
- 'LKR' => '&#8360;',
227
- 'LRD' => '&#36;',
228
- 'LSL' => '&#76;', // ?
229
- 'LTL' => '&#76;&#116;',
230
- 'LVL' => '&#76;&#115;',
231
- 'LYD' => '&#1604;.&#1583;', // ?
232
- 'MAD' => '&#1583;.&#1605;.', //?
233
- 'MDL' => '&#76;',
234
- 'MGA' => '&#65;&#114;', // ?
235
- 'MKD' => '&#1076;&#1077;&#1085;',
236
- 'MMK' => '&#75;',
237
- 'MNT' => '&#8366;',
238
- 'MOP' => '&#77;&#79;&#80;&#36;', // ?
239
- 'MRO' => '&#85;&#77;', // ?
240
- 'MUR' => '&#8360;', // ?
241
- 'MVR' => '.&#1923;', // ?
242
- 'MWK' => '&#77;&#75;',
243
- 'MXN' => '&#36;',
244
- 'MYR' => '&#82;&#77;',
245
- 'MZN' => '&#77;&#84;',
246
- 'NAD' => '&#36;',
247
- 'NGN' => '&#8358;',
248
- 'NIO' => '&#67;&#36;',
249
- 'NOK' => '&#107;&#114;',
250
- 'NPR' => '&#8360;',
251
- 'NZD' => '&#36;',
252
- 'OMR' => '&#65020;',
253
- 'PAB' => '&#66;&#47;&#46;',
254
- 'PEN' => '&#83;&#47;&#46;',
255
- 'PGK' => '&#75;', // ?
256
- 'PHP' => '&#8369;',
257
- 'PKR' => '&#8360;',
258
- 'PLN' => '&#122;&#322;',
259
- 'PYG' => '&#71;&#115;',
260
- 'QAR' => '&#65020;',
261
- 'RON' => '&#108;&#101;&#105;',
262
- 'RSD' => '&#1044;&#1080;&#1085;&#46;',
263
- 'RUB' => '&#1088;&#1091;&#1073;',
264
- 'RWF' => '&#1585;.&#1587;',
265
- 'SAR' => '&#65020;',
266
- 'SBD' => '&#36;',
267
- 'SCR' => '&#8360;',
268
- 'SDG' => '&#163;', // ?
269
- 'SEK' => '&#107;&#114;',
270
- 'SGD' => '&#36;',
271
- 'SHP' => '&#163;',
272
- 'SLL' => '&#76;&#101;', // ?
273
- 'SOS' => '&#83;',
274
- 'SRD' => '&#36;',
275
- 'STD' => '&#68;&#98;', // ?
276
- 'SVC' => '&#36;',
277
- 'SYP' => '&#163;',
278
- 'SZL' => '&#76;', // ?
279
- 'THB' => '&#3647;',
280
- 'TJS' => '&#84;&#74;&#83;', // ? TJS (guess)
281
- 'TMT' => '&#109;',
282
- 'TND' => '&#1583;.&#1578;',
283
- 'TOP' => '&#84;&#36;',
284
- 'TRY' => '&#8356;', // New Turkey Lira (old symbol used)
285
- 'TTD' => '&#36;',
286
- 'TWD' => '&#78;&#84;&#36;',
287
- 'TZS' => '',
288
- 'UAH' => '&#8372;',
289
- 'UGX' => '&#85;&#83;&#104;',
290
- 'USD' => '&#36;',
291
- 'UYU' => '&#36;&#85;',
292
- 'UZS' => '&#1083;&#1074;',
293
- 'VEF' => '&#66;&#115;',
294
- 'VND' => '&#8363;',
295
- 'VUV' => '&#86;&#84;',
296
- 'WST' => '&#87;&#83;&#36;',
297
- 'XAF' => '&#70;&#67;&#70;&#65;',
298
- 'XCD' => '&#36;',
299
- 'XDR' => '',
300
- 'XOF' => '',
301
- 'XPF' => '&#70;',
302
- 'YER' => '&#65020;',
303
- 'ZAR' => '&#82;',
304
- 'ZMK' => '&#90;&#75;', // ?
305
- 'ZWL' => '&#90;&#36;',
306
- );
307
-
308
- if( !empty( $currency_symbols[$currency_code] ) )
309
- return $currency_symbols[$currency_code];
310
- else
311
- return '';
312
-
313
  }
1
+ <?php
2
+
3
+ /*
4
+ * Array with the currency ISO code and associated currency name
5
+ *
6
+ * @return array
7
+ *
8
+ */
9
+ function wck_get_currencies() {
10
+
11
+ $currencies = array(
12
+ 'ALL' => __( 'Albania Lek', 'wck' ),
13
+ 'AFN' => __( 'Afghanistan Afghani', 'wck' ),
14
+ 'ARS' => __( 'Argentina Peso', 'wck' ),
15
+ 'AWG' => __( 'Aruba Guilder', 'wkc' ),
16
+ 'AUD' => __( 'Australia Dollar', 'wck' ),
17
+ 'AZN' => __( 'Azerbaijan New Manat', 'wck' ),
18
+ 'BSD' => __( 'Bahamas Dollar', 'wck' ),
19
+ 'BBD' => __( 'Barbados Dollar','wck' ),
20
+ 'BDT' => __( 'Bangladeshi taka','wck' ),
21
+ 'BYR' => __( 'Belarus Ruble','wck' ),
22
+ 'BZD' => __( 'Belize Dollar','wck' ),
23
+ 'BMD' => __( 'Bermuda Dollar','wck' ),
24
+ 'BOB' => __( 'Bolivia Boliviano','wck' ),
25
+ 'BAM' => __( 'Bosnia and Herzegovina Convertible Marka','wck' ),
26
+ 'BWP' => __( 'Botswana Pula','wck' ),
27
+ 'BGN' => __( 'Bulgaria Lev','wck' ),
28
+ 'BRL' => __( 'Brazil Real','wck' ),
29
+ 'BND' => __( 'Brunei Darussalam Dollar','wck' ),
30
+ 'KHR' => __( 'Cambodia Riel','wck' ),
31
+ 'CAD' => __( 'Canada Dollar','wck' ),
32
+ 'KYD' => __( 'Cayman Islands Dollar','wck' ),
33
+ 'CLP' => __( 'Chile Peso','wck' ),
34
+ 'CNY' => __( 'China Yuan Renminbi','wck' ),
35
+ 'COP' => __( 'Colombia Peso','wck' ),
36
+ 'CRC' => __( 'Costa Rica Colon','wck' ),
37
+ 'HRK' => __( 'Croatia Kuna','wck' ),
38
+ 'CUP' => __( 'Cuba Peso','wck' ),
39
+ 'CZK' => __( 'Czech Republic Koruna','wck' ),
40
+ 'DKK' => __( 'Denmark Krone','wck' ),
41
+ 'DOP' => __( 'Dominican Republic Peso','wck' ),
42
+ 'XCD' => __( 'East Caribbean Dollar','wck' ),
43
+ 'EGP' => __( 'Egypt Pound','wck' ),
44
+ 'SVC' => __( 'El Salvador Colon','wck' ),
45
+ 'EEK' => __( 'Estonia Kroon','wck' ),
46
+ 'EUR' => __( 'Euro','wck' ),
47
+ 'FKP' => __( 'Falkland Islands (Malvinas) Pound','wck' ),
48
+ 'FJD' => __( 'Fiji Dollar','wck' ),
49
+ 'GHC' => __( 'Ghana Cedis','wck' ),
50
+ 'GIP' => __( 'Gibraltar Pound','wck' ),
51
+ 'GTQ' => __( 'Guatemala Quetzal','wck' ),
52
+ 'GGP' => __( 'Guernsey Pound','wck' ),
53
+ 'GYD' => __( 'Guyana Dollar','wck' ),
54
+ 'HNL' => __( 'Honduras Lempira','wck' ),
55
+ 'HKD' => __( 'Hong Kong Dollar','wck' ),
56
+ 'HUF' => __( 'Hungary Forint','wck' ),
57
+ 'ISK' => __( 'Iceland Krona','wck' ),
58
+ 'INR' => __( 'India Rupee','wck' ),
59
+ 'IDR' => __( 'Indonesia Rupiah','wck' ),
60
+ 'IRR' => __( 'Iran Rial','wck' ),
61
+ 'IMP' => __( 'Isle of Man Pound','wck' ),
62
+ 'ILS' => __( 'Israel Shekel','wck' ),
63
+ 'JMD' => __( 'Jamaica Dollar','wck' ),
64
+ 'JPY' => __( 'Japan Yen','wck' ),
65
+ 'JEP' => __( 'Jersey Pound','wck' ),
66
+ 'JOD' => __( 'Jordanian Dinar','wck' ),
67
+ 'KZT' => __( 'Kazakhstan Tenge','wck' ),
68
+ 'KPW' => __( 'Korea (North) Won','wck' ),
69
+ 'KRW' => __( 'Korea (South) Won','wck' ),
70
+ 'KGS' => __( 'Kyrgyzstan Som','wck' ),
71
+ 'LAK' => __( 'Laos Kip','wck' ),
72
+ 'LVL' => __( 'Latvia Lat','wck' ),
73
+ 'LBP' => __( 'Lebanon Pound','wck' ),
74
+ 'LRD' => __( 'Liberia Dollar','wck' ),
75
+ 'LTL' => __( 'Lithuania Litas','wck' ),
76
+ 'MOP' => __( 'Macau Pataca','wck' ),
77
+ 'MKD' => __( 'Macedonia Denar','wck' ),
78
+ 'MYR' => __( 'Malaysia Ringgit','wck' ),
79
+ 'MUR' => __( 'Mauritius Rupee','wck' ),
80
+ 'MXN' => __( 'Mexico Peso','wck' ),
81
+ 'MNT' => __( 'Mongolia Tughrik','wck' ),
82
+ 'MZN' => __( 'Mozambique Metical','wck' ),
83
+ 'NAD' => __( 'Namibia Dollar','wck' ),
84
+ 'NPR' => __( 'Nepal Rupee','wck' ),
85
+ 'ANG' => __( 'Netherlands Antilles Guilder','wck' ),
86
+ 'NZD' => __( 'New Zealand Dollar','wck' ),
87
+ 'NIO' => __( 'Nicaragua Cordoba','wck' ),
88
+ 'NGN' => __( 'Nigeria Naira','wck' ),
89
+ 'NOK' => __( 'Norway Krone','wck' ),
90
+ 'OMR' => __( 'Oman Rial', 'wck' ),
91
+ 'PKR' => __( 'Pakistan Rupee', 'wck' ),
92
+ 'PAB' => __( 'Panama Balboa', 'wck' ),
93
+ 'PYG' => __( 'Paraguay Guarani', 'wck' ),
94
+ 'PEN' => __( 'Peru Nuevo Sol', 'wck' ),
95
+ 'PHP' => __( 'Philippines Peso', 'wck' ),
96
+ 'PLN' => __( 'Poland Zloty', 'wck' ),
97
+ 'QAR' => __( 'Qatar Riyal', 'wck' ),
98
+ 'RON' => __( 'Romania New Leu', 'wck' ),
99
+ 'RUB' => __( 'Russia Ruble', 'wck' ),
100
+ 'SHP' => __( 'Saint Helena Pound', 'wck' ),
101
+ 'SAR' => __( 'Saudi Arabia Riyal', 'wck' ),
102
+ 'RSD' => __( 'Serbia Dinar', 'wck' ),
103
+ 'SCR' => __( 'Seychelles Rupee', 'wck' ),
104
+ 'SGD' => __( 'Singapore Dollar', 'wck' ),
105
+ 'SBD' => __( 'Solomon Islands Dollar', 'wck' ),
106
+ 'SOS' => __( 'Somalia Shilling', 'wck' ),
107
+ 'ZAR' => __( 'South Africa Rand', 'wck' ),
108
+ 'LKR' => __( 'Sri Lanka Rupee', 'wck' ),
109
+ 'SEK' => __( 'Sweden Krona', 'wck' ),
110
+ 'CHF' => __( 'Switzerland Franc', 'wck' ),
111
+ 'SRD' => __( 'Suriname Dollar', 'wck' ),
112
+ 'SYP' => __( 'Syria Pound', 'wck' ),
113
+ 'TWD' => __( 'Taiwan New Dollar', 'wck' ),
114
+ 'THB' => __( 'Thailand Baht', 'wck' ),
115
+ 'TTD' => __( 'Trinidad and Tobago Dollar', 'wck' ),
116
+ 'TRY' => __( 'Turkey Lira', 'wck' ),
117
+ 'TRL' => __( 'Turkey Lira', 'wck' ),
118
+ 'TVD' => __( 'Tuvalu Dollar', 'wck' ),
119
+ 'UAH' => __( 'Ukraine Hryvna', 'wck' ),
120
+ 'GBP' => __( 'United Kingdom Pound', 'wck' ),
121
+ 'UGX' => __( 'Uganda Shilling', 'wck' ),
122
+ 'USD' => __( 'US Dollar', 'wck' ),
123
+ 'UYU' => __( 'Uruguay Peso', 'wck' ),
124
+ 'UZS' => __( 'Uzbekistan Som', 'wck' ),
125
+ 'VEF' => __( 'Venezuela Bolivar', 'wck' ),
126
+ 'VND' => __( 'Viet Nam Dong', 'wck' ),
127
+ 'YER' => __( 'Yemen Rial', 'wck' ),
128
+ 'ZWD' => __( 'Zimbabwe Dollar', 'wck' )
129
+ );
130
+
131
+ return apply_filters( 'wck_get_currencies', $currencies );
132
+
133
+ }
134
+
135
+
136
+ /*
137
+ * Returns the currency symbol for a given currency code
138
+ *
139
+ * @param string $currency_code
140
+ *
141
+ * @return string
142
+ *
143
+ */
144
+ function wck_get_currency_symbol( $currency_code ) {
145
+
146
+ $currency_symbols = array(
147
+ 'AED' => '&#1583;.&#1573;', // ?
148
+ 'AFN' => '&#65;&#102;',
149
+ 'ALL' => '&#76;&#101;&#107;',
150
+ 'AMD' => '',
151
+ 'ANG' => '&#402;',
152
+ 'AOA' => '&#75;&#122;', // ?
153
+ 'ARS' => '&#36;',
154
+ 'AUD' => '&#36;',
155
+ 'AWG' => '&#402;',
156
+ 'AZN' => '&#1084;&#1072;&#1085;',
157
+ 'BAM' => '&#75;&#77;',
158
+ 'BBD' => '&#36;',
159
+ 'BDT' => '&#2547;', // ?
160
+ 'BGN' => '&#1083;&#1074;',
161
+ 'BHD' => '.&#1583;.&#1576;', // ?
162
+ 'BIF' => '&#70;&#66;&#117;', // ?
163
+ 'BMD' => '&#36;',
164
+ 'BND' => '&#36;',
165
+ 'BOB' => '&#36;&#98;',
166
+ 'BRL' => '&#82;&#36;',
167
+ 'BSD' => '&#36;',
168
+ 'BTN' => '&#78;&#117;&#46;', // ?
169
+ 'BWP' => '&#80;',
170
+ 'BYR' => '&#112;&#46;',
171
+ 'BZD' => '&#66;&#90;&#36;',
172
+ 'CAD' => '&#36;',
173
+ 'CDF' => '&#70;&#67;',
174
+ 'CHF' => '&#67;&#72;&#70;',
175
+ 'CLF' => '', // ?
176
+ 'CLP' => '&#36;',
177
+ 'CNY' => '&#165;',
178
+ 'COP' => '&#36;',
179
+ 'CRC' => '&#8353;',
180
+ 'CUP' => '&#8396;',
181
+ 'CVE' => '&#36;', // ?
182
+ 'CZK' => '&#75;&#269;',
183
+ 'DJF' => '&#70;&#100;&#106;', // ?
184
+ 'DKK' => '&#107;&#114;',
185
+ 'DOP' => '&#82;&#68;&#36;',
186
+ 'DZD' => '&#1583;&#1580;', // ?
187
+ 'EGP' => '&#163;',
188
+ 'ETB' => '&#66;&#114;',
189
+ 'EUR' => '&#8364;',
190
+ 'FJD' => '&#36;',
191
+ 'FKP' => '&#163;',
192
+ 'GBP' => '&#163;',
193
+ 'GEL' => '&#4314;', // ?
194
+ 'GHS' => '&#162;',
195
+ 'GIP' => '&#163;',
196
+ 'GMD' => '&#68;', // ?
197
+ 'GNF' => '&#70;&#71;', // ?
198
+ 'GTQ' => '&#81;',
199
+ 'GYD' => '&#36;',
200
+ 'HKD' => '&#36;',
201
+ 'HNL' => '&#76;',
202
+ 'HRK' => '&#107;&#110;',
203
+ 'HTG' => '&#71;', // ?
204
+ 'HUF' => '&#70;&#116;',
205
+ 'IDR' => '&#82;&#112;',
206
+ 'ILS' => '&#8362;',
207
+ 'INR' => '&#8377;',
208
+ 'IQD' => '&#1593;.&#1583;', // ?
209
+ 'IRR' => '&#65020;',
210
+ 'ISK' => '&#107;&#114;',
211
+ 'JEP' => '&#163;',
212
+ 'JMD' => '&#74;&#36;',
213
+ 'JOD' => '&#74;&#68;', // ?
214
+ 'JPY' => '&#165;',
215
+ 'KES' => '&#75;&#83;&#104;', // ?
216
+ 'KGS' => '&#1083;&#1074;',
217
+ 'KHR' => '&#6107;',
218
+ 'KMF' => '&#67;&#70;', // ?
219
+ 'KPW' => '&#8361;',
220
+ 'KRW' => '&#8361;',
221
+ 'KWD' => '&#1583;.&#1603;', // ?
222
+ 'KYD' => '&#36;',
223
+ 'KZT' => '&#1083;&#1074;',
224
+ 'LAK' => '&#8365;',
225
+ 'LBP' => '&#163;',
226
+ 'LKR' => '&#8360;',
227
+ 'LRD' => '&#36;',
228
+ 'LSL' => '&#76;', // ?
229
+ 'LTL' => '&#76;&#116;',
230
+ 'LVL' => '&#76;&#115;',
231
+ 'LYD' => '&#1604;.&#1583;', // ?
232
+ 'MAD' => '&#1583;.&#1605;.', //?
233
+ 'MDL' => '&#76;',
234
+ 'MGA' => '&#65;&#114;', // ?
235
+ 'MKD' => '&#1076;&#1077;&#1085;',
236
+ 'MMK' => '&#75;',
237
+ 'MNT' => '&#8366;',
238
+ 'MOP' => '&#77;&#79;&#80;&#36;', // ?
239
+ 'MRO' => '&#85;&#77;', // ?
240
+ 'MUR' => '&#8360;', // ?
241
+ 'MVR' => '.&#1923;', // ?
242
+ 'MWK' => '&#77;&#75;',
243
+ 'MXN' => '&#36;',
244
+ 'MYR' => '&#82;&#77;',
245
+ 'MZN' => '&#77;&#84;',
246
+ 'NAD' => '&#36;',
247
+ 'NGN' => '&#8358;',
248
+ 'NIO' => '&#67;&#36;',
249
+ 'NOK' => '&#107;&#114;',
250
+ 'NPR' => '&#8360;',
251
+ 'NZD' => '&#36;',
252
+ 'OMR' => '&#65020;',
253
+ 'PAB' => '&#66;&#47;&#46;',
254
+ 'PEN' => '&#83;&#47;&#46;',
255
+ 'PGK' => '&#75;', // ?
256
+ 'PHP' => '&#8369;',
257
+ 'PKR' => '&#8360;',
258
+ 'PLN' => '&#122;&#322;',
259
+ 'PYG' => '&#71;&#115;',
260
+ 'QAR' => '&#65020;',
261
+ 'RON' => '&#108;&#101;&#105;',
262
+ 'RSD' => '&#1044;&#1080;&#1085;&#46;',
263
+ 'RUB' => '&#1088;&#1091;&#1073;',
264
+ 'RWF' => '&#1585;.&#1587;',
265
+ 'SAR' => '&#65020;',
266
+ 'SBD' => '&#36;',
267
+ 'SCR' => '&#8360;',
268
+ 'SDG' => '&#163;', // ?
269
+ 'SEK' => '&#107;&#114;',
270
+ 'SGD' => '&#36;',
271
+ 'SHP' => '&#163;',
272
+ 'SLL' => '&#76;&#101;', // ?
273
+ 'SOS' => '&#83;',
274
+ 'SRD' => '&#36;',
275
+ 'STD' => '&#68;&#98;', // ?
276
+ 'SVC' => '&#36;',
277
+ 'SYP' => '&#163;',
278
+ 'SZL' => '&#76;', // ?
279
+ 'THB' => '&#3647;',
280
+ 'TJS' => '&#84;&#74;&#83;', // ? TJS (guess)
281
+ 'TMT' => '&#109;',
282
+ 'TND' => '&#1583;.&#1578;',
283
+ 'TOP' => '&#84;&#36;',
284
+ 'TRY' => '&#8356;', // New Turkey Lira (old symbol used)
285
+ 'TTD' => '&#36;',
286
+ 'TWD' => '&#78;&#84;&#36;',
287
+ 'TZS' => '',
288
+ 'UAH' => '&#8372;',
289
+ 'UGX' => '&#85;&#83;&#104;',
290
+ 'USD' => '&#36;',
291
+ 'UYU' => '&#36;&#85;',
292
+ 'UZS' => '&#1083;&#1074;',
293
+ 'VEF' => '&#66;&#115;',
294
+ 'VND' => '&#8363;',
295
+ 'VUV' => '&#86;&#84;',
296
+ 'WST' => '&#87;&#83;&#36;',
297
+ 'XAF' => '&#70;&#67;&#70;&#65;',
298
+ 'XCD' => '&#36;',
299
+ 'XDR' => '',
300
+ 'XOF' => '',
301
+ 'XPF' => '&#70;',
302
+ 'YER' => '&#65020;',
303
+ 'ZAR' => '&#82;',
304
+ 'ZMK' => '&#90;&#75;', // ?
305
+ 'ZWL' => '&#90;&#36;',
306
+ );
307
+
308
+ if( !empty( $currency_symbols[$currency_code] ) )
309
+ return $currency_symbols[$currency_code];
310
+ else
311
+ return '';
312
+
313
  }
wordpress-creation-kit-api/assets/js/ckeditor/CHANGES.md CHANGED
@@ -1,1675 +1,1675 @@
1
- CKEditor 4 Changelog
2
- ====================
3
-
4
- ## CKEditor 4.11.3
5
-
6
- Fixed Issues:
7
-
8
- * [#2721](https://github.com/ckeditor/ckeditor-dev/issues/2721), [#487](https://github.com/ckeditor/ckeditor-dev/issues/487): Fixed: The order of sublist items is reversed when a higher level list item is removed.
9
- * [#2527](https://github.com/ckeditor/ckeditor-dev/issues/2527): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) autocomplete order does not prioritize emojis with the name starting from the used string.
10
- * [#2572](https://github.com/ckeditor/ckeditor-dev/issues/2572): Fixed: Icons in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown navigation groups are not centered.
11
- * [#1191](https://github.com/ckeditor/ckeditor-dev/issues/1191): Fixed: Items in the [elements path](https://ckeditor.com/cke4/addon/elementspath) are draggable.
12
- * [#2292](https://github.com/ckeditor/ckeditor-dev/issues/2292): Fixed: Dropping a list with a link on the editor's margin causes a console error and removes the dragged text from editor.
13
- * [#2756](https://github.com/ckeditor/ckeditor-dev/issues/2756): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin causes an error when typing in the [source editing mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_sourcearea.html).
14
- * [#1986](https://github.com/ckeditor/ckeditor-dev/issues/1986): Fixed: The Cell Properties dialog from the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin shows styles that are not allowed through [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent).
15
- * [#2565](https://github.com/ckeditor/ckeditor-dev/issues/2565): [IE, Edge] Fixed: Buttons in the [editor toolbar](https://ckeditor.com/cke4/addon/toolbar) are activated by clicking them with the right mouse button.
16
- * [#2792](https://github.com/ckeditor/ckeditor-dev/pull/2792): Fixed: A bug in the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin that caused the following issues:
17
- * [#2780](https://github.com/ckeditor/ckeditor-dev/issues/2780): Fixed: Undo steps disappear after multiple changes of selection.
18
- * [#2470](https://github.com/ckeditor/ckeditor-dev/issues/2470): [Firefox] Fixed: Widget's nested editable gets blurred upon focus.
19
- * [#2655](https://github.com/ckeditor/ckeditor-dev/issues/2655): [Chrome, Safari] Fixed: Widget's nested editable cannot be focused under certain circumstances.
20
-
21
- ## CKEditor 4.11.2
22
-
23
- Fixed Issues:
24
-
25
- * [#2403](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Styling inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is causing style leaks.
26
- * [#2514](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Pasting table data into inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin inserts pasted content into the wrapping table.
27
- * [#2451](https://github.com/ckeditor/ckeditor-dev/issues/2451): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin changes selection.
28
- * [#2546](https://github.com/ckeditor/ckeditor-dev/issues/2546): Fixed: The separator in the toolbar moves when buttons are focused.
29
- * [#2506](https://github.com/ckeditor/ckeditor-dev/issues/2506): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) throws a type error when an empty `<figure>` tag with an `image` class is upcasted.
30
- * [#2650](https://github.com/ckeditor/ckeditor-dev/issues/2650): Fixed: [Table](https://ckeditor.com/cke4/addon/table) dialog validator fails when the `getValue()` function is defined in the global scope.
31
- * [#2690](https://github.com/ckeditor/ckeditor-dev/issues/2690): Fixed: Decimal characters are removed from the inside of numbered lists when pasting content using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
32
- * [#2205](https://github.com/ckeditor/ckeditor-dev/issues/2205): Fixed: It is not possible to add new list items under an item containing a block element.
33
- * [#2411](https://github.com/ckeditor/ckeditor-dev/issues/2411), [#2438](https://github.com/ckeditor/ckeditor-dev/issues/2438) Fixed: Apply numbered list option throws a console error for a specific markup.
34
- * [#2430](https://github.com/ckeditor/ckeditor-dev/issues/2430) Fixed: [Color Button](https://ckeditor.com/cke4/addon/colorbutton) and [List Block](https://ckeditor.com/cke4/addon/listblock) items are draggable.
35
-
36
- Other Changes:
37
-
38
- * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugin:
39
- * [#52](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/52) Fixed: Clicking "Finish Checking" without a prior action would hang the Spell Checking dialog.
40
- * [#2603](https://github.com/ckeditor/ckeditor-dev/issues/2603): Corrected the GPL license entry in the `package.json` file.
41
-
42
- ## CKEditor 4.11.1
43
-
44
- Fixed Issues:
45
-
46
- * [#2571](https://github.com/ckeditor/ckeditor-dev/issues/2571): Fixed: Clicking the categories in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown panel scrolls the entire page.
47
-
48
- ## CKEditor 4.11
49
-
50
- **Security Updates:**
51
-
52
- * Fixed XSS vulnerability in the HTML parser reported by [maxarr](https://hackerone.com/maxarr).
53
-
54
- Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
55
-
56
- **An upgrade is highly recommended!**
57
-
58
- New Features:
59
-
60
- * [#2062](https://github.com/ckeditor/ckeditor-dev/pull/2062): Added the emoji dropdown that allows the user to choose the emoji from the toolbar and search for them using keywords.
61
- * [#2154](https://github.com/ckeditor/ckeditor-dev/issues/2154): The [Link](https://ckeditor.com/cke4/addon/link) plugin now supports phone number links.
62
- * [#1815](https://github.com/ckeditor/ckeditor-dev/issues/1815): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin supports typing link completion.
63
- * [#2478](https://github.com/ckeditor/ckeditor-dev/issues/2478): [Link](https://ckeditor.com/cke4/addon/link) can be inserted using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>K</kbd> keystroke.
64
- * [#651](https://github.com/ckeditor/ckeditor-dev/issues/651): Text pasted using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin preserves indentation in paragraphs.
65
- * [#2248](https://github.com/ckeditor/ckeditor-dev/issues/2248): Added support for justification in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [Matěj Kmínek](https://github.com/KminekMatej)!
66
- * [#706](https://github.com/ckeditor/ckeditor-dev/issues/706): Added a different cursor style when selecting cells for the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
67
- * [#2072](https://github.com/ckeditor/ckeditor-dev/issues/2072): The [UI Button](https://ckeditor.com/cke4/addon/button) plugin supports custom `aria-haspopup` property values. The [Menu Button](https://ckeditor.com/cke4/addon/menubutton) `aria-haspopup` value is now `menu`, the [Panel Button](https://ckeditor.com/cke4/addon/panelbutton) and [Rich Combo](https://ckeditor.com/cke4/addon/richcombo) `aria-haspopup` value is now `listbox`.
68
- * [#1176](https://github.com/ckeditor/ckeditor-dev/pull/1176): The [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) can now be attached to a selection instead of an element.
69
- * [#2202](https://github.com/ckeditor/ckeditor-dev/issues/2202): Added the `contextmenu_contentsCss` configuration option to allow adding custom CSS to the [Context Menu](https://ckeditor.com/cke4/addon/contextmenu).
70
-
71
- Fixed Issues:
72
-
73
- * [#1477](https://github.com/ckeditor/ckeditor-dev/issues/1477): Fixed: On destroy, [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not destroy its content.
74
- * [#2394](https://github.com/ckeditor/ckeditor-dev/issues/2394): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown does not show up with repeated symbols in a single line.
75
- * [#1181](https://github.com/ckeditor/ckeditor-dev/issues/1181): [Chrome] Fixed: Opening the context menu in a read-only editor results in an error.
76
- * [#2276](https://github.com/ckeditor/ckeditor-dev/issues/2276): [iOS] Fixed: [Button](https://ckeditor.com/cke4/addon/button) state does not refresh properly.
77
- * [#1489](https://github.com/ckeditor/ckeditor-dev/issues/1489): Fixed: Table contents can be removed in read-only mode when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is used.
78
- * [#1264](https://github.com/ckeditor/ckeditor-dev/issues/1264) Fixed: Right-click does not clear the selection created with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
79
- * [#586](https://github.com/ckeditor/ckeditor-dev/issues/586) Fixed: The `required` attribute is not correctly recognized by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin dialog. Thanks to [Roli Züger](https://github.com/rzueger)!
80
- * [#2380](https://github.com/ckeditor/ckeditor-dev/issues/2380) Fixed: Styling HTML comments in a top-level element results in extra paragraphs.
81
- * [#2294](https://github.com/ckeditor/ckeditor-dev/issues/2294) Fixed: Pasting content from Microsoft Outlook and then bolding it results in an error.
82
- * [#2035](https://github.com/ckeditor/ckeditor-dev/issues/2035) [Edge] Fixed: `Permission denied` is thrown when opening a [Panel](https://ckeditor.com/cke4/addon/panel) instance.
83
- * [#965](https://github.com/ckeditor/ckeditor-dev/issues/965) Fixed: The [`config.forceSimpleAmpersand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forceSimpleAmpersand) option does not work. Thanks to [Alex Maris](https://github.com/alexmaris)!
84
- * [#2448](https://github.com/ckeditor/ckeditor-dev/issues/2448): Fixed: The [`Escape HTML Entities`] plugin with custom [additional entities](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities_additional) configuration breaks HTML escaping.
85
- * [#898](https://github.com/ckeditor/ckeditor-dev/issues/898): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) long alternative text protrudes into the editor when the image is selected.
86
- * [#1113](https://github.com/ckeditor/ckeditor-dev/issues/1113): [Firefox] Fixed: Nested contenteditable elements path is not updated on focus with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin.
87
- * [#1682](https://github.com/ckeditor/ckeditor-dev/issues/1682) Fixed: Hovering the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) panel changes its size, causing flickering.
88
- * [#421](https://github.com/ckeditor/ckeditor-dev/issues/421) Fixed: Expandable [Button](https://ckeditor.com/cke4/addon/button) puts the `(Selected)` text at the end of the label when clicked.
89
- * [#1454](https://github.com/ckeditor/ckeditor-dev/issues/1454): Fixed: The [`onAbort`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onAbort) method of the [Upload Widget](https://ckeditor.com/cke4/addon/uploadwidget) is not called when the loader is aborted.
90
- * [#1451](https://github.com/ckeditor/ckeditor-dev/issues/1451): Fixed: The context menu is incorrectly positioned when opened with <kbd>Shift</kbd>+<kbd>F10</kbd>.
91
- * [#1722](https://github.com/ckeditor/ckeditor-dev/issues/1722): [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) is causing memory leaks.
92
- * [#2491](https://github.com/ckeditor/ckeditor-dev/issues/2491): Fixed: The [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin is not matching diacritic characters.
93
- * [#2519](https://github.com/ckeditor/ckeditor-dev/issues/2519): Fixed: The [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) dialog should display all available keystrokes for a single command.
94
-
95
- API Changes:
96
-
97
- * [#2453](https://github.com/ckeditor/ckeditor-dev/issues/2453): The [`CKEDITOR.ui.panel.block.getItems`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_panel_block.html#method-getItems) method now also returns `input` elements in addition to links.
98
- * [#2224](https://github.com/ckeditor/ckeditor-dev/issues/2224): The [`CKEDITOR.tools.convertToPx`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx) function now converts negative values.
99
- * [#2253](https://github.com/ckeditor/ckeditor-dev/issues/2253): The widget definition [`insert`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-insert) method now passes `editor` and `commandData`. Thanks to [marcparmet](https://github.com/marcparmet)!
100
- * [#2045](https://github.com/ckeditor/ckeditor-dev/issues/2045): Extracted [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) and [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) functions logic into a separate namespace.
101
- * [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) was extracted into [`tools.buffers.event`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_event.html),
102
- * [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) was extracted into [`tools.buffers.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_throttle.html).
103
- * [#2466](https://github.com/ckeditor/ckeditor-dev/issues/2466): The [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-constructor) constructor accepts an additional `rules` parameter allowing to bind the editor and filter together.
104
- * [#2493](https://github.com/ckeditor/ckeditor-dev/issues/2493): The [`editor.getCommandKeystroke`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method accepts an additional `all` parameter allowing to retrieve an array of all command keystrokes.
105
- * [#2483](https://github.com/ckeditor/ckeditor-dev/issues/2483): Button's DOM element created with the [`hasArrow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui.html#method-addButton) definition option can by identified by the `.cke_button_expandable` CSS class.
106
-
107
- Other Changes:
108
-
109
- * [#1713](https://github.com/ckeditor/ckeditor-dev/issues/1713): Removed the redundant `lang.title` entry from the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin.
110
-
111
- ## CKEditor 4.10.1
112
-
113
- Fixed Issues:
114
-
115
- * [#2114](https://github.com/ckeditor/ckeditor-dev/issues/2114): Fixed: [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) cannot be initialized before [`instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady).
116
- * [#2107](https://github.com/ckeditor/ckeditor-dev/issues/2107): Fixed: Holding and releasing the mouse button is not inserting an [autocomplete](https://ckeditor.com/cke4/addon/autocomplete) suggestion.
117
- * [#2167](https://github.com/ckeditor/ckeditor-dev/issues/2167): Fixed: Matching in [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin is not case insensitive.
118
- * [#2195](https://github.com/ckeditor/ckeditor-dev/issues/2195): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) shows the suggestion box when the colon is preceded with other characters than white space.
119
- * [#2169](https://github.com/ckeditor/ckeditor-dev/issues/2169): [Edge] Fixed: Error thrown when pasting into the editor.
120
- * [#1084](https://github.com/ckeditor/ckeditor-dev/issues/1084) Fixed: Using the "Automatic" option with [Color Button](https://ckeditor.com/cke4/addon/colorbutton) on a text with the color already defined sets an invalid color value.
121
- * [#2271](https://github.com/ckeditor/ckeditor-dev/issues/2271): Fixed: Custom color name not used as a label in the [Color Button](https://ckeditor.com/cke4/addon/image2) plugin. Thanks to [Eric Geloen](https://github.com/egeloen)!
122
- * [#2296](https://github.com/ckeditor/ckeditor-dev/issues/2296): Fixed: The [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin throws an error when activated on content containing HTML comments.
123
- * [#966](https://github.com/ckeditor/ckeditor-dev/issues/966): Fixed: Executing [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) during the [file upload](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onUploading) throws an error. Thanks to [Maksim Makarevich](https://github.com/MaksimMakarevich)!
124
- * [#1719](https://github.com/ckeditor/ckeditor-dev/issues/1719): Fixed: <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>A</kbd> inadvertently focuses inline editor if it is starting and ending with a list. Thanks to [theNailz](https://github.com/theNailz)!
125
- * [#1046](https://github.com/ckeditor/ckeditor-dev/issues/1046): Fixed: Subsequent new links do not include the `id` attribute. Thanks to [Nathan Samson](https://github.com/nathansamson)!
126
- * [#1348](https://github.com/ckeditor/ckeditor-dev/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses an old width and height on image URL change.
127
- * [#1791](https://github.com/ckeditor/ckeditor-dev/issues/1791): Fixed: [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins can be enabled when [Easy Image](https://ckeditor.com/cke4/addon/easyimage) is present.
128
- * [#2254](https://github.com/ckeditor/ckeditor-dev/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)!
129
- * [#1184](https://github.com/ckeditor/ckeditor-dev/issues/1184): [IE8-11] Fixed: Copying and pasting data in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error.
130
- * [#1916](https://github.com/ckeditor/ckeditor-dev/issues/1916): [IE9-11] Fixed: Pressing the <kbd>Delete</kbd> key in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error.
131
- * [#2003](https://github.com/ckeditor/ckeditor-dev/issues/2003): [Firefox] Fixed: Right-clicking multiple selected table cells containing empty paragraphs removes the selection.
132
- * [#1816](https://github.com/ckeditor/ckeditor-dev/issues/1816): Fixed: Table breaks when <kbd>Enter</kbd> is pressed over the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
133
- * [#1115](https://github.com/ckeditor/ckeditor-dev/issues/1115): Fixed: The `<font>` tag is not preserved when proper configuration is provided and a style is applied by the [Font](https://ckeditor.com/cke4/addon/font) plugin.
134
- * [#727](https://github.com/ckeditor/ckeditor-dev/issues/727): Fixed: Custom styles may be invisible in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin.
135
- * [#988](https://github.com/ckeditor/ckeditor-dev/issues/988): Fixed: ACF-enabled custom elements prefixed with `object`, `embed`, `param` are removed from the editor content.
136
-
137
- API Changes:
138
-
139
- * [#2249](https://github.com/ckeditor/ckeditor-dev/issues/1791): Added the [`editor.plugins.detectConflict()`](https://ckeditor.com/docs/ckeditor4/latest/CKEDITOR_editor_plugins.html#method-detectConflict) method finding conflicts between provided plugins.
140
-
141
- ## CKEditor 4.10
142
-
143
- New Features:
144
-
145
- * [#1751](https://github.com/ckeditor/ckeditor-dev/issues/1751): Introduced the **Autocomplete** feature that consists of the following plugins:
146
- * [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) &ndash; Provides contextual completion feature for custom text matches based on user input.
147
- * [Text Watcher](https://ckeditor.com/cke4/addon/textWatcher) &ndash; Checks whether an editor's text change matches the chosen criteria.
148
- * [Text Match](https://ckeditor.com/cke4/addon/textMatch) &ndash; Allows to search [`CKEDITOR.dom.range`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html) for matching text.
149
- * [#1703](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin providing smart completion feature for custom text matches based on user input starting with a chosen marker character.
150
- * [#1746](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin providing completion feature for emoji ideograms.
151
- * [#1761](https://github.com/ckeditor/ckeditor-dev/issues/1761): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin now supports email links.
152
-
153
- Fixed Issues:
154
-
155
- * [#1458](https://github.com/ckeditor/ckeditor-dev/issues/1458): [Edge] Fixed: After blurring the editor it takes 2 clicks to focus a widget.
156
- * [#1034](https://github.com/ckeditor/ckeditor-dev/issues/1034): Fixed: JAWS leaves forms mode after pressing the <kbd>Enter</kbd> key in an inline editor instance.
157
- * [#1748](https://github.com/ckeditor/ckeditor-dev/pull/1748): Fixed: Missing [`CKEDITOR.dialog.definition.onHide`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#property-onHide) API documentation. Thanks to [sunnyone](https://github.com/sunnyone)!
158
- * [#1321](https://github.com/ckeditor/ckeditor-dev/issues/1321): Fixed: Ideographic space character (`\u3000`) is lost when pasting text.
159
- * [#1776](https://github.com/ckeditor/ckeditor-dev/issues/1776): Fixed: Empty caption placeholder of the [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin is not hidden when blurred.
160
- * [#1592](https://github.com/ckeditor/ckeditor-dev/issues/1592): Fixed: The [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin caption is not visible after paste.
161
- * [#620](https://github.com/ckeditor/ckeditor-dev/issues/620): Fixed: The [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option is not respected in internal and cross-editor pasting.
162
- * [#1467](https://github.com/ckeditor/ckeditor-dev/issues/1467): Fixed: The resizing cursor of the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin appearing in the middle of a merged cell.
163
-
164
- API Changes:
165
-
166
- * [#850](https://github.com/ckeditor/ckeditor-dev/issues/850): Backward incompatibility: Replaced the `replace` dialog from the [Find / Replace](https://ckeditor.com/cke4/addon/find) plugin with a `tabId` option in the `find` command.
167
- * [#1582](https://github.com/ckeditor/ckeditor-dev/issues/1582): The [`CKEDITOR.editor.addCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addCommand) method can now accept a [`CKEDITOR.command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html) instance as a parameter.
168
- * [#1712](https://github.com/ckeditor/ckeditor-dev/issues/1712): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow whitespace.
169
- * [#1802](https://github.com/ckeditor/ckeditor-dev/issues/1802): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow passing plugin names as an array.
170
- * [#1724](https://github.com/ckeditor/ckeditor-dev/issues/1724): Added an option to the [`getClientRect()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getClientRect) function allowing to retrieve an absolute bounding rectangle of the element, i.e. a position relative to the upper-left corner of the topmost viewport.
171
- * [#1498](https://github.com/ckeditor/ckeditor-dev/issues/1498) : Added a new [`getClientRects()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-getClientRects) method to `CKEDITOR.dom.range`. It returns a list of rectangles for each selected element.
172
- * [#1993](https://github.com/ckeditor/ckeditor-dev/issues/1993): Added the [`CKEDITOR.tools.throttle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) function.
173
-
174
- Other Changes:
175
-
176
- * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins:
177
- * Language dictionary update: Added support for the Uzbek Latin language.
178
- * Languages no longer supported as additional languages: Manx - Isle of Man (`gv_GB`) and Interlingua (`ia_XR`).
179
- * Extended and improved language dictionaries: Georgian and Swedish. Also added the missing word _"Ensure"_ to the American, British and Canada English language.
180
- * [#141](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/141) Fixed: SCAYT throws "Uncaught Error: Error in RangyWrappedRange module: createRange(): Parameter must be a Window object or DOM node".
181
- * [#153](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/153) [Chrome] Fixed: Correcting a word in the widget in SCAYT moves focus to another editable.
182
- * [#155](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/155) [IE8] Fixed: SCAYT throws an error and does not work.
183
- * [#156](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/156) [IE10] Fixed: SCAYT does not seem to work.
184
- * Fixed: After some text is dragged and dropped, the markup is not refreshed for grammar problems in SCAYT.
185
- * Fixed: Request to FastCGI fails when the user tries to replace a word with non-English characters with a proper suggestion in WSC.
186
- * [Firefox] Fixed: <kbd>Ctrl</kbd>+<kbd>Z</kbd> removes focus in SCAYT.
187
- * Grammar support for default languages was improved.
188
- * New application source URL was added in SCAYT.
189
- * Removed green marks and legend related to grammar-supported languages in the Languages tab of SCAYT. Grammar is now supported for almost all the anguages in the list for an additional fee.
190
- * Fixed: JavaScript error in the console: "Cannot read property 'split' of undefined" in SCAYT and WSC.
191
- * [IE10] Fixed: Markup is not set for a specific case in SCAYT.
192
- * Fixed: Accessibility issue: No `alt` attribute for the logo image in the About tab of SCAYT.
193
-
194
- ## CKEditor 4.9.2
195
-
196
- **Security Updates:**
197
-
198
- * Fixed XSS vulnerability in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) (`image2`) plugin reported by [Kyaw Min Thein](https://twitter.com/kyawminthein99).
199
-
200
- Issue summary: It was possible to execute XSS inside CKEditor using the `<img>` tag and specially crafted HTML. Please note that the default presets (Basic/Standard/Full) do not include this plugin, so you are only at risk if you made a custom build and enabled this plugin.
201
-
202
- We would like to thank the [Drupal security team](https://www.drupal.org/drupal-security-team) for bringing this matter to our attention and coordinating the fix and release process!
203
-
204
- ## CKEditor 4.9.1
205
-
206
- Fixed Issues:
207
-
208
- * [#1835](https://github.com/ckeditor/ckeditor-dev/issues/1835): Fixed: Integration between [CKFinder](https://ckeditor.com/ckeditor-4/ckfinder/) and the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin does not work.
209
-
210
- ## CKEditor 4.9
211
-
212
- New Features:
213
-
214
- * [#932](https://github.com/ckeditor/ckeditor-dev/issues/932): Introduced Easy Image feature for inserting images that are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added to support it:
215
- * [Easy Image](https://ckeditor.com/cke4/addon/easyimage),
216
- * [Cloud Services](https://ckeditor.com/cke4/addon/cloudservices)
217
- * [Image Base](https://ckeditor.com/cke4/addon/imagebase)
218
- * [#1338](https://github.com/ckeditor/ckeditor-dev/issues/1338): Keystroke labels are displayed for function keys (like F7, F8).
219
- * [#643](https://github.com/ckeditor/ckeditor-dev/issues/643): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using the [`config.fileTools_requestHeaders`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_requestHeaders) configuration option.
220
- * [#1365](https://github.com/ckeditor/ckeditor-dev/issues/1365): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default.
221
- * [#1399](https://github.com/ckeditor/ckeditor-dev/issues/1399): Added the possibility to set [`CKEDITOR.config.startupFocus`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus) as `start` or `end` to specify where the editor focus should be after the initialization.
222
- * [#1441](https://github.com/ckeditor/ckeditor-dev/issues/1441): The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by the `data-cke-magic-line="1"` attribute.
223
-
224
- Fixed Issues:
225
-
226
- * [#595](https://github.com/ckeditor/ckeditor-dev/issues/595): Fixed: Pasting does not work on mobile devices.
227
- * [#869](https://github.com/ckeditor/ckeditor-dev/issues/869): Fixed: Empty selection clears cached clipboard data in the editor.
228
- * [#1419](https://github.com/ckeditor/ckeditor-dev/issues/1419): Fixed: The [Widget Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with the <kbd>Alt+A</kbd> key combination on Windows.
229
- * [#1274](https://github.com/ckeditor/ckeditor-dev/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using the [`contextDefinition.cssSelector`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_balloontoolbar_contextDefinition.html#property-cssSelector) matcher.
230
- * [#1232](https://github.com/ckeditor/ckeditor-dev/issues/1232): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable elements.
231
- * [#1342](https://github.com/ckeditor/ckeditor-dev/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after the [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
232
- * [#1426](https://github.com/ckeditor/ckeditor-dev/issues/1426): [IE8-9] Fixed: Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)!
233
- * [#1470](https://github.com/ckeditor/ckeditor-dev/issues/1470): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a widget it is attached to.
234
- * [#1048](https://github.com/ckeditor/ckeditor-dev/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added to its non-static parent.
235
- * [#889](https://github.com/ckeditor/ckeditor-dev/issues/889): Fixed: Unclear error message for width and height fields in the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins.
236
- * [#859](https://github.com/ckeditor/ckeditor-dev/issues/859): Fixed: Cannot edit a link after a double-click on the text in the link.
237
- * [#1013](https://github.com/ckeditor/ckeditor-dev/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with the [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option.
238
- * [#1356](https://github.com/ckeditor/ckeditor-dev/issues/1356): Fixed: [Border parse function](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) does not allow spaces in the color value.
239
- * [#1010](https://github.com/ckeditor/ckeditor-dev/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly expanded ignoring the `border-color` style.
240
- * [#1535](https://github.com/ckeditor/ckeditor-dev/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) mouseover border contrast is insufficient.
241
- * [#1516](https://github.com/ckeditor/ckeditor-dev/issues/1516): Fixed: Fake selection allows removing content in read-only mode using the <kbd>Backspace</kbd> and <kbd>Delete</kbd> keys.
242
- * [#1570](https://github.com/ckeditor/ckeditor-dev/issues/1570): Fixed: Fake selection allows cutting content in read-only mode using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>X</kbd> keys.
243
- * [#1363](https://github.com/ckeditor/ckeditor-dev/issues/1363): Fixed: Paste notification is unclear and it might confuse users.
244
-
245
- API Changes:
246
-
247
- * [#1346](https://github.com/ckeditor/ckeditor-dev/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.balloontoolbar.contextManager.html) is now available in the [`pluginDefinition.init()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-init) method of the [requiring](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#property-requires) plugin.
248
- * [#1530](https://github.com/ckeditor/ckeditor-dev/issues/1530): Added the possibility to use custom icons for [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_button.html.html).
249
-
250
- Other Changes:
251
-
252
- * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins:
253
- * SCAYT [`scayt_minWordLength`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) configuration option now defaults to 3 instead of 4.
254
- * SCAYT default number of suggested words in the context menu changed to 3.
255
- * [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link creation if SCAYT highlights the word.
256
- * Fixed: SCAYT crashes when the browser `localStorage` is disabled.
257
- * [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT is disabled/enabled.
258
- * [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote spell checker server is offline.
259
- * Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error.
260
- * Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible.
261
- * Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console.
262
- * [#1337](https://github.com/ckeditor/ckeditor-dev/issues/1337): Updated the samples layout with the new CKEditor 4 logo and color scheme.
263
- * [#1591](https://github.com/ckeditor/ckeditor-dev/issues/1591): CKBuilder and language tools are now downloaded over HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)!
264
-
265
- ## CKEditor 4.8
266
-
267
- **Important Notes:**
268
-
269
- * [#1249](https://github.com/ckeditor/ckeditor-dev/issues/1249): Enabled the [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin by default in standard and full presets. Also, it will no longer log an error in case of missing [`config.imageUploadUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-imageUploadUrl) property.
270
-
271
- New Features:
272
-
273
- * [#933](https://github.com/ckeditor/ckeditor-dev/issues/933): Introduced [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin.
274
- * [#662](https://github.com/ckeditor/ckeditor-dev/issues/662): Introduced image inlining for the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
275
- * [#468](https://github.com/ckeditor/ckeditor-dev/issues/468): [Edge] Introduced support for the Clipboard API.
276
- * [#607](https://github.com/ckeditor/ckeditor-dev/issues/607): Manually inserted Hex color is prefixed with a hash character (`#`) if needed. It ensures a valid Hex color value is used when setting the table cell border or background color with the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window.
277
- * [#584](https://github.com/ckeditor/ckeditor-dev/issues/584): [Font size and Family](https://ckeditor.com/cke4/addon/font) and [Format](https://ckeditor.com/cke4/addon/format) drop-downs are not toggleable anymore. Default option to reset styles added.
278
- * [#856](https://github.com/ckeditor/ckeditor-dev/issues/856): Introduced the [`CKEDITOR.tools.keystrokeToArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-keystrokeToArray) method. It converts a keystroke into its string representation, returning every key name as a separate array element.
279
- * [#1053](https://github.com/ckeditor/ckeditor-dev/issues/1053): Introduced the [`CKEDITOR.tools.object.merge()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-merge) method. It allows to merge two objects, returning the new object with all properties from both objects deeply cloned.
280
- * [#1073](https://github.com/ckeditor/ckeditor-dev/issues/1073): Introduced the [`CKEDITOR.tools.array.every()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-every) method. It invokes a given test function on every array element and returns `true` if all elements pass the test.
281
-
282
- Fixed Issues:
283
-
284
- * [#796](https://github.com/ckeditor/ckeditor-dev/issues/796): Fixed: A list is pasted from OneNote in the reversed order.
285
- * [#834](https://github.com/ckeditor/ckeditor-dev/issues/834): [IE9-11] Fixed: The editor does not save the selected state of radio buttons inserted by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin.
286
- * [#704](https://github.com/ckeditor/ckeditor-dev/issues/704): [Edge] Fixed: Using <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>Z</kbd> breaks widget structure.
287
- * [#591](https://github.com/ckeditor/ckeditor-dev/issues/591): Fixed: A column is inserted in a wrong order inside the table if any cell has a vertical split.
288
- * [#787](https://github.com/ckeditor/ckeditor-dev/issues/787): Fixed: Using Cut inside a nested table does not cut the selected content.
289
- * [#842](https://github.com/ckeditor/ckeditor-dev/issues/842): Fixed: List style not restored when toggling list indent level in the [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin.
290
- * [#711](https://github.com/ckeditor/ckeditor-dev/issues/711): Fixed: Dragging widgets should only work with the left mouse button.
291
- * [#862](https://github.com/ckeditor/ckeditor-dev/issues/862): Fixed: The "Object Styles" group in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin is visible only if the whole element is selected.
292
- * [#994](https://github.com/ckeditor/ckeditor-dev/pull/994): Fixed: Typo in the [`CKEDITOR.focusManager.focus()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_focusManager.html#method-focus) API documentation. Thanks to [benjy](https://github.com/benjy)!
293
- * [#1014](https://github.com/ckeditor/ckeditor-dev/issues/1014): Fixed: The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) Cell Properties dialog is now [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) aware &mdash; it is not possible to change the cell width or height if corresponding styles are disabled.
294
- * [#877](https://github.com/ckeditor/ckeditor-dev/issues/877): Fixed: A list with custom bullets with exotic characters crashes the editor when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
295
- * [#605](https://github.com/ckeditor/ckeditor-dev/issues/605): Fixed: Inline widgets do not preserve trailing spaces.
296
- * [#1008](https://github.com/ckeditor/ckeditor-dev/issues/1008): Fixed: Shorthand Hex colors from the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) option are not correctly highlighted in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) Text Color or Background Color panel.
297
- * [#1094](https://github.com/ckeditor/ckeditor-dev/issues/1094): Fixed: Widget definition [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcasts) methods are called for every element.
298
- * [#1057](https://github.com/ckeditor/ckeditor-dev/issues/1057): Fixed: The [Notification](https://ckeditor.com/addon/notification) plugin overwrites Web Notifications API due to leakage to the global scope.
299
- * [#1068](https://github.com/ckeditor/ckeditor-dev/issues/1068): Fixed: Upload widget paste listener ignores changes to the [`uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html).
300
- * [#921](https://github.com/ckeditor/ckeditor-dev/issues/921): Fixed: [Edge] CKEditor erroneously perceives internal copy and paste as type "external".
301
- * [#1213](https://github.com/ckeditor/ckeditor-dev/issues/1213): Fixed: Multiple images uploaded using [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin are randomly duplicated or mangled.
302
- * [#532](https://github.com/ckeditor/ckeditor-dev/issues/532): Fixed: Removed an outdated user guide link from the [About](https://ckeditor.com/cke4/addon/about) dialog.
303
- * [#1221](https://github.com/ckeditor/ckeditor-dev/issues/1221): Fixed: Invalid CSS loaded by [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin when [`config.skin`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-skin) is loaded using a custom path.
304
- * [#522](https://github.com/ckeditor/ckeditor-dev/issues/522): Fixed: Widget selection is not removed when widget is inside table cell with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin enabled.
305
- * [#1027](https://github.com/ckeditor/ckeditor-dev/issues/1027): Fixed: Cannot add multiple images to the table with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin in certain situations.
306
- * [#1069](https://github.com/ckeditor/ckeditor-dev/issues/1069): Fixed: Wrong shape processing by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
307
- * [#995](https://github.com/ckeditor/ckeditor-dev/issues/995): Fixed: Hyperlinked image gets inserted twice by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
308
- * [#1287](https://github.com/ckeditor/ckeditor-dev/issues/1287): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) plugin throws exception if included in editor build but not loaded into editor's instance.
309
-
310
- API Changes:
311
-
312
- * [#1097](https://github.com/ckeditor/ckeditor-dev/issues/1097): Widget [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcast) methods are now called in the [widget definition's](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-definition) context.
313
- * [#1118](https://github.com/ckeditor/ckeditor-dev/issues/1118): Added the `show` option in the [`balloonPanel.attach()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonPanel.html#method-attach) method, allowing to attach a hidden [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) instance.
314
- * [#1145](https://github.com/ckeditor/ckeditor-dev/issues/1145): Added the [`skipNotifications`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-skipNotifications) option to the [`CKEDITOR.fileTools.uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html), allowing to switch off default notifications displayed by upload widgets.
315
-
316
- Other Changes:
317
-
318
- * [#815](https://github.com/ckeditor/ckeditor-dev/issues/815): Removed Node.js dependency from the CKEditor build script.
319
- * [#1041](https://github.com/ckeditor/ckeditor-dev/pull/1041), [#1131](https://github.com/ckeditor/ckeditor-dev/issues/1131): Updated URLs pointing to [CKSource](https://cksource.com/) and [CKEditor](https://ckeditor.com/) resources after the launch of new websites.
320
-
321
- ## CKEditor 4.7.3
322
-
323
- New Features:
324
-
325
- * [#568](https://github.com/ckeditor/ckeditor-dev/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-disallowedContent) property.
326
-
327
- Fixed Issues:
328
-
329
- * [#554](https://github.com/ckeditor/ckeditor-dev/issues/554): Fixed: [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)!
330
- * [#566](https://github.com/ckeditor/ckeditor-dev/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1.
331
- * [#779](https://github.com/ckeditor/ckeditor-dev/issues/779): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/cke4/addon/language) plugin.
332
- * [#423](https://github.com/ckeditor/ckeditor-dev/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is set to `CKEDITOR.ENTER_BR`.
333
- * [#719](https://github.com/ckeditor/ckeditor-dev/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin can be resized when the editor is in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html).
334
- * [#577](https://github.com/ckeditor/ckeditor-dev/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin throws an error when trying to delete columns.
335
- * [#867](https://github.com/ckeditor/ckeditor-dev/issues/867): Fixed: Typing into a selected table throws an error.
336
- * [#817](https://github.com/ckeditor/ckeditor-dev/issues/817): Fixed: The [Save](https://ckeditor.com/cke4/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea).
337
-
338
- Other Changes:
339
-
340
- * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin:
341
- * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started.
342
- * [#800](https://github.com/ckeditor/ckeditor-dev/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-isCollapsed) method which is a simpler way to check if the selection is collapsed.
343
- * [#830](https://github.com/ckeditor/ckeditor-dev/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dialogCommand.html).
344
-
345
- ## CKEditor 4.7.2
346
-
347
- New Features:
348
-
349
- * [#455](https://github.com/ckeditor/ckeditor-dev/issues/455): Added [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) integration with the [Justify](https://ckeditor.com/cke4/addon/justify) plugin.
350
-
351
- Fixed Issues:
352
-
353
- * [#663](https://github.com/ckeditor/ckeditor-dev/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error.
354
- * [#694](https://github.com/ckeditor/ckeditor-dev/pull/694): Refactoring in the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin:
355
- * [#520](https://github.com/ckeditor/ckeditor-dev/issues/520): Fixed: Widgets cannot be properly pasted into a table cell.
356
- * [#460](https://github.com/ckeditor/ckeditor-dev/issues/460): Fixed: Editor gone after pasting into an editor within a table.
357
- * [#579](https://github.com/ckeditor/ckeditor-dev/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](https://ckeditor.com/cke4/addon/table) dialog.
358
- * [#545](https://github.com/ckeditor/ckeditor-dev/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/cke4/addon/selectall) button in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea).
359
- * [#582](https://github.com/ckeditor/ckeditor-dev/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)!
360
- * [#491](https://github.com/ckeditor/ckeditor-dev/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](https://ckeditor.com/cke4/addon/toolbar) plugin inside the [Notification](https://ckeditor.com/cke4/addon/notification) plugin.
361
- * [#646](https://github.com/ckeditor/ckeditor-dev/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin menu in the editor without any selection.
362
- * [#501](https://github.com/ckeditor/ckeditor-dev/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](https://ckeditor.com/cke4/addon/link) plugin.
363
- * [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) editor throws an error.
364
- * [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error.
365
- * [#426](https://github.com/ckeditor/ckeditor-dev/issues/426): Fixed: The [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) method selects the whole element when the selection starts at the beginning of that element.
366
- * [#644](https://github.com/ckeditor/ckeditor-dev/issues/644): Fixed: The [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) method returns an incorrect result when multiple nodes are selected.
367
- * [#684](https://github.com/ckeditor/ckeditor-dev/issues/684): Fixed: The [`elementPath.contains()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_elementPath.html#method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`.
368
-
369
- Other Changes:
370
-
371
- * Updated the [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) plugin:
372
- * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it.
373
- * [#751](https://github.com/ckeditor/ckeditor-dev/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_nodeList.html#method-toArray) method which returns an array representation of a [node list](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.nodeList.html).
374
-
375
- ## CKEditor 4.7.1
376
-
377
- New Features:
378
-
379
- * Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)!
380
- * [#413](https://github.com/ckeditor/ckeditor-dev/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) instructions.
381
-
382
- Fixed Issues:
383
-
384
- * [#515](https://github.com/ckeditor/ckeditor-dev/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is loaded.
385
- * [#493](https://github.com/ckeditor/ckeditor-dev/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down.
386
- * [#415](https://github.com/ckeditor/ckeditor-dev/issues/415): [Firefox] Fixed: <kbd>Enter</kbd> key breaks the table structure when pressed in a table selection.
387
- * [#457](https://github.com/ckeditor/ckeditor-dev/issues/457): Fixed: Error thrown when deleting content from the editor with no selection.
388
- * [#478](https://github.com/ckeditor/ckeditor-dev/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](https://ckeditor.com/cke4/addon/enterkey) plugin when pressing <kbd>Enter</kbd> with no selection.
389
- * [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](https://ckeditor.com/cke4/addon/tab) and [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugins when pressing <kbd>Tab</kbd> with no selection in inline editor.
390
- * [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted with the [Link](https://ckeditor.com/cke4/addon/link) plugin on collapsed selection cannot be edited.
391
- * [#417](https://github.com/ckeditor/ckeditor-dev/issues/417): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin throws an error when used with a table with only header or footer rows.
392
- * [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: The [`editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method does not obtain the correct keystroke.
393
- * [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work in Quirks Mode.
394
- * [#450](https://github.com/ckeditor/ckeditor-dev/issues/450): Fixed: [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) incorrectly transforms the `margin` CSS property.
395
-
396
- ## CKEditor 4.7
397
-
398
- **Important Notes:**
399
-
400
- * [#13793](https://dev.ckeditor.com/ticket/13793): The [`embed_provider`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-embed_provider) configuration option for the [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins is no longer preset by default.
401
- * The [UI Color](https://ckeditor.com/cke4/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used).
402
-
403
- New Features:
404
-
405
- * [#16755](https://dev.ckeditor.com/ticket/16755): Added the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column).
406
- * [#16961](https://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel.
407
- * [#13381](https://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.template.html) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy Patiño](http://caridy.name)!
408
- * [#16971](https://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin.
409
- * [#16847](https://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
410
- * [#16818](https://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
411
- * [#16850](https://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](https://ckeditor.com/cke4/addon/contextmenu).
412
- * [#16937](https://dev.ckeditor.com/ticket/16937): The `command` parameter in [`CKEDITOR.editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) now also accepts a command name as an argument.
413
- * [#17010](https://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-shrink) method now allows for skipping bogus `<br>` elements.
414
-
415
- Fixed Issues:
416
-
417
- * [#16935](https://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea) throws an error.
418
- * [#16825](https://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor.
419
- * [#16857](https://dev.ckeditor.com/ticket/16857): Fixed: <kbd>Ctrl+Shift+V</kbd> blocked by [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting).
420
- * [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin is enabled.
421
- * [#16786](https://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin.
422
- * [#14714](https://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor.
423
- * [#16913](https://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) keystroke does not work.
424
- * [#16968](https://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) is not handled by the editor.
425
- * [#16912](https://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
426
- * [#16821](https://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `<span>` elements with `height` style stacked when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
427
- * [#16866](https://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
428
- * [#16860](https://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
429
- * [#16817](https://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword), paragraphs are transformed into lists with some corrupted data.
430
- * [#16833](https://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
431
- * [#16826](https://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
432
- * [#12465](https://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click.
433
- * [#13062](https://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link.
434
- * [#13585](https://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `<div>` elements with a `<div>`.
435
- * [#16811](https://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
436
- * [#16810](https://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
437
- * [#11956](https://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles.
438
- * [#10472](https://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](https://ckeditor.com/cke4/addon/tableresize) on table header and footer.
439
- * [#14762](https://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin is active.
440
- * [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin does not allow to drop widgets into the editor.
441
- * [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened.
442
- * [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin.
443
- * [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar.
444
- * [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited.
445
- * [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)!
446
- * [#16920](https://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](https://ckeditor.com/cke4/addon/dialog) plugin as a direct dependency.
447
- * [PR#336](https://github.com/ckeditor/ckeditor-dev/pull/336): Fixed: Typo in [`CKEDITOR.getCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)!
448
- * [#17027](https://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object.
449
- * Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the `<iframe>` element in a CKEditor setup with ACF turned off and without the [Iframe Dialog](https://ckeditor.com/cke4/addon/iframe) plugin. The issue was originally reported as a security issue by [Sriramk21](https://twitter.com/sriramk21) from Pegasystems and was later downgraded by the security team into a normal issue due to the requirement of having ACF turned off. Disabling [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) is against [security best practices](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_best_practices.html#security), so the problem described above has not been considered a security issue as such.
450
-
451
- Other Changes:
452
-
453
- * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugins:
454
- * Fixed: DOM Exception after clicking "Remove Language" on a selected word with enabled [Language](https://ckeditor.com/cke4/addon/language) plugin in SCAYT.
455
- * [#16958](https://dev.ckeditor.com/ticket/16958): Switched the default MathJax CDN provider for the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin from `cdn.mathjax.org` to [cdnjs](https://cdnjs.com/), due to closing of `cdn.mathjax.org` scheduled for April 30, 2017.
456
- * [#16954](https://dev.ckeditor.com/ticket/16954): Removed the paste dialog.
457
- * [#16982](https://dev.ckeditor.com/ticket/16982): Latest Safari now supports enhanced Clipboard API introduced in CKEditor 4.5.0.
458
- * [#17025](https://dev.ckeditor.com/ticket/17025): Updated [Bender.js](https://github.com/benderjs/benderjs) to 0.4.2.
459
-
460
- ## CKEditor 4.6.2
461
-
462
- New Features:
463
-
464
- * [#16733](https://dev.ckeditor.com/ticket/16733): Added a new pastel color palette for the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin and a new [`config.colorButton_colorsPerRow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colorsPerRow) configuration option for setting the number of rows in the color selector.
465
- * [#16752](https://dev.ckeditor.com/ticket/16752): Added a new Azerbaijani localization. Thanks to the [Azerbaijani language team](https://www.transifex.com/ckeditor/teams/11143/az/)!
466
- * [#13818](https://dev.ckeditor.com/ticket/13818): It is now possible to group [Widget](https://ckeditor.com/cke4/addon/widget) [style definitions](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles), so applying one style disables the other.
467
-
468
- Fixed Issues:
469
-
470
- * [#13446](https://dev.ckeditor.com/ticket/13446): [Chrome] Fixed: It is possible to type in an unfocused inline editor.
471
- * [#14856](https://dev.ckeditor.com/ticket/14856): Fixed: [Font size and font family](https://ckeditor.com/cke4/addon/font) reset each other when modified at certain positions.
472
- * [#16745](https://dev.ckeditor.com/ticket/16745): [Edge] Fixed: List items are lost when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
473
- * [#16682](https://dev.ckeditor.com/ticket/16682): [Edge] Fixed: A list gets [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword) as a set of paragraphs. Added the [`config.pasteFromWord_heuristicsEdgeList`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWord_heuristicsEdgeList) configuration option.
474
- * [#10373](https://dev.ckeditor.com/ticket/10373): Fixed: Context menu items can be dragged into the editor.
475
- * [#16728](https://dev.ckeditor.com/ticket/16728): [IE] Fixed: [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) breaks the editor in Quirks Mode.
476
- * [#16795](https://dev.ckeditor.com/ticket/16795): [IE] Fixed: [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) breaks the editor in Compatibility Mode.
477
- * [#16675](https://dev.ckeditor.com/ticket/16675): Fixed: Styles applied with [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) to a single table cell are applied to the whole table.
478
- * [#16753](https://dev.ckeditor.com/ticket/16753): Fixed: [`element.setSize()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-setSize) sets incorrect editor dimensions if the border width is represented as a fraction of pixels.
479
- * [#16705](https://dev.ckeditor.com/ticket/16705): [Firefox] Fixed: Unable to paste images as Base64 strings when using [Clipboard](https://ckeditor.com/cke4/addon/clipboard).
480
- * [#14869](https://dev.ckeditor.com/ticket/14869): Fixed: JavaScript error is thrown when trying to use [Find](https://ckeditor.com/cke4/addon/find) in a [`<div>`-based editor](https://ckeditor.com/cke4/addon/divarea).
481
-
482
- ## CKEditor 4.6.1
483
-
484
- New Features:
485
-
486
- * [#16639](https://dev.ckeditor.com/ticket/16639): The `callback` parameter in the [`CKEDITOR.ajax.post()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ajax.html#method-post) method became optional.
487
-
488
- Fixed Issues:
489
-
490
- * [#11064](https://dev.ckeditor.com/ticket/11064): [Blink, WebKit] Fixed: Cannot select all editor content when a widget or a non-editable element is the first or last element of the content. Also fixes this issue in the [Select All](https://ckeditor.com/cke4/addon/selectall) plugin.
491
- * [#14755](https://dev.ckeditor.com/ticket/14755): [Blink, WebKit, IE8] Fixed: Browser hangs when a table is inserted in the place of a selected list with an empty last item.
492
- * [#16624](https://dev.ckeditor.com/ticket/16624): Fixed: Improved the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin which will now normalize the CSS `background` property if it only contains a color value. This fixes missing background colors when using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
493
- * [#16600](https://dev.ckeditor.com/ticket/16600): [Blink, WebKit] Fixed: Error thrown occasionally by an uninitialized editable for multiple CKEditor instances on the same page.
494
-
495
- ## CKEditor 4.6
496
-
497
- New Features:
498
-
499
- * [#14569](https://dev.ckeditor.com/ticket/14569): Added a new, flat, default CKEditor skin called [Moono-Lisa](https://ckeditor.com/cke4/addon/moono-lisa). Refreshed default colors available in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin ([Text Color and Background Color](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_colorbutton.html) feature).
500
- * [#14707](https://dev.ckeditor.com/ticket/14707): Added a new [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) feature to enable easy copying of styles between your document parts.
501
- * Introduced the completely rewritten [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin:
502
- * Backward incompatibility: The [`config.pasteFromWordRemoveFontStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveFontStyles) option now defaults to `false`. This option will be deprecated in the future. Use [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) to replicate the effect of setting it to `true`.
503
- * Backward incompatibility: The [`config.pasteFromWordNumberedHeadingToList`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordNumberedHeadingToList) and [`config.pasteFromWordRemoveStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveStyles) options were dropped and no longer have any effect on pasted content.
504
- * Major improvements in preservation of list numbering, styling and indentation (nested lists with multiple levels).
505
- * Major improvements in document structure parsing that fix plenty of issues with distorted or missing content after paste.
506
- * Added new translation: Occitan. Thanks to [Cédric Valmary](https://totenoc.eu/)!
507
- * [#10015](https://dev.ckeditor.com/ticket/10015): Keyboard shortcuts (relevant to the operating system in use) will now be displayed in tooltips and context menus.
508
- * [#13794](https://dev.ckeditor.com/ticket/13794): The [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) feature now uses `uploaded.width/height` if set.
509
- * [#12541](https://dev.ckeditor.com/ticket/12541): Added the [Upload File](https://ckeditor.com/cke4/addon/uploadfile) plugin that lets you upload a file by drag&amp;dropping it into the editor content.
510
- * [#14449](https://dev.ckeditor.com/ticket/14449): Introduced the [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin that lets you create stylish floating UI elements for the editor.
511
- * [#12077](https://dev.ckeditor.com/ticket/12077): Added support for the HTML5 `download` attribute in link (`<a>`) elements. Selecting the "Force Download" checkbox in the [Link](https://ckeditor.com/cke4/addon/link) dialog will cause the linked file to be downloaded automatically. Thanks to [sbusse](https://github.com/sbusse)!
512
- * [#13518](https://dev.ckeditor.com/ticket/13518): Introduced the [`additionalRequestParameters`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-additionalRequestParameters) property for file uploads to make it possible to send additional information about the uploaded file to the server.
513
- * [#14889](https://dev.ckeditor.com/ticket/14889): Added the [`config.image2_altRequired`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_altRequired) option for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin to allow making alternative text a mandatory field. Thanks to [Andrey Fedoseev](https://github.com/andreyfedoseev)!
514
-
515
- Fixed Issues:
516
-
517
- * [#9991](https://dev.ckeditor.com/ticket/9991): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) should only normalize input data.
518
- * [#7209](https://dev.ckeditor.com/ticket/7209): Fixed: Lists with 3 levels not [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword) correctly.
519
- * [#14335](https://dev.ckeditor.com/ticket/14335): Fixed: Pasting a numbered list starting with a value different from "1" from Microsoft Word does not work correctly.
520
- * [#14542](https://dev.ckeditor.com/ticket/14542): Fixed: Copying a numbered list from Microsoft Word does not preserve list formatting.
521
- * [#14544](https://dev.ckeditor.com/ticket/14544): Fixed: Copying a nested list from Microsoft Word results in an empty list.
522
- * [#14660](https://dev.ckeditor.com/ticket/14660): Fixed: [Pasting text from Word](https://ckeditor.com/cke4/addon/pastefromword) breaks the styling in some cases.
523
- * [#14867](https://dev.ckeditor.com/ticket/14867): [Firefox] Fixed: Text gets stripped when [pasting content from Word](https://ckeditor.com/cke4/addon/pastefromword).
524
- * [#2507](https://dev.ckeditor.com/ticket/2507): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not detect pasting a part of a paragraph.
525
- * [#3336](https://dev.ckeditor.com/ticket/3336): Fixed: Extra blank row added on top of the content [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
526
- * [#6115](https://dev.ckeditor.com/ticket/6115): Fixed: When Right-to-Left text direction is applied to a table [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword), borders are missing on one side.
527
- * [#6342](https://dev.ckeditor.com/ticket/6342): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filters out a basic text style when it is [configured to use attributes](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_basicstyles.html#custom-basic-text-style-definition).
528
- * [#6457](https://dev.ckeditor.com/ticket/6457): [IE] Fixed: [Pasting from Word](https://ckeditor.com/cke4/addon/pastefromword) is extremely slow.
529
- * [#6789](https://dev.ckeditor.com/ticket/6789): Fixed: The `mso-list: ignore` style is not handled properly when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
530
- * [#7262](https://dev.ckeditor.com/ticket/7262): Fixed: Lists in preformatted body disappear when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
531
- * [#7662](https://dev.ckeditor.com/ticket/7662): [Opera] Fixed: Extra empty number/bullet shown in the editor body when editing a multi-level list [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
532
- * [#7807](https://dev.ckeditor.com/ticket/7807): Fixed: Last item in a list not converted to a `<li>` element after [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
533
- * [#7950](https://dev.ckeditor.com/ticket/7950): [IE] Fixed: Content [from Word pasted](https://ckeditor.com/cke4/addon/pastefromword) differently than in other browsers.
534
- * [#7982](https://dev.ckeditor.com/ticket/7982): Fixed: Multi-level lists get split into smaller ones when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
535
- * [#8231](https://dev.ckeditor.com/ticket/8231): [WebKit, Opera] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) inserts empty paragraphs.
536
- * [#8266](https://dev.ckeditor.com/ticket/8266): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) inserts a blank line at the top.
537
- * [#8341](https://dev.ckeditor.com/ticket/8341), [#7646](https://dev.ckeditor.com/ticket/7646): Fixed: Faulty removal of empty `<span>` elements in [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) content cleanup breaking content formatting.
538
- * [#8754](https://dev.ckeditor.com/ticket/8754): [Firefox] Fixed: Incorrect pasting of multiple nested lists in [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
539
- * [#8983](https://dev.ckeditor.com/ticket/8983): Fixed: Alignment lost when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword) with [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) set to [`CKEDITOR.ENTER_BR`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_BR).
540
- * [#9331](https://dev.ckeditor.com/ticket/9331): [IE] Fixed: [Pasting text from Word](https://ckeditor.com/cke4/addon/pastefromword) creates a simple Caesar cipher.
541
- * [#9422](https://dev.ckeditor.com/ticket/9422): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) leaves an unwanted `color:windowtext` style.
542
- * [#10011](https://dev.ckeditor.com/ticket/10011): [IE9-10] Fixed: [`config.pasteFromWordRemoveFontStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveFontStyles) is ignored under certain conditions.
543
- * [#10643](https://dev.ckeditor.com/ticket/10643): Fixed: Differences between using <kbd>Ctrl+V</kbd> and pasting from the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) dialog.
544
- * [#10784](https://dev.ckeditor.com/ticket/10784): Fixed: Lines missing when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
545
- * [#11294](https://dev.ckeditor.com/ticket/11294): [IE10] Fixed: Font size is not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
546
- * [#11627](https://dev.ckeditor.com/ticket/11627): Fixed: Missing words when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
547
- * [#12784](https://dev.ckeditor.com/ticket/12784): Fixed: Bulleted list with custom bullets gets changed to a numbered list when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
548
- * [#13174](https://dev.ckeditor.com/ticket/13174): Fixed: Data loss after [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
549
- * [#13828](https://dev.ckeditor.com/ticket/13828): Fixed: Widget classes should be added to the wrapper rather than the widget element.
550
- * [#13829](https://dev.ckeditor.com/ticket/13829): Fixed: No class in [Widget](https://ckeditor.com/cke4/addon/widget) wrapper to identify the widget type.
551
- * [#13519](https://dev.ckeditor.com/ticket/13519): Server response received when uploading files should be more flexible.
552
-
553
- Other Changes:
554
-
555
- * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugins:
556
- * Support for the new default Moono-Lisa skin.
557
- * [#121](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/121): Fixed: [Basic Styles](https://ckeditor.com/cke4/addon/basicstyles) do not work when SCAYT is enabled.
558
- * [#125](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/125): Fixed: Inline styles are not continued when writing multiple lines of styled text with SCAYT enabled.
559
- * [#127](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/127): Fixed: Uncaught TypeError after enabling SCAYT in the CKEditor `<div>` element.
560
- * [#128](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/128): Fixed: Error thrown after enabling SCAYT caused by conflicts with RequireJS.
561
-
562
- ## CKEditor 4.5.11
563
-
564
- **Security Updates:**
565
-
566
- * [Severity: minor] Fixed the `target="_blank"` vulnerability reported by James Gaskell.
567
-
568
- Issue summary: If a victim had access to a spoofed version of ckeditor.com via HTTP (e.g. due to DNS spoofing, using a hacked public network or mailicious hotspot), then when using a link to the ckeditor.com website it was possible for the attacker to change the current URL of the opening page, even if the opening page was protected with SSL.
569
-
570
- An upgrade is recommended.
571
-
572
- New Features:
573
-
574
- * [#14747](https://dev.ckeditor.com/ticket/14747): The [Enhanced Image](https://ckeditor.com/cke4/addon/image2) caption now supports the link `target` attribute.
575
- * [#7154](https://dev.ckeditor.com/ticket/7154): Added support for the "Display Text" field to the [Link](https://ckeditor.com/cke4/addon/link) dialog. Thanks to [Ryan Guill](https://github.com/ryanguill)!
576
-
577
- Fixed Issues:
578
-
579
- * [#13362](https://dev.ckeditor.com/ticket/13362): [Blink, WebKit] Fixed: Active widget element is not cached when it is losing focus and it is inside an editable element.
580
- * [#13755](https://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images does not work.
581
- * [#13548](https://dev.ckeditor.com/ticket/13548): [IE] Fixed: Clicking the [elements path](https://ckeditor.com/cke4/addon/elementspath) disables Cut and Copy icons.
582
- * [#13812](https://dev.ckeditor.com/ticket/13812): Fixed: When aborting file upload the placeholder for image is left.
583
- * [#14659](https://dev.ckeditor.com/ticket/14659): [Blink] Fixed: Content scrolled to the top after closing the dialog in a [`<div>`-based editor](https://ckeditor.com/cke4/addon/divarea).
584
- * [#14825](https://dev.ckeditor.com/ticket/14825): [Edge] Fixed: Focusing the editor causes unwanted scrolling due to dropped support for the `setActive()` method.
585
-
586
- ## CKEditor 4.5.10
587
-
588
- Fixed Issues:
589
-
590
- * [#10750](https://dev.ckeditor.com/ticket/10750): Fixed: The editor does not escape the `font-style` family property correctly, removing quotes and whitespace from font names.
591
- * [#14413](https://dev.ckeditor.com/ticket/14413): Fixed: The [Auto Grow](https://ckeditor.com/cke4/addon/autogrow) plugin with the [`config.autoGrow_onStartup`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autoGrow_onStartup) option set to `true` does not work properly for an editor that is not visible.
592
- * [#14451](https://dev.ckeditor.com/ticket/14451): Fixed: Numeric element ID not escaped properly. Thanks to [Jakub Chalupa](https://github.com/chaluja7)!
593
- * [#14590](https://dev.ckeditor.com/ticket/14590): Fixed: Additional line break appearing after inline elements when switching modes. Thanks to [dpidcock](https://github.com/dpidcock)!
594
- * [#14539](https://dev.ckeditor.com/ticket/14539): Fixed: JAWS reads "selected Blank" instead of "selected <widget name>" when selecting a widget.
595
- * [#14701](https://dev.ckeditor.com/ticket/14701): Fixed: More precise labels for [Enhanced Image](https://ckeditor.com/cke4/addon/image2) and [Placeholder](https://ckeditor.com/cke4/addon/placeholder) widgets.
596
- * [#14667](https://dev.ckeditor.com/ticket/14667): [IE] Fixed: Removing background color from selected text removes background color from the whole paragraph.
597
- * [#14252](https://dev.ckeditor.com/ticket/14252): [IE] Fixed: Styles drop-down list does not always reflect the current style of the text line.
598
- * [#14275](https://dev.ckeditor.com/ticket/14275): [IE9+] Fixed: `onerror` and `onload` events are not used in browsers it could have been used when loading scripts dynamically.
599
-
600
- ## CKEditor 4.5.9
601
-
602
- Fixed Issues:
603
-
604
- * [#10685](https://dev.ckeditor.com/ticket/10685): Fixed: Unreadable toolbar icons after updating to the new editor version. Fixed with [6876179](https://github.com/ckeditor/ckeditor-dev/commit/6876179db4ee97e786b07b8fd72e6b4120732185) in [ckeditor-dev](https://github.com/ckeditor/ckeditor-dev) and [6c9189f4](https://github.com/ckeditor/ckeditor-presets/commit/6c9189f46392d2c126854fe8889b820b8c76d291) in [ckeditor-presets](https://github.com/ckeditor/ckeditor-presets).
605
- * [#14573](https://dev.ckeditor.com/ticket/14573): Fixed: Missing [Widget](https://ckeditor.com/cke4/addon/widget) drag handler CSS when there are multiple editor instances.
606
- * [#14620](https://dev.ckeditor.com/ticket/14620): Fixed: Setting both the `min-height` style for the `<body>` element and the `height` style for the `<html>` element breaks the [Auto Grow](https://ckeditor.com/cke4/addon/autogrow) plugin.
607
- * [#14538](https://dev.ckeditor.com/ticket/14538): Fixed: Keyboard focus goes into an embedded `<iframe>` element.
608
- * [#14602](https://dev.ckeditor.com/ticket/14602): Fixed: The [`dom.element.removeAttribute()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeAttribute) method does not remove all attributes if no parameter is given.
609
- * [#8679](https://dev.ckeditor.com/ticket/8679): Fixed: Better focus indication and ability to style the selected color in the [color picker dialog](https://ckeditor.com/cke4/addon/colordialog).
610
- * [#11697](https://dev.ckeditor.com/ticket/11697): Fixed: Content is replaced ignoring the letter case setting in the [Find and Replace](https://ckeditor.com/cke4/addon/find) dialog window.
611
- * [#13886](https://dev.ckeditor.com/ticket/13886): Fixed: Invalid handling of the [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) instance with the `styles` property by [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html).
612
- * [#14535](https://dev.ckeditor.com/ticket/14535): Fixed: CSS syntax corrections. Thanks to [mdjdenormandie](https://github.com/mdjdenormandie)!
613
-
614
- ## CKEditor 4.5.8
615
-
616
- New Features:
617
-
618
- * [#12440](https://dev.ckeditor.com/ticket/12440): Added the [`config.colorButton_enableAutomatic`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_enableAutomatic) option to allow hiding the "Automatic" option in the [color picker](https://ckeditor.com/cke4/addon/colorbutton).
619
-
620
- Fixed Issues:
621
-
622
- * [#10448](https://dev.ckeditor.com/ticket/10448): Fixed: Lack of scrollbar in the [right-to-left text direction](https://ckeditor.com/cke4/addon/bidi).
623
- * [#12707](https://dev.ckeditor.com/ticket/12707): Fixed: The order of table elements does not comply with the HTML specification.
624
- * [#13756](https://dev.ckeditor.com/ticket/13756): [Edge] Fixed: Context menus are cut-off.
625
-
626
- ## CKEditor 4.5.7
627
-
628
- New Features:
629
-
630
- * [#14327](https://dev.ckeditor.com/ticket/14327): Added Swiss German localization. Thanks to [Miro Grenda](https://twitter.com/mirogrenda)!
631
-
632
- Fixed Issues:
633
-
634
- * [#13816](https://dev.ckeditor.com/ticket/13816): Introduced a new strategy for Filling Character handling to avoid changes in DOM. This fixes the following issues:
635
- * [#12727](https://dev.ckeditor.com/ticket/12727): [Blink] `IndexSizeError` when using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) and [Content Templates](https://ckeditor.com/cke4/addon/templates) plugins.
636
- * [#13377](https://dev.ckeditor.com/ticket/13377): [Widget](https://ckeditor.com/cke4/addon/widget) plugin issue when typing in Korean.
637
- * [#13389](https://dev.ckeditor.com/ticket/13389): [Blink] [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) fails when the cursor is next to an `<hr>` tag.
638
- * [#13513](https://dev.ckeditor.com/ticket/13513): [Blink, WebKit] [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) and [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) throw an error when an image is the only data in the editor.
639
- * [#13884](https://dev.ckeditor.com/ticket/13884): [Firefox] Fixed: Copying and pasting a table results in just the first cell being pasted.
640
- * [#14234](https://dev.ckeditor.com/ticket/14234): Fixed: URL input field is not marked as required in the [Media Embed](https://ckeditor.com/cke4/addon/embed) dialog.
641
-
642
- ## CKEditor 4.5.6
643
-
644
- New Features:
645
-
646
- * Introduced the [`CKEDITOR.tools.getCookie()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-getCookie) and [`CKEDITOR.tools.setCookie()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-setCookie) methods for accessing cookies.
647
- * Introduced the [`CKEDITOR.tools.getCsrfToken()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-getCsrfToken) method. The CSRF token is now automatically sent by the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) and [File Tools](https://ckeditor.com/cke4/addon/filetools) plugins during file uploads. The server-side upload handlers may check it and use it to additionally secure the communication.
648
-
649
- Other Changes:
650
-
651
- * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type):
652
- - New features:
653
- - CKEditor [Language](https://ckeditor.com/cke4/addon/language) plugin support.
654
- - CKEditor [Placeholder](https://ckeditor.com/cke4/addon/placeholder) plugin support.
655
- - [Drag&Drop](https://ckeditor.com/docs/ckeditor4/latest/examples/fileupload.html) support.
656
- - **Experimental** [GRAYT](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-grayt_autoStartup) (Grammar As You Type) functionality.
657
- - Fixed issues:
658
- * [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98): SCAYT affects dialog double-click. Fixed in SCAYT core.
659
- * [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102): SCAYT core performance enhancements.
660
- * [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104): SCAYT's spans leak into the clipboard and after pasting.
661
- * [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105): A JavaScript error fired in case of multiple instances of CKEditor on one page.
662
- * [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107): SCAYT should not check non-editable parts of content.
663
- * [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108): Latest SCAYT copies the ID of the editor element to the iframe.
664
- * SCAYT stops working when CKEditor [Undo plugin](https://ckeditor.com/cke4/addon/undo) not enabled.
665
- * Issue with pasting SCAYT markup in CKEditor.
666
- * SCAYT stops working after pressing the *Cancel* button in the WSC dialog.
667
-
668
- ## CKEditor 4.5.5
669
-
670
- Fixed Issues:
671
-
672
- * [#13887](https://dev.ckeditor.com/ticket/13887): Fixed: [Link](https://ckeditor.com/cke4/addon/link) plugin alters the `target` attribute value. Thanks to [SamZiemer](https://github.com/SamZiemer)!
673
- * [#12189](https://dev.ckeditor.com/ticket/12189): Fixed: The [Link](https://ckeditor.com/cke4/addon/link) plugin dialog does not display the subject of email links if the subject parameter is not lowercase.
674
- * [#9192](https://dev.ckeditor.com/ticket/9192): Fixed: An `undefined` string is appended to an email address added with the [Link](https://ckeditor.com/cke4/addon/link) plugin if subject and email body are empty and [`config.emailProtection`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-emailProtection) is set to `encode`.
675
- * [#13790](https://dev.ckeditor.com/ticket/13790): Fixed: It is not possible to destroy the editor `<iframe>` after the editor was detached from DOM. Thanks to [Stefan Rijnhart](https://github.com/StefanRijnhart)!
676
- * [#13803](https://dev.ckeditor.com/ticket/13803): Fixed: The editor cannot be destroyed before being fully initialized. Thanks to [Cyril Fluck](https://github.com/cyril-sf)!
677
- * [#13867](https://dev.ckeditor.com/ticket/13867): Fixed: CKEditor does not work when the `classList` polyfill is used.
678
- * [#13885](https://dev.ckeditor.com/ticket/13885): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) requires the [Link](https://ckeditor.com/cke4/addon/link) plugin to link an image.
679
- * [#13883](https://dev.ckeditor.com/ticket/13883): Fixed: Copying a table using the context menu strips off styles.
680
- * [#13872](https://dev.ckeditor.com/ticket/13872): Fixed: Cutting is possible in the [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode.
681
- * [#12848](https://dev.ckeditor.com/ticket/12848): [Blink] Fixed: Opening the [Find and Replace](https://ckeditor.com/cke4/addon/find) dialog window in the [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode throws an exception.
682
- * [#13879](https://dev.ckeditor.com/ticket/13879): Fixed: It is not possible to prevent the [`editor.drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop) event.
683
- * [#13361](https://dev.ckeditor.com/ticket/13361): Fixed: Skin images fail when the site path includes parentheses because the `background-image` path needs single quotes around the URL value.
684
- * [#13771](https://dev.ckeditor.com/ticket/13771): Fixed: The `contents.css` style is not used if the [IFrame Editing Area](https://ckeditor.com/cke4/addon/wysiwygarea) plugin is missing.
685
- * [#13782](https://dev.ckeditor.com/ticket/13782): Fixed: Unclear log messages.
686
- * [#13919](https://dev.ckeditor.com/ticket/13919): [Edge] Fixed: Browser window crashes when accessing the `isContentEditable` property of an `<input>` DOM element.
687
-
688
- Other Changes:
689
-
690
- * [#13859](https://dev.ckeditor.com/ticket/13859): Test cases created with `bender.tools.createTestsForEditors` will also receive editor bot as a second parameter.
691
-
692
- ## CKEditor 4.5.4
693
-
694
- New Features:
695
-
696
- * [#13632](https://dev.ckeditor.com/ticket/13632): Introduce error logging mechanism.
697
- * [#13730](https://dev.ckeditor.com/ticket/13730): Switch to the new error logging mechanism.
698
-
699
- Fixed Issues:
700
-
701
- * [#9856](https://dev.ckeditor.com/ticket/9856): Fixed: Cannot use the native context menu together with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. Thanks to [Mark Wade](https://github.com/mark-wade)!
702
- * [#12733](https://dev.ckeditor.com/ticket/12733): [IE9+] Fixed: Radio button `onChange` does not work. Thanks to [Iliya Kostadinov](https://github.com/iliyakostadinov)!
703
- * [#13142](https://dev.ckeditor.com/ticket/13142): [Edge] Fixed: *Ctrl+A* and then *Backspace* result in an empty `<div>` element.
704
- * [#13599](https://dev.ckeditor.com/ticket/13599): Fixed: Cross-editor drag and drop of an inline widget results in error/artifacts.
705
- * [#13640](https://dev.ckeditor.com/ticket/13640): [IE] Fixed: Dropping a widget outside the `<body>` element is not handled correctly.
706
- * [#13533](https://dev.ckeditor.com/ticket/13533): Fixed: No progress during upload.
707
- * [#13680](https://dev.ckeditor.com/ticket/13680): Fixed: The parser should allow the `<h1-6>` element to be a child of the `<summary>` element.
708
- * [#11724](https://dev.ckeditor.com/ticket/11724): [Touch devices] Fixed: Drop-downs often hide right after opening them.
709
- * [#13690](https://dev.ckeditor.com/ticket/13690): Fixed: Copying content from IE to Chrome adds an extra paragraph.
710
- * [#13284](https://dev.ckeditor.com/ticket/13284): Fixed: Cannot drag and drop a widget if the text caret is placed just after the widget instance.
711
- * [#13516](https://dev.ckeditor.com/ticket/13516): Fixed: CKEditor removes empty HTML5 anchors without the `name` attribute.
712
- * [#13765](https://dev.ckeditor.com/ticket/13765): [Safari 9] Fixed: Problems with rendering samples.
713
-
714
- Other Changes:
715
-
716
- * [#11725](https://dev.ckeditor.com/ticket/11725): Marked [`CKEDITOR.env.mobile`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-mobile) as deprecated. The reason is that it is no longer clear what "mobile" means.
717
- * [#13737](https://dev.ckeditor.com/ticket/13737): Upgraded [Bender.js](https://github.com/benderjs/benderjs) to 0.4.1.
718
-
719
- ## CKEditor 4.5.3
720
-
721
- New Features:
722
-
723
- * [#13501](https://dev.ckeditor.com/ticket/13501): Added the [`config.fileTools_defaultFileName`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_defaultFileName) option to allow setting a default file name for paste uploads.
724
- * [#13603](https://dev.ckeditor.com/ticket/13603): Added support for uploading dropped BMP images.
725
-
726
- Fixed Issues:
727
-
728
- * [#13590](https://dev.ckeditor.com/ticket/13590): Fixed: Various issues related to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) feature. Fixes also:
729
- * [#11215](https://dev.ckeditor.com/ticket/11215),
730
- * [#8780](https://dev.ckeditor.com/ticket/8780),
731
- * [#12762](https://dev.ckeditor.com/ticket/12762).
732
- * [#13386](https://dev.ckeditor.com/ticket/13386): [Edge] Fixed: Issues with selecting and editing images.
733
- * [#13568](https://dev.ckeditor.com/ticket/13568): Fixed: The [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) method returns invalid results for entire content selection.
734
- * [#13453](https://dev.ckeditor.com/ticket/13453): Fixed: Drag&drop of entire editor content throws an error.
735
- * [#13465](https://dev.ckeditor.com/ticket/13465): Fixed: Error is thrown and the widget is lost on drag&drop if it is the only content of the editor.
736
- * [#13414](https://dev.ckeditor.com/ticket/13414): Fixed: Content auto paragraphing in a nested editable despite editor configuration.
737
- * [#13429](https://dev.ckeditor.com/ticket/13429): Fixed: Incorrect selection after content insertion by the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin.
738
- * [#13388](https://dev.ckeditor.com/ticket/13388): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) integration with [Undo](https://ckeditor.com/cke4/addon/undo) is broken.
739
-
740
- Other Changes:
741
-
742
- * [#13637](https://dev.ckeditor.com/ticket/13637): Several icons were refactored.
743
- * Updated [Bender.js](https://github.com/benderjs/benderjs) to 0.3.0 and introduced the ability to run tests via HTTPs ([#13265](https://dev.ckeditor.com/ticket/13265)).
744
-
745
- ## CKEditor 4.5.2
746
-
747
- Fixed Issues:
748
-
749
- * [#13609](https://dev.ckeditor.com/ticket/13609): [Edge] Fixed: The browser crashes when switching to the source mode. Thanks to [Andrew Williams and Mark Smeed](http://webxsolution.com/)!
750
- * [PR#201](https://github.com/ckeditor/ckeditor-dev/pull/201): Fixed: Buttons in the toolbar configurator cause form submission. Thanks to [colemanw](https://github.com/colemanw)!
751
- * [#13422](https://dev.ckeditor.com/ticket/13422): Fixed: A monospaced font should be used in the `<textarea>` element storing editor configuration in the toolbar configurator.
752
- * [#13494](https://dev.ckeditor.com/ticket/13494): Fixed: Error thrown in the toolbar configurator if plugin requirements are not met.
753
- * [#13409](https://dev.ckeditor.com/ticket/13409): Fixed: List elements incorrectly merged when pressing *Backspace* or *Delete*.
754
- * [#13434](https://dev.ckeditor.com/ticket/13434): Fixed: Dialog state indicator broken in Right–To–Left environments.
755
- * [#13460](https://dev.ckeditor.com/ticket/13460): [IE8] Fixed: Copying inline widgets is broken when [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) is disabled.
756
- * [#13495](https://dev.ckeditor.com/ticket/13495): [Firefox, IE] Fixed: Text is not word-wrapped in the Paste dialog window.
757
- * [#13528](https://dev.ckeditor.com/ticket/13528): [Firefox@Windows] Fixed: Content copied from Microsoft Word and other external applications is pasted as a plain text. Removed the `CKEDITOR.plugins.clipboard.isHtmlInExternalDataTransfer` property as the check must be dynamic.
758
- * [#13583](https://dev.ckeditor.com/ticket/13583): Fixed: [`DataTransfer.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_clipboard_dataTransfer.html#method-getData) should work consistently in all browsers and should not strip valuable content. Fixed pasting tables from Microsoft Excel on Chrome.
759
- * [#13468](https://dev.ckeditor.com/ticket/13468): [IE] Fixed: Binding drag&drop `dataTransfer` does not work if `text` data was set in the meantime.
760
- * [#13451](https://dev.ckeditor.com/ticket/13451): [IE8-9] Fixed: One drag&drop operation may affect following ones.
761
- * [#13184](https://dev.ckeditor.com/ticket/13184): Fixed: Web page reloaded after a drop on editor UI.
762
- * [#13129](https://dev.ckeditor.com/ticket/13129) Fixed: Block widget blurred after a drop followed by an undo.
763
- * [#13397](https://dev.ckeditor.com/ticket/13397): Fixed: Drag&drop of a widget inside its nested widget crashes the editor.
764
- * [#13385](https://dev.ckeditor.com/ticket/13385): Fixed: [`editor.getSnapshot()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSnapshot) may return a non-string value.
765
- * [#13419](https://dev.ckeditor.com/ticket/13419): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin does not encode double quotes in URLs.
766
- * [#13420](https://dev.ckeditor.com/ticket/13420): Fixed: The [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin ignores encoded characters in URL parameters.
767
- * [#13410](https://dev.ckeditor.com/ticket/13410): Fixed: Error thrown in the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin when undoing right after pasting a link.
768
- * [#13566](https://dev.ckeditor.com/ticket/13566): Fixed: Suppressed notifications in the [Media Embed Base](https://ckeditor.com/cke4/addon/embedbase) plugin.
769
- * [#11616](https://dev.ckeditor.com/ticket/11616): [Chrome] Fixed: Resizing the editor while it is not displayed breaks the editable. Fixes also [#9160](https://dev.ckeditor.com/ticket/9160) and [#9715](https://dev.ckeditor.com/ticket/9715).
770
- * [#11376](https://dev.ckeditor.com/ticket/11376): [IE11] Fixed: Loss of text when pasting bulleted lists from Microsoft Word.
771
- * [#13143](https://dev.ckeditor.com/ticket/13143): [Edge] Fixed: Focus lost when opening the panel.
772
- * [#13387](https://dev.ckeditor.com/ticket/13387): [Edge] Fixed: "Permission denied" error thrown when loading the editor with developer tools open.
773
- * [#13574](https://dev.ckeditor.com/ticket/13574): [Edge] Fixed: "Permission denied" error thrown when opening editor dialog windows.
774
- * [#13441](https://dev.ckeditor.com/ticket/13441): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin breaks the state of [Undo](https://ckeditor.com/cke4/addon/undo) commands after a paste.
775
- * [#13554](https://dev.ckeditor.com/ticket/13554): [Edge] Fixed: Paste dialog's iframe does not receive focus on show.
776
- * [#13440](https://dev.ckeditor.com/ticket/13440): [Edge] Fixed: Unable to paste a widget.
777
-
778
- Other Changes:
779
-
780
- * [#13421](https://dev.ckeditor.com/ticket/13421): UX improvements to notifications in the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin.
781
-
782
- ## CKEditor 4.5.1
783
-
784
- Fixed Issues:
785
-
786
- * [#13486](https://dev.ckeditor.com/ticket/13486): Fixed: The [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin should log an error, not throw an error when upload URL is not set.
787
-
788
- ## CKEditor 4.5
789
-
790
- New Features:
791
-
792
- * [#13304](https://dev.ckeditor.com/ticket/13304): Added support for passing DOM elements to [`config.sharedSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-sharedSpaces). Thanks to [Undergrounder](https://github.com/Undergrounder)!
793
- * [#13215](https://dev.ckeditor.com/ticket/13215): Added ability to cancel fetching a resource by the Embed plugins.
794
- * [#13213](https://dev.ckeditor.com/ticket/13213): Added the [`dialog#setState()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-setState) method and used it in the [Embed](https://ckeditor.com/cke4/addon/embed) dialog to indicate that a resource is being loaded.
795
- * [#13337](https://dev.ckeditor.com/ticket/13337): Added the [`repository.onWidget()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-onWidget) method &mdash; a convenient way to listen to [widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) events through the [repository](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.repository.html).
796
- * [#13214](https://dev.ckeditor.com/ticket/13214): Added support for pasting links that convert into embeddable resources on the fly.
797
-
798
- Fixed Issues:
799
-
800
- * [#13334](https://dev.ckeditor.com/ticket/13334): Fixed: Error after nesting widgets and playing with undo/redo.
801
- * [#13118](https://dev.ckeditor.com/ticket/13118): Fixed: The [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) method throws an error when called in the source mode.
802
- * [#13158](https://dev.ckeditor.com/ticket/13158): Fixed: Error after canceling a dialog when creating a widget.
803
- * [#13197](https://dev.ckeditor.com/ticket/13197): Fixed: Linked inline [Enhanced Image](https://ckeditor.com/cke4/addon/image2) alignment class is not transferred to the widget wrapper.
804
- * [#13199](https://dev.ckeditor.com/ticket/13199): Fixed: [Semantic Embed](https://ckeditor.com/cke4/addon/embedsemantic) does not support widget classes.
805
- * [#13003](https://dev.ckeditor.com/ticket/13003): Fixed: Anchors are uploaded when moving them by drag and drop.
806
- * [#13032](https://dev.ckeditor.com/ticket/13032): Fixed: When upload is done, notification update should be marked as important.
807
- * [#13300](https://dev.ckeditor.com/ticket/13300): Fixed: The `internalCommit` argument in the [Image](https://ckeditor.com/cke4/addon/image) dialog seems to be never used.
808
- * [#13036](https://dev.ckeditor.com/ticket/13036): Fixed: Notifications are moved 10px to the right.
809
- * [#13280](https://dev.ckeditor.com/ticket/13280): [IE8] Fixed: Undo after inline widget drag&drop throws an error.
810
- * [#13186](https://dev.ckeditor.com/ticket/13186): Fixed: Content dropped into a nested editable is not filtered by [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html).
811
- * [#13140](https://dev.ckeditor.com/ticket/13140): Fixed: Error thrown when dropping a block widget right after itself.
812
- * [#13176](https://dev.ckeditor.com/ticket/13176): [IE8] Fixed: Errors on drag&drop of embed widgets.
813
- * [#13015](https://dev.ckeditor.com/ticket/13015): Fixed: Dropping an image file on [Enhanced Image](https://ckeditor.com/cke4/addon/image2) causes a page reload.
814
- * [#13080](https://dev.ckeditor.com/ticket/13080): Fixed: Ugly notification shown when the response contains HTML content.
815
- * [#13011](https://dev.ckeditor.com/ticket/13011): [IE8] Fixed: Anchors are duplicated on drag&drop in specific locations.
816
- * [#13105](https://dev.ckeditor.com/ticket/13105): Fixed: Various issues related to [`CKEDITOR.tools.htmlEncode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlEncode) and [`CKEDITOR.tools.htmlDecode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlDecode) methods.
817
- * [#11976](https://dev.ckeditor.com/ticket/11976): [Chrome] Fixed: Copy&paste and drag&drop lists from Microsoft Word.
818
- * [#13128](https://dev.ckeditor.com/ticket/13128): Fixed: Various issues with cloning element IDs:
819
- * Fixed the default behavior of [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) and [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) methods which now clone IDs similarly to their native counterparts.
820
- * Added `cloneId` arguments to the above methods, [`range.splitBlock()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-splitBlock) and [`element.breakParent()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-breakParent). Mind the default values and special behavior in the `extractContents()` method!
821
- * Fixed issues where IDs were lost on copy&paste and drag&drop.
822
- * Toolbar configurators:
823
- * [#13185](https://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret.
824
- * [#13138](https://dev.ckeditor.com/ticket/13138): Fixed: The "Toggle empty elements" button label is unclear.
825
- * [#13136](https://dev.ckeditor.com/ticket/13136): Fixed: Autocompleter is far too intrusive.
826
- * [#13133](https://dev.ckeditor.com/ticket/13133): Fixed: Tab leaves the editor.
827
- * [#13173](https://dev.ckeditor.com/ticket/13173): Fixed: [`config.removeButtons`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removeButtons) is ignored by the advanced toolbar configurator.
828
-
829
- Other Changes:
830
-
831
- * [#13119](https://dev.ckeditor.com/ticket/13119): Improved compatibility of editor skins ([Moono](https://ckeditor.com/cke4/addon/moono) and [Kama](https://ckeditor.com/cke4/addon/kama)) with external web page style sheets.
832
- * Toolbar configurators:
833
- * [#13147](https://dev.ckeditor.com/ticket/13147): Added buttons to the sticky toolbar.
834
- * [#13207](https://dev.ckeditor.com/ticket/13207): Used modal window to display toolbar configurator help.
835
- * [#13316](https://dev.ckeditor.com/ticket/13316): Made [`CKEDITOR.env.isCompatible`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-isCompatible) a blacklist rather than a whitelist. More about the change in the [Browser Compatibility](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html) guide.
836
- * [#13398](https://dev.ckeditor.com/ticket/13398): Renamed `CKEDITOR.fileTools.UploadsRepository` to [`CKEDITOR.fileTools.UploadRepository`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadRepository.html) and changed all related properties.
837
- * [#13279](https://dev.ckeditor.com/ticket/13279): Reviewed CSS vendor prefixes.
838
- * [#13454](https://dev.ckeditor.com/ticket/13454): Removed unused `lang.image.alertUrl` token from the [Image](https://ckeditor.com/cke4/addon/image) plugin.
839
-
840
- ## CKEditor 4.5 Beta
841
-
842
- New Features:
843
-
844
- * Clipboard (copy&paste, drag&drop) and file uploading features and improvements ([#11437](https://dev.ckeditor.com/ticket/11437)).
845
-
846
- * Major features:
847
- * Support for dropping and pasting files into the editor was introduced. Through a set of new facades for native APIs it is now possible to easily intercept and process inserted files.
848
- * [File upload tools](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.html) were introduced in order to simplify controlling the loading, uploading and handling server response, properly handle [new upload configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-uploadUrl) options, etc.
849
- * [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) widget was introduced to upload dropped images. A base class for the [upload widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html) was exposed, too, to make it simple to create new types of upload widgets which can handle any type of dropped file, show the upload progress and update the content when the process is done. It also handles editing and undo/redo operations when a file is being uploaded and integrates with the [notification aggregator](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notificationAggregator.html) to show progress and success or error.
850
- * All drag and drop operations were integrated with the editor. All dropped content is passed through the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event and a set of new editor events was introduced &mdash; [`dragstart`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart), [`drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop), [`dragend`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend).
851
- * The [Data Transfer](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.clipboard.dataTransfer.html) facade was introduced to unify access to data in various types and files. [Data Transfer](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.clipboard.dataTransfer.html) is now always available in the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event.
852
- * Switched from the pastebin to using the native clipboard access whenever possible. This solved many issues related to pastebin such as unnecessary scrolling or data loss. Additionally, on copy and cut from the editor the clipboard data is set. Therefore, on paste the editor has access to clean data, undisturbed by the browsers.
853
- * Drag and drop of inline and block widgets was integrated with the standard clipboard APIs. By listening to drag events you will thus be notified about widgets, too. This opens a possibility to filter pasted and dropped widgets.
854
- * The [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event can have the `range` parameter so it is possible to change the paste position in the listener or paste in the not selectable position. Also the [`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml) method now accepts `range` as an additional parameter.
855
- * [#11621](https://dev.ckeditor.com/ticket/11621): A configurable [paste filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFilter) was introduced. The filter is by default turned to `'semantic-content'` on Webkit and Blink for all pasted content coming from external sources because of the low quality of HTML that these engines put into the clipboard. Internal and cross-editor paste is safe due to the change explained in the previous point.
856
-
857
- * Other changes and related fixes:
858
- * [#12095](https://dev.ckeditor.com/ticket/12095): On drag and copy of widgets [the same method](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) is used to get selected HTML as in the normal case. Thanks to that styles applied to inline widgets are not lost.
859
- * [#11219](https://dev.ckeditor.com/ticket/11219): Fixed: Dragging a [captioned image](https://ckeditor.com/cke4/addon/image2) does not fire the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event.
860
- * [#9554](https://dev.ckeditor.com/ticket/9554): [Webkit Mac] Fixed: Editor scrolls on paste.
861
- * [#9898](https://dev.ckeditor.com/ticket/9898): [Webkit&Divarea] Fixed: Pasting causes undesirable scrolling.
862
- * [#11993](https://dev.ckeditor.com/ticket/11993): [Chrome] Fixed: Pasting content scrolls the document.
863
- * [#12613](https://dev.ckeditor.com/ticket/12613): Show the user that they can not drop on editor UI (toolbar, bottom bar).
864
- * [#12851](https://dev.ckeditor.com/ticket/12851): [Blink/Webkit] Fixed: Formatting disappears when pasting content into cells.
865
- * [#12914](https://dev.ckeditor.com/ticket/12914): Fixed: Copy/Paste of table broken in `div`-based editor.
866
-
867
- * Browser support.<br>Browser support for related features varies significantly (see http://caniuse.com/clipboard).
868
- * File APIs needed to operate and file upload is not supported in Internet Explorer 9 and below.
869
- * Only Chrome and Safari on Mac OS support setting custom data items in the clipboard, so currently it is possible to recognize the origin of the copied content in these browsers only. All drag and drop operations can be identified thanks to the new Data Transfer facade.
870
- * No Internet Explorer browser supports the standard clipboard API which results in small glitches like where only plain text can be dropped from outside the editor. Thanks to the new Data Transfer facade, internal and cross-editor drag and drop supports the full range of data.
871
- * Direct access to clipboard could only be implemented in Chrome, Safari on Mac OS, Opera and Firefox. In other browsers the pastebin must still be used.
872
-
873
- * [#12875](https://dev.ckeditor.com/ticket/12875): Samples and toolbar configuration tools.
874
- * The old set of samples shipped with every CKEditor package was replaced with a shiny new single-page sample. This change concluded a long term plan which started from introducing the [CKEditor SDK](https://ckeditor.com/docs/ckeditor4/latest/examples/index.html) and [CKEditor Functionality Overview](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_features.html) section in the documentation which essentially redefined the old samples.
875
- * Toolbar configurators with live previews were introduced. They will be shipped with every CKEditor package and are meant to help in configuring toolbar layouts.
876
-
877
- * [#10925](https://dev.ckeditor.com/ticket/10925): The [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins were introduced. Read more about the new features in the [Embedding Content](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_media_embed.html) article.
878
- * [#10931](https://dev.ckeditor.com/ticket/10931): Added support for nesting widgets. It is now possible to insert one widget into another widget's nested editable. Note that unless nested editable's [allowed content](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_nestedEditable_definition.html#property-allowedContent) is defined precisely, starting from CKEditor 4.5 some widget buttons may become enabled. This feature is not supported in IE8. Included issues:
879
- * [#12018](https://dev.ckeditor.com/ticket/12018): Fixed and reviewed: Nested widgets garbage collection.
880
- * [#12024](https://dev.ckeditor.com/ticket/12024): [Firefox] Fixed: Outline is extended to the left by unpositioned drag handlers.
881
- * [#12006](https://dev.ckeditor.com/ticket/12006): Fixed: Drag and drop of nested block widgets.
882
- * [#12008](https://dev.ckeditor.com/ticket/12008): Fixed various cases of inserting a single non-editable element using the [`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml) method. Fixes pasting a widget with a nested editable inside another widget's nested editable.
883
-
884
- * Notification system:
885
- * [#11580](https://dev.ckeditor.com/ticket/11580): Introduced the [notification system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notification.html).
886
- * [#12810](https://dev.ckeditor.com/ticket/12810): Introduced a [notification aggregator](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notificationAggregator.html) for the [notification system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notification.html) which simplifies displaying progress of many concurrent tasks.
887
- * [#11636](https://dev.ckeditor.com/ticket/11636): Introduced new, UX-focused, methods for getting selected HTML and deleting it &mdash; [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) and [`editor.extractSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-extractSelectedHtml).
888
- * [#12416](https://dev.ckeditor.com/ticket/12416): Added the [`widget.definition.upcastPriority`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcastPriority) property which gives more control over widget upcasting order to the widget author.
889
- * [#12036](https://dev.ckeditor.com/ticket/12036): Initialize the editor in [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode when the `<textarea>` element has a `readonly` attribute.
890
- * [#11905](https://dev.ckeditor.com/ticket/11905): The [`resize` event](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-resize) passes the current dimensions in its data.
891
- * [#12126](https://dev.ckeditor.com/ticket/12126): Introduced [`config.image_prefillDimensions`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image_prefillDimensions) and [`config.image2_prefillDimensions`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_prefillDimensions) to make pre-filling `width` and `height` configurable for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2).
892
- * [#12746](https://dev.ckeditor.com/ticket/12746): Added a new configuration option to hide the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resizer.
893
- * [#12150](https://dev.ckeditor.com/ticket/12150): Exposed the [`getNestedEditable()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#static-method-getNestedEditable) and `is*` [widget helper](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) functions (see the static methods).
894
- * [#12448](https://dev.ckeditor.com/ticket/12448): Introduced the [`editable.insertHtmlIntoRange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertHtmlIntoRange) method.
895
- * [#12143](https://dev.ckeditor.com/ticket/12143): Added the [`config.floatSpacePreferRight`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-floatSpacePreferRight) configuration option that switches the alignment of the floating toolbar. Thanks to [InvisibleBacon](http://github.com/InvisibleBacon)!
896
- * [#10986](https://dev.ckeditor.com/ticket/10986): Added support for changing dialog input and textarea text directions by using the *Shift+Alt+Home/End* keystrokes. The direction is stored in the value of the input by prepending the [`\u202A`](http://unicode.org/cldr/utility/character.jsp?a=202A) or [`\u202B`](http://unicode.org/cldr/utility/character.jsp?a=202B) marker to it. Read more in the [documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition_textInput.html#property-bidi). Thanks to [edithkk](https://github.com/edithkk)!
897
- * [#12770](https://dev.ckeditor.com/ticket/12770): Added support for passing [widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html)'s startup data as a widget command's argument. Thanks to [Rebrov Boris](https://github.com/zipp3r) and [Tieme van Veen](https://github.com/tiemevanveen)!
898
- * [#11583](https://dev.ckeditor.com/ticket/11583): Added support for the HTML5 `required` attribute in various form elements. Thanks to [Steven Busse](https://github.com/sbusse)!
899
-
900
- Changes:
901
-
902
- * [#12858](https://dev.ckeditor.com/ticket/12858): Basic [Spartan](http://blogs.windows.com/bloggingwindows/2015/03/30/introducing-project-spartan-the-new-browser-built-for-windows-10/) browser compatibility. Full compatibility will be introduced later, because at the moment Spartan is still too unstable to be used for tests and we see many changes from version to version.
903
- * [#12948](https://dev.ckeditor.com/ticket/12948): The [`config.mathJaxLibrary`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-mathJaxLib) option does not default to the MathJax CDN any more. It needs to be configured to enable the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin now.
904
- * [#13069](https://dev.ckeditor.com/ticket/13069): Fixed inconsistencies between [`editable.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElement) and [`editable.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElement) when the `range` parameter is used. Now, the `editor.insertElement()` method works on a higher level, which means that it saves undo snapshots and sets the selection after insertion. Use the [`editable.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElementIntoRange) method directly for the pre 4.5 behavior of `editable.insertElement()`.
905
- * [#12870](https://dev.ckeditor.com/ticket/12870): Use [`editor.showNotification()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-showNotification) instead of `alert()` directly whenever possible. When the [Notification plugin](https://ckeditor.com/cke4/addon/notification) is loaded, the notification system is used automatically. Otherwise, the native `alert()` is displayed.
906
- * [#8024](https://dev.ckeditor.com/ticket/8024): Swapped behavior of the Split Cell Vertically and Horizontally features of the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin to be more intuitive. Thanks to [kevinisagit](https://github.com/kevinisagit)!
907
- * [#10903](https://dev.ckeditor.com/ticket/10903): Performance improvements for the [`dom.element.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-addClass), [`dom.element.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeClass) and [`dom.element.hasClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-hasClass) methods. Note: The previous implementation allowed passing multiple classes to `addClass()` although it was only a side effect of that implementation. The new implementation does not allow this.
908
- * [#11856](https://dev.ckeditor.com/ticket/11856): The jQuery adapter throws a meaningful error if CKEditor or jQuery are not loaded.
909
-
910
- Fixed issues:
911
-
912
- * [#11586](https://dev.ckeditor.com/ticket/11586): Fixed: [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) should not change the DOM in order not to affect selection.
913
- * [#12148](https://dev.ckeditor.com/ticket/12148): Fixed: [`dom.element.getChild()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getChild) should not modify a passed array.
914
- * [#12503](https://dev.ckeditor.com/ticket/12503): [Blink/Webkit] Fixed: Incorrect result of Select All and *Backspace* or *Delete*.
915
- * [#13001](https://dev.ckeditor.com/ticket/13001): [Firefox] Fixed: The `<br />` filler is placed in the wrong position by the [`range.fixBlock()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-fixBlock) method due to quirky Firefox behavior.
916
- * [#13101](https://dev.ckeditor.com/ticket/13101): [IE8] Fixed: Colons are prepended to HTML5 element names when cloning them.
917
-
918
- ## CKEditor 4.4.8
919
-
920
- **Security Updates:**
921
-
922
- * Fixed XSS vulnerability in the HTML parser reported by [Dheeraj Joshi](https://twitter.com/dheerajhere) and [Prem Kumar](https://twitter.com/iAmPr3m).
923
-
924
- Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
925
-
926
- **An upgrade is highly recommended!**
927
-
928
- Fixed Issues:
929
-
930
- * [#12899](https://dev.ckeditor.com/ticket/12899): Fixed: Corrected wrong tag ending for horizontal box definition in the [Dialog User Interface](https://ckeditor.com/cke4/addon/dialogui) plugin. Thanks to [mizafish](https://github.com/mizafish)!
931
- * [#13254](https://dev.ckeditor.com/ticket/13254): Fixed: Cannot outdent block after indent when using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. Thanks to [Jonathan Cottrill](https://github.com/jcttrll)!
932
- * [#13268](https://dev.ckeditor.com/ticket/13268): Fixed: Documentation for [`CKEDITOR.dom.text`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.text.html) is incorrect. Thanks to [Ben Kiefer](https://github.com/benkiefer)!
933
- * [#12739](https://dev.ckeditor.com/ticket/12739): Fixed: Link loses inline styles when edited without the [Advanced Tab for Dialogs](https://ckeditor.com/cke4/addon/dialogadvtab) plugin. Thanks to [Віталій Крутько](https://github.com/asmforce)!
934
- * [#13292](https://dev.ckeditor.com/ticket/13292): Fixed: Protection pattern does not work in attribute in self-closing elements with no space before `/>`. Thanks to [Віталій Крутько](https://github.com/asmforce)!
935
- * [PR#192](https://github.com/ckeditor/ckeditor-dev/pull/192): Fixed: Variable name typo in the [Dialog User Interface](https://ckeditor.com/cke4/addon/dialogui) plugin which caused [`CKEDITOR.ui.dialog.radio`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.ui.dialog.radio.html) validation to not work. Thanks to [Florian Ludwig](https://github.com/FlorianLudwig)!
936
- * [#13232](https://dev.ckeditor.com/ticket/13232): [Safari] Fixed: The [`element.appendText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-appendText) method does not work properly for empty elements.
937
- * [#13233](https://dev.ckeditor.com/ticket/13233): Fixed: [HTMLDataProcessor](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html) can process `foo:href` attributes.
938
- * [#12796](https://dev.ckeditor.com/ticket/12796): Fixed: The [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin unwraps parent `<li>` elements. Thanks to [Andrew Stucki](https://github.com/andrewstucki)!
939
- * [#12885](https://dev.ckeditor.com/ticket/12885): Added missing [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) parameter documentation.
940
- * [#11982](https://dev.ckeditor.com/ticket/11982): Fixed: Bullet added in a wrong position after the *Enter* key is pressed in a nested list.
941
- * [#13027](https://dev.ckeditor.com/ticket/13027): Fixed: Keyboard navigation in dialog windows with multiple tabs not following IBM CI 162 instructions or [ARIA Authoring Practices](http://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel).
942
- * [#12256](https://dev.ckeditor.com/ticket/12256): Fixed: Basic styles classes are lost when pasting from Microsoft Word if [basic styles](https://ckeditor.com/cke4/addon/basicstyles) were configured to use classes.
943
- * [#12729](https://dev.ckeditor.com/ticket/12729): Fixed: Incorrect structure created when merging a block into a list item on *Backspace* and *Delete*.
944
- * [#13031](https://dev.ckeditor.com/ticket/13031): [Firefox] Fixed: No more line breaks in source view since Firefox 36.
945
- * [#13131](https://dev.ckeditor.com/ticket/13131): Fixed: The [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) plugin cannot be used without the [IFrame Editing Area](https://ckeditor.com/cke4/addon/wysiwygarea) plugin.
946
- * [#9086](https://dev.ckeditor.com/ticket/9086): Fixed: Invalid ARIA property used on paste area `<iframe>`.
947
- * [#13164](https://dev.ckeditor.com/ticket/13164): Fixed: Error when inserting a hidden field.
948
- * [#13155](https://dev.ckeditor.com/ticket/13155): Fixed: Incorrect [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) positioning when `<body>` has a margin.
949
- * [#13351](https://dev.ckeditor.com/ticket/13351): Fixed: Link lost when editing a linked image with the Link tab disabled. This also fixed a bug when inserting an image into a fully selected link would throw an error ([#12847](https://dev.ckeditor.com/ticket/12847)).
950
- * [#13344](https://dev.ckeditor.com/ticket/13344): [WebKit/Blink] Fixed: It is possible to remove or change editor content in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html).
951
-
952
- Other Changes:
953
-
954
- * [#12844](https://dev.ckeditor.com/ticket/12844) and [#13103](https://dev.ckeditor.com/ticket/13103): Upgraded the [testing environment](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_tests.html) to [Bender.js](https://github.com/benderjs/benderjs) `0.2.3`.
955
- * [#12930](https://dev.ckeditor.com/ticket/12930): Because of licensing issues, `truncated-mathjax/` is now removed from the `tests/` directory. Now `bender.config.mathJaxLibPath` must be configured manually in order to run [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin tests.
956
- * [#13266](https://dev.ckeditor.com/ticket/13266): Added more shades of gray in the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window. Thanks to [mizafish](https://github.com/mizafish)!
957
-
958
-
959
- ## CKEditor 4.4.7
960
-
961
- Fixed Issues:
962
-
963
- * [#12825](https://dev.ckeditor.com/ticket/12825): Fixed: Preventing the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin from operating on elements outside the editor. Thanks to [Paul Martin](https://github.com/Paul-Martin)!
964
- * [#12157](https://dev.ckeditor.com/ticket/12157): Fixed: Lost text formatting on pressing *Tab* when the [`config.tabSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-tabSpaces) configuration option value was greater than zero.
965
- * [#12777](https://dev.ckeditor.com/ticket/12777): Fixed: The `table-layout` CSS property should be reset by skins. Thanks to [vita10gy](https://github.com/vita10gy)!
966
- * [#12812](https://dev.ckeditor.com/ticket/12812): Fixed: An uncaught security exception is thrown when [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) are used in an inline editor loaded in a cross-domain `iframe`. Thanks to [Vitaliy Zurian](https://github.com/thecatontheflat)!
967
- * [#12735](https://dev.ckeditor.com/ticket/12735): Fixed: [`config.fillEmptyBlocks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fillEmptyBlocks) should only apply when outputting data.
968
- * [#10032](https://dev.ckeditor.com/ticket/10032): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter is executed for every paste after using the button.
969
- * [#12597](https://dev.ckeditor.com/ticket/12597): [Blink/WebKit] Fixed: Multi-byte Japanese characters entry not working properly after *Shift+Enter*.
970
- * [#12387](https://dev.ckeditor.com/ticket/12387): Fixed: An error is thrown if a skin does not have the [`chameleon`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_skin.html#method-chameleon) property defined and [`config.uiColor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-uiColor) is defined.
971
- * [#12747](https://dev.ckeditor.com/ticket/12747): [IE8-10] Fixed: Opening a drop-down for a specific selection when the editor is maximized results in incorrect drop-down panel position.
972
- * [#12850](https://dev.ckeditor.com/ticket/12850): [IEQM] Fixed: An error is thrown after focusing the editor.
973
-
974
- ## CKEditor 4.4.6
975
-
976
- **Security Updates:**
977
-
978
- * Fixed XSS vulnerability in the HTML parser reported by [Maco Cortes](https://www.facebook.com/Maaacoooo).
979
-
980
- Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
981
-
982
- **An upgrade is highly recommended!**
983
-
984
- New Features:
985
-
986
- * [#12501](https://dev.ckeditor.com/ticket/12501): Allowed dashes in element names in the [string format of allowed content rules](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html#string-format).
987
- * [#12550](https://dev.ckeditor.com/ticket/12550): Added the `<main>` element to the [`CKEDITOR.dtd`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dtd.html).
988
-
989
- Fixed Issues:
990
-
991
- * [#12506](https://dev.ckeditor.com/ticket/12506): [Safari] Fixed: Cannot paste into inline editor if the page has `user-select: none` style. Thanks to [shaohua](https://github.com/shaohua)!
992
- * [#12683](https://dev.ckeditor.com/ticket/12683): Fixed: [Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) fails to remove custom tags. Thanks to [timselier](https://github.com/timselier)!
993
- * [#12489](https://dev.ckeditor.com/ticket/12489) and [#12491](https://dev.ckeditor.com/ticket/12491): Fixed: Various issues related to restoring the selection after performing operations on filler character. See the [fixed cases](https://dev.ckeditor.com/ticket/12491#comment:4).
994
- * [#12621](https://dev.ckeditor.com/ticket/12621): Fixed: Cannot remove inline styles (bold, italic, etc.) in empty lines.
995
- * [#12630](https://dev.ckeditor.com/ticket/12630): [Chrome] Fixed: Selection is placed outside the paragraph when the [New Page](https://ckeditor.com/cke4/addon/newpage) button is clicked. This patch significantly simplified the way how the initial selection (a selection after the content of the editable is overwritten) is being fixed. That might have fixed many related scenarios in all browsers.
996
- * [#11647](https://dev.ckeditor.com/ticket/11647): Fixed: The [`editor.blur`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur) event is not fired on first blur after initializing the inline editor on an already focused element.
997
- * [#12601](https://dev.ckeditor.com/ticket/12601): Fixed: [Strikethrough](https://ckeditor.com/cke4/addon/basicstyles) button tooltip spelling.
998
- * [#12546](https://dev.ckeditor.com/ticket/12546): Fixed: The Preview tab in the [Document Properties](https://ckeditor.com/cke4/addon/docprops) dialog window is always disabled.
999
- * [#12300](https://dev.ckeditor.com/ticket/12300): Fixed: The [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event fired on first navigation key press after typing.
1000
- * [#12141](https://dev.ckeditor.com/ticket/12141): Fixed: List items are lost when indenting a list item with content wrapped with a block element.
1001
- * [#12515](https://dev.ckeditor.com/ticket/12515): Fixed: Cursor is in the wrong position when undoing after adding an image and typing some text.
1002
- * [#12484](https://dev.ckeditor.com/ticket/12484): [Blink/WebKit] Fixed: DOM is changed outside the editor area in a certain case.
1003
- * [#12688](https://dev.ckeditor.com/ticket/12688): Improved the tests of the [styles system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) and fixed two minor issues.
1004
- * [#12403](https://dev.ckeditor.com/ticket/12403): Fixed: Changing the [font](https://ckeditor.com/cke4/addon/font) style should not lead to nesting it in the previous style element.
1005
- * [#12609](https://dev.ckeditor.com/ticket/12609): Fixed: Incorrect `config.magicline_putEverywhere` name used for a [Magic Line](https://ckeditor.com/cke4/addon/magicline) all-encompassing [`config.magicline_everywhere`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-magicline_everywhere) configuration option.
1006
-
1007
-
1008
- ## CKEditor 4.4.5
1009
-
1010
- New Features:
1011
-
1012
- * [#12279](https://dev.ckeditor.com/ticket/12279): Added a possibility to pass a custom evaluator to [`node.getAscendant()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_node.html#method-getAscendant).
1013
-
1014
- Fixed Issues:
1015
-
1016
- * [#12423](https://dev.ckeditor.com/ticket/12423): [Safari7.1+] Fixed: *Enter* key moved cursor to a strange position.
1017
- * [#12381](https://dev.ckeditor.com/ticket/12381): [iOS] Fixed: Selection issue. Thanks to [Remiremi](https://github.com/Remiremi)!
1018
- * [#10804](https://dev.ckeditor.com/ticket/10804): Fixed: `CKEDITOR_GETURL` is not used with some plugins where it should be used. Thanks to [Thomas Andraschko](https://github.com/tandraschko)!
1019
- * [#9137](https://dev.ckeditor.com/ticket/9137): Fixed: The `<base>` tag is not created when `<head>` has an attribute. Thanks to [naoki.fujikawa](https://github.com/naoki-fujikawa)!
1020
- * [#12377](https://dev.ckeditor.com/ticket/12377): Fixed: Errors thrown in the [Image](https://ckeditor.com/cke4/addon/image) plugin when removing preview from the dialog window definition. Thanks to [Axinet](https://github.com/Axinet)!
1021
- * [#12162](https://dev.ckeditor.com/ticket/12162): Fixed: Auto paragraphing and *Enter* key in nested editables.
1022
- * [#12315](https://dev.ckeditor.com/ticket/12315): Fixed: Marked [`config.autoParagraph`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autoParagraph) as deprecated.
1023
- * [#12113](https://dev.ckeditor.com/ticket/12113): Fixed: A [code snippet](https://ckeditor.com/cke4/addon/codesnippet) should be presented in the [elements path](https://ckeditor.com/cke4/addon/elementspath) as "code snippet" (translatable).
1024
- * [#12311](https://dev.ckeditor.com/ticket/12311): Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) should also remove `<cite>` elements.
1025
- * [#12261](https://dev.ckeditor.com/ticket/12261): Fixed: The filter is not destroyed and removed from [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) on editor destroy.
1026
- * [#12398](https://dev.ckeditor.com/ticket/12398): Fixed: [Maximize](https://ckeditor.com/cke4/addon/maximize) does not work on an instance without a [title](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title).
1027
- * [#12097](https://dev.ckeditor.com/ticket/12097): Fixed: JAWS not reading the number of options correctly in the [Text Color and Background Color](https://ckeditor.com/cke4/addon/colorbutton) button menu.
1028
- * [#12411](https://dev.ckeditor.com/ticket/12411): Fixed: [Page Break](https://ckeditor.com/cke4/addon/pagebreak) used directly in the editable breaks the editor.
1029
- * [#12354](https://dev.ckeditor.com/ticket/12354): Fixed: Various issues in undo manager when holding keys.
1030
- * [#12324](https://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps are not recorded when changing the caret position by clicking below the body.
1031
- * [#12332](https://dev.ckeditor.com/ticket/12332): Fixed: Lowered DOM events listeners' priorities in undo manager in order to avoid ambiguity.
1032
- * [#12402](https://dev.ckeditor.com/ticket/12402): [Blink] Fixed: Workaround for Blink bug with `document.title` which breaks updating title in the full HTML mode.
1033
- * [#12338](https://dev.ckeditor.com/ticket/12338): Fixed: The CKEditor package contains unoptimized images.
1034
-
1035
-
1036
- ## CKEditor 4.4.4
1037
-
1038
- Fixed Issues:
1039
-
1040
- * [#12268](https://dev.ckeditor.com/ticket/12268): Cleanup of [UI Color](https://ckeditor.com/cke4/addon/uicolor) YUI styles. Thanks to [CasherWest](https://github.com/CasherWest)!
1041
- * [#12263](https://dev.ckeditor.com/ticket/12263): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter does not properly normalize semicolons style text. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1042
- * [#12243](https://dev.ckeditor.com/ticket/12243): Fixed: Text formatting lost when pasting from Word. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1043
- * [#111739](https://dev.ckeditor.com/ticket/11739): Fixed: `keypress` listeners should not be used in the undo manager. A complete rewrite of keyboard handling in the undo manager was made. Numerous smaller issues were fixed, among others:
1044
- * [#10926](https://dev.ckeditor.com/ticket/10926): [Chrome@Android] Fixed: Typing does not record snapshots and does not fire the [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
1045
- * [#11611](https://dev.ckeditor.com/ticket/11611): [Firefox] Fixed: The [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event is fired when pressing Arrow keys.
1046
- * [#12219](https://dev.ckeditor.com/ticket/12219): [Safari] Fixed: Some modifications of the [`UndoManager.locked`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#property-locked) property violate strict mode in the [Undo](https://ckeditor.com/cke4/addon/undo) plugin.
1047
- * [#10916](https://dev.ckeditor.com/ticket/10916): Fixed: [Magic Line](https://ckeditor.com/cke4/addon/magicline) icon in Right-To-Left environments.
1048
- * [#11970](https://dev.ckeditor.com/ticket/11970): [IE] Fixed: CKEditor `paste` event is not fired when pasting with *Shift+Ins*.
1049
- * [#12111](https://dev.ckeditor.com/ticket/12111): Fixed: Linked image attributes are not read when opening the image dialog window by doubleclicking.
1050
- * [#10030](https://dev.ckeditor.com/ticket/10030): [IE] Fixed: Prevented "Unspecified Error" thrown in various cases when IE8-9 does not allow access to `document.activeElement`.
1051
- * [#12273](https://dev.ckeditor.com/ticket/12273): Fixed: Applying block style in a description list breaks it.
1052
- * [#12218](https://dev.ckeditor.com/ticket/12218): Fixed: Minor syntax issue in CSS files.
1053
- * [#12178](https://dev.ckeditor.com/ticket/12178): [Blink/WebKit] Fixed: Iterator does not return the block if the selection is located at the end of it.
1054
- * [#12185](https://dev.ckeditor.com/ticket/12185): [IE9QM] Fixed: Error thrown when moving the mouse over focused editor's scrollbar.
1055
- * [#12215](https://dev.ckeditor.com/ticket/12215): Fixed: Basepath resolution does not recognize semicolon as a query separator.
1056
- * [#12135](https://dev.ckeditor.com/ticket/12135): Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) does not work on widgets.
1057
- * [#12298](https://dev.ckeditor.com/ticket/12298): [IE11] Fixed: Clicking below `<body>` in Compatibility Mode will no longer reset selection to the first line.
1058
- * [#12204](https://dev.ckeditor.com/ticket/12204): Fixed: Editor's voice label is not affected by [`config.title`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title).
1059
- * [#11915](https://dev.ckeditor.com/ticket/11915): Fixed: With [SCAYT](https://ckeditor.com/cke4/addon/scayt) enabled, cursor moves to the beginning of the first highlighted, misspelled word after typing or pasting into the editor.
1060
- * [SCAYT](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/69): Fixed: Error thrown in the console after enabling [SCAYT](https://ckeditor.com/cke4/addon/scayt) and trying to add a new image.
1061
-
1062
-
1063
- Other Changes:
1064
-
1065
- * [#12296](https://dev.ckeditor.com/ticket/12296): Merged `benderjs-ckeditor` into the main CKEditor repository.
1066
-
1067
- ## CKEditor 4.4.3
1068
-
1069
- **Security Updates:**
1070
-
1071
- * Fixed XSS vulnerability in the Preview plugin reported by Mario Heiderich of [Cure53](https://cure53.de/).
1072
-
1073
- **An upgrade is highly recommended!**
1074
-
1075
- New Features:
1076
-
1077
- * [#12164](https://dev.ckeditor.com/ticket/12164): Added the "Justify" option to the "Horizontal Alignment" drop-down in the Table Cell Properties dialog window.
1078
-
1079
- Fixed Issues:
1080
-
1081
- * [#12110](https://dev.ckeditor.com/ticket/12110): Fixed: Editor crash after deleting a table. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1082
- * [#11897](https://dev.ckeditor.com/ticket/11897): Fixed: *Enter* key used in an empty list item creates a new line instead of breaking the list. Thanks to [noam-si](https://github.com/noam-si)!
1083
- * [#12140](https://dev.ckeditor.com/ticket/12140): Fixed: Double-clicking linked widgets opens two dialog windows.
1084
- * [#12132](https://dev.ckeditor.com/ticket/12132): Fixed: Image is inserted with `width` and `height` styles even when they are not allowed.
1085
- * [#9317](https://dev.ckeditor.com/ticket/9317): [IE] Fixed: [`config.disableObjectResizing`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-disableObjectResizing) does not work on IE. **Note**: We were not able to fix this issue on IE11+ because necessary events stopped working. See a [last resort workaround](https://dev.ckeditor.com/ticket/9317#comment:16) and make sure to [support our complaint to Microsoft](https://connect.microsoft.com/IE/feedback/details/742593/please-respect-execcommand-enableobjectresizing-in-contenteditable-elements).
1086
- * [#9638](https://dev.ckeditor.com/ticket/9638): Fixed: There should be no information about accessibility help available under the *Alt+0* keyboard shortcut if the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) plugin is not available.
1087
- * [#8117](https://dev.ckeditor.com/ticket/8117) and [#9186](https://dev.ckeditor.com/ticket/9186): Fixed: In HTML5 `<meta>` tags should be allowed everywhere, including inside the `<body>` element.
1088
- * [#10422](https://dev.ckeditor.com/ticket/10422): Fixed: [`config.fillEmptyBlocks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fillEmptyBlocks) not working properly if a function is specified.
1089
-
1090
- ## CKEditor 4.4.2
1091
-
1092
- Important Notes:
1093
-
1094
- * The CKEditor testing environment is now publicly available. Read more about how to set up the environment and execute tests in the [CKEditor Testing Environment](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_tests.html) guide.
1095
- Please note that the [`tests/`](https://github.com/ckeditor/ckeditor-dev/tree/master/tests) directory which contains editor tests is not available in release packages. It can only be found in the development version of CKEditor on [GitHub](https://github.com/ckeditor/ckeditor-dev/).
1096
-
1097
- New Features:
1098
-
1099
- * [#11909](https://dev.ckeditor.com/ticket/11909): Introduced a parameter to prevent the [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData) method from recording undo snapshots.
1100
-
1101
- Fixed Issues:
1102
-
1103
- * [#11757](https://dev.ckeditor.com/ticket/11757): Fixed: Imperfections in the [Moono](https://ckeditor.com/cke4/addon/moono) skin. Thanks to [danyaPostfactum](https://github.com/danyaPostfactum)!
1104
- * [#10091](https://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)!
1105
- * [#11478](https://dev.ckeditor.com/ticket/11478): Fixed: Issue with passing jQuery objects to [adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) configuration.
1106
- * [#10867](https://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image link.
1107
- * [#11983](https://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-getByElement) method was improved.
1108
- * [#12000](https://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData) and [`nestedEditable.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_nestedEditable.html#method-setData).
1109
- * [#12022](https://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside.
1110
- * [#11960](https://dev.ckeditor.com/ticket/11960): [Blink/WebKit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case).
1111
- * [#11306](https://dev.ckeditor.com/ticket/11306): [OSX][Blink/WebKit] Fixed: No widget entries in the context menu on widget right-click.
1112
- * [#11957](https://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window are not translated.
1113
- * [#11980](https://dev.ckeditor.com/ticket/11980): [Blink/WebKit] Fixed: `<span>` elements created when joining adjacent elements (non-collapsed selection).
1114
- * [#12009](https://dev.ckeditor.com/ticket/12009): [Nested widgets] Integration with the [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin.
1115
- * [#11387](https://dev.ckeditor.com/ticket/11387): Fixed: `role="radiogroup"` should be applied only to radio inputs' container.
1116
- * [#7975](https://dev.ckeditor.com/ticket/7975): [IE8] Fixed: Errors when trying to select an empty table cell.
1117
- * [#11947](https://dev.ckeditor.com/ticket/11947): [Firefox+IE11] Fixed: *Shift+Enter* in lists produces two line breaks.
1118
- * [#11972](https://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-setText) method should not trigger the layout engine.
1119
- * [#7634](https://dev.ckeditor.com/ticket/7634): Fixed: The [Flash Dialog](https://ckeditor.com/cke4/addon/flash) plugin omits the `allowFullScreen` parameter in the editor data if set to `true`.
1120
- * [#11910](https://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) does not take [`config.baseHref`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-baseHref) into account when updating image dimensions.
1121
- * [#11753](https://dev.ckeditor.com/ticket/11753): Fixed: Wrong [`checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) method value after focusing or blurring a widget.
1122
- * [#11830](https://dev.ckeditor.com/ticket/11830): Fixed: Impossible to pass some arguments to [CKBuilder](https://github.com/ckeditor/ckbuilder) when using the `/dev/builder/build.sh` script.
1123
- * [#11945](https://dev.ckeditor.com/ticket/11945): Fixed: [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin should not change a core method.
1124
- * [#11384](https://dev.ckeditor.com/ticket/11384): [IE9+] Fixed: `IndexSizeError` thrown when pasting into a non-empty selection anchored in one text node.
1125
-
1126
- ## CKEditor 4.4.1
1127
-
1128
- New Features:
1129
-
1130
- * [#9661](https://dev.ckeditor.com/ticket/9661): Added the option to [configure](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in the `href` attribute.
1131
-
1132
- Fixed Issues:
1133
-
1134
- * [#11861](https://dev.ckeditor.com/ticket/11861): [WebKit/Blink] Fixed: Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in the next release.
1135
- * [#10714](https://dev.ckeditor.com/ticket/10714): [iOS] Fixed: Selection and drop-downs are broken if a touch event listener is used due to a [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)!
1136
- * [#11911](https://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for a preloaded language in [CKEDITOR.lang](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.lang.html). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)!
1137
- * [#11926](https://dev.ckeditor.com/ticket/11926): Fixed: [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) does not decode HTML entities when loading code from the `<code>` element.
1138
- * [#11223](https://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-protectedSource) was not working in the `<title>` element.
1139
- * [#11859](https://dev.ckeditor.com/ticket/11859): Fixed: Removed the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin dependency from the [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) sample.
1140
- * [#11754](https://dev.ckeditor.com/ticket/11754): [Chrome] Fixed: Infinite loop when content includes not closed attributes.
1141
- * [#11848](https://dev.ckeditor.com/ticket/11848): [IE] Fixed: [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) throwing an exception when there was no selection in the editor.
1142
- * [#11801](https://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) widget.
1143
- * [#11626](https://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) sets invalid column width.
1144
- * [#11872](https://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-addClass) chainable symmetrically to [`element.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeClass).
1145
- * [#11813](https://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting a captioned image and restoring an undo snapshot ([Enhanced Image](https://ckeditor.com/cke4/addon/image2)).
1146
- * [#11814](https://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) context menu.
1147
- * [#11839](https://dev.ckeditor.com/ticket/11839): [IE9] Fixed: The caret jumps out of the editable area when resizing the editor in the source mode.
1148
- * [#11822](https://dev.ckeditor.com/ticket/11822): [WebKit] Fixed: Editing anchors by double-click is broken in some cases.
1149
- * [#11823](https://dev.ckeditor.com/ticket/11823): [IE8] Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) throws an error over scrollbar.
1150
- * [#11788](https://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change the language back to _Not set_ in the [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) dialog window.
1151
- * [#11788](https://dev.ckeditor.com/ticket/11788): Fixed: [Filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html) rules are not applied inside elements with the `contenteditable` attribute set to `true`.
1152
- * [#11798](https://dev.ckeditor.com/ticket/11798): Fixed: Inserting a non-editable element inside a table cell breaks the table.
1153
- * [#11793](https://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while the editor is blurred.
1154
- * [#11850](https://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with the `contenteditable` attribute set to `false` are not downcasted properly.
1155
- * [#11811](https://dev.ckeditor.com/ticket/11811): Fixed: Widget's data is not encoded correctly when passed to an attribute.
1156
- * [#11777](https://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin.
1157
- * [#11880](https://dev.ckeditor.com/ticket/11880): [IE8-9] Fixed: Linked image has a default thick border.
1158
-
1159
- Other Changes:
1160
-
1161
- * [#11807](https://dev.ckeditor.com/ticket/11807): Updated jQuery version used in the sample to 1.11.0 and tested CKEditor jQuery Adapter with version 1.11.0 and 2.1.0.
1162
- * [#9504](https://dev.ckeditor.com/ticket/9504): Stopped using deprecated `attribute.specified` in all browsers except Internet Explorer.
1163
- * [#11809](https://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces.
1164
-
1165
- ## CKEditor 4.4
1166
-
1167
- **Important Notes:**
1168
-
1169
- * Marked the [`editor.beforePaste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-beforePaste) event as deprecated.
1170
- * The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) unless the [`config.image2_captionedClass`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations.
1171
- * Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](https://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_feature.html#property-allowedContent) and [`requiredContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_feature.html#property-requiredContent) properties for it manually, because the editor will not be able to find them.
1172
- * The [Show Borders](https://ckeditor.com/cke4/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](https://dev.ckeditor.com/ticket/11665)).
1173
- * Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) will work even when the editor instance is not provided.
1174
-
1175
- New Features:
1176
-
1177
- * [#11297](https://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties &mdash; `type` and `widget`. Read more in the [Widget Styles](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features:
1178
- * Introduced the [`CKEDITOR.style.addCustomHandler()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#static-method-addCustomHandler) method for registering custom style handlers.
1179
- * The [`CKEDITOR.style.apply()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-apply) and [`CKEDITOR.style.remove()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods.
1180
- * Many new methods and properties were introduced in the [Widget API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleableElements), [`widget.definition.styleToAllowedContentRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleToAllowedContentRules), [`widget.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-addClass), [`widget.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeClass), [`widget.getClasses()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClasses), [`widget.hasClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-hasClass), [`widget.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-applyStyle), [`widget.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeStyle), [`widget.checkStyleActive()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-checkStyleActive).
1181
- * Integration with the [Allowed Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) to translate a style to [allowed content rules](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.allowedContentRules.html).
1182
- * [#11300](https://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin:
1183
- * Introduced the [`config.image2_captionedClass`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_captionedClass) option to configure the class of captioned images.
1184
- * Introduced the [`config.image2_alignClasses`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes.
1185
- If this setting is defined, the editor produces classes instead of inline styles for aligned images.
1186
- * Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string.
1187
- * [#11341](https://dev.ckeditor.com/ticket/11341): [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin: It is now possible to add a link to any image type.
1188
- * [#10202](https://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html) format.
1189
- * [#10276](https://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html).
1190
- * [#10480](https://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far &mdash; the default [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](https://ckeditor.com/cke4/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library.
1191
- * [#11737](https://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) of an element that matches custom criteria (see [`filter.addElementCallback()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#method-addElementCallback)).
1192
- * [#11532](https://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addContentsCss) method that can be used for [adding custom CSS files](https://ckeditor.com/docs/ckeditor4/latest/guide/plugin_sdk_styles.html).
1193
- * [#11536](https://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlDecode) method for decoding HTML entities.
1194
- * [#11225](https://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#property-transparentImageData) property which contains transparent image data to be used in CSS or as image source.
1195
-
1196
- Other Changes:
1197
-
1198
- * [#11377](https://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](https://ckeditor.com/cke4/addon/fakeobjects).
1199
- * [#11422](https://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code.
1200
- * [#5217](https://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that:
1201
- * Introduced the [`editable.status`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#property-status) property.
1202
- * Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-lockSnapshot) event.
1203
- * Fixed: Selection not being unlocked in inline editor after setting data ([#11500](https://dev.ckeditor.com/ticket/11500)).
1204
- * The [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin was updated to the latest version.
1205
-
1206
- Fixed Issues:
1207
-
1208
- * [#10190](https://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-removeStyle) should result in a paragraph and not a div.
1209
- * [#11727](https://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked.
1210
-
1211
- ## CKEditor 4.3.5
1212
-
1213
- New Features:
1214
-
1215
- * Added new translation: Tatar.
1216
-
1217
- Fixed Issues:
1218
-
1219
- * [#11677](https://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode.
1220
- * [#11717](https://dev.ckeditor.com/ticket/11717): [Document Properties](https://ckeditor.com/cke4/addon/docprops) plugin requires the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin to work.
1221
-
1222
- ## CKEditor 4.3.4
1223
-
1224
- Fixed Issues:
1225
-
1226
- * [#11597](https://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](https://ckeditor.com/cke4/addon/preview) using the keyboard.
1227
- * [#11544](https://dev.ckeditor.com/ticket/11544): [Placeholders](https://ckeditor.com/cke4/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements.
1228
- * [#8663](https://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-renameNode) not clearing the [`element.getName()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getName) cache.
1229
- * [#11574](https://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item.
1230
- * [#11603](https://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) attaches to tables outside the editable.
1231
- * [#9205](https://dev.ckeditor.com/ticket/9205), [#7805](https://dev.ckeditor.com/ticket/7805), [#8216](https://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`.
1232
- * [#11635](https://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin.
1233
- * [#11660](https://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table.
1234
- * [#11641](https://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor.
1235
- * [#11568](https://dev.ckeditor.com/ticket/11568): Fixed: [Styles](https://ckeditor.com/cke4/addon/stylescombo) drop-down list is not enabled on selection change.
1236
-
1237
- ## CKEditor 4.3.3
1238
-
1239
- Fixed Issues:
1240
-
1241
- * [#11500](https://dev.ckeditor.com/ticket/11500): [WebKit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-removeAllRanges) is now scoped to selection's [root](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#property-root).
1242
- * [#11104](https://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets.
1243
- * [#11487](https://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) method.
1244
- * [#8673](https://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](https://ckeditor.com/cke4/addon/pagebreak).
1245
- * [#11413](https://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-execCommand) behavior.
1246
- * [#11438](https://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure.
1247
- * [#8899](https://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](https://ckeditor.com/cke4/addon/about) dialog window now open in a new browser window or tab.
1248
- * [#11490](https://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](https://ckeditor.com/cke4/addon/menubutton) panel not showing in the source mode.
1249
- * [#11417](https://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#event-doubleclick) event is not canceled anymore after editing was triggered.
1250
- * [#11253](https://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1251
- * [#11359](https://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](https://ckeditor.com/cke4/addon/link) plugin.
1252
- * [#11058](https://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row.
1253
- * [#11508](https://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html) discovering protected attributes within other attributes' values.
1254
- * [#11533](https://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast.
1255
- * [#11400](https://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_domObject.html#method-removeAllListeners) method does not remove custom listeners completely.
1256
- * [#11493](https://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument.
1257
- * [#11390](https://dev.ckeditor.com/ticket/11390): [IE] All [XML](https://ckeditor.com/cke4/addon/xml) plugin [methods](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.xml.html) now work in IE10+.
1258
- * [#11542](https://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set.
1259
- * [#11504](https://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fullPage) is set to `true`, entities are not encoded in editor output.
1260
- * [#11004](https://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window with [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html).
1261
- * [#11439](https://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected.
1262
-
1263
- ## CKEditor 4.3.2
1264
-
1265
- Fixed Issues:
1266
-
1267
- * [#11331](https://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute.
1268
- * [#11177](https://dev.ckeditor.com/ticket/11177): Widget drag handler improvements:
1269
- * [#11176](https://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty.
1270
- * [#11001](https://dev.ckeditor.com/ticket/11001): Fixed: Multiple synchronous layout recalculations are caused by initial drag handler positioning causing performance issues.
1271
- * [#11161](https://dev.ckeditor.com/ticket/11161): Fixed: Drag handler is not repositioned in various situations.
1272
- * [#11281](https://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization.
1273
- * [#11207](https://dev.ckeditor.com/ticket/11207): [Firefox] Fixed: Misplaced [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resizer in the inline editor.
1274
- * [#11102](https://dev.ckeditor.com/ticket/11102): `CKEDITOR.template` improvements:
1275
- * [#11102](https://dev.ckeditor.com/ticket/11102): Added newline character support.
1276
- * [#11216](https://dev.ckeditor.com/ticket/11216): Added "\\'" substring support.
1277
- * [#11121](https://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe.
1278
- * [#11350](https://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl).
1279
- * [#11097](https://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](https://ckeditor.com/cke4/addon/autogrow) plugin performance when dealing with very big tables.
1280
- * [#11290](https://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin.
1281
- * [#11133](https://dev.ckeditor.com/ticket/11133): [Page Break](https://ckeditor.com/cke4/addon/pagebreak) becomes editable if pasted.
1282
- * [#11126](https://dev.ckeditor.com/ticket/11126): Fixed: Native Undo executed once the bottom of the snapshot stack is reached.
1283
- * [#11131](https://dev.ckeditor.com/ticket/11131): [Div Editing Area](https://ckeditor.com/cke4/addon/divarea): Fixed: Error thrown when switching to source mode if the selection was in widget's nested editable.
1284
- * [#11139](https://dev.ckeditor.com/ticket/11139): [Div Editing Area](https://ckeditor.com/cke4/addon/divarea): Fixed: Elements Path is not cleared after switching to source mode.
1285
- * [#10778](https://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace.
1286
- * [#11146](https://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode.
1287
- * [#10762](https://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar.
1288
- * [#11186](https://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-addUpcastCallback) method that allows to block upcasting given element to a widget.
1289
- * [#11307](https://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library.
1290
- * [#11140](https://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable.
1291
- * [#11379](https://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](https://dev.ckeditor.com/ticket/9696)).
1292
- * [#10787](https://dev.ckeditor.com/ticket/10787): [Firefox] Fixed: Broken replacement of text while pasting into `div`-based editor.
1293
- * [#10884](https://dev.ckeditor.com/ticket/10884): Widgets integration with the [Show Blocks](https://ckeditor.com/cke4/addon/showblocks) plugin.
1294
- * [#11021](https://dev.ckeditor.com/ticket/11021): Fixed: An error thrown when selecting entire editable contents while fake selection is on.
1295
- * [#11086](https://dev.ckeditor.com/ticket/11086): [IE8] Re-enable inline widgets drag&drop in Internet Explorer 8.
1296
- * [#11372](https://dev.ckeditor.com/ticket/11372): Widgets: Special characters encoded twice in nested editables.
1297
- * [#10068](https://dev.ckeditor.com/ticket/10068): Fixed: Support for protocol-relative URLs.
1298
- * [#11283](https://dev.ckeditor.com/ticket/11283): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): A `<div>` element with `text-align: center` and an image inside is not recognised correctly.
1299
- * [#11196](https://dev.ckeditor.com/ticket/11196): [Accessibility Instructions](https://ckeditor.com/cke4/addon/a11yhelp): Allowed additional keyboard button labels to be translated in the dialog window.
1300
-
1301
- ## CKEditor 4.3.1
1302
-
1303
- **Important Notes:**
1304
-
1305
- * To match the naming convention, the `language` button is now `Language` ([#11201](https://dev.ckeditor.com/ticket/11201)).
1306
- * [Enhanced Image](https://ckeditor.com/cke4/addon/image2) button, context menu, command, and icon names match those of the [Image](https://ckeditor.com/cke4/addon/image) plugin ([#11222](https://dev.ckeditor.com/ticket/11222)).
1307
-
1308
- Fixed Issues:
1309
-
1310
- * [#11244](https://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event.
1311
- * [#11171](https://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) and [`editor.insertText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertText) methods do not call the [`widget.repository.checkWidgets()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-checkWidgets) method.
1312
- * [#11085](https://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) widget with a placeholder.
1313
- * [#11044](https://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](https://ckeditor.com/cke4/addon/language) plugin drop-down menu.
1314
- * [#11075](https://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option.
1315
- * [#11165](https://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin cannot be removed from the editor.
1316
- * [#11159](https://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Fixed buggy discovery of image dimensions.
1317
- * [#11101](https://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes.
1318
- * [#11077](https://dev.ckeditor.com/ticket/11077): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Empty undo step recorded when resizing the image.
1319
- * [#10853](https://dev.ckeditor.com/ticket/10853): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image.
1320
- * [#11198](https://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading.
1321
- * [#11132](https://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget.
1322
- * [#11182](https://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-quirks) for more details.
1323
- * [#11204](https://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](https://ckeditor.com/cke4/addon/image2) looks nicer.
1324
- * [#11202](https://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](https://ckeditor.com/cke4/addon/bbcode) mode.
1325
- * [#10890](https://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item.
1326
- * [#10055](https://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back.
1327
- * [#11183](https://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) method does not insert the element into every range of a selection any more.
1328
- * [#11042](https://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked.
1329
- * [#11125](https://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle.
1330
- * [#11011](https://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-applyStyle) method removes attributes from nested elements.
1331
- * [#11179](https://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) does not cleanup content generated by the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin for inline editors.
1332
- * [#11237](https://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word.
1333
- * [#11250](https://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded.
1334
- * [#11260](https://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled.
1335
- * [#11200](https://dev.ckeditor.com/ticket/11200): Added [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin as a dependency for [Widget](https://ckeditor.com/cke4/addon/widget) to fix drag and drop.
1336
-
1337
- ## CKEditor 4.3
1338
-
1339
- New Features:
1340
-
1341
- * [#10612](https://dev.ckeditor.com/ticket/10612): Internet Explorer 11 support.
1342
- * [#10869](https://dev.ckeditor.com/ticket/10869): Widgets: Added better integration with the [Elements Path](https://ckeditor.com/cke4/addon/elementspath) plugin.
1343
- * [#10886](https://dev.ckeditor.com/ticket/10886): Widgets: Added tooltip to the drag handle.
1344
- * [#10933](https://dev.ckeditor.com/ticket/10933): Widgets: Introduced drag and drop of block widgets with the [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) plugin.
1345
- * [#10936](https://dev.ckeditor.com/ticket/10936): Widget System changes for easier integration with other dialog systems.
1346
- * [#10895](https://dev.ckeditor.com/ticket/10895): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Added file browser integration.
1347
- * [#11002](https://dev.ckeditor.com/ticket/11002): Added the [`draggable`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-draggable) option to disable drag and drop support for widgets.
1348
- * [#10937](https://dev.ckeditor.com/ticket/10937): [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) widget improvements:
1349
- * loading indicator ([#10948](https://dev.ckeditor.com/ticket/10948)),
1350
- * applying paragraph changes (like font color change) to iframe ([#10841](https://dev.ckeditor.com/ticket/10841)),
1351
- * Firefox and IE9 clipboard fixes ([#10857](https://dev.ckeditor.com/ticket/10857)),
1352
- * fixing same origin policy issue ([#10840](https://dev.ckeditor.com/ticket/10840)),
1353
- * fixing undo bugs ([#10842](https://dev.ckeditor.com/ticket/10842), [#10930](https://dev.ckeditor.com/ticket/10930)),
1354
- * fixing other minor bugs.
1355
- * [#10862](https://dev.ckeditor.com/ticket/10862): [Placeholder](https://ckeditor.com/cke4/addon/placeholder) plugin was rewritten as a widget.
1356
- * [#10822](https://dev.ckeditor.com/ticket/10822): Added styles system integration with non-editable elements (for example widgets) and their nested editables. Styles cannot change non-editable content and are applied in nested editable only if allowed by its type and content filter.
1357
- * [#10856](https://dev.ckeditor.com/ticket/10856): Menu buttons will now toggle the visibility of their panels when clicked multiple times. [Language](https://ckeditor.com/cke4/addon/language) plugin fixes: Added active language highlighting, added an option to remove the language.
1358
- * [#10028](https://dev.ckeditor.com/ticket/10028): New [`config.dialog_noConfirmCancel`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-dialog_noConfirmCancel) configuration option that eliminates the need to confirm closing of a dialog window when the user changed any of its fields.
1359
- * [#10848](https://dev.ckeditor.com/ticket/10848): Integrate remaining plugins ([Styles](https://ckeditor.com/cke4/addon/stylescombo), [Format](https://ckeditor.com/cke4/addon/format), [Font](https://ckeditor.com/cke4/addon/font), [Color Button](https://ckeditor.com/cke4/addon/colorbutton), [Language](https://ckeditor.com/cke4/addon/language) and [Indent](https://ckeditor.com/cke4/addon/indent)) with [active filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeFilter).
1360
- * [#10855](https://dev.ckeditor.com/ticket/10855): Change the extension of emoticons in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) sample from GIF to PNG.
1361
-
1362
- Fixed Issues:
1363
-
1364
- * [#10831](https://dev.ckeditor.com/ticket/10831): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Merged `image2inline` and `image2block` into one `image2` widget.
1365
- * [#10835](https://dev.ckeditor.com/ticket/10835): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Improved visibility of the resize handle.
1366
- * [#10836](https://dev.ckeditor.com/ticket/10836): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Preserve custom mouse cursor while resizing the image.
1367
- * [#10939](https://dev.ckeditor.com/ticket/10939): [Firefox] [Enhanced Image](https://ckeditor.com/cke4/addon/image2): hovering the image causes it to change.
1368
- * [#10866](https://dev.ckeditor.com/ticket/10866): Fixed: Broken *Tab* key navigation in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1369
- * [#10833](https://dev.ckeditor.com/ticket/10833): Fixed: *Lock ratio* option should be on by default in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1370
- * [#10881](https://dev.ckeditor.com/ticket/10881): Various improvements to *Enter* key behavior in nested editables.
1371
- * [#10879](https://dev.ckeditor.com/ticket/10879): [Remove Format](https://ckeditor.com/cke4/addon/removeformat) should not leak from a nested editable.
1372
- * [#10877](https://dev.ckeditor.com/ticket/10877): Fixed: [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) fails to apply changes if a nested editable was focused.
1373
- * [#10877](https://dev.ckeditor.com/ticket/10877): Fixed: [SCAYT](https://ckeditor.com/cke4/addon/wsc) blocks typing in nested editables.
1374
- * [#11079](https://dev.ckeditor.com/ticket/11079): Add button icons to the [Placeholder](https://ckeditor.com/cke4/addon/placeholder) sample.
1375
- * [#10870](https://dev.ckeditor.com/ticket/10870): The `paste` command is no longer being disabled when the clipboard is empty.
1376
- * [#10854](https://dev.ckeditor.com/ticket/10854): Fixed: Firefox prepends `<br>` to `<body>`, so it is stripped by the HTML data processor.
1377
- * [#10823](https://dev.ckeditor.com/ticket/10823): Fixed: [Link](https://ckeditor.com/cke4/addon/link) plugin does not work with non-editable content.
1378
- * [#10828](https://dev.ckeditor.com/ticket/10828): [Magic Line](https://ckeditor.com/cke4/addon/magicline) integration with the Widget System.
1379
- * [#10865](https://dev.ckeditor.com/ticket/10865): Improved hiding copybin, so copying widgets works smoothly.
1380
- * [#11066](https://dev.ckeditor.com/ticket/11066): Widget's private parts use CSS reset.
1381
- * [#11027](https://dev.ckeditor.com/ticket/11027): Fixed: Block commands break on widgets; added the [`contentDomInvalidated`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-contentDomInvalidated) event.
1382
- * [#10430](https://dev.ckeditor.com/ticket/10430): Resolve dependence of the [Image](https://ckeditor.com/cke4/addon/image) plugin on the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin.
1383
- * [#10911](https://dev.ckeditor.com/ticket/10911): Fixed: Browser *Alt* hotkeys will no longer be blocked while a widget is focused.
1384
- * [#11082](https://dev.ckeditor.com/ticket/11082): Fixed: Selected widget is not copied or cut when using toolbar buttons or context menu.
1385
- * [#11083](https://dev.ckeditor.com/ticket/11083): Fixed list and div element application to block widgets.
1386
- * [#10887](https://dev.ckeditor.com/ticket/10887): Internet Explorer 8 compatibility issues related to the Widget System.
1387
- * [#11074](https://dev.ckeditor.com/ticket/11074): Temporarily disabled inline widget drag and drop, because of seriously buggy native `range#moveToPoint` method.
1388
- * [#11098](https://dev.ckeditor.com/ticket/11098): Fixed: Wrong selection position after undoing widget drag and drop.
1389
- * [#11110](https://dev.ckeditor.com/ticket/11110): Fixed: IFrame and Flash objects are being incorrectly pasted in certain conditions.
1390
- * [#11129](https://dev.ckeditor.com/ticket/11129): Page break is lost when loading data.
1391
- * [#11123](https://dev.ckeditor.com/ticket/11123): [Firefox] Widget is destroyed after being dragged outside of `<body>`.
1392
- * [#11124](https://dev.ckeditor.com/ticket/11124): Fixed the [Elements Path](https://ckeditor.com/cke4/addon/elementspath) in an editor using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea).
1393
-
1394
- ## CKEditor 4.3 Beta
1395
-
1396
- New Features:
1397
-
1398
- * [#9764](https://dev.ckeditor.com/ticket/9764): Widget System.
1399
- * [Widget plugin](https://ckeditor.com/cke4/addon/widget) introducing the [Widget API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html).
1400
- * New [`editor.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-enterMode) and [`editor.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-shiftEnterMode) properties &ndash; normalized versions of [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) and [`config.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-shiftEnterMode).
1401
- * Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeEnterMode) or [static](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content.
1402
- * Dynamic *Enter* mode values &ndash; [`editor.setActiveEnterMode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeEnterMode) and [`editor.activeShiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeShiftEnterMode).
1403
- * Dynamic content filter instances &ndash; [`editor.setActiveFilter()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setActiveFilter) method, [`editor.activeFilterChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-activeFilterChange) event, and [`editor.activeFilter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeFilter) property.
1404
- * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-fake) method.
1405
- * Default [`htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_filter.html#method-addRules) method.
1406
- * Dozens of new methods were introduced &ndash; most interesting ones:
1407
- * [`document.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_document.html#method-find),
1408
- * [`document.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_document.html#method-findOne),
1409
- * [`editable.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElementIntoRange),
1410
- * [`range.moveToClosestEditablePosition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-moveToClosestEditablePosition),
1411
- * New methods for [`htmlParser.node`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.node.html) and [`htmlParser.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.element.html).
1412
- * [#10659](https://dev.ckeditor.com/ticket/10659): New [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing.
1413
- * [#10664](https://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin that introduces the MathJax widget.
1414
- * [#7987](https://dev.ckeditor.com/ticket/7987): New [Language](https://ckeditor.com/cke4/addon/language) plugin that implements Language toolbar button to support [WCAG 3.1.2 Language of Parts](http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html).
1415
- * [#10708](https://dev.ckeditor.com/ticket/10708): New [smileys](https://ckeditor.com/cke4/addon/smiley).
1416
-
1417
- ## CKEditor 4.2.3
1418
-
1419
- Fixed Issues:
1420
-
1421
- * [#10994](https://dev.ckeditor.com/ticket/10994): Fixed: Loading external jQuery library when opening the [jQuery Adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) sample directly from file.
1422
- * [#10975](https://dev.ckeditor.com/ticket/10975): [IE] Fixed: Error thrown while opening the color palette.
1423
- * [#9929](https://dev.ckeditor.com/ticket/9929): [Blink/WebKit] Fixed: A non-breaking space is created once a character is deleted and a regular space is typed.
1424
- * [#10963](https://dev.ckeditor.com/ticket/10963): Fixed: JAWS issue with the keyboard shortcut for [Magic Line](https://ckeditor.com/cke4/addon/magicline).
1425
- * [#11096](https://dev.ckeditor.com/ticket/11096): Fixed: TypeError: Object has no method 'is'.
1426
-
1427
- ## CKEditor 4.2.2
1428
-
1429
- Fixed Issues:
1430
-
1431
- * [#9314](https://dev.ckeditor.com/ticket/9314): Fixed: Incorrect error message on closing a dialog window without saving changs.
1432
- * [#10308](https://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row.
1433
- * [#10945](https://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret.
1434
- * [#10912](https://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked.
1435
- * [#10913](https://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_resourceManager.html#method-addExternal) not handling paths including file name specified.
1436
- * [#10666](https://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-isArray) not working cross frame.
1437
- * [#10910](https://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area.
1438
- * [#10868](https://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style.
1439
- * [#10915](https://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin.
1440
- * [#10914](https://dev.ckeditor.com/ticket/10914): Plugins [Indent List](https://ckeditor.com/cke4/addon/indentlist) and [Indent Block](https://ckeditor.com/cke4/addon/indentblock) are now included in the build configuration.
1441
- * [#10812](https://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](https://dev.ckeditor.com/ticket/10850), [#10842](https://dev.ckeditor.com/ticket/10842).
1442
- * [#10951](https://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](https://dev.ckeditor.com/ticket/10705), [#10706](https://dev.ckeditor.com/ticket/10706) and [#10707](https://dev.ckeditor.com/ticket/10707).
1443
- * [#10704](https://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced.
1444
- * [#10753](https://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label.
1445
-
1446
- ## CKEditor 4.2.1
1447
-
1448
- Fixed Issues:
1449
-
1450
- * [#10301](https://dev.ckeditor.com/ticket/10301): [IE9-10] Undo fails after 3+ consecutive paste actions with a JavaScript error.
1451
- * [#10689](https://dev.ckeditor.com/ticket/10689): Save toolbar button saves only the first editor instance.
1452
- * [#10368](https://dev.ckeditor.com/ticket/10368): Move language reading direction definition (`dir`) from main language file to core.
1453
- * [#9330](https://dev.ckeditor.com/ticket/9330): Fixed pasting anchors from MS Word.
1454
- * [#8103](https://dev.ckeditor.com/ticket/8103): Fixed pasting nested lists from MS Word.
1455
- * [#9958](https://dev.ckeditor.com/ticket/9958): [IE9] Pressing the "OK" button will trigger the `onbeforeunload` event in the popup dialog.
1456
- * [#10662](https://dev.ckeditor.com/ticket/10662): Fixed styles from the Styles drop-down list not registering to the ACF in case when the [Shared Spaces plugin](https://ckeditor.com/cke4/addon/sharedspace) is used.
1457
- * [#9654](https://dev.ckeditor.com/ticket/9654): Problems with Internet Explorer 10 Quirks Mode.
1458
- * [#9816](https://dev.ckeditor.com/ticket/9816): Floating toolbar does not reposition vertically in several cases.
1459
- * [#10646](https://dev.ckeditor.com/ticket/10646): Removing a selected sublist or nested table with *Backspace/Delete* removes the parent element.
1460
- * [#10623](https://dev.ckeditor.com/ticket/10623): [WebKit] Page is scrolled when opening a drop-down list.
1461
- * [#10004](https://dev.ckeditor.com/ticket/10004): [ChromeVox] Button names are not announced.
1462
- * [#10731](https://dev.ckeditor.com/ticket/10731): [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin breaks cloning of editor configuration.
1463
- * It is now possible to set per instance [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin configuration instead of setting the configuration globally.
1464
-
1465
- ## CKEditor 4.2
1466
-
1467
- **Important Notes:**
1468
-
1469
- * Dropped compatibility support for Internet Explorer 7 and Firefox 3.6.
1470
-
1471
- * Both the Basic and the Standard distribution packages will not contain the new [Indent Block](https://ckeditor.com/cke4/addon/indentblock) plugin. Because of this the [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) might remove block indentations from existing contents. If you want to prevent this, either [add an appropriate ACF rule to your filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html) or create a custom build based on the Basic/Standard package and add the Indent Block plugin in [CKBuilder](https://ckeditor.com/cke4/builder).
1472
-
1473
- New Features:
1474
-
1475
- * [#10027](https://dev.ckeditor.com/ticket/10027): Separated list and block indentation into two plugins: [Indent List](https://ckeditor.com/cke4/addon/indentlist) and [Indent Block](https://ckeditor.com/cke4/addon/indentblock).
1476
- * [#8244](https://dev.ckeditor.com/ticket/8244): Use *(Shift+)Tab* to indent and outdent lists.
1477
- * [#10281](https://dev.ckeditor.com/ticket/10281): The [jQuery Adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) is now available. Several jQuery-related issues fixed: [#8261](https://dev.ckeditor.com/ticket/8261), [#9077](https://dev.ckeditor.com/ticket/9077), [#8710](https://dev.ckeditor.com/ticket/8710), [#8530](https://dev.ckeditor.com/ticket/8530), [#9019](https://dev.ckeditor.com/ticket/9019), [#6181](https://dev.ckeditor.com/ticket/6181), [#7876](https://dev.ckeditor.com/ticket/7876), [#6906](https://dev.ckeditor.com/ticket/6906).
1478
- * [#10042](https://dev.ckeditor.com/ticket/10042): Introduced [`config.title`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title) setting to change the human-readable title of the editor.
1479
- * [#9794](https://dev.ckeditor.com/ticket/9794): Added [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
1480
- * [#9923](https://dev.ckeditor.com/ticket/9923): HiDPI support in the editor UI. HiDPI icons for [Moono skin](https://ckeditor.com/cke4/addon/moono) added.
1481
- * [#8031](https://dev.ckeditor.com/ticket/8031): Handle `required` attributes on `<textarea>` elements &mdash; introduced [`editor.required`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-required) event.
1482
- * [#10280](https://dev.ckeditor.com/ticket/10280): Ability to replace `<textarea>` elements with the inline editor.
1483
-
1484
- Fixed Issues:
1485
-
1486
- * [#10599](https://dev.ckeditor.com/ticket/10599): [Indent](https://ckeditor.com/cke4/addon/indent) plugin is no longer required by the [List](https://ckeditor.com/cke4/addon/list) plugin.
1487
- * [#10370](https://dev.ckeditor.com/ticket/10370): Inconsistency in data events between framed and inline editors.
1488
- * [#10438](https://dev.ckeditor.com/ticket/10438): [FF, IE] No selection is done on an editable element on executing [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData).
1489
-
1490
- ## CKEditor 4.1.3
1491
-
1492
- New Features:
1493
-
1494
- * Added new translation: Indonesian.
1495
-
1496
- Fixed Issues:
1497
-
1498
- * [#10644](https://dev.ckeditor.com/ticket/10644): Fixed a critical bug when pasting plain text in Blink-based browsers.
1499
- * [#5189](https://dev.ckeditor.com/ticket/5189): [Find/Replace](https://ckeditor.com/cke4/addon/find) dialog window: rename "Cancel" button to "Close".
1500
- * [#10562](https://dev.ckeditor.com/ticket/10562): [Housekeeping] Unified CSS gradient filter formats in the [Moono](https://ckeditor.com/cke4/addon/moono) skin.
1501
- * [#10537](https://dev.ckeditor.com/ticket/10537): Advanced Content Filter should register a default rule for [`config.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-shiftEnterMode).
1502
- * [#10610](https://dev.ckeditor.com/ticket/10610): [`CKEDITOR.dialog.addIframe()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#static-method-addIframe) incorrectly sets the iframe size in dialog windows.
1503
-
1504
- ## CKEditor 4.1.2
1505
-
1506
- New Features:
1507
-
1508
- * Added new translation: Sinhala.
1509
-
1510
- Fixed Issues:
1511
-
1512
- * [#10339](https://dev.ckeditor.com/ticket/10339): Fixed: Error thrown when inserted data was totally stripped out after filtering and processing.
1513
- * [#10298](https://dev.ckeditor.com/ticket/10298): Fixed: Data processor breaks attributes containing protected parts.
1514
- * [#10367](https://dev.ckeditor.com/ticket/10367): Fixed: [`editable.insertText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertText) loses characters when `RegExp` replace controls are being inserted.
1515
- * [#10165](https://dev.ckeditor.com/ticket/10165): [IE] Access denied error when `document.domain` has been altered.
1516
- * [#9761](https://dev.ckeditor.com/ticket/9761): Update the *Backspace* key state in [`keystrokeHandler.blockedKeystrokes`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_keystrokeHandler.html#property-blockedKeystrokes) when calling [`editor.setReadOnly()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setReadOnly).
1517
- * [#6504](https://dev.ckeditor.com/ticket/6504): Fixed: Race condition while loading several [`config.customConfig`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-customConfig) files.
1518
- * [#10146](https://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is [`CKEDITOR.ENTER_BR`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_BR).
1519
- * [#10360](https://dev.ckeditor.com/ticket/10360): Fixed: ARIA `role="application"` should not be used for dialog windows.
1520
- * [#10361](https://dev.ckeditor.com/ticket/10361): Fixed: ARIA `role="application"` should not be used for floating panels.
1521
- * [#10510](https://dev.ckeditor.com/ticket/10510): Introduced unique voice labels to differentiate between different editor instances.
1522
- * [#9945](https://dev.ckeditor.com/ticket/9945): [iOS] Scrolling not possible on iPad.
1523
- * [#10389](https://dev.ckeditor.com/ticket/10389): Fixed: Invalid HTML in the "Text and Table" template.
1524
- * [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin user interface was changed to match CKEditor 4 style.
1525
-
1526
- ## CKEditor 4.1.1
1527
-
1528
- New Features:
1529
-
1530
- * Added new translation: Albanian.
1531
-
1532
- Fixed Issues:
1533
-
1534
- * [#10172](https://dev.ckeditor.com/ticket/10172): Pressing *Delete* or *Backspace* in an empty table cell moves the cursor to the next/previous cell.
1535
- * [#10219](https://dev.ckeditor.com/ticket/10219): Error thrown when destroying an editor instance in parallel with a `mouseup` event.
1536
- * [#10265](https://dev.ckeditor.com/ticket/10265): Wrong loop type in the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin.
1537
- * [#10249](https://dev.ckeditor.com/ticket/10249): Wrong undo/redo states at start.
1538
- * [#10268](https://dev.ckeditor.com/ticket/10268): [Show Blocks](https://ckeditor.com/cke4/addon/showblocks) does not recover after switching to Source view.
1539
- * [#9995](https://dev.ckeditor.com/ticket/9995): HTML code in the `<textarea>` should not be modified by the [`htmlDataProcessor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html).
1540
- * [#10320](https://dev.ckeditor.com/ticket/10320): [Justify](https://ckeditor.com/cke4/addon/justify) plugin should add elements to Advanced Content Filter based on current [Enter mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode).
1541
- * [#10260](https://dev.ckeditor.com/ticket/10260): Fixed: Advanced Content Filter blocks [`tabSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-tabSpaces). Unified `data-cke-*` attributes filtering.
1542
- * [#10315](https://dev.ckeditor.com/ticket/10315): [WebKit] [Undo manager](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.undo.UndoManager.html) should not record snapshots after a filling character was added/removed.
1543
- * [#10291](https://dev.ckeditor.com/ticket/10291): [WebKit] Space after a filling character should be secured.
1544
- * [#10330](https://dev.ckeditor.com/ticket/10330): [WebKit] The filling character is not removed on `keydown` in specific cases.
1545
- * [#10285](https://dev.ckeditor.com/ticket/10285): Fixed: Styled text pasted from MS Word causes an infinite loop.
1546
- * [#10131](https://dev.ckeditor.com/ticket/10131): Fixed: [`undoManager.update()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#method-update) does not refresh the command state.
1547
- * [#10337](https://dev.ckeditor.com/ticket/10337): Fixed: Unable to remove `<s>` using [Remove Format](https://ckeditor.com/cke4/addon/removeformat).
1548
-
1549
- ## CKEditor 4.1
1550
-
1551
- Fixed Issues:
1552
-
1553
- * [#10192](https://dev.ckeditor.com/ticket/10192): Closing lists with the *Enter* key does not work with [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) in several cases.
1554
- * [#10191](https://dev.ckeditor.com/ticket/10191): Fixed allowed content rules unification, so the [`filter.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-allowedContent) property always contains rules in the same format.
1555
- * [#10224](https://dev.ckeditor.com/ticket/10224): Advanced Content Filter does not remove non-empty `<a>` elements anymore.
1556
- * Minor issues in plugin integration with Advanced Content Filter:
1557
- * [#10166](https://dev.ckeditor.com/ticket/10166): Added transformation from the `align` attribute to `float` style to preserve backward compatibility after the introduction of Advanced Content Filter.
1558
- * [#10195](https://dev.ckeditor.com/ticket/10195): [Image](https://ckeditor.com/cke4/addon/image) plugin no longer registers rules for links to Advanced Content Filter.
1559
- * [#10213](https://dev.ckeditor.com/ticket/10213): [Justify](https://ckeditor.com/cke4/addon/justify) plugin is now correctly registering rules to Advanced Content Filter when [`config.justifyClasses`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-justifyClasses) is defined.
1560
-
1561
- ## CKEditor 4.1 RC
1562
-
1563
- New Features:
1564
-
1565
- * [#9829](https://dev.ckeditor.com/ticket/9829): Advanced Content Filter - data and features activation based on editor configuration.
1566
-
1567
- Brand new data filtering system that works in 2 modes:
1568
-
1569
- * Based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its
1570
- current configuration can handle.
1571
- * Based on [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent) rules - the data
1572
- will be filtered and the editor features (toolbar items, commands, keystrokes) will be enabled if they are allowed.
1573
-
1574
- See the `datafiltering.html` sample, [guides](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) and [`CKEDITOR.filter` API documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html).
1575
- * [#9387](https://dev.ckeditor.com/ticket/9387): Reintroduced [Shared Spaces](https://ckeditor.com/cke4/addon/sharedspace) - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances.
1576
- * [#9907](https://dev.ckeditor.com/ticket/9907): Added the [`contentPreview`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#event-contentPreview) event for preview data manipulation.
1577
- * [#9713](https://dev.ckeditor.com/ticket/9713): Introduced the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin that brings raw HTML editing for inline editor instances.
1578
- * Included in [#9829](https://dev.ckeditor.com/ticket/9829): Introduced new events, [`toHtml`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-toHtml) and [`toDataFormat`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-toDataFormat), allowing for better integration with data processing.
1579
- * [#9981](https://dev.ckeditor.com/ticket/9981): Added ability to filter [`htmlParser.fragment`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.fragment.html), [`htmlParser.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.element.html) etc. by many [`htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html)s before writing structure to an HTML string.
1580
- * Included in [#10103](https://dev.ckeditor.com/ticket/10103):
1581
- * Introduced the [`editor.status`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-status) property to make it easier to check the current status of the editor.
1582
- * Default [`command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.command.html) state is now [`CKEDITOR.TRISTATE_DISABLE`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-TRISTATE_DISABLED). It will be activated on [`editor.instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#event-instanceReady) or immediately after being added if the editor is already initialized.
1583
- * [#9796](https://dev.ckeditor.com/ticket/9796): Introduced `<s>` as a default tag for strikethrough, which replaces obsolete `<strike>` in HTML5.
1584
-
1585
- ## CKEditor 4.0.3
1586
-
1587
- Fixed Issues:
1588
-
1589
- * [#10196](https://dev.ckeditor.com/ticket/10196): Fixed context menus not opening with keyboard shortcuts when [Autogrow](https://ckeditor.com/cke4/addon/autogrow) is enabled.
1590
- * [#10212](https://dev.ckeditor.com/ticket/10212): [IE7-10] Undo command throws errors after multiple switches between Source and WYSIWYG view.
1591
- * [#10219](https://dev.ckeditor.com/ticket/10219): [Inline editor] Error thrown after calling [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy).
1592
-
1593
- ## CKEditor 4.0.2
1594
-
1595
- Fixed Issues:
1596
-
1597
- * [#9779](https://dev.ckeditor.com/ticket/9779): Fixed overriding [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) with `CKEDITOR_GETURL`.
1598
- * [#9772](https://dev.ckeditor.com/ticket/9772): Custom buttons in the dialog window footer have different look and size ([Moono](https://ckeditor.com/cke4/addon/moono), [Kama](https://ckeditor.com/cke4/addon/kama) skins).
1599
- * [#9029](https://dev.ckeditor.com/ticket/9029): Custom styles added with the [`stylesSet.add()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_stylesSet.html#method-add) are displayed in the wrong order.
1600
- * [#9887](https://dev.ckeditor.com/ticket/9887): Disable [Magic Line](https://ckeditor.com/cke4/addon/magicline) when [`editor.readOnly`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) is set.
1601
- * [#9882](https://dev.ckeditor.com/ticket/9882): Fixed empty document title on [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) if set via the Document Properties dialog window.
1602
- * [#9773](https://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin.
1603
- * [#9851](https://dev.ckeditor.com/ticket/9851): The [`selectionChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-selectionChange) event is not fired when mouse selection ended outside editable.
1604
- * [#9903](https://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll.
1605
- * [#9872](https://dev.ckeditor.com/ticket/9872): [`editor.checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag.
1606
- * [#9893](https://dev.ckeditor.com/ticket/9893): [IE] Fixed broken toolbar when editing mixed direction content in Quirks mode.
1607
- * [#9845](https://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the [Link](https://ckeditor.com/cke4/addon/link) dialog window when the Anchor option is used and no anchors are available.
1608
- * [#9883](https://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with [divarea](https://ckeditor.com/cke4/addon/divarea)-based editors.
1609
- * [#9940](https://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable.
1610
- * [#9966](https://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed [Magic Line](https://ckeditor.com/cke4/addon/magicline) keystrokes.
1611
- * [#9507](https://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time.
1612
- * [#9947](https://dev.ckeditor.com/ticket/9947): [WebKit] Editor overflows parent container in some edge cases.
1613
- * [#10105](https://dev.ckeditor.com/ticket/10105): Fixed: Broken [sourcearea](https://ckeditor.com/cke4/addon/sourcearea) view when an RTL language is set.
1614
- * [#10123](https://dev.ckeditor.com/ticket/10123): [WebKit] Fixed: Several dialog windows have broken layout since the latest WebKit release.
1615
- * [#10152](https://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items.
1616
-
1617
- ## CKEditor 4.0.1.1
1618
-
1619
- Fixed Issues:
1620
-
1621
- * Security update: Added protection against XSS attack and possible path disclosure in the PHP sample.
1622
-
1623
- ## CKEditor 4.0.1
1624
-
1625
- Fixed Issues:
1626
-
1627
- * [#9655](https://dev.ckeditor.com/ticket/9655): Support for IE Quirks Mode in the new [Moono skin](https://ckeditor.com/cke4/addon/moono).
1628
- * Accessibility issues (mainly in inline editor): [#9364](https://dev.ckeditor.com/ticket/9364), [#9368](https://dev.ckeditor.com/ticket/9368), [#9369](https://dev.ckeditor.com/ticket/9369), [#9370](https://dev.ckeditor.com/ticket/9370), [#9541](https://dev.ckeditor.com/ticket/9541), [#9543](https://dev.ckeditor.com/ticket/9543), [#9841](https://dev.ckeditor.com/ticket/9841), [#9844](https://dev.ckeditor.com/ticket/9844).
1629
- * [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin:
1630
- * [#9481](https://dev.ckeditor.com/ticket/9481): Added accessibility support for Magic Line.
1631
- * [#9509](https://dev.ckeditor.com/ticket/9509): Added Magic Line support for forms.
1632
- * [#9573](https://dev.ckeditor.com/ticket/9573): Magic Line does not disappear on `mouseout` in a specific case.
1633
- * [#9754](https://dev.ckeditor.com/ticket/9754): [WebKit] Cutting & pasting simple unformatted text generates an inline wrapper in WebKit browsers.
1634
- * [#9456](https://dev.ckeditor.com/ticket/9456): [Chrome] Properly paste bullet list style from MS Word.
1635
- * [#9699](https://dev.ckeditor.com/ticket/9699), [#9758](https://dev.ckeditor.com/ticket/9758): Improved selection locking when selecting by dragging.
1636
- * Context menu:
1637
- * [#9712](https://dev.ckeditor.com/ticket/9712): Opening the context menu destroys editor focus.
1638
- * [#9366](https://dev.ckeditor.com/ticket/9366): Context menu should be displayed over the floating toolbar.
1639
- * [#9706](https://dev.ckeditor.com/ticket/9706): Context menu generates a JavaScript error in inline mode when the editor is attached to a header element.
1640
- * [#9800](https://dev.ckeditor.com/ticket/9800): Hide float panel when resizing the window.
1641
- * [#9721](https://dev.ckeditor.com/ticket/9721): Padding in content of div-based editor puts the editing area under the bottom UI space.
1642
- * [#9528](https://dev.ckeditor.com/ticket/9528): Host page `box-sizing` style should not influence the editor UI elements.
1643
- * [#9503](https://dev.ckeditor.com/ticket/9503): [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin adds context menu listeners only on supported input types. Added support for `tel`, `email`, `search` and `url` input types.
1644
- * [#9769](https://dev.ckeditor.com/ticket/9769): Improved floating toolbar positioning in a narrow window.
1645
- * [#9875](https://dev.ckeditor.com/ticket/9875): Table dialog window does not populate width correctly.
1646
- * [#8675](https://dev.ckeditor.com/ticket/8675): Deleting cells in a nested table removes the outer table cell.
1647
- * [#9815](https://dev.ckeditor.com/ticket/9815): Cannot edit dialog window fields in an editor initialized in the jQuery UI modal dialog.
1648
- * [#8888](https://dev.ckeditor.com/ticket/8888): CKEditor dialog windows do not show completely in a small window.
1649
- * [#9360](https://dev.ckeditor.com/ticket/9360): [Inline editor] Blocks shown for a `<div>` element stay permanently even after the user exits editing the `<div>`.
1650
- * [#9531](https://dev.ckeditor.com/ticket/9531): [Firefox & Inline editor] Toolbar is lost when closing the Format drop-down list by clicking its button.
1651
- * [#9553](https://dev.ckeditor.com/ticket/9553): Table width incorrectly set when the `border-width` style is specified.
1652
- * [#9594](https://dev.ckeditor.com/ticket/9594): Cannot tab past CKEditor when it is in read-only mode.
1653
- * [#9658](https://dev.ckeditor.com/ticket/9658): [IE9] Justify not working on selected images.
1654
- * [#9686](https://dev.ckeditor.com/ticket/9686): Added missing contents styles for `<pre>` elements.
1655
- * [#9709](https://dev.ckeditor.com/ticket/9709): [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) should not depend on configuration from other styles.
1656
- * [#9726](https://dev.ckeditor.com/ticket/9726): Removed [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin dependency from [Table Tools](https://ckeditor.com/cke4/addon/tabletools).
1657
- * [#9765](https://dev.ckeditor.com/ticket/9765): Toolbar Collapse command documented incorrectly in the [Accessibility Instructions](https://ckeditor.com/cke4/addon/a11yhelp) dialog window.
1658
- * [#9771](https://dev.ckeditor.com/ticket/9771): [WebKit & Opera] Fixed scrolling issues when pasting.
1659
- * [#9787](https://dev.ckeditor.com/ticket/9787): [IE9] `onChange` is not fired for checkboxes in dialogs.
1660
- * [#9842](https://dev.ckeditor.com/ticket/9842): [Firefox 17] When opening a toolbar menu for the first time and pressing the *Down Arrow* key, focus goes to the next toolbar button instead of the menu options.
1661
- * [#9847](https://dev.ckeditor.com/ticket/9847): [Elements Path](https://ckeditor.com/cke4/addon/elementspath) should not be initialized in the inline editor.
1662
- * [#9853](https://dev.ckeditor.com/ticket/9853): [`editor.addRemoveFormatFilter()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addRemoveFormatFilter) is exposed before it really works.
1663
- * [#8893](https://dev.ckeditor.com/ticket/8893): Value of the [`pasteFromWordCleanupFile`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordCleanupFile) configuration option is now taken from the instance configuration.
1664
- * [#9693](https://dev.ckeditor.com/ticket/9693): Removed "Live Preview" checkbox from UI color picker.
1665
-
1666
-
1667
- ## CKEditor 4.0
1668
-
1669
- The first stable release of the new CKEditor 4 code line.
1670
-
1671
- The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever
1672
- possible. The list of relevant changes can be found in the [API Changes page of
1673
- the CKEditor 4 documentation][1].
1674
-
1675
- [1]: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_api_changes.html "API Changes"
1
+ CKEditor 4 Changelog
2
+ ====================
3
+
4
+ ## CKEditor 4.11.3
5
+
6
+ Fixed Issues:
7
+
8
+ * [#2721](https://github.com/ckeditor/ckeditor-dev/issues/2721), [#487](https://github.com/ckeditor/ckeditor-dev/issues/487): Fixed: The order of sublist items is reversed when a higher level list item is removed.
9
+ * [#2527](https://github.com/ckeditor/ckeditor-dev/issues/2527): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) autocomplete order does not prioritize emojis with the name starting from the used string.
10
+ * [#2572](https://github.com/ckeditor/ckeditor-dev/issues/2572): Fixed: Icons in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown navigation groups are not centered.
11
+ * [#1191](https://github.com/ckeditor/ckeditor-dev/issues/1191): Fixed: Items in the [elements path](https://ckeditor.com/cke4/addon/elementspath) are draggable.
12
+ * [#2292](https://github.com/ckeditor/ckeditor-dev/issues/2292): Fixed: Dropping a list with a link on the editor's margin causes a console error and removes the dragged text from editor.
13
+ * [#2756](https://github.com/ckeditor/ckeditor-dev/issues/2756): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin causes an error when typing in the [source editing mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_sourcearea.html).
14
+ * [#1986](https://github.com/ckeditor/ckeditor-dev/issues/1986): Fixed: The Cell Properties dialog from the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin shows styles that are not allowed through [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent).
15
+ * [#2565](https://github.com/ckeditor/ckeditor-dev/issues/2565): [IE, Edge] Fixed: Buttons in the [editor toolbar](https://ckeditor.com/cke4/addon/toolbar) are activated by clicking them with the right mouse button.
16
+ * [#2792](https://github.com/ckeditor/ckeditor-dev/pull/2792): Fixed: A bug in the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin that caused the following issues:
17
+ * [#2780](https://github.com/ckeditor/ckeditor-dev/issues/2780): Fixed: Undo steps disappear after multiple changes of selection.
18
+ * [#2470](https://github.com/ckeditor/ckeditor-dev/issues/2470): [Firefox] Fixed: Widget's nested editable gets blurred upon focus.
19
+ * [#2655](https://github.com/ckeditor/ckeditor-dev/issues/2655): [Chrome, Safari] Fixed: Widget's nested editable cannot be focused under certain circumstances.
20
+
21
+ ## CKEditor 4.11.2
22
+
23
+ Fixed Issues:
24
+
25
+ * [#2403](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Styling inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is causing style leaks.
26
+ * [#2514](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Pasting table data into inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin inserts pasted content into the wrapping table.
27
+ * [#2451](https://github.com/ckeditor/ckeditor-dev/issues/2451): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin changes selection.
28
+ * [#2546](https://github.com/ckeditor/ckeditor-dev/issues/2546): Fixed: The separator in the toolbar moves when buttons are focused.
29
+ * [#2506](https://github.com/ckeditor/ckeditor-dev/issues/2506): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) throws a type error when an empty `<figure>` tag with an `image` class is upcasted.
30
+ * [#2650](https://github.com/ckeditor/ckeditor-dev/issues/2650): Fixed: [Table](https://ckeditor.com/cke4/addon/table) dialog validator fails when the `getValue()` function is defined in the global scope.
31
+ * [#2690](https://github.com/ckeditor/ckeditor-dev/issues/2690): Fixed: Decimal characters are removed from the inside of numbered lists when pasting content using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
32
+ * [#2205](https://github.com/ckeditor/ckeditor-dev/issues/2205): Fixed: It is not possible to add new list items under an item containing a block element.
33
+ * [#2411](https://github.com/ckeditor/ckeditor-dev/issues/2411), [#2438](https://github.com/ckeditor/ckeditor-dev/issues/2438) Fixed: Apply numbered list option throws a console error for a specific markup.
34
+ * [#2430](https://github.com/ckeditor/ckeditor-dev/issues/2430) Fixed: [Color Button](https://ckeditor.com/cke4/addon/colorbutton) and [List Block](https://ckeditor.com/cke4/addon/listblock) items are draggable.
35
+
36
+ Other Changes:
37
+
38
+ * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugin:
39
+ * [#52](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/52) Fixed: Clicking "Finish Checking" without a prior action would hang the Spell Checking dialog.
40
+ * [#2603](https://github.com/ckeditor/ckeditor-dev/issues/2603): Corrected the GPL license entry in the `package.json` file.
41
+
42
+ ## CKEditor 4.11.1
43
+
44
+ Fixed Issues:
45
+
46
+ * [#2571](https://github.com/ckeditor/ckeditor-dev/issues/2571): Fixed: Clicking the categories in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown panel scrolls the entire page.
47
+
48
+ ## CKEditor 4.11
49
+
50
+ **Security Updates:**
51
+
52
+ * Fixed XSS vulnerability in the HTML parser reported by [maxarr](https://hackerone.com/maxarr).
53
+
54
+ Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
55
+
56
+ **An upgrade is highly recommended!**
57
+
58
+ New Features:
59
+
60
+ * [#2062](https://github.com/ckeditor/ckeditor-dev/pull/2062): Added the emoji dropdown that allows the user to choose the emoji from the toolbar and search for them using keywords.
61
+ * [#2154](https://github.com/ckeditor/ckeditor-dev/issues/2154): The [Link](https://ckeditor.com/cke4/addon/link) plugin now supports phone number links.
62
+ * [#1815](https://github.com/ckeditor/ckeditor-dev/issues/1815): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin supports typing link completion.
63
+ * [#2478](https://github.com/ckeditor/ckeditor-dev/issues/2478): [Link](https://ckeditor.com/cke4/addon/link) can be inserted using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>K</kbd> keystroke.
64
+ * [#651](https://github.com/ckeditor/ckeditor-dev/issues/651): Text pasted using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin preserves indentation in paragraphs.
65
+ * [#2248](https://github.com/ckeditor/ckeditor-dev/issues/2248): Added support for justification in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [Matěj Kmínek](https://github.com/KminekMatej)!
66
+ * [#706](https://github.com/ckeditor/ckeditor-dev/issues/706): Added a different cursor style when selecting cells for the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
67
+ * [#2072](https://github.com/ckeditor/ckeditor-dev/issues/2072): The [UI Button](https://ckeditor.com/cke4/addon/button) plugin supports custom `aria-haspopup` property values. The [Menu Button](https://ckeditor.com/cke4/addon/menubutton) `aria-haspopup` value is now `menu`, the [Panel Button](https://ckeditor.com/cke4/addon/panelbutton) and [Rich Combo](https://ckeditor.com/cke4/addon/richcombo) `aria-haspopup` value is now `listbox`.
68
+ * [#1176](https://github.com/ckeditor/ckeditor-dev/pull/1176): The [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) can now be attached to a selection instead of an element.
69
+ * [#2202](https://github.com/ckeditor/ckeditor-dev/issues/2202): Added the `contextmenu_contentsCss` configuration option to allow adding custom CSS to the [Context Menu](https://ckeditor.com/cke4/addon/contextmenu).
70
+
71
+ Fixed Issues:
72
+
73
+ * [#1477](https://github.com/ckeditor/ckeditor-dev/issues/1477): Fixed: On destroy, [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not destroy its content.
74
+ * [#2394](https://github.com/ckeditor/ckeditor-dev/issues/2394): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown does not show up with repeated symbols in a single line.
75
+ * [#1181](https://github.com/ckeditor/ckeditor-dev/issues/1181): [Chrome] Fixed: Opening the context menu in a read-only editor results in an error.
76
+ * [#2276](https://github.com/ckeditor/ckeditor-dev/issues/2276): [iOS] Fixed: [Button](https://ckeditor.com/cke4/addon/button) state does not refresh properly.
77
+ * [#1489](https://github.com/ckeditor/ckeditor-dev/issues/1489): Fixed: Table contents can be removed in read-only mode when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is used.
78
+ * [#1264](https://github.com/ckeditor/ckeditor-dev/issues/1264) Fixed: Right-click does not clear the selection created with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
79
+ * [#586](https://github.com/ckeditor/ckeditor-dev/issues/586) Fixed: The `required` attribute is not correctly recognized by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin dialog. Thanks to [Roli Züger](https://github.com/rzueger)!
80
+ * [#2380](https://github.com/ckeditor/ckeditor-dev/issues/2380) Fixed: Styling HTML comments in a top-level element results in extra paragraphs.
81
+ * [#2294](https://github.com/ckeditor/ckeditor-dev/issues/2294) Fixed: Pasting content from Microsoft Outlook and then bolding it results in an error.
82
+ * [#2035](https://github.com/ckeditor/ckeditor-dev/issues/2035) [Edge] Fixed: `Permission denied` is thrown when opening a [Panel](https://ckeditor.com/cke4/addon/panel) instance.
83
+ * [#965](https://github.com/ckeditor/ckeditor-dev/issues/965) Fixed: The [`config.forceSimpleAmpersand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forceSimpleAmpersand) option does not work. Thanks to [Alex Maris](https://github.com/alexmaris)!
84
+ * [#2448](https://github.com/ckeditor/ckeditor-dev/issues/2448): Fixed: The [`Escape HTML Entities`] plugin with custom [additional entities](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities_additional) configuration breaks HTML escaping.
85
+ * [#898](https://github.com/ckeditor/ckeditor-dev/issues/898): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) long alternative text protrudes into the editor when the image is selected.
86
+ * [#1113](https://github.com/ckeditor/ckeditor-dev/issues/1113): [Firefox] Fixed: Nested contenteditable elements path is not updated on focus with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin.
87
+ * [#1682](https://github.com/ckeditor/ckeditor-dev/issues/1682) Fixed: Hovering the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) panel changes its size, causing flickering.
88
+ * [#421](https://github.com/ckeditor/ckeditor-dev/issues/421) Fixed: Expandable [Button](https://ckeditor.com/cke4/addon/button) puts the `(Selected)` text at the end of the label when clicked.
89
+ * [#1454](https://github.com/ckeditor/ckeditor-dev/issues/1454): Fixed: The [`onAbort`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onAbort) method of the [Upload Widget](https://ckeditor.com/cke4/addon/uploadwidget) is not called when the loader is aborted.
90
+ * [#1451](https://github.com/ckeditor/ckeditor-dev/issues/1451): Fixed: The context menu is incorrectly positioned when opened with <kbd>Shift</kbd>+<kbd>F10</kbd>.
91
+ * [#1722](https://github.com/ckeditor/ckeditor-dev/issues/1722): [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) is causing memory leaks.
92
+ * [#2491](https://github.com/ckeditor/ckeditor-dev/issues/2491): Fixed: The [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin is not matching diacritic characters.
93
+ * [#2519](https://github.com/ckeditor/ckeditor-dev/issues/2519): Fixed: The [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) dialog should display all available keystrokes for a single command.
94
+
95
+ API Changes:
96
+
97
+ * [#2453](https://github.com/ckeditor/ckeditor-dev/issues/2453): The [`CKEDITOR.ui.panel.block.getItems`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_panel_block.html#method-getItems) method now also returns `input` elements in addition to links.
98
+ * [#2224](https://github.com/ckeditor/ckeditor-dev/issues/2224): The [`CKEDITOR.tools.convertToPx`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx) function now converts negative values.
99
+ * [#2253](https://github.com/ckeditor/ckeditor-dev/issues/2253): The widget definition [`insert`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-insert) method now passes `editor` and `commandData`. Thanks to [marcparmet](https://github.com/marcparmet)!
100
+ * [#2045](https://github.com/ckeditor/ckeditor-dev/issues/2045): Extracted [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) and [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) functions logic into a separate namespace.
101
+ * [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) was extracted into [`tools.buffers.event`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_event.html),
102
+ * [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) was extracted into [`tools.buffers.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_throttle.html).
103
+ * [#2466](https://github.com/ckeditor/ckeditor-dev/issues/2466): The [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-constructor) constructor accepts an additional `rules` parameter allowing to bind the editor and filter together.
104
+ * [#2493](https://github.com/ckeditor/ckeditor-dev/issues/2493): The [`editor.getCommandKeystroke`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method accepts an additional `all` parameter allowing to retrieve an array of all command keystrokes.
105
+ * [#2483](https://github.com/ckeditor/ckeditor-dev/issues/2483): Button's DOM element created with the [`hasArrow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui.html#method-addButton) definition option can by identified by the `.cke_button_expandable` CSS class.
106
+
107
+ Other Changes:
108
+
109
+ * [#1713](https://github.com/ckeditor/ckeditor-dev/issues/1713): Removed the redundant `lang.title` entry from the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin.
110
+
111
+ ## CKEditor 4.10.1
112
+
113
+ Fixed Issues:
114
+
115
+ * [#2114](https://github.com/ckeditor/ckeditor-dev/issues/2114): Fixed: [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) cannot be initialized before [`instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady).
116
+ * [#2107](https://github.com/ckeditor/ckeditor-dev/issues/2107): Fixed: Holding and releasing the mouse button is not inserting an [autocomplete](https://ckeditor.com/cke4/addon/autocomplete) suggestion.
117
+ * [#2167](https://github.com/ckeditor/ckeditor-dev/issues/2167): Fixed: Matching in [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin is not case insensitive.
118
+ * [#2195](https://github.com/ckeditor/ckeditor-dev/issues/2195): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) shows the suggestion box when the colon is preceded with other characters than white space.
119
+ * [#2169](https://github.com/ckeditor/ckeditor-dev/issues/2169): [Edge] Fixed: Error thrown when pasting into the editor.
120
+ * [#1084](https://github.com/ckeditor/ckeditor-dev/issues/1084) Fixed: Using the "Automatic" option with [Color Button](https://ckeditor.com/cke4/addon/colorbutton) on a text with the color already defined sets an invalid color value.
121
+ * [#2271](https://github.com/ckeditor/ckeditor-dev/issues/2271): Fixed: Custom color name not used as a label in the [Color Button](https://ckeditor.com/cke4/addon/image2) plugin. Thanks to [Eric Geloen](https://github.com/egeloen)!
122
+ * [#2296](https://github.com/ckeditor/ckeditor-dev/issues/2296): Fixed: The [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin throws an error when activated on content containing HTML comments.
123
+ * [#966](https://github.com/ckeditor/ckeditor-dev/issues/966): Fixed: Executing [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) during the [file upload](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onUploading) throws an error. Thanks to [Maksim Makarevich](https://github.com/MaksimMakarevich)!
124
+ * [#1719](https://github.com/ckeditor/ckeditor-dev/issues/1719): Fixed: <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>A</kbd> inadvertently focuses inline editor if it is starting and ending with a list. Thanks to [theNailz](https://github.com/theNailz)!
125
+ * [#1046](https://github.com/ckeditor/ckeditor-dev/issues/1046): Fixed: Subsequent new links do not include the `id` attribute. Thanks to [Nathan Samson](https://github.com/nathansamson)!
126
+ * [#1348](https://github.com/ckeditor/ckeditor-dev/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses an old width and height on image URL change.
127
+ * [#1791](https://github.com/ckeditor/ckeditor-dev/issues/1791): Fixed: [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins can be enabled when [Easy Image](https://ckeditor.com/cke4/addon/easyimage) is present.
128
+ * [#2254](https://github.com/ckeditor/ckeditor-dev/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)!
129
+ * [#1184](https://github.com/ckeditor/ckeditor-dev/issues/1184): [IE8-11] Fixed: Copying and pasting data in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error.
130
+ * [#1916](https://github.com/ckeditor/ckeditor-dev/issues/1916): [IE9-11] Fixed: Pressing the <kbd>Delete</kbd> key in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error.
131
+ * [#2003](https://github.com/ckeditor/ckeditor-dev/issues/2003): [Firefox] Fixed: Right-clicking multiple selected table cells containing empty paragraphs removes the selection.
132
+ * [#1816](https://github.com/ckeditor/ckeditor-dev/issues/1816): Fixed: Table breaks when <kbd>Enter</kbd> is pressed over the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin.
133
+ * [#1115](https://github.com/ckeditor/ckeditor-dev/issues/1115): Fixed: The `<font>` tag is not preserved when proper configuration is provided and a style is applied by the [Font](https://ckeditor.com/cke4/addon/font) plugin.
134
+ * [#727](https://github.com/ckeditor/ckeditor-dev/issues/727): Fixed: Custom styles may be invisible in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin.
135
+ * [#988](https://github.com/ckeditor/ckeditor-dev/issues/988): Fixed: ACF-enabled custom elements prefixed with `object`, `embed`, `param` are removed from the editor content.
136
+
137
+ API Changes:
138
+
139
+ * [#2249](https://github.com/ckeditor/ckeditor-dev/issues/1791): Added the [`editor.plugins.detectConflict()`](https://ckeditor.com/docs/ckeditor4/latest/CKEDITOR_editor_plugins.html#method-detectConflict) method finding conflicts between provided plugins.
140
+
141
+ ## CKEditor 4.10
142
+
143
+ New Features:
144
+
145
+ * [#1751](https://github.com/ckeditor/ckeditor-dev/issues/1751): Introduced the **Autocomplete** feature that consists of the following plugins:
146
+ * [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) &ndash; Provides contextual completion feature for custom text matches based on user input.
147
+ * [Text Watcher](https://ckeditor.com/cke4/addon/textWatcher) &ndash; Checks whether an editor's text change matches the chosen criteria.
148
+ * [Text Match](https://ckeditor.com/cke4/addon/textMatch) &ndash; Allows to search [`CKEDITOR.dom.range`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html) for matching text.
149
+ * [#1703](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin providing smart completion feature for custom text matches based on user input starting with a chosen marker character.
150
+ * [#1746](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin providing completion feature for emoji ideograms.
151
+ * [#1761](https://github.com/ckeditor/ckeditor-dev/issues/1761): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin now supports email links.
152
+
153
+ Fixed Issues:
154
+
155
+ * [#1458](https://github.com/ckeditor/ckeditor-dev/issues/1458): [Edge] Fixed: After blurring the editor it takes 2 clicks to focus a widget.
156
+ * [#1034](https://github.com/ckeditor/ckeditor-dev/issues/1034): Fixed: JAWS leaves forms mode after pressing the <kbd>Enter</kbd> key in an inline editor instance.
157
+ * [#1748](https://github.com/ckeditor/ckeditor-dev/pull/1748): Fixed: Missing [`CKEDITOR.dialog.definition.onHide`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#property-onHide) API documentation. Thanks to [sunnyone](https://github.com/sunnyone)!
158
+ * [#1321](https://github.com/ckeditor/ckeditor-dev/issues/1321): Fixed: Ideographic space character (`\u3000`) is lost when pasting text.
159
+ * [#1776](https://github.com/ckeditor/ckeditor-dev/issues/1776): Fixed: Empty caption placeholder of the [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin is not hidden when blurred.
160
+ * [#1592](https://github.com/ckeditor/ckeditor-dev/issues/1592): Fixed: The [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin caption is not visible after paste.
161
+ * [#620](https://github.com/ckeditor/ckeditor-dev/issues/620): Fixed: The [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option is not respected in internal and cross-editor pasting.
162
+ * [#1467](https://github.com/ckeditor/ckeditor-dev/issues/1467): Fixed: The resizing cursor of the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin appearing in the middle of a merged cell.
163
+
164
+ API Changes:
165
+
166
+ * [#850](https://github.com/ckeditor/ckeditor-dev/issues/850): Backward incompatibility: Replaced the `replace` dialog from the [Find / Replace](https://ckeditor.com/cke4/addon/find) plugin with a `tabId` option in the `find` command.
167
+ * [#1582](https://github.com/ckeditor/ckeditor-dev/issues/1582): The [`CKEDITOR.editor.addCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addCommand) method can now accept a [`CKEDITOR.command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html) instance as a parameter.
168
+ * [#1712](https://github.com/ckeditor/ckeditor-dev/issues/1712): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow whitespace.
169
+ * [#1802](https://github.com/ckeditor/ckeditor-dev/issues/1802): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow passing plugin names as an array.
170
+ * [#1724](https://github.com/ckeditor/ckeditor-dev/issues/1724): Added an option to the [`getClientRect()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getClientRect) function allowing to retrieve an absolute bounding rectangle of the element, i.e. a position relative to the upper-left corner of the topmost viewport.
171
+ * [#1498](https://github.com/ckeditor/ckeditor-dev/issues/1498) : Added a new [`getClientRects()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-getClientRects) method to `CKEDITOR.dom.range`. It returns a list of rectangles for each selected element.
172
+ * [#1993](https://github.com/ckeditor/ckeditor-dev/issues/1993): Added the [`CKEDITOR.tools.throttle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) function.
173
+
174
+ Other Changes:
175
+
176
+ * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins:
177
+ * Language dictionary update: Added support for the Uzbek Latin language.
178
+ * Languages no longer supported as additional languages: Manx - Isle of Man (`gv_GB`) and Interlingua (`ia_XR`).
179
+ * Extended and improved language dictionaries: Georgian and Swedish. Also added the missing word _"Ensure"_ to the American, British and Canada English language.
180
+ * [#141](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/141) Fixed: SCAYT throws "Uncaught Error: Error in RangyWrappedRange module: createRange(): Parameter must be a Window object or DOM node".
181
+ * [#153](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/153) [Chrome] Fixed: Correcting a word in the widget in SCAYT moves focus to another editable.
182
+ * [#155](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/155) [IE8] Fixed: SCAYT throws an error and does not work.
183
+ * [#156](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/156) [IE10] Fixed: SCAYT does not seem to work.
184
+ * Fixed: After some text is dragged and dropped, the markup is not refreshed for grammar problems in SCAYT.
185
+ * Fixed: Request to FastCGI fails when the user tries to replace a word with non-English characters with a proper suggestion in WSC.
186
+ * [Firefox] Fixed: <kbd>Ctrl</kbd>+<kbd>Z</kbd> removes focus in SCAYT.
187
+ * Grammar support for default languages was improved.
188
+ * New application source URL was added in SCAYT.
189
+ * Removed green marks and legend related to grammar-supported languages in the Languages tab of SCAYT. Grammar is now supported for almost all the anguages in the list for an additional fee.
190
+ * Fixed: JavaScript error in the console: "Cannot read property 'split' of undefined" in SCAYT and WSC.
191
+ * [IE10] Fixed: Markup is not set for a specific case in SCAYT.
192
+ * Fixed: Accessibility issue: No `alt` attribute for the logo image in the About tab of SCAYT.
193
+
194
+ ## CKEditor 4.9.2
195
+
196
+ **Security Updates:**
197
+
198
+ * Fixed XSS vulnerability in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) (`image2`) plugin reported by [Kyaw Min Thein](https://twitter.com/kyawminthein99).
199
+
200
+ Issue summary: It was possible to execute XSS inside CKEditor using the `<img>` tag and specially crafted HTML. Please note that the default presets (Basic/Standard/Full) do not include this plugin, so you are only at risk if you made a custom build and enabled this plugin.
201
+
202
+ We would like to thank the [Drupal security team](https://www.drupal.org/drupal-security-team) for bringing this matter to our attention and coordinating the fix and release process!
203
+
204
+ ## CKEditor 4.9.1
205
+
206
+ Fixed Issues:
207
+
208
+ * [#1835](https://github.com/ckeditor/ckeditor-dev/issues/1835): Fixed: Integration between [CKFinder](https://ckeditor.com/ckeditor-4/ckfinder/) and the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin does not work.
209
+
210
+ ## CKEditor 4.9
211
+
212
+ New Features:
213
+
214
+ * [#932](https://github.com/ckeditor/ckeditor-dev/issues/932): Introduced Easy Image feature for inserting images that are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added to support it:
215
+ * [Easy Image](https://ckeditor.com/cke4/addon/easyimage),
216
+ * [Cloud Services](https://ckeditor.com/cke4/addon/cloudservices)
217
+ * [Image Base](https://ckeditor.com/cke4/addon/imagebase)
218
+ * [#1338](https://github.com/ckeditor/ckeditor-dev/issues/1338): Keystroke labels are displayed for function keys (like F7, F8).
219
+ * [#643](https://github.com/ckeditor/ckeditor-dev/issues/643): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using the [`config.fileTools_requestHeaders`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_requestHeaders) configuration option.
220
+ * [#1365](https://github.com/ckeditor/ckeditor-dev/issues/1365): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default.
221
+ * [#1399](https://github.com/ckeditor/ckeditor-dev/issues/1399): Added the possibility to set [`CKEDITOR.config.startupFocus`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus) as `start` or `end` to specify where the editor focus should be after the initialization.
222
+ * [#1441](https://github.com/ckeditor/ckeditor-dev/issues/1441): The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by the `data-cke-magic-line="1"` attribute.
223
+
224
+ Fixed Issues:
225
+
226
+ * [#595](https://github.com/ckeditor/ckeditor-dev/issues/595): Fixed: Pasting does not work on mobile devices.
227
+ * [#869](https://github.com/ckeditor/ckeditor-dev/issues/869): Fixed: Empty selection clears cached clipboard data in the editor.
228
+ * [#1419](https://github.com/ckeditor/ckeditor-dev/issues/1419): Fixed: The [Widget Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with the <kbd>Alt+A</kbd> key combination on Windows.
229
+ * [#1274](https://github.com/ckeditor/ckeditor-dev/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using the [`contextDefinition.cssSelector`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_balloontoolbar_contextDefinition.html#property-cssSelector) matcher.
230
+ * [#1232](https://github.com/ckeditor/ckeditor-dev/issues/1232): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable elements.
231
+ * [#1342](https://github.com/ckeditor/ckeditor-dev/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after the [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
232
+ * [#1426](https://github.com/ckeditor/ckeditor-dev/issues/1426): [IE8-9] Fixed: Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)!
233
+ * [#1470](https://github.com/ckeditor/ckeditor-dev/issues/1470): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a widget it is attached to.
234
+ * [#1048](https://github.com/ckeditor/ckeditor-dev/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added to its non-static parent.
235
+ * [#889](https://github.com/ckeditor/ckeditor-dev/issues/889): Fixed: Unclear error message for width and height fields in the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins.
236
+ * [#859](https://github.com/ckeditor/ckeditor-dev/issues/859): Fixed: Cannot edit a link after a double-click on the text in the link.
237
+ * [#1013](https://github.com/ckeditor/ckeditor-dev/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with the [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option.
238
+ * [#1356](https://github.com/ckeditor/ckeditor-dev/issues/1356): Fixed: [Border parse function](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) does not allow spaces in the color value.
239
+ * [#1010](https://github.com/ckeditor/ckeditor-dev/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly expanded ignoring the `border-color` style.
240
+ * [#1535](https://github.com/ckeditor/ckeditor-dev/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) mouseover border contrast is insufficient.
241
+ * [#1516](https://github.com/ckeditor/ckeditor-dev/issues/1516): Fixed: Fake selection allows removing content in read-only mode using the <kbd>Backspace</kbd> and <kbd>Delete</kbd> keys.
242
+ * [#1570](https://github.com/ckeditor/ckeditor-dev/issues/1570): Fixed: Fake selection allows cutting content in read-only mode using the <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>X</kbd> keys.
243
+ * [#1363](https://github.com/ckeditor/ckeditor-dev/issues/1363): Fixed: Paste notification is unclear and it might confuse users.
244
+
245
+ API Changes:
246
+
247
+ * [#1346](https://github.com/ckeditor/ckeditor-dev/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.balloontoolbar.contextManager.html) is now available in the [`pluginDefinition.init()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-init) method of the [requiring](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#property-requires) plugin.
248
+ * [#1530](https://github.com/ckeditor/ckeditor-dev/issues/1530): Added the possibility to use custom icons for [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_button.html.html).
249
+
250
+ Other Changes:
251
+
252
+ * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins:
253
+ * SCAYT [`scayt_minWordLength`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) configuration option now defaults to 3 instead of 4.
254
+ * SCAYT default number of suggested words in the context menu changed to 3.
255
+ * [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link creation if SCAYT highlights the word.
256
+ * Fixed: SCAYT crashes when the browser `localStorage` is disabled.
257
+ * [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT is disabled/enabled.
258
+ * [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote spell checker server is offline.
259
+ * Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error.
260
+ * Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible.
261
+ * Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console.
262
+ * [#1337](https://github.com/ckeditor/ckeditor-dev/issues/1337): Updated the samples layout with the new CKEditor 4 logo and color scheme.
263
+ * [#1591](https://github.com/ckeditor/ckeditor-dev/issues/1591): CKBuilder and language tools are now downloaded over HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)!
264
+
265
+ ## CKEditor 4.8
266
+
267
+ **Important Notes:**
268
+
269
+ * [#1249](https://github.com/ckeditor/ckeditor-dev/issues/1249): Enabled the [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin by default in standard and full presets. Also, it will no longer log an error in case of missing [`config.imageUploadUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-imageUploadUrl) property.
270
+
271
+ New Features:
272
+
273
+ * [#933](https://github.com/ckeditor/ckeditor-dev/issues/933): Introduced [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin.
274
+ * [#662](https://github.com/ckeditor/ckeditor-dev/issues/662): Introduced image inlining for the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
275
+ * [#468](https://github.com/ckeditor/ckeditor-dev/issues/468): [Edge] Introduced support for the Clipboard API.
276
+ * [#607](https://github.com/ckeditor/ckeditor-dev/issues/607): Manually inserted Hex color is prefixed with a hash character (`#`) if needed. It ensures a valid Hex color value is used when setting the table cell border or background color with the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window.
277
+ * [#584](https://github.com/ckeditor/ckeditor-dev/issues/584): [Font size and Family](https://ckeditor.com/cke4/addon/font) and [Format](https://ckeditor.com/cke4/addon/format) drop-downs are not toggleable anymore. Default option to reset styles added.
278
+ * [#856](https://github.com/ckeditor/ckeditor-dev/issues/856): Introduced the [`CKEDITOR.tools.keystrokeToArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-keystrokeToArray) method. It converts a keystroke into its string representation, returning every key name as a separate array element.
279
+ * [#1053](https://github.com/ckeditor/ckeditor-dev/issues/1053): Introduced the [`CKEDITOR.tools.object.merge()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-merge) method. It allows to merge two objects, returning the new object with all properties from both objects deeply cloned.
280
+ * [#1073](https://github.com/ckeditor/ckeditor-dev/issues/1073): Introduced the [`CKEDITOR.tools.array.every()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-every) method. It invokes a given test function on every array element and returns `true` if all elements pass the test.
281
+
282
+ Fixed Issues:
283
+
284
+ * [#796](https://github.com/ckeditor/ckeditor-dev/issues/796): Fixed: A list is pasted from OneNote in the reversed order.
285
+ * [#834](https://github.com/ckeditor/ckeditor-dev/issues/834): [IE9-11] Fixed: The editor does not save the selected state of radio buttons inserted by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin.
286
+ * [#704](https://github.com/ckeditor/ckeditor-dev/issues/704): [Edge] Fixed: Using <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>Z</kbd> breaks widget structure.
287
+ * [#591](https://github.com/ckeditor/ckeditor-dev/issues/591): Fixed: A column is inserted in a wrong order inside the table if any cell has a vertical split.
288
+ * [#787](https://github.com/ckeditor/ckeditor-dev/issues/787): Fixed: Using Cut inside a nested table does not cut the selected content.
289
+ * [#842](https://github.com/ckeditor/ckeditor-dev/issues/842): Fixed: List style not restored when toggling list indent level in the [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin.
290
+ * [#711](https://github.com/ckeditor/ckeditor-dev/issues/711): Fixed: Dragging widgets should only work with the left mouse button.
291
+ * [#862](https://github.com/ckeditor/ckeditor-dev/issues/862): Fixed: The "Object Styles" group in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin is visible only if the whole element is selected.
292
+ * [#994](https://github.com/ckeditor/ckeditor-dev/pull/994): Fixed: Typo in the [`CKEDITOR.focusManager.focus()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_focusManager.html#method-focus) API documentation. Thanks to [benjy](https://github.com/benjy)!
293
+ * [#1014](https://github.com/ckeditor/ckeditor-dev/issues/1014): Fixed: The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) Cell Properties dialog is now [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) aware &mdash; it is not possible to change the cell width or height if corresponding styles are disabled.
294
+ * [#877](https://github.com/ckeditor/ckeditor-dev/issues/877): Fixed: A list with custom bullets with exotic characters crashes the editor when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
295
+ * [#605](https://github.com/ckeditor/ckeditor-dev/issues/605): Fixed: Inline widgets do not preserve trailing spaces.
296
+ * [#1008](https://github.com/ckeditor/ckeditor-dev/issues/1008): Fixed: Shorthand Hex colors from the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) option are not correctly highlighted in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) Text Color or Background Color panel.
297
+ * [#1094](https://github.com/ckeditor/ckeditor-dev/issues/1094): Fixed: Widget definition [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcasts) methods are called for every element.
298
+ * [#1057](https://github.com/ckeditor/ckeditor-dev/issues/1057): Fixed: The [Notification](https://ckeditor.com/addon/notification) plugin overwrites Web Notifications API due to leakage to the global scope.
299
+ * [#1068](https://github.com/ckeditor/ckeditor-dev/issues/1068): Fixed: Upload widget paste listener ignores changes to the [`uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html).
300
+ * [#921](https://github.com/ckeditor/ckeditor-dev/issues/921): Fixed: [Edge] CKEditor erroneously perceives internal copy and paste as type "external".
301
+ * [#1213](https://github.com/ckeditor/ckeditor-dev/issues/1213): Fixed: Multiple images uploaded using [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin are randomly duplicated or mangled.
302
+ * [#532](https://github.com/ckeditor/ckeditor-dev/issues/532): Fixed: Removed an outdated user guide link from the [About](https://ckeditor.com/cke4/addon/about) dialog.
303
+ * [#1221](https://github.com/ckeditor/ckeditor-dev/issues/1221): Fixed: Invalid CSS loaded by [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin when [`config.skin`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-skin) is loaded using a custom path.
304
+ * [#522](https://github.com/ckeditor/ckeditor-dev/issues/522): Fixed: Widget selection is not removed when widget is inside table cell with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin enabled.
305
+ * [#1027](https://github.com/ckeditor/ckeditor-dev/issues/1027): Fixed: Cannot add multiple images to the table with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin in certain situations.
306
+ * [#1069](https://github.com/ckeditor/ckeditor-dev/issues/1069): Fixed: Wrong shape processing by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
307
+ * [#995](https://github.com/ckeditor/ckeditor-dev/issues/995): Fixed: Hyperlinked image gets inserted twice by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
308
+ * [#1287](https://github.com/ckeditor/ckeditor-dev/issues/1287): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) plugin throws exception if included in editor build but not loaded into editor's instance.
309
+
310
+ API Changes:
311
+
312
+ * [#1097](https://github.com/ckeditor/ckeditor-dev/issues/1097): Widget [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcast) methods are now called in the [widget definition's](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-definition) context.
313
+ * [#1118](https://github.com/ckeditor/ckeditor-dev/issues/1118): Added the `show` option in the [`balloonPanel.attach()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonPanel.html#method-attach) method, allowing to attach a hidden [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) instance.
314
+ * [#1145](https://github.com/ckeditor/ckeditor-dev/issues/1145): Added the [`skipNotifications`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-skipNotifications) option to the [`CKEDITOR.fileTools.uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html), allowing to switch off default notifications displayed by upload widgets.
315
+
316
+ Other Changes:
317
+
318
+ * [#815](https://github.com/ckeditor/ckeditor-dev/issues/815): Removed Node.js dependency from the CKEditor build script.
319
+ * [#1041](https://github.com/ckeditor/ckeditor-dev/pull/1041), [#1131](https://github.com/ckeditor/ckeditor-dev/issues/1131): Updated URLs pointing to [CKSource](https://cksource.com/) and [CKEditor](https://ckeditor.com/) resources after the launch of new websites.
320
+
321
+ ## CKEditor 4.7.3
322
+
323
+ New Features:
324
+
325
+ * [#568](https://github.com/ckeditor/ckeditor-dev/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-disallowedContent) property.
326
+
327
+ Fixed Issues:
328
+
329
+ * [#554](https://github.com/ckeditor/ckeditor-dev/issues/554): Fixed: [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)!
330
+ * [#566](https://github.com/ckeditor/ckeditor-dev/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1.
331
+ * [#779](https://github.com/ckeditor/ckeditor-dev/issues/779): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/cke4/addon/language) plugin.
332
+ * [#423](https://github.com/ckeditor/ckeditor-dev/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is set to `CKEDITOR.ENTER_BR`.
333
+ * [#719](https://github.com/ckeditor/ckeditor-dev/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin can be resized when the editor is in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html).
334
+ * [#577](https://github.com/ckeditor/ckeditor-dev/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin throws an error when trying to delete columns.
335
+ * [#867](https://github.com/ckeditor/ckeditor-dev/issues/867): Fixed: Typing into a selected table throws an error.
336
+ * [#817](https://github.com/ckeditor/ckeditor-dev/issues/817): Fixed: The [Save](https://ckeditor.com/cke4/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea).
337
+
338
+ Other Changes:
339
+
340
+ * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin:
341
+ * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started.
342
+ * [#800](https://github.com/ckeditor/ckeditor-dev/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-isCollapsed) method which is a simpler way to check if the selection is collapsed.
343
+ * [#830](https://github.com/ckeditor/ckeditor-dev/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dialogCommand.html).
344
+
345
+ ## CKEditor 4.7.2
346
+
347
+ New Features:
348
+
349
+ * [#455](https://github.com/ckeditor/ckeditor-dev/issues/455): Added [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) integration with the [Justify](https://ckeditor.com/cke4/addon/justify) plugin.
350
+
351
+ Fixed Issues:
352
+
353
+ * [#663](https://github.com/ckeditor/ckeditor-dev/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error.
354
+ * [#694](https://github.com/ckeditor/ckeditor-dev/pull/694): Refactoring in the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin:
355
+ * [#520](https://github.com/ckeditor/ckeditor-dev/issues/520): Fixed: Widgets cannot be properly pasted into a table cell.
356
+ * [#460](https://github.com/ckeditor/ckeditor-dev/issues/460): Fixed: Editor gone after pasting into an editor within a table.
357
+ * [#579](https://github.com/ckeditor/ckeditor-dev/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](https://ckeditor.com/cke4/addon/table) dialog.
358
+ * [#545](https://github.com/ckeditor/ckeditor-dev/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/cke4/addon/selectall) button in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea).
359
+ * [#582](https://github.com/ckeditor/ckeditor-dev/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)!
360
+ * [#491](https://github.com/ckeditor/ckeditor-dev/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](https://ckeditor.com/cke4/addon/toolbar) plugin inside the [Notification](https://ckeditor.com/cke4/addon/notification) plugin.
361
+ * [#646](https://github.com/ckeditor/ckeditor-dev/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin menu in the editor without any selection.
362
+ * [#501](https://github.com/ckeditor/ckeditor-dev/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](https://ckeditor.com/cke4/addon/link) plugin.
363
+ * [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) editor throws an error.
364
+ * [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error.
365
+ * [#426](https://github.com/ckeditor/ckeditor-dev/issues/426): Fixed: The [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) method selects the whole element when the selection starts at the beginning of that element.
366
+ * [#644](https://github.com/ckeditor/ckeditor-dev/issues/644): Fixed: The [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) method returns an incorrect result when multiple nodes are selected.
367
+ * [#684](https://github.com/ckeditor/ckeditor-dev/issues/684): Fixed: The [`elementPath.contains()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_elementPath.html#method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`.
368
+
369
+ Other Changes:
370
+
371
+ * Updated the [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) plugin:
372
+ * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it.
373
+ * [#751](https://github.com/ckeditor/ckeditor-dev/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_nodeList.html#method-toArray) method which returns an array representation of a [node list](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.nodeList.html).
374
+
375
+ ## CKEditor 4.7.1
376
+
377
+ New Features:
378
+
379
+ * Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)!
380
+ * [#413](https://github.com/ckeditor/ckeditor-dev/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) instructions.
381
+
382
+ Fixed Issues:
383
+
384
+ * [#515](https://github.com/ckeditor/ckeditor-dev/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is loaded.
385
+ * [#493](https://github.com/ckeditor/ckeditor-dev/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down.
386
+ * [#415](https://github.com/ckeditor/ckeditor-dev/issues/415): [Firefox] Fixed: <kbd>Enter</kbd> key breaks the table structure when pressed in a table selection.
387
+ * [#457](https://github.com/ckeditor/ckeditor-dev/issues/457): Fixed: Error thrown when deleting content from the editor with no selection.
388
+ * [#478](https://github.com/ckeditor/ckeditor-dev/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](https://ckeditor.com/cke4/addon/enterkey) plugin when pressing <kbd>Enter</kbd> with no selection.
389
+ * [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](https://ckeditor.com/cke4/addon/tab) and [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugins when pressing <kbd>Tab</kbd> with no selection in inline editor.
390
+ * [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted with the [Link](https://ckeditor.com/cke4/addon/link) plugin on collapsed selection cannot be edited.
391
+ * [#417](https://github.com/ckeditor/ckeditor-dev/issues/417): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin throws an error when used with a table with only header or footer rows.
392
+ * [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: The [`editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method does not obtain the correct keystroke.
393
+ * [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work in Quirks Mode.
394
+ * [#450](https://github.com/ckeditor/ckeditor-dev/issues/450): Fixed: [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) incorrectly transforms the `margin` CSS property.
395
+
396
+ ## CKEditor 4.7
397
+
398
+ **Important Notes:**
399
+
400
+ * [#13793](https://dev.ckeditor.com/ticket/13793): The [`embed_provider`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-embed_provider) configuration option for the [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins is no longer preset by default.
401
+ * The [UI Color](https://ckeditor.com/cke4/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used).
402
+
403
+ New Features:
404
+
405
+ * [#16755](https://dev.ckeditor.com/ticket/16755): Added the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column).
406
+ * [#16961](https://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel.
407
+ * [#13381](https://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.template.html) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy Patiño](http://caridy.name)!
408
+ * [#16971](https://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin.
409
+ * [#16847](https://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
410
+ * [#16818](https://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
411
+ * [#16850](https://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](https://ckeditor.com/cke4/addon/contextmenu).
412
+ * [#16937](https://dev.ckeditor.com/ticket/16937): The `command` parameter in [`CKEDITOR.editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) now also accepts a command name as an argument.
413
+ * [#17010](https://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-shrink) method now allows for skipping bogus `<br>` elements.
414
+
415
+ Fixed Issues:
416
+
417
+ * [#16935](https://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea) throws an error.
418
+ * [#16825](https://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor.
419
+ * [#16857](https://dev.ckeditor.com/ticket/16857): Fixed: <kbd>Ctrl+Shift+V</kbd> blocked by [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting).
420
+ * [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin is enabled.
421
+ * [#16786](https://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin.
422
+ * [#14714](https://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor.
423
+ * [#16913](https://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) keystroke does not work.
424
+ * [#16968](https://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) is not handled by the editor.
425
+ * [#16912](https://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
426
+ * [#16821](https://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `<span>` elements with `height` style stacked when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
427
+ * [#16866](https://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
428
+ * [#16860](https://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
429
+ * [#16817](https://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword), paragraphs are transformed into lists with some corrupted data.
430
+ * [#16833](https://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
431
+ * [#16826](https://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
432
+ * [#12465](https://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click.
433
+ * [#13062](https://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link.
434
+ * [#13585](https://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `<div>` elements with a `<div>`.
435
+ * [#16811](https://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
436
+ * [#16810](https://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin.
437
+ * [#11956](https://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles.
438
+ * [#10472](https://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](https://ckeditor.com/cke4/addon/tableresize) on table header and footer.
439
+ * [#14762](https://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin is active.
440
+ * [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin does not allow to drop widgets into the editor.
441
+ * [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened.
442
+ * [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin.
443
+ * [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar.
444
+ * [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited.
445
+ * [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)!
446
+ * [#16920](https://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](https://ckeditor.com/cke4/addon/dialog) plugin as a direct dependency.
447
+ * [PR#336](https://github.com/ckeditor/ckeditor-dev/pull/336): Fixed: Typo in [`CKEDITOR.getCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)!
448
+ * [#17027](https://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object.
449
+ * Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the `<iframe>` element in a CKEditor setup with ACF turned off and without the [Iframe Dialog](https://ckeditor.com/cke4/addon/iframe) plugin. The issue was originally reported as a security issue by [Sriramk21](https://twitter.com/sriramk21) from Pegasystems and was later downgraded by the security team into a normal issue due to the requirement of having ACF turned off. Disabling [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) is against [security best practices](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_best_practices.html#security), so the problem described above has not been considered a security issue as such.
450
+
451
+ Other Changes:
452
+
453
+ * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugins:
454
+ * Fixed: DOM Exception after clicking "Remove Language" on a selected word with enabled [Language](https://ckeditor.com/cke4/addon/language) plugin in SCAYT.
455
+ * [#16958](https://dev.ckeditor.com/ticket/16958): Switched the default MathJax CDN provider for the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin from `cdn.mathjax.org` to [cdnjs](https://cdnjs.com/), due to closing of `cdn.mathjax.org` scheduled for April 30, 2017.
456
+ * [#16954](https://dev.ckeditor.com/ticket/16954): Removed the paste dialog.
457
+ * [#16982](https://dev.ckeditor.com/ticket/16982): Latest Safari now supports enhanced Clipboard API introduced in CKEditor 4.5.0.
458
+ * [#17025](https://dev.ckeditor.com/ticket/17025): Updated [Bender.js](https://github.com/benderjs/benderjs) to 0.4.2.
459
+
460
+ ## CKEditor 4.6.2
461
+
462
+ New Features:
463
+
464
+ * [#16733](https://dev.ckeditor.com/ticket/16733): Added a new pastel color palette for the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin and a new [`config.colorButton_colorsPerRow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colorsPerRow) configuration option for setting the number of rows in the color selector.
465
+ * [#16752](https://dev.ckeditor.com/ticket/16752): Added a new Azerbaijani localization. Thanks to the [Azerbaijani language team](https://www.transifex.com/ckeditor/teams/11143/az/)!
466
+ * [#13818](https://dev.ckeditor.com/ticket/13818): It is now possible to group [Widget](https://ckeditor.com/cke4/addon/widget) [style definitions](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles), so applying one style disables the other.
467
+
468
+ Fixed Issues:
469
+
470
+ * [#13446](https://dev.ckeditor.com/ticket/13446): [Chrome] Fixed: It is possible to type in an unfocused inline editor.
471
+ * [#14856](https://dev.ckeditor.com/ticket/14856): Fixed: [Font size and font family](https://ckeditor.com/cke4/addon/font) reset each other when modified at certain positions.
472
+ * [#16745](https://dev.ckeditor.com/ticket/16745): [Edge] Fixed: List items are lost when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
473
+ * [#16682](https://dev.ckeditor.com/ticket/16682): [Edge] Fixed: A list gets [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword) as a set of paragraphs. Added the [`config.pasteFromWord_heuristicsEdgeList`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWord_heuristicsEdgeList) configuration option.
474
+ * [#10373](https://dev.ckeditor.com/ticket/10373): Fixed: Context menu items can be dragged into the editor.
475
+ * [#16728](https://dev.ckeditor.com/ticket/16728): [IE] Fixed: [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) breaks the editor in Quirks Mode.
476
+ * [#16795](https://dev.ckeditor.com/ticket/16795): [IE] Fixed: [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) breaks the editor in Compatibility Mode.
477
+ * [#16675](https://dev.ckeditor.com/ticket/16675): Fixed: Styles applied with [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) to a single table cell are applied to the whole table.
478
+ * [#16753](https://dev.ckeditor.com/ticket/16753): Fixed: [`element.setSize()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-setSize) sets incorrect editor dimensions if the border width is represented as a fraction of pixels.
479
+ * [#16705](https://dev.ckeditor.com/ticket/16705): [Firefox] Fixed: Unable to paste images as Base64 strings when using [Clipboard](https://ckeditor.com/cke4/addon/clipboard).
480
+ * [#14869](https://dev.ckeditor.com/ticket/14869): Fixed: JavaScript error is thrown when trying to use [Find](https://ckeditor.com/cke4/addon/find) in a [`<div>`-based editor](https://ckeditor.com/cke4/addon/divarea).
481
+
482
+ ## CKEditor 4.6.1
483
+
484
+ New Features:
485
+
486
+ * [#16639](https://dev.ckeditor.com/ticket/16639): The `callback` parameter in the [`CKEDITOR.ajax.post()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ajax.html#method-post) method became optional.
487
+
488
+ Fixed Issues:
489
+
490
+ * [#11064](https://dev.ckeditor.com/ticket/11064): [Blink, WebKit] Fixed: Cannot select all editor content when a widget or a non-editable element is the first or last element of the content. Also fixes this issue in the [Select All](https://ckeditor.com/cke4/addon/selectall) plugin.
491
+ * [#14755](https://dev.ckeditor.com/ticket/14755): [Blink, WebKit, IE8] Fixed: Browser hangs when a table is inserted in the place of a selected list with an empty last item.
492
+ * [#16624](https://dev.ckeditor.com/ticket/16624): Fixed: Improved the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin which will now normalize the CSS `background` property if it only contains a color value. This fixes missing background colors when using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
493
+ * [#16600](https://dev.ckeditor.com/ticket/16600): [Blink, WebKit] Fixed: Error thrown occasionally by an uninitialized editable for multiple CKEditor instances on the same page.
494
+
495
+ ## CKEditor 4.6
496
+
497
+ New Features:
498
+
499
+ * [#14569](https://dev.ckeditor.com/ticket/14569): Added a new, flat, default CKEditor skin called [Moono-Lisa](https://ckeditor.com/cke4/addon/moono-lisa). Refreshed default colors available in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin ([Text Color and Background Color](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_colorbutton.html) feature).
500
+ * [#14707](https://dev.ckeditor.com/ticket/14707): Added a new [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) feature to enable easy copying of styles between your document parts.
501
+ * Introduced the completely rewritten [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin:
502
+ * Backward incompatibility: The [`config.pasteFromWordRemoveFontStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveFontStyles) option now defaults to `false`. This option will be deprecated in the future. Use [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) to replicate the effect of setting it to `true`.
503
+ * Backward incompatibility: The [`config.pasteFromWordNumberedHeadingToList`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordNumberedHeadingToList) and [`config.pasteFromWordRemoveStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveStyles) options were dropped and no longer have any effect on pasted content.
504
+ * Major improvements in preservation of list numbering, styling and indentation (nested lists with multiple levels).
505
+ * Major improvements in document structure parsing that fix plenty of issues with distorted or missing content after paste.
506
+ * Added new translation: Occitan. Thanks to [Cédric Valmary](https://totenoc.eu/)!
507
+ * [#10015](https://dev.ckeditor.com/ticket/10015): Keyboard shortcuts (relevant to the operating system in use) will now be displayed in tooltips and context menus.
508
+ * [#13794](https://dev.ckeditor.com/ticket/13794): The [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) feature now uses `uploaded.width/height` if set.
509
+ * [#12541](https://dev.ckeditor.com/ticket/12541): Added the [Upload File](https://ckeditor.com/cke4/addon/uploadfile) plugin that lets you upload a file by drag&amp;dropping it into the editor content.
510
+ * [#14449](https://dev.ckeditor.com/ticket/14449): Introduced the [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin that lets you create stylish floating UI elements for the editor.
511
+ * [#12077](https://dev.ckeditor.com/ticket/12077): Added support for the HTML5 `download` attribute in link (`<a>`) elements. Selecting the "Force Download" checkbox in the [Link](https://ckeditor.com/cke4/addon/link) dialog will cause the linked file to be downloaded automatically. Thanks to [sbusse](https://github.com/sbusse)!
512
+ * [#13518](https://dev.ckeditor.com/ticket/13518): Introduced the [`additionalRequestParameters`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-additionalRequestParameters) property for file uploads to make it possible to send additional information about the uploaded file to the server.
513
+ * [#14889](https://dev.ckeditor.com/ticket/14889): Added the [`config.image2_altRequired`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_altRequired) option for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin to allow making alternative text a mandatory field. Thanks to [Andrey Fedoseev](https://github.com/andreyfedoseev)!
514
+
515
+ Fixed Issues:
516
+
517
+ * [#9991](https://dev.ckeditor.com/ticket/9991): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) should only normalize input data.
518
+ * [#7209](https://dev.ckeditor.com/ticket/7209): Fixed: Lists with 3 levels not [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword) correctly.
519
+ * [#14335](https://dev.ckeditor.com/ticket/14335): Fixed: Pasting a numbered list starting with a value different from "1" from Microsoft Word does not work correctly.
520
+ * [#14542](https://dev.ckeditor.com/ticket/14542): Fixed: Copying a numbered list from Microsoft Word does not preserve list formatting.
521
+ * [#14544](https://dev.ckeditor.com/ticket/14544): Fixed: Copying a nested list from Microsoft Word results in an empty list.
522
+ * [#14660](https://dev.ckeditor.com/ticket/14660): Fixed: [Pasting text from Word](https://ckeditor.com/cke4/addon/pastefromword) breaks the styling in some cases.
523
+ * [#14867](https://dev.ckeditor.com/ticket/14867): [Firefox] Fixed: Text gets stripped when [pasting content from Word](https://ckeditor.com/cke4/addon/pastefromword).
524
+ * [#2507](https://dev.ckeditor.com/ticket/2507): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not detect pasting a part of a paragraph.
525
+ * [#3336](https://dev.ckeditor.com/ticket/3336): Fixed: Extra blank row added on top of the content [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
526
+ * [#6115](https://dev.ckeditor.com/ticket/6115): Fixed: When Right-to-Left text direction is applied to a table [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword), borders are missing on one side.
527
+ * [#6342](https://dev.ckeditor.com/ticket/6342): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filters out a basic text style when it is [configured to use attributes](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_basicstyles.html#custom-basic-text-style-definition).
528
+ * [#6457](https://dev.ckeditor.com/ticket/6457): [IE] Fixed: [Pasting from Word](https://ckeditor.com/cke4/addon/pastefromword) is extremely slow.
529
+ * [#6789](https://dev.ckeditor.com/ticket/6789): Fixed: The `mso-list: ignore` style is not handled properly when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
530
+ * [#7262](https://dev.ckeditor.com/ticket/7262): Fixed: Lists in preformatted body disappear when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
531
+ * [#7662](https://dev.ckeditor.com/ticket/7662): [Opera] Fixed: Extra empty number/bullet shown in the editor body when editing a multi-level list [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword).
532
+ * [#7807](https://dev.ckeditor.com/ticket/7807): Fixed: Last item in a list not converted to a `<li>` element after [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
533
+ * [#7950](https://dev.ckeditor.com/ticket/7950): [IE] Fixed: Content [from Word pasted](https://ckeditor.com/cke4/addon/pastefromword) differently than in other browsers.
534
+ * [#7982](https://dev.ckeditor.com/ticket/7982): Fixed: Multi-level lists get split into smaller ones when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
535
+ * [#8231](https://dev.ckeditor.com/ticket/8231): [WebKit, Opera] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) inserts empty paragraphs.
536
+ * [#8266](https://dev.ckeditor.com/ticket/8266): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) inserts a blank line at the top.
537
+ * [#8341](https://dev.ckeditor.com/ticket/8341), [#7646](https://dev.ckeditor.com/ticket/7646): Fixed: Faulty removal of empty `<span>` elements in [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) content cleanup breaking content formatting.
538
+ * [#8754](https://dev.ckeditor.com/ticket/8754): [Firefox] Fixed: Incorrect pasting of multiple nested lists in [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword).
539
+ * [#8983](https://dev.ckeditor.com/ticket/8983): Fixed: Alignment lost when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword) with [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) set to [`CKEDITOR.ENTER_BR`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_BR).
540
+ * [#9331](https://dev.ckeditor.com/ticket/9331): [IE] Fixed: [Pasting text from Word](https://ckeditor.com/cke4/addon/pastefromword) creates a simple Caesar cipher.
541
+ * [#9422](https://dev.ckeditor.com/ticket/9422): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) leaves an unwanted `color:windowtext` style.
542
+ * [#10011](https://dev.ckeditor.com/ticket/10011): [IE9-10] Fixed: [`config.pasteFromWordRemoveFontStyles`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordRemoveFontStyles) is ignored under certain conditions.
543
+ * [#10643](https://dev.ckeditor.com/ticket/10643): Fixed: Differences between using <kbd>Ctrl+V</kbd> and pasting from the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) dialog.
544
+ * [#10784](https://dev.ckeditor.com/ticket/10784): Fixed: Lines missing when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
545
+ * [#11294](https://dev.ckeditor.com/ticket/11294): [IE10] Fixed: Font size is not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
546
+ * [#11627](https://dev.ckeditor.com/ticket/11627): Fixed: Missing words when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
547
+ * [#12784](https://dev.ckeditor.com/ticket/12784): Fixed: Bulleted list with custom bullets gets changed to a numbered list when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
548
+ * [#13174](https://dev.ckeditor.com/ticket/13174): Fixed: Data loss after [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword).
549
+ * [#13828](https://dev.ckeditor.com/ticket/13828): Fixed: Widget classes should be added to the wrapper rather than the widget element.
550
+ * [#13829](https://dev.ckeditor.com/ticket/13829): Fixed: No class in [Widget](https://ckeditor.com/cke4/addon/widget) wrapper to identify the widget type.
551
+ * [#13519](https://dev.ckeditor.com/ticket/13519): Server response received when uploading files should be more flexible.
552
+
553
+ Other Changes:
554
+
555
+ * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugins:
556
+ * Support for the new default Moono-Lisa skin.
557
+ * [#121](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/121): Fixed: [Basic Styles](https://ckeditor.com/cke4/addon/basicstyles) do not work when SCAYT is enabled.
558
+ * [#125](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/125): Fixed: Inline styles are not continued when writing multiple lines of styled text with SCAYT enabled.
559
+ * [#127](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/127): Fixed: Uncaught TypeError after enabling SCAYT in the CKEditor `<div>` element.
560
+ * [#128](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/128): Fixed: Error thrown after enabling SCAYT caused by conflicts with RequireJS.
561
+
562
+ ## CKEditor 4.5.11
563
+
564
+ **Security Updates:**
565
+
566
+ * [Severity: minor] Fixed the `target="_blank"` vulnerability reported by James Gaskell.
567
+
568
+ Issue summary: If a victim had access to a spoofed version of ckeditor.com via HTTP (e.g. due to DNS spoofing, using a hacked public network or mailicious hotspot), then when using a link to the ckeditor.com website it was possible for the attacker to change the current URL of the opening page, even if the opening page was protected with SSL.
569
+
570
+ An upgrade is recommended.
571
+
572
+ New Features:
573
+
574
+ * [#14747](https://dev.ckeditor.com/ticket/14747): The [Enhanced Image](https://ckeditor.com/cke4/addon/image2) caption now supports the link `target` attribute.
575
+ * [#7154](https://dev.ckeditor.com/ticket/7154): Added support for the "Display Text" field to the [Link](https://ckeditor.com/cke4/addon/link) dialog. Thanks to [Ryan Guill](https://github.com/ryanguill)!
576
+
577
+ Fixed Issues:
578
+
579
+ * [#13362](https://dev.ckeditor.com/ticket/13362): [Blink, WebKit] Fixed: Active widget element is not cached when it is losing focus and it is inside an editable element.
580
+ * [#13755](https://dev.ckeditor.com/ticket/13755): [Edge] Fixed: Pasting images does not work.
581
+ * [#13548](https://dev.ckeditor.com/ticket/13548): [IE] Fixed: Clicking the [elements path](https://ckeditor.com/cke4/addon/elementspath) disables Cut and Copy icons.
582
+ * [#13812](https://dev.ckeditor.com/ticket/13812): Fixed: When aborting file upload the placeholder for image is left.
583
+ * [#14659](https://dev.ckeditor.com/ticket/14659): [Blink] Fixed: Content scrolled to the top after closing the dialog in a [`<div>`-based editor](https://ckeditor.com/cke4/addon/divarea).
584
+ * [#14825](https://dev.ckeditor.com/ticket/14825): [Edge] Fixed: Focusing the editor causes unwanted scrolling due to dropped support for the `setActive()` method.
585
+
586
+ ## CKEditor 4.5.10
587
+
588
+ Fixed Issues:
589
+
590
+ * [#10750](https://dev.ckeditor.com/ticket/10750): Fixed: The editor does not escape the `font-style` family property correctly, removing quotes and whitespace from font names.
591
+ * [#14413](https://dev.ckeditor.com/ticket/14413): Fixed: The [Auto Grow](https://ckeditor.com/cke4/addon/autogrow) plugin with the [`config.autoGrow_onStartup`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autoGrow_onStartup) option set to `true` does not work properly for an editor that is not visible.
592
+ * [#14451](https://dev.ckeditor.com/ticket/14451): Fixed: Numeric element ID not escaped properly. Thanks to [Jakub Chalupa](https://github.com/chaluja7)!
593
+ * [#14590](https://dev.ckeditor.com/ticket/14590): Fixed: Additional line break appearing after inline elements when switching modes. Thanks to [dpidcock](https://github.com/dpidcock)!
594
+ * [#14539](https://dev.ckeditor.com/ticket/14539): Fixed: JAWS reads "selected Blank" instead of "selected <widget name>" when selecting a widget.
595
+ * [#14701](https://dev.ckeditor.com/ticket/14701): Fixed: More precise labels for [Enhanced Image](https://ckeditor.com/cke4/addon/image2) and [Placeholder](https://ckeditor.com/cke4/addon/placeholder) widgets.
596
+ * [#14667](https://dev.ckeditor.com/ticket/14667): [IE] Fixed: Removing background color from selected text removes background color from the whole paragraph.
597
+ * [#14252](https://dev.ckeditor.com/ticket/14252): [IE] Fixed: Styles drop-down list does not always reflect the current style of the text line.
598
+ * [#14275](https://dev.ckeditor.com/ticket/14275): [IE9+] Fixed: `onerror` and `onload` events are not used in browsers it could have been used when loading scripts dynamically.
599
+
600
+ ## CKEditor 4.5.9
601
+
602
+ Fixed Issues:
603
+
604
+ * [#10685](https://dev.ckeditor.com/ticket/10685): Fixed: Unreadable toolbar icons after updating to the new editor version. Fixed with [6876179](https://github.com/ckeditor/ckeditor-dev/commit/6876179db4ee97e786b07b8fd72e6b4120732185) in [ckeditor-dev](https://github.com/ckeditor/ckeditor-dev) and [6c9189f4](https://github.com/ckeditor/ckeditor-presets/commit/6c9189f46392d2c126854fe8889b820b8c76d291) in [ckeditor-presets](https://github.com/ckeditor/ckeditor-presets).
605
+ * [#14573](https://dev.ckeditor.com/ticket/14573): Fixed: Missing [Widget](https://ckeditor.com/cke4/addon/widget) drag handler CSS when there are multiple editor instances.
606
+ * [#14620](https://dev.ckeditor.com/ticket/14620): Fixed: Setting both the `min-height` style for the `<body>` element and the `height` style for the `<html>` element breaks the [Auto Grow](https://ckeditor.com/cke4/addon/autogrow) plugin.
607
+ * [#14538](https://dev.ckeditor.com/ticket/14538): Fixed: Keyboard focus goes into an embedded `<iframe>` element.
608
+ * [#14602](https://dev.ckeditor.com/ticket/14602): Fixed: The [`dom.element.removeAttribute()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeAttribute) method does not remove all attributes if no parameter is given.
609
+ * [#8679](https://dev.ckeditor.com/ticket/8679): Fixed: Better focus indication and ability to style the selected color in the [color picker dialog](https://ckeditor.com/cke4/addon/colordialog).
610
+ * [#11697](https://dev.ckeditor.com/ticket/11697): Fixed: Content is replaced ignoring the letter case setting in the [Find and Replace](https://ckeditor.com/cke4/addon/find) dialog window.
611
+ * [#13886](https://dev.ckeditor.com/ticket/13886): Fixed: Invalid handling of the [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) instance with the `styles` property by [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html).
612
+ * [#14535](https://dev.ckeditor.com/ticket/14535): Fixed: CSS syntax corrections. Thanks to [mdjdenormandie](https://github.com/mdjdenormandie)!
613
+
614
+ ## CKEditor 4.5.8
615
+
616
+ New Features:
617
+
618
+ * [#12440](https://dev.ckeditor.com/ticket/12440): Added the [`config.colorButton_enableAutomatic`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_enableAutomatic) option to allow hiding the "Automatic" option in the [color picker](https://ckeditor.com/cke4/addon/colorbutton).
619
+
620
+ Fixed Issues:
621
+
622
+ * [#10448](https://dev.ckeditor.com/ticket/10448): Fixed: Lack of scrollbar in the [right-to-left text direction](https://ckeditor.com/cke4/addon/bidi).
623
+ * [#12707](https://dev.ckeditor.com/ticket/12707): Fixed: The order of table elements does not comply with the HTML specification.
624
+ * [#13756](https://dev.ckeditor.com/ticket/13756): [Edge] Fixed: Context menus are cut-off.
625
+
626
+ ## CKEditor 4.5.7
627
+
628
+ New Features:
629
+
630
+ * [#14327](https://dev.ckeditor.com/ticket/14327): Added Swiss German localization. Thanks to [Miro Grenda](https://twitter.com/mirogrenda)!
631
+
632
+ Fixed Issues:
633
+
634
+ * [#13816](https://dev.ckeditor.com/ticket/13816): Introduced a new strategy for Filling Character handling to avoid changes in DOM. This fixes the following issues:
635
+ * [#12727](https://dev.ckeditor.com/ticket/12727): [Blink] `IndexSizeError` when using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) and [Content Templates](https://ckeditor.com/cke4/addon/templates) plugins.
636
+ * [#13377](https://dev.ckeditor.com/ticket/13377): [Widget](https://ckeditor.com/cke4/addon/widget) plugin issue when typing in Korean.
637
+ * [#13389](https://dev.ckeditor.com/ticket/13389): [Blink] [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) fails when the cursor is next to an `<hr>` tag.
638
+ * [#13513](https://dev.ckeditor.com/ticket/13513): [Blink, WebKit] [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) and [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) throw an error when an image is the only data in the editor.
639
+ * [#13884](https://dev.ckeditor.com/ticket/13884): [Firefox] Fixed: Copying and pasting a table results in just the first cell being pasted.
640
+ * [#14234](https://dev.ckeditor.com/ticket/14234): Fixed: URL input field is not marked as required in the [Media Embed](https://ckeditor.com/cke4/addon/embed) dialog.
641
+
642
+ ## CKEditor 4.5.6
643
+
644
+ New Features:
645
+
646
+ * Introduced the [`CKEDITOR.tools.getCookie()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-getCookie) and [`CKEDITOR.tools.setCookie()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-setCookie) methods for accessing cookies.
647
+ * Introduced the [`CKEDITOR.tools.getCsrfToken()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-getCsrfToken) method. The CSRF token is now automatically sent by the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) and [File Tools](https://ckeditor.com/cke4/addon/filetools) plugins during file uploads. The server-side upload handlers may check it and use it to additionally secure the communication.
648
+
649
+ Other Changes:
650
+
651
+ * Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type):
652
+ - New features:
653
+ - CKEditor [Language](https://ckeditor.com/cke4/addon/language) plugin support.
654
+ - CKEditor [Placeholder](https://ckeditor.com/cke4/addon/placeholder) plugin support.
655
+ - [Drag&Drop](https://ckeditor.com/docs/ckeditor4/latest/examples/fileupload.html) support.
656
+ - **Experimental** [GRAYT](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-grayt_autoStartup) (Grammar As You Type) functionality.
657
+ - Fixed issues:
658
+ * [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98): SCAYT affects dialog double-click. Fixed in SCAYT core.
659
+ * [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102): SCAYT core performance enhancements.
660
+ * [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104): SCAYT's spans leak into the clipboard and after pasting.
661
+ * [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105): A JavaScript error fired in case of multiple instances of CKEditor on one page.
662
+ * [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107): SCAYT should not check non-editable parts of content.
663
+ * [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108): Latest SCAYT copies the ID of the editor element to the iframe.
664
+ * SCAYT stops working when CKEditor [Undo plugin](https://ckeditor.com/cke4/addon/undo) not enabled.
665
+ * Issue with pasting SCAYT markup in CKEditor.
666
+ * SCAYT stops working after pressing the *Cancel* button in the WSC dialog.
667
+
668
+ ## CKEditor 4.5.5
669
+
670
+ Fixed Issues:
671
+
672
+ * [#13887](https://dev.ckeditor.com/ticket/13887): Fixed: [Link](https://ckeditor.com/cke4/addon/link) plugin alters the `target` attribute value. Thanks to [SamZiemer](https://github.com/SamZiemer)!
673
+ * [#12189](https://dev.ckeditor.com/ticket/12189): Fixed: The [Link](https://ckeditor.com/cke4/addon/link) plugin dialog does not display the subject of email links if the subject parameter is not lowercase.
674
+ * [#9192](https://dev.ckeditor.com/ticket/9192): Fixed: An `undefined` string is appended to an email address added with the [Link](https://ckeditor.com/cke4/addon/link) plugin if subject and email body are empty and [`config.emailProtection`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-emailProtection) is set to `encode`.
675
+ * [#13790](https://dev.ckeditor.com/ticket/13790): Fixed: It is not possible to destroy the editor `<iframe>` after the editor was detached from DOM. Thanks to [Stefan Rijnhart](https://github.com/StefanRijnhart)!
676
+ * [#13803](https://dev.ckeditor.com/ticket/13803): Fixed: The editor cannot be destroyed before being fully initialized. Thanks to [Cyril Fluck](https://github.com/cyril-sf)!
677
+ * [#13867](https://dev.ckeditor.com/ticket/13867): Fixed: CKEditor does not work when the `classList` polyfill is used.
678
+ * [#13885](https://dev.ckeditor.com/ticket/13885): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) requires the [Link](https://ckeditor.com/cke4/addon/link) plugin to link an image.
679
+ * [#13883](https://dev.ckeditor.com/ticket/13883): Fixed: Copying a table using the context menu strips off styles.
680
+ * [#13872](https://dev.ckeditor.com/ticket/13872): Fixed: Cutting is possible in the [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode.
681
+ * [#12848](https://dev.ckeditor.com/ticket/12848): [Blink] Fixed: Opening the [Find and Replace](https://ckeditor.com/cke4/addon/find) dialog window in the [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode throws an exception.
682
+ * [#13879](https://dev.ckeditor.com/ticket/13879): Fixed: It is not possible to prevent the [`editor.drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop) event.
683
+ * [#13361](https://dev.ckeditor.com/ticket/13361): Fixed: Skin images fail when the site path includes parentheses because the `background-image` path needs single quotes around the URL value.
684
+ * [#13771](https://dev.ckeditor.com/ticket/13771): Fixed: The `contents.css` style is not used if the [IFrame Editing Area](https://ckeditor.com/cke4/addon/wysiwygarea) plugin is missing.
685
+ * [#13782](https://dev.ckeditor.com/ticket/13782): Fixed: Unclear log messages.
686
+ * [#13919](https://dev.ckeditor.com/ticket/13919): [Edge] Fixed: Browser window crashes when accessing the `isContentEditable` property of an `<input>` DOM element.
687
+
688
+ Other Changes:
689
+
690
+ * [#13859](https://dev.ckeditor.com/ticket/13859): Test cases created with `bender.tools.createTestsForEditors` will also receive editor bot as a second parameter.
691
+
692
+ ## CKEditor 4.5.4
693
+
694
+ New Features:
695
+
696
+ * [#13632](https://dev.ckeditor.com/ticket/13632): Introduce error logging mechanism.
697
+ * [#13730](https://dev.ckeditor.com/ticket/13730): Switch to the new error logging mechanism.
698
+
699
+ Fixed Issues:
700
+
701
+ * [#9856](https://dev.ckeditor.com/ticket/9856): Fixed: Cannot use the native context menu together with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. Thanks to [Mark Wade](https://github.com/mark-wade)!
702
+ * [#12733](https://dev.ckeditor.com/ticket/12733): [IE9+] Fixed: Radio button `onChange` does not work. Thanks to [Iliya Kostadinov](https://github.com/iliyakostadinov)!
703
+ * [#13142](https://dev.ckeditor.com/ticket/13142): [Edge] Fixed: *Ctrl+A* and then *Backspace* result in an empty `<div>` element.
704
+ * [#13599](https://dev.ckeditor.com/ticket/13599): Fixed: Cross-editor drag and drop of an inline widget results in error/artifacts.
705
+ * [#13640](https://dev.ckeditor.com/ticket/13640): [IE] Fixed: Dropping a widget outside the `<body>` element is not handled correctly.
706
+ * [#13533](https://dev.ckeditor.com/ticket/13533): Fixed: No progress during upload.
707
+ * [#13680](https://dev.ckeditor.com/ticket/13680): Fixed: The parser should allow the `<h1-6>` element to be a child of the `<summary>` element.
708
+ * [#11724](https://dev.ckeditor.com/ticket/11724): [Touch devices] Fixed: Drop-downs often hide right after opening them.
709
+ * [#13690](https://dev.ckeditor.com/ticket/13690): Fixed: Copying content from IE to Chrome adds an extra paragraph.
710
+ * [#13284](https://dev.ckeditor.com/ticket/13284): Fixed: Cannot drag and drop a widget if the text caret is placed just after the widget instance.
711
+ * [#13516](https://dev.ckeditor.com/ticket/13516): Fixed: CKEditor removes empty HTML5 anchors without the `name` attribute.
712
+ * [#13765](https://dev.ckeditor.com/ticket/13765): [Safari 9] Fixed: Problems with rendering samples.
713
+
714
+ Other Changes:
715
+
716
+ * [#11725](https://dev.ckeditor.com/ticket/11725): Marked [`CKEDITOR.env.mobile`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-mobile) as deprecated. The reason is that it is no longer clear what "mobile" means.
717
+ * [#13737](https://dev.ckeditor.com/ticket/13737): Upgraded [Bender.js](https://github.com/benderjs/benderjs) to 0.4.1.
718
+
719
+ ## CKEditor 4.5.3
720
+
721
+ New Features:
722
+
723
+ * [#13501](https://dev.ckeditor.com/ticket/13501): Added the [`config.fileTools_defaultFileName`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_defaultFileName) option to allow setting a default file name for paste uploads.
724
+ * [#13603](https://dev.ckeditor.com/ticket/13603): Added support for uploading dropped BMP images.
725
+
726
+ Fixed Issues:
727
+
728
+ * [#13590](https://dev.ckeditor.com/ticket/13590): Fixed: Various issues related to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) feature. Fixes also:
729
+ * [#11215](https://dev.ckeditor.com/ticket/11215),
730
+ * [#8780](https://dev.ckeditor.com/ticket/8780),
731
+ * [#12762](https://dev.ckeditor.com/ticket/12762).
732
+ * [#13386](https://dev.ckeditor.com/ticket/13386): [Edge] Fixed: Issues with selecting and editing images.
733
+ * [#13568](https://dev.ckeditor.com/ticket/13568): Fixed: The [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) method returns invalid results for entire content selection.
734
+ * [#13453](https://dev.ckeditor.com/ticket/13453): Fixed: Drag&drop of entire editor content throws an error.
735
+ * [#13465](https://dev.ckeditor.com/ticket/13465): Fixed: Error is thrown and the widget is lost on drag&drop if it is the only content of the editor.
736
+ * [#13414](https://dev.ckeditor.com/ticket/13414): Fixed: Content auto paragraphing in a nested editable despite editor configuration.
737
+ * [#13429](https://dev.ckeditor.com/ticket/13429): Fixed: Incorrect selection after content insertion by the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin.
738
+ * [#13388](https://dev.ckeditor.com/ticket/13388): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) integration with [Undo](https://ckeditor.com/cke4/addon/undo) is broken.
739
+
740
+ Other Changes:
741
+
742
+ * [#13637](https://dev.ckeditor.com/ticket/13637): Several icons were refactored.
743
+ * Updated [Bender.js](https://github.com/benderjs/benderjs) to 0.3.0 and introduced the ability to run tests via HTTPs ([#13265](https://dev.ckeditor.com/ticket/13265)).
744
+
745
+ ## CKEditor 4.5.2
746
+
747
+ Fixed Issues:
748
+
749
+ * [#13609](https://dev.ckeditor.com/ticket/13609): [Edge] Fixed: The browser crashes when switching to the source mode. Thanks to [Andrew Williams and Mark Smeed](http://webxsolution.com/)!
750
+ * [PR#201](https://github.com/ckeditor/ckeditor-dev/pull/201): Fixed: Buttons in the toolbar configurator cause form submission. Thanks to [colemanw](https://github.com/colemanw)!
751
+ * [#13422](https://dev.ckeditor.com/ticket/13422): Fixed: A monospaced font should be used in the `<textarea>` element storing editor configuration in the toolbar configurator.
752
+ * [#13494](https://dev.ckeditor.com/ticket/13494): Fixed: Error thrown in the toolbar configurator if plugin requirements are not met.
753
+ * [#13409](https://dev.ckeditor.com/ticket/13409): Fixed: List elements incorrectly merged when pressing *Backspace* or *Delete*.
754
+ * [#13434](https://dev.ckeditor.com/ticket/13434): Fixed: Dialog state indicator broken in Right–To–Left environments.
755
+ * [#13460](https://dev.ckeditor.com/ticket/13460): [IE8] Fixed: Copying inline widgets is broken when [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) is disabled.
756
+ * [#13495](https://dev.ckeditor.com/ticket/13495): [Firefox, IE] Fixed: Text is not word-wrapped in the Paste dialog window.
757
+ * [#13528](https://dev.ckeditor.com/ticket/13528): [Firefox@Windows] Fixed: Content copied from Microsoft Word and other external applications is pasted as a plain text. Removed the `CKEDITOR.plugins.clipboard.isHtmlInExternalDataTransfer` property as the check must be dynamic.
758
+ * [#13583](https://dev.ckeditor.com/ticket/13583): Fixed: [`DataTransfer.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_clipboard_dataTransfer.html#method-getData) should work consistently in all browsers and should not strip valuable content. Fixed pasting tables from Microsoft Excel on Chrome.
759
+ * [#13468](https://dev.ckeditor.com/ticket/13468): [IE] Fixed: Binding drag&drop `dataTransfer` does not work if `text` data was set in the meantime.
760
+ * [#13451](https://dev.ckeditor.com/ticket/13451): [IE8-9] Fixed: One drag&drop operation may affect following ones.
761
+ * [#13184](https://dev.ckeditor.com/ticket/13184): Fixed: Web page reloaded after a drop on editor UI.
762
+ * [#13129](https://dev.ckeditor.com/ticket/13129) Fixed: Block widget blurred after a drop followed by an undo.
763
+ * [#13397](https://dev.ckeditor.com/ticket/13397): Fixed: Drag&drop of a widget inside its nested widget crashes the editor.
764
+ * [#13385](https://dev.ckeditor.com/ticket/13385): Fixed: [`editor.getSnapshot()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSnapshot) may return a non-string value.
765
+ * [#13419](https://dev.ckeditor.com/ticket/13419): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin does not encode double quotes in URLs.
766
+ * [#13420](https://dev.ckeditor.com/ticket/13420): Fixed: The [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin ignores encoded characters in URL parameters.
767
+ * [#13410](https://dev.ckeditor.com/ticket/13410): Fixed: Error thrown in the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin when undoing right after pasting a link.
768
+ * [#13566](https://dev.ckeditor.com/ticket/13566): Fixed: Suppressed notifications in the [Media Embed Base](https://ckeditor.com/cke4/addon/embedbase) plugin.
769
+ * [#11616](https://dev.ckeditor.com/ticket/11616): [Chrome] Fixed: Resizing the editor while it is not displayed breaks the editable. Fixes also [#9160](https://dev.ckeditor.com/ticket/9160) and [#9715](https://dev.ckeditor.com/ticket/9715).
770
+ * [#11376](https://dev.ckeditor.com/ticket/11376): [IE11] Fixed: Loss of text when pasting bulleted lists from Microsoft Word.
771
+ * [#13143](https://dev.ckeditor.com/ticket/13143): [Edge] Fixed: Focus lost when opening the panel.
772
+ * [#13387](https://dev.ckeditor.com/ticket/13387): [Edge] Fixed: "Permission denied" error thrown when loading the editor with developer tools open.
773
+ * [#13574](https://dev.ckeditor.com/ticket/13574): [Edge] Fixed: "Permission denied" error thrown when opening editor dialog windows.
774
+ * [#13441](https://dev.ckeditor.com/ticket/13441): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin breaks the state of [Undo](https://ckeditor.com/cke4/addon/undo) commands after a paste.
775
+ * [#13554](https://dev.ckeditor.com/ticket/13554): [Edge] Fixed: Paste dialog's iframe does not receive focus on show.
776
+ * [#13440](https://dev.ckeditor.com/ticket/13440): [Edge] Fixed: Unable to paste a widget.
777
+
778
+ Other Changes:
779
+
780
+ * [#13421](https://dev.ckeditor.com/ticket/13421): UX improvements to notifications in the [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) plugin.
781
+
782
+ ## CKEditor 4.5.1
783
+
784
+ Fixed Issues:
785
+
786
+ * [#13486](https://dev.ckeditor.com/ticket/13486): Fixed: The [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin should log an error, not throw an error when upload URL is not set.
787
+
788
+ ## CKEditor 4.5
789
+
790
+ New Features:
791
+
792
+ * [#13304](https://dev.ckeditor.com/ticket/13304): Added support for passing DOM elements to [`config.sharedSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-sharedSpaces). Thanks to [Undergrounder](https://github.com/Undergrounder)!
793
+ * [#13215](https://dev.ckeditor.com/ticket/13215): Added ability to cancel fetching a resource by the Embed plugins.
794
+ * [#13213](https://dev.ckeditor.com/ticket/13213): Added the [`dialog#setState()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-setState) method and used it in the [Embed](https://ckeditor.com/cke4/addon/embed) dialog to indicate that a resource is being loaded.
795
+ * [#13337](https://dev.ckeditor.com/ticket/13337): Added the [`repository.onWidget()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-onWidget) method &mdash; a convenient way to listen to [widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) events through the [repository](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.repository.html).
796
+ * [#13214](https://dev.ckeditor.com/ticket/13214): Added support for pasting links that convert into embeddable resources on the fly.
797
+
798
+ Fixed Issues:
799
+
800
+ * [#13334](https://dev.ckeditor.com/ticket/13334): Fixed: Error after nesting widgets and playing with undo/redo.
801
+ * [#13118](https://dev.ckeditor.com/ticket/13118): Fixed: The [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) method throws an error when called in the source mode.
802
+ * [#13158](https://dev.ckeditor.com/ticket/13158): Fixed: Error after canceling a dialog when creating a widget.
803
+ * [#13197](https://dev.ckeditor.com/ticket/13197): Fixed: Linked inline [Enhanced Image](https://ckeditor.com/cke4/addon/image2) alignment class is not transferred to the widget wrapper.
804
+ * [#13199](https://dev.ckeditor.com/ticket/13199): Fixed: [Semantic Embed](https://ckeditor.com/cke4/addon/embedsemantic) does not support widget classes.
805
+ * [#13003](https://dev.ckeditor.com/ticket/13003): Fixed: Anchors are uploaded when moving them by drag and drop.
806
+ * [#13032](https://dev.ckeditor.com/ticket/13032): Fixed: When upload is done, notification update should be marked as important.
807
+ * [#13300](https://dev.ckeditor.com/ticket/13300): Fixed: The `internalCommit` argument in the [Image](https://ckeditor.com/cke4/addon/image) dialog seems to be never used.
808
+ * [#13036](https://dev.ckeditor.com/ticket/13036): Fixed: Notifications are moved 10px to the right.
809
+ * [#13280](https://dev.ckeditor.com/ticket/13280): [IE8] Fixed: Undo after inline widget drag&drop throws an error.
810
+ * [#13186](https://dev.ckeditor.com/ticket/13186): Fixed: Content dropped into a nested editable is not filtered by [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html).
811
+ * [#13140](https://dev.ckeditor.com/ticket/13140): Fixed: Error thrown when dropping a block widget right after itself.
812
+ * [#13176](https://dev.ckeditor.com/ticket/13176): [IE8] Fixed: Errors on drag&drop of embed widgets.
813
+ * [#13015](https://dev.ckeditor.com/ticket/13015): Fixed: Dropping an image file on [Enhanced Image](https://ckeditor.com/cke4/addon/image2) causes a page reload.
814
+ * [#13080](https://dev.ckeditor.com/ticket/13080): Fixed: Ugly notification shown when the response contains HTML content.
815
+ * [#13011](https://dev.ckeditor.com/ticket/13011): [IE8] Fixed: Anchors are duplicated on drag&drop in specific locations.
816
+ * [#13105](https://dev.ckeditor.com/ticket/13105): Fixed: Various issues related to [`CKEDITOR.tools.htmlEncode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlEncode) and [`CKEDITOR.tools.htmlDecode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlDecode) methods.
817
+ * [#11976](https://dev.ckeditor.com/ticket/11976): [Chrome] Fixed: Copy&paste and drag&drop lists from Microsoft Word.
818
+ * [#13128](https://dev.ckeditor.com/ticket/13128): Fixed: Various issues with cloning element IDs:
819
+ * Fixed the default behavior of [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) and [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) methods which now clone IDs similarly to their native counterparts.
820
+ * Added `cloneId` arguments to the above methods, [`range.splitBlock()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-splitBlock) and [`element.breakParent()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-breakParent). Mind the default values and special behavior in the `extractContents()` method!
821
+ * Fixed issues where IDs were lost on copy&paste and drag&drop.
822
+ * Toolbar configurators:
823
+ * [#13185](https://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret.
824
+ * [#13138](https://dev.ckeditor.com/ticket/13138): Fixed: The "Toggle empty elements" button label is unclear.
825
+ * [#13136](https://dev.ckeditor.com/ticket/13136): Fixed: Autocompleter is far too intrusive.
826
+ * [#13133](https://dev.ckeditor.com/ticket/13133): Fixed: Tab leaves the editor.
827
+ * [#13173](https://dev.ckeditor.com/ticket/13173): Fixed: [`config.removeButtons`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removeButtons) is ignored by the advanced toolbar configurator.
828
+
829
+ Other Changes:
830
+
831
+ * [#13119](https://dev.ckeditor.com/ticket/13119): Improved compatibility of editor skins ([Moono](https://ckeditor.com/cke4/addon/moono) and [Kama](https://ckeditor.com/cke4/addon/kama)) with external web page style sheets.
832
+ * Toolbar configurators:
833
+ * [#13147](https://dev.ckeditor.com/ticket/13147): Added buttons to the sticky toolbar.
834
+ * [#13207](https://dev.ckeditor.com/ticket/13207): Used modal window to display toolbar configurator help.
835
+ * [#13316](https://dev.ckeditor.com/ticket/13316): Made [`CKEDITOR.env.isCompatible`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-isCompatible) a blacklist rather than a whitelist. More about the change in the [Browser Compatibility](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_browsers.html) guide.
836
+ * [#13398](https://dev.ckeditor.com/ticket/13398): Renamed `CKEDITOR.fileTools.UploadsRepository` to [`CKEDITOR.fileTools.UploadRepository`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadRepository.html) and changed all related properties.
837
+ * [#13279](https://dev.ckeditor.com/ticket/13279): Reviewed CSS vendor prefixes.
838
+ * [#13454](https://dev.ckeditor.com/ticket/13454): Removed unused `lang.image.alertUrl` token from the [Image](https://ckeditor.com/cke4/addon/image) plugin.
839
+
840
+ ## CKEditor 4.5 Beta
841
+
842
+ New Features:
843
+
844
+ * Clipboard (copy&paste, drag&drop) and file uploading features and improvements ([#11437](https://dev.ckeditor.com/ticket/11437)).
845
+
846
+ * Major features:
847
+ * Support for dropping and pasting files into the editor was introduced. Through a set of new facades for native APIs it is now possible to easily intercept and process inserted files.
848
+ * [File upload tools](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.html) were introduced in order to simplify controlling the loading, uploading and handling server response, properly handle [new upload configuration](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-uploadUrl) options, etc.
849
+ * [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) widget was introduced to upload dropped images. A base class for the [upload widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html) was exposed, too, to make it simple to create new types of upload widgets which can handle any type of dropped file, show the upload progress and update the content when the process is done. It also handles editing and undo/redo operations when a file is being uploaded and integrates with the [notification aggregator](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notificationAggregator.html) to show progress and success or error.
850
+ * All drag and drop operations were integrated with the editor. All dropped content is passed through the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event and a set of new editor events was introduced &mdash; [`dragstart`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragstart), [`drop`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-drop), [`dragend`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-dragend).
851
+ * The [Data Transfer](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.clipboard.dataTransfer.html) facade was introduced to unify access to data in various types and files. [Data Transfer](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.clipboard.dataTransfer.html) is now always available in the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event.
852
+ * Switched from the pastebin to using the native clipboard access whenever possible. This solved many issues related to pastebin such as unnecessary scrolling or data loss. Additionally, on copy and cut from the editor the clipboard data is set. Therefore, on paste the editor has access to clean data, undisturbed by the browsers.
853
+ * Drag and drop of inline and block widgets was integrated with the standard clipboard APIs. By listening to drag events you will thus be notified about widgets, too. This opens a possibility to filter pasted and dropped widgets.
854
+ * The [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event can have the `range` parameter so it is possible to change the paste position in the listener or paste in the not selectable position. Also the [`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml) method now accepts `range` as an additional parameter.
855
+ * [#11621](https://dev.ckeditor.com/ticket/11621): A configurable [paste filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFilter) was introduced. The filter is by default turned to `'semantic-content'` on Webkit and Blink for all pasted content coming from external sources because of the low quality of HTML that these engines put into the clipboard. Internal and cross-editor paste is safe due to the change explained in the previous point.
856
+
857
+ * Other changes and related fixes:
858
+ * [#12095](https://dev.ckeditor.com/ticket/12095): On drag and copy of widgets [the same method](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) is used to get selected HTML as in the normal case. Thanks to that styles applied to inline widgets are not lost.
859
+ * [#11219](https://dev.ckeditor.com/ticket/11219): Fixed: Dragging a [captioned image](https://ckeditor.com/cke4/addon/image2) does not fire the [`editor#paste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-paste) event.
860
+ * [#9554](https://dev.ckeditor.com/ticket/9554): [Webkit Mac] Fixed: Editor scrolls on paste.
861
+ * [#9898](https://dev.ckeditor.com/ticket/9898): [Webkit&Divarea] Fixed: Pasting causes undesirable scrolling.
862
+ * [#11993](https://dev.ckeditor.com/ticket/11993): [Chrome] Fixed: Pasting content scrolls the document.
863
+ * [#12613](https://dev.ckeditor.com/ticket/12613): Show the user that they can not drop on editor UI (toolbar, bottom bar).
864
+ * [#12851](https://dev.ckeditor.com/ticket/12851): [Blink/Webkit] Fixed: Formatting disappears when pasting content into cells.
865
+ * [#12914](https://dev.ckeditor.com/ticket/12914): Fixed: Copy/Paste of table broken in `div`-based editor.
866
+
867
+ * Browser support.<br>Browser support for related features varies significantly (see http://caniuse.com/clipboard).
868
+ * File APIs needed to operate and file upload is not supported in Internet Explorer 9 and below.
869
+ * Only Chrome and Safari on Mac OS support setting custom data items in the clipboard, so currently it is possible to recognize the origin of the copied content in these browsers only. All drag and drop operations can be identified thanks to the new Data Transfer facade.
870
+ * No Internet Explorer browser supports the standard clipboard API which results in small glitches like where only plain text can be dropped from outside the editor. Thanks to the new Data Transfer facade, internal and cross-editor drag and drop supports the full range of data.
871
+ * Direct access to clipboard could only be implemented in Chrome, Safari on Mac OS, Opera and Firefox. In other browsers the pastebin must still be used.
872
+
873
+ * [#12875](https://dev.ckeditor.com/ticket/12875): Samples and toolbar configuration tools.
874
+ * The old set of samples shipped with every CKEditor package was replaced with a shiny new single-page sample. This change concluded a long term plan which started from introducing the [CKEditor SDK](https://ckeditor.com/docs/ckeditor4/latest/examples/index.html) and [CKEditor Functionality Overview](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_features.html) section in the documentation which essentially redefined the old samples.
875
+ * Toolbar configurators with live previews were introduced. They will be shipped with every CKEditor package and are meant to help in configuring toolbar layouts.
876
+
877
+ * [#10925](https://dev.ckeditor.com/ticket/10925): The [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins were introduced. Read more about the new features in the [Embedding Content](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_media_embed.html) article.
878
+ * [#10931](https://dev.ckeditor.com/ticket/10931): Added support for nesting widgets. It is now possible to insert one widget into another widget's nested editable. Note that unless nested editable's [allowed content](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_nestedEditable_definition.html#property-allowedContent) is defined precisely, starting from CKEditor 4.5 some widget buttons may become enabled. This feature is not supported in IE8. Included issues:
879
+ * [#12018](https://dev.ckeditor.com/ticket/12018): Fixed and reviewed: Nested widgets garbage collection.
880
+ * [#12024](https://dev.ckeditor.com/ticket/12024): [Firefox] Fixed: Outline is extended to the left by unpositioned drag handlers.
881
+ * [#12006](https://dev.ckeditor.com/ticket/12006): Fixed: Drag and drop of nested block widgets.
882
+ * [#12008](https://dev.ckeditor.com/ticket/12008): Fixed various cases of inserting a single non-editable element using the [`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml) method. Fixes pasting a widget with a nested editable inside another widget's nested editable.
883
+
884
+ * Notification system:
885
+ * [#11580](https://dev.ckeditor.com/ticket/11580): Introduced the [notification system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notification.html).
886
+ * [#12810](https://dev.ckeditor.com/ticket/12810): Introduced a [notification aggregator](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notificationAggregator.html) for the [notification system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.notification.html) which simplifies displaying progress of many concurrent tasks.
887
+ * [#11636](https://dev.ckeditor.com/ticket/11636): Introduced new, UX-focused, methods for getting selected HTML and deleting it &mdash; [`editor.getSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedHtml) and [`editor.extractSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-extractSelectedHtml).
888
+ * [#12416](https://dev.ckeditor.com/ticket/12416): Added the [`widget.definition.upcastPriority`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcastPriority) property which gives more control over widget upcasting order to the widget author.
889
+ * [#12036](https://dev.ckeditor.com/ticket/12036): Initialize the editor in [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) mode when the `<textarea>` element has a `readonly` attribute.
890
+ * [#11905](https://dev.ckeditor.com/ticket/11905): The [`resize` event](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-resize) passes the current dimensions in its data.
891
+ * [#12126](https://dev.ckeditor.com/ticket/12126): Introduced [`config.image_prefillDimensions`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image_prefillDimensions) and [`config.image2_prefillDimensions`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_prefillDimensions) to make pre-filling `width` and `height` configurable for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2).
892
+ * [#12746](https://dev.ckeditor.com/ticket/12746): Added a new configuration option to hide the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resizer.
893
+ * [#12150](https://dev.ckeditor.com/ticket/12150): Exposed the [`getNestedEditable()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#static-method-getNestedEditable) and `is*` [widget helper](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) functions (see the static methods).
894
+ * [#12448](https://dev.ckeditor.com/ticket/12448): Introduced the [`editable.insertHtmlIntoRange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertHtmlIntoRange) method.
895
+ * [#12143](https://dev.ckeditor.com/ticket/12143): Added the [`config.floatSpacePreferRight`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-floatSpacePreferRight) configuration option that switches the alignment of the floating toolbar. Thanks to [InvisibleBacon](http://github.com/InvisibleBacon)!
896
+ * [#10986](https://dev.ckeditor.com/ticket/10986): Added support for changing dialog input and textarea text directions by using the *Shift+Alt+Home/End* keystrokes. The direction is stored in the value of the input by prepending the [`\u202A`](http://unicode.org/cldr/utility/character.jsp?a=202A) or [`\u202B`](http://unicode.org/cldr/utility/character.jsp?a=202B) marker to it. Read more in the [documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition_textInput.html#property-bidi). Thanks to [edithkk](https://github.com/edithkk)!
897
+ * [#12770](https://dev.ckeditor.com/ticket/12770): Added support for passing [widget](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html)'s startup data as a widget command's argument. Thanks to [Rebrov Boris](https://github.com/zipp3r) and [Tieme van Veen](https://github.com/tiemevanveen)!
898
+ * [#11583](https://dev.ckeditor.com/ticket/11583): Added support for the HTML5 `required` attribute in various form elements. Thanks to [Steven Busse](https://github.com/sbusse)!
899
+
900
+ Changes:
901
+
902
+ * [#12858](https://dev.ckeditor.com/ticket/12858): Basic [Spartan](http://blogs.windows.com/bloggingwindows/2015/03/30/introducing-project-spartan-the-new-browser-built-for-windows-10/) browser compatibility. Full compatibility will be introduced later, because at the moment Spartan is still too unstable to be used for tests and we see many changes from version to version.
903
+ * [#12948](https://dev.ckeditor.com/ticket/12948): The [`config.mathJaxLibrary`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-mathJaxLib) option does not default to the MathJax CDN any more. It needs to be configured to enable the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin now.
904
+ * [#13069](https://dev.ckeditor.com/ticket/13069): Fixed inconsistencies between [`editable.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElement) and [`editable.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElement) when the `range` parameter is used. Now, the `editor.insertElement()` method works on a higher level, which means that it saves undo snapshots and sets the selection after insertion. Use the [`editable.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElementIntoRange) method directly for the pre 4.5 behavior of `editable.insertElement()`.
905
+ * [#12870](https://dev.ckeditor.com/ticket/12870): Use [`editor.showNotification()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-showNotification) instead of `alert()` directly whenever possible. When the [Notification plugin](https://ckeditor.com/cke4/addon/notification) is loaded, the notification system is used automatically. Otherwise, the native `alert()` is displayed.
906
+ * [#8024](https://dev.ckeditor.com/ticket/8024): Swapped behavior of the Split Cell Vertically and Horizontally features of the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin to be more intuitive. Thanks to [kevinisagit](https://github.com/kevinisagit)!
907
+ * [#10903](https://dev.ckeditor.com/ticket/10903): Performance improvements for the [`dom.element.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-addClass), [`dom.element.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeClass) and [`dom.element.hasClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-hasClass) methods. Note: The previous implementation allowed passing multiple classes to `addClass()` although it was only a side effect of that implementation. The new implementation does not allow this.
908
+ * [#11856](https://dev.ckeditor.com/ticket/11856): The jQuery adapter throws a meaningful error if CKEditor or jQuery are not loaded.
909
+
910
+ Fixed issues:
911
+
912
+ * [#11586](https://dev.ckeditor.com/ticket/11586): Fixed: [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) should not change the DOM in order not to affect selection.
913
+ * [#12148](https://dev.ckeditor.com/ticket/12148): Fixed: [`dom.element.getChild()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getChild) should not modify a passed array.
914
+ * [#12503](https://dev.ckeditor.com/ticket/12503): [Blink/Webkit] Fixed: Incorrect result of Select All and *Backspace* or *Delete*.
915
+ * [#13001](https://dev.ckeditor.com/ticket/13001): [Firefox] Fixed: The `<br />` filler is placed in the wrong position by the [`range.fixBlock()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-fixBlock) method due to quirky Firefox behavior.
916
+ * [#13101](https://dev.ckeditor.com/ticket/13101): [IE8] Fixed: Colons are prepended to HTML5 element names when cloning them.
917
+
918
+ ## CKEditor 4.4.8
919
+
920
+ **Security Updates:**
921
+
922
+ * Fixed XSS vulnerability in the HTML parser reported by [Dheeraj Joshi](https://twitter.com/dheerajhere) and [Prem Kumar](https://twitter.com/iAmPr3m).
923
+
924
+ Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
925
+
926
+ **An upgrade is highly recommended!**
927
+
928
+ Fixed Issues:
929
+
930
+ * [#12899](https://dev.ckeditor.com/ticket/12899): Fixed: Corrected wrong tag ending for horizontal box definition in the [Dialog User Interface](https://ckeditor.com/cke4/addon/dialogui) plugin. Thanks to [mizafish](https://github.com/mizafish)!
931
+ * [#13254](https://dev.ckeditor.com/ticket/13254): Fixed: Cannot outdent block after indent when using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. Thanks to [Jonathan Cottrill](https://github.com/jcttrll)!
932
+ * [#13268](https://dev.ckeditor.com/ticket/13268): Fixed: Documentation for [`CKEDITOR.dom.text`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.text.html) is incorrect. Thanks to [Ben Kiefer](https://github.com/benkiefer)!
933
+ * [#12739](https://dev.ckeditor.com/ticket/12739): Fixed: Link loses inline styles when edited without the [Advanced Tab for Dialogs](https://ckeditor.com/cke4/addon/dialogadvtab) plugin. Thanks to [Віталій Крутько](https://github.com/asmforce)!
934
+ * [#13292](https://dev.ckeditor.com/ticket/13292): Fixed: Protection pattern does not work in attribute in self-closing elements with no space before `/>`. Thanks to [Віталій Крутько](https://github.com/asmforce)!
935
+ * [PR#192](https://github.com/ckeditor/ckeditor-dev/pull/192): Fixed: Variable name typo in the [Dialog User Interface](https://ckeditor.com/cke4/addon/dialogui) plugin which caused [`CKEDITOR.ui.dialog.radio`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.ui.dialog.radio.html) validation to not work. Thanks to [Florian Ludwig](https://github.com/FlorianLudwig)!
936
+ * [#13232](https://dev.ckeditor.com/ticket/13232): [Safari] Fixed: The [`element.appendText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-appendText) method does not work properly for empty elements.
937
+ * [#13233](https://dev.ckeditor.com/ticket/13233): Fixed: [HTMLDataProcessor](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html) can process `foo:href` attributes.
938
+ * [#12796](https://dev.ckeditor.com/ticket/12796): Fixed: The [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin unwraps parent `<li>` elements. Thanks to [Andrew Stucki](https://github.com/andrewstucki)!
939
+ * [#12885](https://dev.ckeditor.com/ticket/12885): Added missing [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) parameter documentation.
940
+ * [#11982](https://dev.ckeditor.com/ticket/11982): Fixed: Bullet added in a wrong position after the *Enter* key is pressed in a nested list.
941
+ * [#13027](https://dev.ckeditor.com/ticket/13027): Fixed: Keyboard navigation in dialog windows with multiple tabs not following IBM CI 162 instructions or [ARIA Authoring Practices](http://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#tabpanel).
942
+ * [#12256](https://dev.ckeditor.com/ticket/12256): Fixed: Basic styles classes are lost when pasting from Microsoft Word if [basic styles](https://ckeditor.com/cke4/addon/basicstyles) were configured to use classes.
943
+ * [#12729](https://dev.ckeditor.com/ticket/12729): Fixed: Incorrect structure created when merging a block into a list item on *Backspace* and *Delete*.
944
+ * [#13031](https://dev.ckeditor.com/ticket/13031): [Firefox] Fixed: No more line breaks in source view since Firefox 36.
945
+ * [#13131](https://dev.ckeditor.com/ticket/13131): Fixed: The [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) plugin cannot be used without the [IFrame Editing Area](https://ckeditor.com/cke4/addon/wysiwygarea) plugin.
946
+ * [#9086](https://dev.ckeditor.com/ticket/9086): Fixed: Invalid ARIA property used on paste area `<iframe>`.
947
+ * [#13164](https://dev.ckeditor.com/ticket/13164): Fixed: Error when inserting a hidden field.
948
+ * [#13155](https://dev.ckeditor.com/ticket/13155): Fixed: Incorrect [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) positioning when `<body>` has a margin.
949
+ * [#13351](https://dev.ckeditor.com/ticket/13351): Fixed: Link lost when editing a linked image with the Link tab disabled. This also fixed a bug when inserting an image into a fully selected link would throw an error ([#12847](https://dev.ckeditor.com/ticket/12847)).
950
+ * [#13344](https://dev.ckeditor.com/ticket/13344): [WebKit/Blink] Fixed: It is possible to remove or change editor content in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html).
951
+
952
+ Other Changes:
953
+
954
+ * [#12844](https://dev.ckeditor.com/ticket/12844) and [#13103](https://dev.ckeditor.com/ticket/13103): Upgraded the [testing environment](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_tests.html) to [Bender.js](https://github.com/benderjs/benderjs) `0.2.3`.
955
+ * [#12930](https://dev.ckeditor.com/ticket/12930): Because of licensing issues, `truncated-mathjax/` is now removed from the `tests/` directory. Now `bender.config.mathJaxLibPath` must be configured manually in order to run [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin tests.
956
+ * [#13266](https://dev.ckeditor.com/ticket/13266): Added more shades of gray in the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window. Thanks to [mizafish](https://github.com/mizafish)!
957
+
958
+
959
+ ## CKEditor 4.4.7
960
+
961
+ Fixed Issues:
962
+
963
+ * [#12825](https://dev.ckeditor.com/ticket/12825): Fixed: Preventing the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin from operating on elements outside the editor. Thanks to [Paul Martin](https://github.com/Paul-Martin)!
964
+ * [#12157](https://dev.ckeditor.com/ticket/12157): Fixed: Lost text formatting on pressing *Tab* when the [`config.tabSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-tabSpaces) configuration option value was greater than zero.
965
+ * [#12777](https://dev.ckeditor.com/ticket/12777): Fixed: The `table-layout` CSS property should be reset by skins. Thanks to [vita10gy](https://github.com/vita10gy)!
966
+ * [#12812](https://dev.ckeditor.com/ticket/12812): Fixed: An uncaught security exception is thrown when [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) are used in an inline editor loaded in a cross-domain `iframe`. Thanks to [Vitaliy Zurian](https://github.com/thecatontheflat)!
967
+ * [#12735](https://dev.ckeditor.com/ticket/12735): Fixed: [`config.fillEmptyBlocks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fillEmptyBlocks) should only apply when outputting data.
968
+ * [#10032](https://dev.ckeditor.com/ticket/10032): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter is executed for every paste after using the button.
969
+ * [#12597](https://dev.ckeditor.com/ticket/12597): [Blink/WebKit] Fixed: Multi-byte Japanese characters entry not working properly after *Shift+Enter*.
970
+ * [#12387](https://dev.ckeditor.com/ticket/12387): Fixed: An error is thrown if a skin does not have the [`chameleon`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_skin.html#method-chameleon) property defined and [`config.uiColor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-uiColor) is defined.
971
+ * [#12747](https://dev.ckeditor.com/ticket/12747): [IE8-10] Fixed: Opening a drop-down for a specific selection when the editor is maximized results in incorrect drop-down panel position.
972
+ * [#12850](https://dev.ckeditor.com/ticket/12850): [IEQM] Fixed: An error is thrown after focusing the editor.
973
+
974
+ ## CKEditor 4.4.6
975
+
976
+ **Security Updates:**
977
+
978
+ * Fixed XSS vulnerability in the HTML parser reported by [Maco Cortes](https://www.facebook.com/Maaacoooo).
979
+
980
+ Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode.
981
+
982
+ **An upgrade is highly recommended!**
983
+
984
+ New Features:
985
+
986
+ * [#12501](https://dev.ckeditor.com/ticket/12501): Allowed dashes in element names in the [string format of allowed content rules](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html#string-format).
987
+ * [#12550](https://dev.ckeditor.com/ticket/12550): Added the `<main>` element to the [`CKEDITOR.dtd`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dtd.html).
988
+
989
+ Fixed Issues:
990
+
991
+ * [#12506](https://dev.ckeditor.com/ticket/12506): [Safari] Fixed: Cannot paste into inline editor if the page has `user-select: none` style. Thanks to [shaohua](https://github.com/shaohua)!
992
+ * [#12683](https://dev.ckeditor.com/ticket/12683): Fixed: [Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) fails to remove custom tags. Thanks to [timselier](https://github.com/timselier)!
993
+ * [#12489](https://dev.ckeditor.com/ticket/12489) and [#12491](https://dev.ckeditor.com/ticket/12491): Fixed: Various issues related to restoring the selection after performing operations on filler character. See the [fixed cases](https://dev.ckeditor.com/ticket/12491#comment:4).
994
+ * [#12621](https://dev.ckeditor.com/ticket/12621): Fixed: Cannot remove inline styles (bold, italic, etc.) in empty lines.
995
+ * [#12630](https://dev.ckeditor.com/ticket/12630): [Chrome] Fixed: Selection is placed outside the paragraph when the [New Page](https://ckeditor.com/cke4/addon/newpage) button is clicked. This patch significantly simplified the way how the initial selection (a selection after the content of the editable is overwritten) is being fixed. That might have fixed many related scenarios in all browsers.
996
+ * [#11647](https://dev.ckeditor.com/ticket/11647): Fixed: The [`editor.blur`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-blur) event is not fired on first blur after initializing the inline editor on an already focused element.
997
+ * [#12601](https://dev.ckeditor.com/ticket/12601): Fixed: [Strikethrough](https://ckeditor.com/cke4/addon/basicstyles) button tooltip spelling.
998
+ * [#12546](https://dev.ckeditor.com/ticket/12546): Fixed: The Preview tab in the [Document Properties](https://ckeditor.com/cke4/addon/docprops) dialog window is always disabled.
999
+ * [#12300](https://dev.ckeditor.com/ticket/12300): Fixed: The [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event fired on first navigation key press after typing.
1000
+ * [#12141](https://dev.ckeditor.com/ticket/12141): Fixed: List items are lost when indenting a list item with content wrapped with a block element.
1001
+ * [#12515](https://dev.ckeditor.com/ticket/12515): Fixed: Cursor is in the wrong position when undoing after adding an image and typing some text.
1002
+ * [#12484](https://dev.ckeditor.com/ticket/12484): [Blink/WebKit] Fixed: DOM is changed outside the editor area in a certain case.
1003
+ * [#12688](https://dev.ckeditor.com/ticket/12688): Improved the tests of the [styles system](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) and fixed two minor issues.
1004
+ * [#12403](https://dev.ckeditor.com/ticket/12403): Fixed: Changing the [font](https://ckeditor.com/cke4/addon/font) style should not lead to nesting it in the previous style element.
1005
+ * [#12609](https://dev.ckeditor.com/ticket/12609): Fixed: Incorrect `config.magicline_putEverywhere` name used for a [Magic Line](https://ckeditor.com/cke4/addon/magicline) all-encompassing [`config.magicline_everywhere`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-magicline_everywhere) configuration option.
1006
+
1007
+
1008
+ ## CKEditor 4.4.5
1009
+
1010
+ New Features:
1011
+
1012
+ * [#12279](https://dev.ckeditor.com/ticket/12279): Added a possibility to pass a custom evaluator to [`node.getAscendant()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_node.html#method-getAscendant).
1013
+
1014
+ Fixed Issues:
1015
+
1016
+ * [#12423](https://dev.ckeditor.com/ticket/12423): [Safari7.1+] Fixed: *Enter* key moved cursor to a strange position.
1017
+ * [#12381](https://dev.ckeditor.com/ticket/12381): [iOS] Fixed: Selection issue. Thanks to [Remiremi](https://github.com/Remiremi)!
1018
+ * [#10804](https://dev.ckeditor.com/ticket/10804): Fixed: `CKEDITOR_GETURL` is not used with some plugins where it should be used. Thanks to [Thomas Andraschko](https://github.com/tandraschko)!
1019
+ * [#9137](https://dev.ckeditor.com/ticket/9137): Fixed: The `<base>` tag is not created when `<head>` has an attribute. Thanks to [naoki.fujikawa](https://github.com/naoki-fujikawa)!
1020
+ * [#12377](https://dev.ckeditor.com/ticket/12377): Fixed: Errors thrown in the [Image](https://ckeditor.com/cke4/addon/image) plugin when removing preview from the dialog window definition. Thanks to [Axinet](https://github.com/Axinet)!
1021
+ * [#12162](https://dev.ckeditor.com/ticket/12162): Fixed: Auto paragraphing and *Enter* key in nested editables.
1022
+ * [#12315](https://dev.ckeditor.com/ticket/12315): Fixed: Marked [`config.autoParagraph`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autoParagraph) as deprecated.
1023
+ * [#12113](https://dev.ckeditor.com/ticket/12113): Fixed: A [code snippet](https://ckeditor.com/cke4/addon/codesnippet) should be presented in the [elements path](https://ckeditor.com/cke4/addon/elementspath) as "code snippet" (translatable).
1024
+ * [#12311](https://dev.ckeditor.com/ticket/12311): Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) should also remove `<cite>` elements.
1025
+ * [#12261](https://dev.ckeditor.com/ticket/12261): Fixed: The filter is not destroyed and removed from [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) on editor destroy.
1026
+ * [#12398](https://dev.ckeditor.com/ticket/12398): Fixed: [Maximize](https://ckeditor.com/cke4/addon/maximize) does not work on an instance without a [title](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title).
1027
+ * [#12097](https://dev.ckeditor.com/ticket/12097): Fixed: JAWS not reading the number of options correctly in the [Text Color and Background Color](https://ckeditor.com/cke4/addon/colorbutton) button menu.
1028
+ * [#12411](https://dev.ckeditor.com/ticket/12411): Fixed: [Page Break](https://ckeditor.com/cke4/addon/pagebreak) used directly in the editable breaks the editor.
1029
+ * [#12354](https://dev.ckeditor.com/ticket/12354): Fixed: Various issues in undo manager when holding keys.
1030
+ * [#12324](https://dev.ckeditor.com/ticket/12324): [IE8] Fixed: Undo steps are not recorded when changing the caret position by clicking below the body.
1031
+ * [#12332](https://dev.ckeditor.com/ticket/12332): Fixed: Lowered DOM events listeners' priorities in undo manager in order to avoid ambiguity.
1032
+ * [#12402](https://dev.ckeditor.com/ticket/12402): [Blink] Fixed: Workaround for Blink bug with `document.title` which breaks updating title in the full HTML mode.
1033
+ * [#12338](https://dev.ckeditor.com/ticket/12338): Fixed: The CKEditor package contains unoptimized images.
1034
+
1035
+
1036
+ ## CKEditor 4.4.4
1037
+
1038
+ Fixed Issues:
1039
+
1040
+ * [#12268](https://dev.ckeditor.com/ticket/12268): Cleanup of [UI Color](https://ckeditor.com/cke4/addon/uicolor) YUI styles. Thanks to [CasherWest](https://github.com/CasherWest)!
1041
+ * [#12263](https://dev.ckeditor.com/ticket/12263): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter does not properly normalize semicolons style text. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1042
+ * [#12243](https://dev.ckeditor.com/ticket/12243): Fixed: Text formatting lost when pasting from Word. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1043
+ * [#111739](https://dev.ckeditor.com/ticket/11739): Fixed: `keypress` listeners should not be used in the undo manager. A complete rewrite of keyboard handling in the undo manager was made. Numerous smaller issues were fixed, among others:
1044
+ * [#10926](https://dev.ckeditor.com/ticket/10926): [Chrome@Android] Fixed: Typing does not record snapshots and does not fire the [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
1045
+ * [#11611](https://dev.ckeditor.com/ticket/11611): [Firefox] Fixed: The [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event is fired when pressing Arrow keys.
1046
+ * [#12219](https://dev.ckeditor.com/ticket/12219): [Safari] Fixed: Some modifications of the [`UndoManager.locked`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#property-locked) property violate strict mode in the [Undo](https://ckeditor.com/cke4/addon/undo) plugin.
1047
+ * [#10916](https://dev.ckeditor.com/ticket/10916): Fixed: [Magic Line](https://ckeditor.com/cke4/addon/magicline) icon in Right-To-Left environments.
1048
+ * [#11970](https://dev.ckeditor.com/ticket/11970): [IE] Fixed: CKEditor `paste` event is not fired when pasting with *Shift+Ins*.
1049
+ * [#12111](https://dev.ckeditor.com/ticket/12111): Fixed: Linked image attributes are not read when opening the image dialog window by doubleclicking.
1050
+ * [#10030](https://dev.ckeditor.com/ticket/10030): [IE] Fixed: Prevented "Unspecified Error" thrown in various cases when IE8-9 does not allow access to `document.activeElement`.
1051
+ * [#12273](https://dev.ckeditor.com/ticket/12273): Fixed: Applying block style in a description list breaks it.
1052
+ * [#12218](https://dev.ckeditor.com/ticket/12218): Fixed: Minor syntax issue in CSS files.
1053
+ * [#12178](https://dev.ckeditor.com/ticket/12178): [Blink/WebKit] Fixed: Iterator does not return the block if the selection is located at the end of it.
1054
+ * [#12185](https://dev.ckeditor.com/ticket/12185): [IE9QM] Fixed: Error thrown when moving the mouse over focused editor's scrollbar.
1055
+ * [#12215](https://dev.ckeditor.com/ticket/12215): Fixed: Basepath resolution does not recognize semicolon as a query separator.
1056
+ * [#12135](https://dev.ckeditor.com/ticket/12135): Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) does not work on widgets.
1057
+ * [#12298](https://dev.ckeditor.com/ticket/12298): [IE11] Fixed: Clicking below `<body>` in Compatibility Mode will no longer reset selection to the first line.
1058
+ * [#12204](https://dev.ckeditor.com/ticket/12204): Fixed: Editor's voice label is not affected by [`config.title`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title).
1059
+ * [#11915](https://dev.ckeditor.com/ticket/11915): Fixed: With [SCAYT](https://ckeditor.com/cke4/addon/scayt) enabled, cursor moves to the beginning of the first highlighted, misspelled word after typing or pasting into the editor.
1060
+ * [SCAYT](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/69): Fixed: Error thrown in the console after enabling [SCAYT](https://ckeditor.com/cke4/addon/scayt) and trying to add a new image.
1061
+
1062
+
1063
+ Other Changes:
1064
+
1065
+ * [#12296](https://dev.ckeditor.com/ticket/12296): Merged `benderjs-ckeditor` into the main CKEditor repository.
1066
+
1067
+ ## CKEditor 4.4.3
1068
+
1069
+ **Security Updates:**
1070
+
1071
+ * Fixed XSS vulnerability in the Preview plugin reported by Mario Heiderich of [Cure53](https://cure53.de/).
1072
+
1073
+ **An upgrade is highly recommended!**
1074
+
1075
+ New Features:
1076
+
1077
+ * [#12164](https://dev.ckeditor.com/ticket/12164): Added the "Justify" option to the "Horizontal Alignment" drop-down in the Table Cell Properties dialog window.
1078
+
1079
+ Fixed Issues:
1080
+
1081
+ * [#12110](https://dev.ckeditor.com/ticket/12110): Fixed: Editor crash after deleting a table. Thanks to [Alin Purcaru](https://github.com/mesmerizero)!
1082
+ * [#11897](https://dev.ckeditor.com/ticket/11897): Fixed: *Enter* key used in an empty list item creates a new line instead of breaking the list. Thanks to [noam-si](https://github.com/noam-si)!
1083
+ * [#12140](https://dev.ckeditor.com/ticket/12140): Fixed: Double-clicking linked widgets opens two dialog windows.
1084
+ * [#12132](https://dev.ckeditor.com/ticket/12132): Fixed: Image is inserted with `width` and `height` styles even when they are not allowed.
1085
+ * [#9317](https://dev.ckeditor.com/ticket/9317): [IE] Fixed: [`config.disableObjectResizing`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-disableObjectResizing) does not work on IE. **Note**: We were not able to fix this issue on IE11+ because necessary events stopped working. See a [last resort workaround](https://dev.ckeditor.com/ticket/9317#comment:16) and make sure to [support our complaint to Microsoft](https://connect.microsoft.com/IE/feedback/details/742593/please-respect-execcommand-enableobjectresizing-in-contenteditable-elements).
1086
+ * [#9638](https://dev.ckeditor.com/ticket/9638): Fixed: There should be no information about accessibility help available under the *Alt+0* keyboard shortcut if the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) plugin is not available.
1087
+ * [#8117](https://dev.ckeditor.com/ticket/8117) and [#9186](https://dev.ckeditor.com/ticket/9186): Fixed: In HTML5 `<meta>` tags should be allowed everywhere, including inside the `<body>` element.
1088
+ * [#10422](https://dev.ckeditor.com/ticket/10422): Fixed: [`config.fillEmptyBlocks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fillEmptyBlocks) not working properly if a function is specified.
1089
+
1090
+ ## CKEditor 4.4.2
1091
+
1092
+ Important Notes:
1093
+
1094
+ * The CKEditor testing environment is now publicly available. Read more about how to set up the environment and execute tests in the [CKEditor Testing Environment](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_tests.html) guide.
1095
+ Please note that the [`tests/`](https://github.com/ckeditor/ckeditor-dev/tree/master/tests) directory which contains editor tests is not available in release packages. It can only be found in the development version of CKEditor on [GitHub](https://github.com/ckeditor/ckeditor-dev/).
1096
+
1097
+ New Features:
1098
+
1099
+ * [#11909](https://dev.ckeditor.com/ticket/11909): Introduced a parameter to prevent the [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData) method from recording undo snapshots.
1100
+
1101
+ Fixed Issues:
1102
+
1103
+ * [#11757](https://dev.ckeditor.com/ticket/11757): Fixed: Imperfections in the [Moono](https://ckeditor.com/cke4/addon/moono) skin. Thanks to [danyaPostfactum](https://github.com/danyaPostfactum)!
1104
+ * [#10091](https://dev.ckeditor.com/ticket/10091): Blockquote should be treated like an object by the styles system. Thanks to [dan-james-deeson](https://github.com/dan-james-deeson)!
1105
+ * [#11478](https://dev.ckeditor.com/ticket/11478): Fixed: Issue with passing jQuery objects to [adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) configuration.
1106
+ * [#10867](https://dev.ckeditor.com/ticket/10867): Fixed: Issue with setting encoded URI as image link.
1107
+ * [#11983](https://dev.ckeditor.com/ticket/11983): Fixed: Clicking a nested widget does not focus it. Additionally, performance of the [`widget.repository.getByElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-getByElement) method was improved.
1108
+ * [#12000](https://dev.ckeditor.com/ticket/12000): Fixed: Nested widgets should be initialized on [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData) and [`nestedEditable.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_nestedEditable.html#method-setData).
1109
+ * [#12022](https://dev.ckeditor.com/ticket/12022): Fixed: Outer widget's drag handler is not created at all if it has any nested widgets inside.
1110
+ * [#11960](https://dev.ckeditor.com/ticket/11960): [Blink/WebKit] Fixed: The caret should be scrolled into view on *Backspace* and *Delete* (covers only the merging blocks case).
1111
+ * [#11306](https://dev.ckeditor.com/ticket/11306): [OSX][Blink/WebKit] Fixed: No widget entries in the context menu on widget right-click.
1112
+ * [#11957](https://dev.ckeditor.com/ticket/11957): Fixed: Alignment labels in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window are not translated.
1113
+ * [#11980](https://dev.ckeditor.com/ticket/11980): [Blink/WebKit] Fixed: `<span>` elements created when joining adjacent elements (non-collapsed selection).
1114
+ * [#12009](https://dev.ckeditor.com/ticket/12009): [Nested widgets] Integration with the [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin.
1115
+ * [#11387](https://dev.ckeditor.com/ticket/11387): Fixed: `role="radiogroup"` should be applied only to radio inputs' container.
1116
+ * [#7975](https://dev.ckeditor.com/ticket/7975): [IE8] Fixed: Errors when trying to select an empty table cell.
1117
+ * [#11947](https://dev.ckeditor.com/ticket/11947): [Firefox+IE11] Fixed: *Shift+Enter* in lists produces two line breaks.
1118
+ * [#11972](https://dev.ckeditor.com/ticket/11972): Fixed: Feature detection in the [`element.setText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-setText) method should not trigger the layout engine.
1119
+ * [#7634](https://dev.ckeditor.com/ticket/7634): Fixed: The [Flash Dialog](https://ckeditor.com/cke4/addon/flash) plugin omits the `allowFullScreen` parameter in the editor data if set to `true`.
1120
+ * [#11910](https://dev.ckeditor.com/ticket/11910): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) does not take [`config.baseHref`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-baseHref) into account when updating image dimensions.
1121
+ * [#11753](https://dev.ckeditor.com/ticket/11753): Fixed: Wrong [`checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) method value after focusing or blurring a widget.
1122
+ * [#11830](https://dev.ckeditor.com/ticket/11830): Fixed: Impossible to pass some arguments to [CKBuilder](https://github.com/ckeditor/ckbuilder) when using the `/dev/builder/build.sh` script.
1123
+ * [#11945](https://dev.ckeditor.com/ticket/11945): Fixed: [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin should not change a core method.
1124
+ * [#11384](https://dev.ckeditor.com/ticket/11384): [IE9+] Fixed: `IndexSizeError` thrown when pasting into a non-empty selection anchored in one text node.
1125
+
1126
+ ## CKEditor 4.4.1
1127
+
1128
+ New Features:
1129
+
1130
+ * [#9661](https://dev.ckeditor.com/ticket/9661): Added the option to [configure](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-linkJavaScriptLinksAllowed) anchor tags with JavaScript code in the `href` attribute.
1131
+
1132
+ Fixed Issues:
1133
+
1134
+ * [#11861](https://dev.ckeditor.com/ticket/11861): [WebKit/Blink] Fixed: Span elements created while joining adjacent elements. **Note:** This patch only covers cases when *Backspace* or *Delete* is pressed on a collapsed (empty) selection. The remaining case, with a non-empty selection, will be fixed in the next release.
1135
+ * [#10714](https://dev.ckeditor.com/ticket/10714): [iOS] Fixed: Selection and drop-downs are broken if a touch event listener is used due to a [WebKit bug](https://bugs.webkit.org/show_bug.cgi?id=128924). Thanks to [Arty Gus](https://github.com/artygus)!
1136
+ * [#11911](https://dev.ckeditor.com/ticket/11911): Fixed setting the `dir` attribute for a preloaded language in [CKEDITOR.lang](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.lang.html). Thanks to [Akash Mohapatra](https://github.com/akashmohapatra)!
1137
+ * [#11926](https://dev.ckeditor.com/ticket/11926): Fixed: [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) does not decode HTML entities when loading code from the `<code>` element.
1138
+ * [#11223](https://dev.ckeditor.com/ticket/11223): Fixed: Issue when [Protected Source](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-protectedSource) was not working in the `<title>` element.
1139
+ * [#11859](https://dev.ckeditor.com/ticket/11859): Fixed: Removed the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin dependency from the [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) sample.
1140
+ * [#11754](https://dev.ckeditor.com/ticket/11754): [Chrome] Fixed: Infinite loop when content includes not closed attributes.
1141
+ * [#11848](https://dev.ckeditor.com/ticket/11848): [IE] Fixed: [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) throwing an exception when there was no selection in the editor.
1142
+ * [#11801](https://dev.ckeditor.com/ticket/11801): Fixed: Editor anchors unavailable when linking the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) widget.
1143
+ * [#11626](https://dev.ckeditor.com/ticket/11626): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) sets invalid column width.
1144
+ * [#11872](https://dev.ckeditor.com/ticket/11872): Made [`element.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-addClass) chainable symmetrically to [`element.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-removeClass).
1145
+ * [#11813](https://dev.ckeditor.com/ticket/11813): Fixed: Link lost while pasting a captioned image and restoring an undo snapshot ([Enhanced Image](https://ckeditor.com/cke4/addon/image2)).
1146
+ * [#11814](https://dev.ckeditor.com/ticket/11814): Fixed: _Link_ and _Unlink_ entries persistently displayed in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) context menu.
1147
+ * [#11839](https://dev.ckeditor.com/ticket/11839): [IE9] Fixed: The caret jumps out of the editable area when resizing the editor in the source mode.
1148
+ * [#11822](https://dev.ckeditor.com/ticket/11822): [WebKit] Fixed: Editing anchors by double-click is broken in some cases.
1149
+ * [#11823](https://dev.ckeditor.com/ticket/11823): [IE8] Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) throws an error over scrollbar.
1150
+ * [#11788](https://dev.ckeditor.com/ticket/11788): Fixed: It is not possible to change the language back to _Not set_ in the [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) dialog window.
1151
+ * [#11788](https://dev.ckeditor.com/ticket/11788): Fixed: [Filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html) rules are not applied inside elements with the `contenteditable` attribute set to `true`.
1152
+ * [#11798](https://dev.ckeditor.com/ticket/11798): Fixed: Inserting a non-editable element inside a table cell breaks the table.
1153
+ * [#11793](https://dev.ckeditor.com/ticket/11793): Fixed: Drop-down is not "on" when clicking it while the editor is blurred.
1154
+ * [#11850](https://dev.ckeditor.com/ticket/11850): Fixed: Fake objects with the `contenteditable` attribute set to `false` are not downcasted properly.
1155
+ * [#11811](https://dev.ckeditor.com/ticket/11811): Fixed: Widget's data is not encoded correctly when passed to an attribute.
1156
+ * [#11777](https://dev.ckeditor.com/ticket/11777): Fixed encoding ampersand in the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin.
1157
+ * [#11880](https://dev.ckeditor.com/ticket/11880): [IE8-9] Fixed: Linked image has a default thick border.
1158
+
1159
+ Other Changes:
1160
+
1161
+ * [#11807](https://dev.ckeditor.com/ticket/11807): Updated jQuery version used in the sample to 1.11.0 and tested CKEditor jQuery Adapter with version 1.11.0 and 2.1.0.
1162
+ * [#9504](https://dev.ckeditor.com/ticket/9504): Stopped using deprecated `attribute.specified` in all browsers except Internet Explorer.
1163
+ * [#11809](https://dev.ckeditor.com/ticket/11809): Changed tab size in `<pre>` to 4 spaces.
1164
+
1165
+ ## CKEditor 4.4
1166
+
1167
+ **Important Notes:**
1168
+
1169
+ * Marked the [`editor.beforePaste`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-beforePaste) event as deprecated.
1170
+ * The default class of captioned images has changed to `image` (was: `caption`). Please note that once edited in CKEditor 4.4+, all existing images of the `caption` class (`<figure class="caption">`) will be [filtered out](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) unless the [`config.image2_captionedClass`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_captionedClass) option is set to `caption`. For backward compatibility (i.e. when upgrading), it is highly recommended to use this setting, which also helps prevent CSS conflicts, etc. This does not apply to new CKEditor integrations.
1171
+ * Widgets without defined buttons are no longer registered automatically to the [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html). Before CKEditor 4.4 widgets were registered to the ACF which was an incorrect behavior ([#11567](https://dev.ckeditor.com/ticket/11567)). This change should not have any impact on standard scenarios, but if your button does not execute the widget command, you need to set [`allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_feature.html#property-allowedContent) and [`requiredContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_feature.html#property-requiredContent) properties for it manually, because the editor will not be able to find them.
1172
+ * The [Show Borders](https://ckeditor.com/cke4/addon/showborders) plugin was added to the Standard installation package in order to ensure that unstyled tables are still visible for the user ([#11665](https://dev.ckeditor.com/ticket/11665)).
1173
+ * Since CKEditor 4.4 the editor instance should be passed to [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) methods to ensure full compatibility with other features (e.g. applying styles to widgets requires that). We ensured backward compatibility though, so the [`CKEDITOR.style`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.style.html) will work even when the editor instance is not provided.
1174
+
1175
+ New Features:
1176
+
1177
+ * [#11297](https://dev.ckeditor.com/ticket/11297): Styles can now be applied to widgets. The definition of a style which can be applied to a specific widget must contain two additional properties &mdash; `type` and `widget`. Read more in the [Widget Styles](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_styles.html#widget-styles) section of the "Syles Drop-down" guide. Note that by default, widgets support only classes and no other attributes or styles. Related changes and features:
1178
+ * Introduced the [`CKEDITOR.style.addCustomHandler()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#static-method-addCustomHandler) method for registering custom style handlers.
1179
+ * The [`CKEDITOR.style.apply()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-apply) and [`CKEDITOR.style.remove()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-remove) methods are now called with an editor instance instead of the document so they can be reused by the [`CKEDITOR.editor.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-applyStyle) and [`CKEDITOR.editor.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-removeStyle) methods. Backward compatibility was preserved, but from CKEditor 4.4 it is highly recommended to pass an editor instead of a document to these methods.
1180
+ * Many new methods and properties were introduced in the [Widget API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html) to make the handling of styles by widgets fully customizable. See: [`widget.definition.styleableElements`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleableElements), [`widget.definition.styleToAllowedContentRule`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-styleToAllowedContentRules), [`widget.addClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-addClass), [`widget.removeClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeClass), [`widget.getClasses()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClasses), [`widget.hasClass()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-hasClass), [`widget.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-applyStyle), [`widget.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-removeStyle), [`widget.checkStyleActive()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-checkStyleActive).
1181
+ * Integration with the [Allowed Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) required an introduction of the [`CKEDITOR.style.toAllowedContent()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_style.html#method-toAllowedContentRules) method which can be implemented by the custom style handler and if exists, it is used by the [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) to translate a style to [allowed content rules](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.allowedContentRules.html).
1182
+ * [#11300](https://dev.ckeditor.com/ticket/11300): Various changes in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin:
1183
+ * Introduced the [`config.image2_captionedClass`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_captionedClass) option to configure the class of captioned images.
1184
+ * Introduced the [`config.image2_alignClasses`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_alignClasses) option to configure the way images are aligned with CSS classes.
1185
+ If this setting is defined, the editor produces classes instead of inline styles for aligned images.
1186
+ * Default image caption can be translated (customized) with the `editor.lang.image2.captionPlaceholder` string.
1187
+ * [#11341](https://dev.ckeditor.com/ticket/11341): [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin: It is now possible to add a link to any image type.
1188
+ * [#10202](https://dev.ckeditor.com/ticket/10202): Introduced wildcard support in the [Allowed Content Rules](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html) format.
1189
+ * [#10276](https://dev.ckeditor.com/ticket/10276): Introduced blacklisting in the [Allowed Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html).
1190
+ * [#10480](https://dev.ckeditor.com/ticket/10480): Introduced code snippets with code highlighting. There are two versions available so far &mdash; the default [Code Snippet](https://ckeditor.com/cke4/addon/codesnippet) which uses the [highlight.js](http://highlightjs.org) library and the [Code Snippet GeSHi](https://ckeditor.com/cke4/addon/codesnippetgeshi) which uses the [GeSHi](http://qbnz.com/highlighter/) library.
1191
+ * [#11737](https://dev.ckeditor.com/ticket/11737): Introduced an option to prevent [filtering](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) of an element that matches custom criteria (see [`filter.addElementCallback()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#method-addElementCallback)).
1192
+ * [#11532](https://dev.ckeditor.com/ticket/11532): Introduced the [`editor.addContentsCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addContentsCss) method that can be used for [adding custom CSS files](https://ckeditor.com/docs/ckeditor4/latest/guide/plugin_sdk_styles.html).
1193
+ * [#11536](https://dev.ckeditor.com/ticket/11536): Added the [`CKEDITOR.tools.htmlDecode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-htmlDecode) method for decoding HTML entities.
1194
+ * [#11225](https://dev.ckeditor.com/ticket/11225): Introduced the [`CKEDITOR.tools.transparentImageData`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#property-transparentImageData) property which contains transparent image data to be used in CSS or as image source.
1195
+
1196
+ Other Changes:
1197
+
1198
+ * [#11377](https://dev.ckeditor.com/ticket/11377): Unified internal representation of empty anchors using the [fake objects](https://ckeditor.com/cke4/addon/fakeobjects).
1199
+ * [#11422](https://dev.ckeditor.com/ticket/11422): Removed Firefox 3.x, Internet Explorer 6 and Opera 12.x leftovers in code.
1200
+ * [#5217](https://dev.ckeditor.com/ticket/5217): Setting data (including switching between modes) creates a new undo snapshot. Besides that:
1201
+ * Introduced the [`editable.status`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#property-status) property.
1202
+ * Introduced a new `forceUpdate` option for the [`editor.lockSnapshot`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-lockSnapshot) event.
1203
+ * Fixed: Selection not being unlocked in inline editor after setting data ([#11500](https://dev.ckeditor.com/ticket/11500)).
1204
+ * The [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin was updated to the latest version.
1205
+
1206
+ Fixed Issues:
1207
+
1208
+ * [#10190](https://dev.ckeditor.com/ticket/10190): Fixed: Removing block style with [`editor.removeStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-removeStyle) should result in a paragraph and not a div.
1209
+ * [#11727](https://dev.ckeditor.com/ticket/11727): Fixed: The editor tries to select a non-editable image which was clicked.
1210
+
1211
+ ## CKEditor 4.3.5
1212
+
1213
+ New Features:
1214
+
1215
+ * Added new translation: Tatar.
1216
+
1217
+ Fixed Issues:
1218
+
1219
+ * [#11677](https://dev.ckeditor.com/ticket/11677): Fixed: Undo/Redo keystrokes are blocked in the source mode.
1220
+ * [#11717](https://dev.ckeditor.com/ticket/11717): [Document Properties](https://ckeditor.com/cke4/addon/docprops) plugin requires the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin to work.
1221
+
1222
+ ## CKEditor 4.3.4
1223
+
1224
+ Fixed Issues:
1225
+
1226
+ * [#11597](https://dev.ckeditor.com/ticket/11597): [IE11] Fixed: Error thrown when trying to open the [preview](https://ckeditor.com/cke4/addon/preview) using the keyboard.
1227
+ * [#11544](https://dev.ckeditor.com/ticket/11544): [Placeholders](https://ckeditor.com/cke4/addon/placeholder) will no longer be upcasted in parents not accepting `<span>` elements.
1228
+ * [#8663](https://dev.ckeditor.com/ticket/8663): Fixed [`element.renameNode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-renameNode) not clearing the [`element.getName()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getName) cache.
1229
+ * [#11574](https://dev.ckeditor.com/ticket/11574): Fixed: *Backspace* destroying the DOM structure if an inline editable is placed in a list item.
1230
+ * [#11603](https://dev.ckeditor.com/ticket/11603): Fixed: [Table Resize](https://ckeditor.com/cke4/addon/tableresize) attaches to tables outside the editable.
1231
+ * [#9205](https://dev.ckeditor.com/ticket/9205), [#7805](https://dev.ckeditor.com/ticket/7805), [#8216](https://dev.ckeditor.com/ticket/8216): Fixed: `{cke_protected_1}` appearing in data in various cases where HTML comments are placed next to `"` or `'`.
1232
+ * [#11635](https://dev.ckeditor.com/ticket/11635): Fixed: Some attributes are not protected before the content is passed through the fix bin.
1233
+ * [#11660](https://dev.ckeditor.com/ticket/11660): [IE] Fixed: Table content is lost when some extra markup is inside the table.
1234
+ * [#11641](https://dev.ckeditor.com/ticket/11641): Fixed: Switching between modes in the classic editor removes content styles for the inline editor.
1235
+ * [#11568](https://dev.ckeditor.com/ticket/11568): Fixed: [Styles](https://ckeditor.com/cke4/addon/stylescombo) drop-down list is not enabled on selection change.
1236
+
1237
+ ## CKEditor 4.3.3
1238
+
1239
+ Fixed Issues:
1240
+
1241
+ * [#11500](https://dev.ckeditor.com/ticket/11500): [WebKit/Blink] Fixed: Selection lost when setting data in another inline editor. Additionally, [`selection.removeAllRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-removeAllRanges) is now scoped to selection's [root](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#property-root).
1242
+ * [#11104](https://dev.ckeditor.com/ticket/11104): [IE] Fixed: Various issues with scrolling and selection when focusing widgets.
1243
+ * [#11487](https://dev.ckeditor.com/ticket/11487): Moving mouse over the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) widget will no longer change the value returned by the [`editor.checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) method.
1244
+ * [#8673](https://dev.ckeditor.com/ticket/8673): [WebKit] Fixed: Cannot select and remove the [Page Break](https://ckeditor.com/cke4/addon/pagebreak).
1245
+ * [#11413](https://dev.ckeditor.com/ticket/11413): Fixed: Incorrect [`editor.execCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-execCommand) behavior.
1246
+ * [#11438](https://dev.ckeditor.com/ticket/11438): Splitting table cells vertically is no longer changing table structure.
1247
+ * [#8899](https://dev.ckeditor.com/ticket/8899): Fixed: Links in the [About CKEditor](https://ckeditor.com/cke4/addon/about) dialog window now open in a new browser window or tab.
1248
+ * [#11490](https://dev.ckeditor.com/ticket/11490): Fixed: [Menu button](https://ckeditor.com/cke4/addon/menubutton) panel not showing in the source mode.
1249
+ * [#11417](https://dev.ckeditor.com/ticket/11417): The [`widget.doubleclick`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#event-doubleclick) event is not canceled anymore after editing was triggered.
1250
+ * [#11253](https://dev.ckeditor.com/ticket/11253): [IE] Fixed: Clipped upload button in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1251
+ * [#11359](https://dev.ckeditor.com/ticket/11359): Standardized the way anchors are discovered by the [Link](https://ckeditor.com/cke4/addon/link) plugin.
1252
+ * [#11058](https://dev.ckeditor.com/ticket/11058): [IE8] Fixed: Error when deleting a table row.
1253
+ * [#11508](https://dev.ckeditor.com/ticket/11508): Fixed: [`htmlDataProcessor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html) discovering protected attributes within other attributes' values.
1254
+ * [#11533](https://dev.ckeditor.com/ticket/11533): Widgets: Avoid recurring upcasts if the DOM structure was modified during an upcast.
1255
+ * [#11400](https://dev.ckeditor.com/ticket/11400): Fixed: The [`domObject.removeAllListeners()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_domObject.html#method-removeAllListeners) method does not remove custom listeners completely.
1256
+ * [#11493](https://dev.ckeditor.com/ticket/11493): Fixed: The [`selection.getRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-getRanges) method does not override cached ranges when used with the `onlyEditables` argument.
1257
+ * [#11390](https://dev.ckeditor.com/ticket/11390): [IE] All [XML](https://ckeditor.com/cke4/addon/xml) plugin [methods](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.xml.html) now work in IE10+.
1258
+ * [#11542](https://dev.ckeditor.com/ticket/11542): [IE11] Fixed: Blurry toolbar icons when Right-to-Left UI language is set.
1259
+ * [#11504](https://dev.ckeditor.com/ticket/11504): Fixed: When [`config.fullPage`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fullPage) is set to `true`, entities are not encoded in editor output.
1260
+ * [#11004](https://dev.ckeditor.com/ticket/11004): Integrated [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window with [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html).
1261
+ * [#11439](https://dev.ckeditor.com/ticket/11439): Fixed: Properties get cloned in the Cell Properties dialog window if multiple cells are selected.
1262
+
1263
+ ## CKEditor 4.3.2
1264
+
1265
+ Fixed Issues:
1266
+
1267
+ * [#11331](https://dev.ckeditor.com/ticket/11331): A menu button will have a changed label when selected instead of using the `aria-pressed` attribute.
1268
+ * [#11177](https://dev.ckeditor.com/ticket/11177): Widget drag handler improvements:
1269
+ * [#11176](https://dev.ckeditor.com/ticket/11176): Fixed: Initial position is not updated when the widget data object is empty.
1270
+ * [#11001](https://dev.ckeditor.com/ticket/11001): Fixed: Multiple synchronous layout recalculations are caused by initial drag handler positioning causing performance issues.
1271
+ * [#11161](https://dev.ckeditor.com/ticket/11161): Fixed: Drag handler is not repositioned in various situations.
1272
+ * [#11281](https://dev.ckeditor.com/ticket/11281): Fixed: Drag handler and mask are duplicated after widget reinitialization.
1273
+ * [#11207](https://dev.ckeditor.com/ticket/11207): [Firefox] Fixed: Misplaced [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resizer in the inline editor.
1274
+ * [#11102](https://dev.ckeditor.com/ticket/11102): `CKEDITOR.template` improvements:
1275
+ * [#11102](https://dev.ckeditor.com/ticket/11102): Added newline character support.
1276
+ * [#11216](https://dev.ckeditor.com/ticket/11216): Added "\\'" substring support.
1277
+ * [#11121](https://dev.ckeditor.com/ticket/11121): [Firefox] Fixed: High Contrast mode is enabled when the editor is loaded in a hidden iframe.
1278
+ * [#11350](https://dev.ckeditor.com/ticket/11350): The default value of [`config.contentsCss`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-contentsCss) is affected by [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl).
1279
+ * [#11097](https://dev.ckeditor.com/ticket/11097): Improved the [Autogrow](https://ckeditor.com/cke4/addon/autogrow) plugin performance when dealing with very big tables.
1280
+ * [#11290](https://dev.ckeditor.com/ticket/11290): Removed redundant code in the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin.
1281
+ * [#11133](https://dev.ckeditor.com/ticket/11133): [Page Break](https://ckeditor.com/cke4/addon/pagebreak) becomes editable if pasted.
1282
+ * [#11126](https://dev.ckeditor.com/ticket/11126): Fixed: Native Undo executed once the bottom of the snapshot stack is reached.
1283
+ * [#11131](https://dev.ckeditor.com/ticket/11131): [Div Editing Area](https://ckeditor.com/cke4/addon/divarea): Fixed: Error thrown when switching to source mode if the selection was in widget's nested editable.
1284
+ * [#11139](https://dev.ckeditor.com/ticket/11139): [Div Editing Area](https://ckeditor.com/cke4/addon/divarea): Fixed: Elements Path is not cleared after switching to source mode.
1285
+ * [#10778](https://dev.ckeditor.com/ticket/10778): Fixed a bug with range enlargement. The range no longer expands to visible whitespace.
1286
+ * [#11146](https://dev.ckeditor.com/ticket/11146): [IE] Fixed: Preview window switches Internet Explorer to Quirks Mode.
1287
+ * [#10762](https://dev.ckeditor.com/ticket/10762): [IE] Fixed: JavaScript code displayed in preview window's URL bar.
1288
+ * [#11186](https://dev.ckeditor.com/ticket/11186): Introduced the [`widgets.repository.addUpcastCallback()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-addUpcastCallback) method that allows to block upcasting given element to a widget.
1289
+ * [#11307](https://dev.ckeditor.com/ticket/11307): Fixed: Paste as Plain Text conflict with the [MooTools](http://mootools.net) library.
1290
+ * [#11140](https://dev.ckeditor.com/ticket/11140): [IE11] Fixed: Anchors are not draggable.
1291
+ * [#11379](https://dev.ckeditor.com/ticket/11379): Changed default contents `line-height` to unitless values to avoid huge text overlapping (like in [#9696](https://dev.ckeditor.com/ticket/9696)).
1292
+ * [#10787](https://dev.ckeditor.com/ticket/10787): [Firefox] Fixed: Broken replacement of text while pasting into `div`-based editor.
1293
+ * [#10884](https://dev.ckeditor.com/ticket/10884): Widgets integration with the [Show Blocks](https://ckeditor.com/cke4/addon/showblocks) plugin.
1294
+ * [#11021](https://dev.ckeditor.com/ticket/11021): Fixed: An error thrown when selecting entire editable contents while fake selection is on.
1295
+ * [#11086](https://dev.ckeditor.com/ticket/11086): [IE8] Re-enable inline widgets drag&drop in Internet Explorer 8.
1296
+ * [#11372](https://dev.ckeditor.com/ticket/11372): Widgets: Special characters encoded twice in nested editables.
1297
+ * [#10068](https://dev.ckeditor.com/ticket/10068): Fixed: Support for protocol-relative URLs.
1298
+ * [#11283](https://dev.ckeditor.com/ticket/11283): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): A `<div>` element with `text-align: center` and an image inside is not recognised correctly.
1299
+ * [#11196](https://dev.ckeditor.com/ticket/11196): [Accessibility Instructions](https://ckeditor.com/cke4/addon/a11yhelp): Allowed additional keyboard button labels to be translated in the dialog window.
1300
+
1301
+ ## CKEditor 4.3.1
1302
+
1303
+ **Important Notes:**
1304
+
1305
+ * To match the naming convention, the `language` button is now `Language` ([#11201](https://dev.ckeditor.com/ticket/11201)).
1306
+ * [Enhanced Image](https://ckeditor.com/cke4/addon/image2) button, context menu, command, and icon names match those of the [Image](https://ckeditor.com/cke4/addon/image) plugin ([#11222](https://dev.ckeditor.com/ticket/11222)).
1307
+
1308
+ Fixed Issues:
1309
+
1310
+ * [#11244](https://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event.
1311
+ * [#11171](https://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) and [`editor.insertText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertText) methods do not call the [`widget.repository.checkWidgets()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#method-checkWidgets) method.
1312
+ * [#11085](https://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) widget with a placeholder.
1313
+ * [#11044](https://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](https://ckeditor.com/cke4/addon/language) plugin drop-down menu.
1314
+ * [#11075](https://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option.
1315
+ * [#11165](https://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin cannot be removed from the editor.
1316
+ * [#11159](https://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Fixed buggy discovery of image dimensions.
1317
+ * [#11101](https://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes.
1318
+ * [#11077](https://dev.ckeditor.com/ticket/11077): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Empty undo step recorded when resizing the image.
1319
+ * [#10853](https://dev.ckeditor.com/ticket/10853): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image.
1320
+ * [#11198](https://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading.
1321
+ * [#11132](https://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget.
1322
+ * [#11182](https://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_env.html#property-quirks) for more details.
1323
+ * [#11204](https://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](https://ckeditor.com/cke4/addon/image2) looks nicer.
1324
+ * [#11202](https://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](https://ckeditor.com/cke4/addon/bbcode) mode.
1325
+ * [#10890](https://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item.
1326
+ * [#10055](https://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back.
1327
+ * [#11183](https://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) method does not insert the element into every range of a selection any more.
1328
+ * [#11042](https://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked.
1329
+ * [#11125](https://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle.
1330
+ * [#11011](https://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-applyStyle) method removes attributes from nested elements.
1331
+ * [#11179](https://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) does not cleanup content generated by the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin for inline editors.
1332
+ * [#11237](https://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word.
1333
+ * [#11250](https://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded.
1334
+ * [#11260](https://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled.
1335
+ * [#11200](https://dev.ckeditor.com/ticket/11200): Added [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin as a dependency for [Widget](https://ckeditor.com/cke4/addon/widget) to fix drag and drop.
1336
+
1337
+ ## CKEditor 4.3
1338
+
1339
+ New Features:
1340
+
1341
+ * [#10612](https://dev.ckeditor.com/ticket/10612): Internet Explorer 11 support.
1342
+ * [#10869](https://dev.ckeditor.com/ticket/10869): Widgets: Added better integration with the [Elements Path](https://ckeditor.com/cke4/addon/elementspath) plugin.
1343
+ * [#10886](https://dev.ckeditor.com/ticket/10886): Widgets: Added tooltip to the drag handle.
1344
+ * [#10933](https://dev.ckeditor.com/ticket/10933): Widgets: Introduced drag and drop of block widgets with the [Line Utilities](https://ckeditor.com/cke4/addon/lineutils) plugin.
1345
+ * [#10936](https://dev.ckeditor.com/ticket/10936): Widget System changes for easier integration with other dialog systems.
1346
+ * [#10895](https://dev.ckeditor.com/ticket/10895): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Added file browser integration.
1347
+ * [#11002](https://dev.ckeditor.com/ticket/11002): Added the [`draggable`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-draggable) option to disable drag and drop support for widgets.
1348
+ * [#10937](https://dev.ckeditor.com/ticket/10937): [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) widget improvements:
1349
+ * loading indicator ([#10948](https://dev.ckeditor.com/ticket/10948)),
1350
+ * applying paragraph changes (like font color change) to iframe ([#10841](https://dev.ckeditor.com/ticket/10841)),
1351
+ * Firefox and IE9 clipboard fixes ([#10857](https://dev.ckeditor.com/ticket/10857)),
1352
+ * fixing same origin policy issue ([#10840](https://dev.ckeditor.com/ticket/10840)),
1353
+ * fixing undo bugs ([#10842](https://dev.ckeditor.com/ticket/10842), [#10930](https://dev.ckeditor.com/ticket/10930)),
1354
+ * fixing other minor bugs.
1355
+ * [#10862](https://dev.ckeditor.com/ticket/10862): [Placeholder](https://ckeditor.com/cke4/addon/placeholder) plugin was rewritten as a widget.
1356
+ * [#10822](https://dev.ckeditor.com/ticket/10822): Added styles system integration with non-editable elements (for example widgets) and their nested editables. Styles cannot change non-editable content and are applied in nested editable only if allowed by its type and content filter.
1357
+ * [#10856](https://dev.ckeditor.com/ticket/10856): Menu buttons will now toggle the visibility of their panels when clicked multiple times. [Language](https://ckeditor.com/cke4/addon/language) plugin fixes: Added active language highlighting, added an option to remove the language.
1358
+ * [#10028](https://dev.ckeditor.com/ticket/10028): New [`config.dialog_noConfirmCancel`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-dialog_noConfirmCancel) configuration option that eliminates the need to confirm closing of a dialog window when the user changed any of its fields.
1359
+ * [#10848](https://dev.ckeditor.com/ticket/10848): Integrate remaining plugins ([Styles](https://ckeditor.com/cke4/addon/stylescombo), [Format](https://ckeditor.com/cke4/addon/format), [Font](https://ckeditor.com/cke4/addon/font), [Color Button](https://ckeditor.com/cke4/addon/colorbutton), [Language](https://ckeditor.com/cke4/addon/language) and [Indent](https://ckeditor.com/cke4/addon/indent)) with [active filter](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeFilter).
1360
+ * [#10855](https://dev.ckeditor.com/ticket/10855): Change the extension of emoticons in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) sample from GIF to PNG.
1361
+
1362
+ Fixed Issues:
1363
+
1364
+ * [#10831](https://dev.ckeditor.com/ticket/10831): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Merged `image2inline` and `image2block` into one `image2` widget.
1365
+ * [#10835](https://dev.ckeditor.com/ticket/10835): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Improved visibility of the resize handle.
1366
+ * [#10836](https://dev.ckeditor.com/ticket/10836): [Enhanced Image](https://ckeditor.com/cke4/addon/image2): Preserve custom mouse cursor while resizing the image.
1367
+ * [#10939](https://dev.ckeditor.com/ticket/10939): [Firefox] [Enhanced Image](https://ckeditor.com/cke4/addon/image2): hovering the image causes it to change.
1368
+ * [#10866](https://dev.ckeditor.com/ticket/10866): Fixed: Broken *Tab* key navigation in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1369
+ * [#10833](https://dev.ckeditor.com/ticket/10833): Fixed: *Lock ratio* option should be on by default in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) dialog window.
1370
+ * [#10881](https://dev.ckeditor.com/ticket/10881): Various improvements to *Enter* key behavior in nested editables.
1371
+ * [#10879](https://dev.ckeditor.com/ticket/10879): [Remove Format](https://ckeditor.com/cke4/addon/removeformat) should not leak from a nested editable.
1372
+ * [#10877](https://dev.ckeditor.com/ticket/10877): Fixed: [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) fails to apply changes if a nested editable was focused.
1373
+ * [#10877](https://dev.ckeditor.com/ticket/10877): Fixed: [SCAYT](https://ckeditor.com/cke4/addon/wsc) blocks typing in nested editables.
1374
+ * [#11079](https://dev.ckeditor.com/ticket/11079): Add button icons to the [Placeholder](https://ckeditor.com/cke4/addon/placeholder) sample.
1375
+ * [#10870](https://dev.ckeditor.com/ticket/10870): The `paste` command is no longer being disabled when the clipboard is empty.
1376
+ * [#10854](https://dev.ckeditor.com/ticket/10854): Fixed: Firefox prepends `<br>` to `<body>`, so it is stripped by the HTML data processor.
1377
+ * [#10823](https://dev.ckeditor.com/ticket/10823): Fixed: [Link](https://ckeditor.com/cke4/addon/link) plugin does not work with non-editable content.
1378
+ * [#10828](https://dev.ckeditor.com/ticket/10828): [Magic Line](https://ckeditor.com/cke4/addon/magicline) integration with the Widget System.
1379
+ * [#10865](https://dev.ckeditor.com/ticket/10865): Improved hiding copybin, so copying widgets works smoothly.
1380
+ * [#11066](https://dev.ckeditor.com/ticket/11066): Widget's private parts use CSS reset.
1381
+ * [#11027](https://dev.ckeditor.com/ticket/11027): Fixed: Block commands break on widgets; added the [`contentDomInvalidated`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-contentDomInvalidated) event.
1382
+ * [#10430](https://dev.ckeditor.com/ticket/10430): Resolve dependence of the [Image](https://ckeditor.com/cke4/addon/image) plugin on the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin.
1383
+ * [#10911](https://dev.ckeditor.com/ticket/10911): Fixed: Browser *Alt* hotkeys will no longer be blocked while a widget is focused.
1384
+ * [#11082](https://dev.ckeditor.com/ticket/11082): Fixed: Selected widget is not copied or cut when using toolbar buttons or context menu.
1385
+ * [#11083](https://dev.ckeditor.com/ticket/11083): Fixed list and div element application to block widgets.
1386
+ * [#10887](https://dev.ckeditor.com/ticket/10887): Internet Explorer 8 compatibility issues related to the Widget System.
1387
+ * [#11074](https://dev.ckeditor.com/ticket/11074): Temporarily disabled inline widget drag and drop, because of seriously buggy native `range#moveToPoint` method.
1388
+ * [#11098](https://dev.ckeditor.com/ticket/11098): Fixed: Wrong selection position after undoing widget drag and drop.
1389
+ * [#11110](https://dev.ckeditor.com/ticket/11110): Fixed: IFrame and Flash objects are being incorrectly pasted in certain conditions.
1390
+ * [#11129](https://dev.ckeditor.com/ticket/11129): Page break is lost when loading data.
1391
+ * [#11123](https://dev.ckeditor.com/ticket/11123): [Firefox] Widget is destroyed after being dragged outside of `<body>`.
1392
+ * [#11124](https://dev.ckeditor.com/ticket/11124): Fixed the [Elements Path](https://ckeditor.com/cke4/addon/elementspath) in an editor using the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea).
1393
+
1394
+ ## CKEditor 4.3 Beta
1395
+
1396
+ New Features:
1397
+
1398
+ * [#9764](https://dev.ckeditor.com/ticket/9764): Widget System.
1399
+ * [Widget plugin](https://ckeditor.com/cke4/addon/widget) introducing the [Widget API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.widget.html).
1400
+ * New [`editor.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-enterMode) and [`editor.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-shiftEnterMode) properties &ndash; normalized versions of [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) and [`config.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-shiftEnterMode).
1401
+ * Dynamic editor settings. Starting from CKEditor 4.3 Beta, *Enter* mode values and [content filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) instances may be changed dynamically (for example when the caret was placed in an element in which editor features should be adjusted). When you are implementing a new editor feature, you should base its behavior on [dynamic](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeEnterMode) or [static](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-enterMode) *Enter* mode values depending on whether this feature works in selection context or globally on editor content.
1402
+ * Dynamic *Enter* mode values &ndash; [`editor.setActiveEnterMode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setActiveEnterMode) method, [`editor.activeEnterModeChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-activeEnterModeChange) event, and two properties: [`editor.activeEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeEnterMode) and [`editor.activeShiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeShiftEnterMode).
1403
+ * Dynamic content filter instances &ndash; [`editor.setActiveFilter()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setActiveFilter) method, [`editor.activeFilterChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-activeFilterChange) event, and [`editor.activeFilter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-activeFilter) property.
1404
+ * "Fake" selection was introduced. It makes it possible to virtually select any element when the real selection remains hidden. See the [`selection.fake()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-fake) method.
1405
+ * Default [`htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html) rules are not applied to non-editable elements (elements with `contenteditable` attribute set to `false` and their descendants) anymore. To add a rule which will be applied to all elements you need to pass an additional argument to the [`filter.addRules()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_filter.html#method-addRules) method.
1406
+ * Dozens of new methods were introduced &ndash; most interesting ones:
1407
+ * [`document.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_document.html#method-find),
1408
+ * [`document.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_document.html#method-findOne),
1409
+ * [`editable.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertElementIntoRange),
1410
+ * [`range.moveToClosestEditablePosition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-moveToClosestEditablePosition),
1411
+ * New methods for [`htmlParser.node`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.node.html) and [`htmlParser.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.element.html).
1412
+ * [#10659](https://dev.ckeditor.com/ticket/10659): New [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin that introduces a widget with integrated image captions, an option to center images, and dynamic "click and drag" resizing.
1413
+ * [#10664](https://dev.ckeditor.com/ticket/10664): New [Mathematical Formulas](https://ckeditor.com/cke4/addon/mathjax) plugin that introduces the MathJax widget.
1414
+ * [#7987](https://dev.ckeditor.com/ticket/7987): New [Language](https://ckeditor.com/cke4/addon/language) plugin that implements Language toolbar button to support [WCAG 3.1.2 Language of Parts](http://www.w3.org/TR/UNDERSTANDING-WCAG20/meaning-other-lang-id.html).
1415
+ * [#10708](https://dev.ckeditor.com/ticket/10708): New [smileys](https://ckeditor.com/cke4/addon/smiley).
1416
+
1417
+ ## CKEditor 4.2.3
1418
+
1419
+ Fixed Issues:
1420
+
1421
+ * [#10994](https://dev.ckeditor.com/ticket/10994): Fixed: Loading external jQuery library when opening the [jQuery Adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) sample directly from file.
1422
+ * [#10975](https://dev.ckeditor.com/ticket/10975): [IE] Fixed: Error thrown while opening the color palette.
1423
+ * [#9929](https://dev.ckeditor.com/ticket/9929): [Blink/WebKit] Fixed: A non-breaking space is created once a character is deleted and a regular space is typed.
1424
+ * [#10963](https://dev.ckeditor.com/ticket/10963): Fixed: JAWS issue with the keyboard shortcut for [Magic Line](https://ckeditor.com/cke4/addon/magicline).
1425
+ * [#11096](https://dev.ckeditor.com/ticket/11096): Fixed: TypeError: Object has no method 'is'.
1426
+
1427
+ ## CKEditor 4.2.2
1428
+
1429
+ Fixed Issues:
1430
+
1431
+ * [#9314](https://dev.ckeditor.com/ticket/9314): Fixed: Incorrect error message on closing a dialog window without saving changs.
1432
+ * [#10308](https://dev.ckeditor.com/ticket/10308): [IE10] Fixed: Unspecified error when deleting a row.
1433
+ * [#10945](https://dev.ckeditor.com/ticket/10945): [Chrome] Fixed: Clicking with a mouse inside the editor does not show the caret.
1434
+ * [#10912](https://dev.ckeditor.com/ticket/10912): Prevent default action when content of a non-editable link is clicked.
1435
+ * [#10913](https://dev.ckeditor.com/ticket/10913): Fixed [`CKEDITOR.plugins.addExternal()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_resourceManager.html#method-addExternal) not handling paths including file name specified.
1436
+ * [#10666](https://dev.ckeditor.com/ticket/10666): Fixed [`CKEDITOR.tools.isArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-isArray) not working cross frame.
1437
+ * [#10910](https://dev.ckeditor.com/ticket/10910): [IE9] Fixed JavaScript error thrown in Compatibility Mode when clicking and/or typing in the editing area.
1438
+ * [#10868](https://dev.ckeditor.com/ticket/10868): [IE8] Prevent the browser from crashing when applying the Inline Quotation style.
1439
+ * [#10915](https://dev.ckeditor.com/ticket/10915): Fixed: Invalid CSS filter in the Kama skin.
1440
+ * [#10914](https://dev.ckeditor.com/ticket/10914): Plugins [Indent List](https://ckeditor.com/cke4/addon/indentlist) and [Indent Block](https://ckeditor.com/cke4/addon/indentblock) are now included in the build configuration.
1441
+ * [#10812](https://dev.ckeditor.com/ticket/10812): Fixed [`range.createBookmark2()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-createBookmark2) incorrectly normalizing offsets. This bug was causing many issues: [#10850](https://dev.ckeditor.com/ticket/10850), [#10842](https://dev.ckeditor.com/ticket/10842).
1442
+ * [#10951](https://dev.ckeditor.com/ticket/10951): Reviewed and optimized focus handling on panels (combo, menu buttons, color buttons, and context menu) to enhance accessibility. Fixed [#10705](https://dev.ckeditor.com/ticket/10705), [#10706](https://dev.ckeditor.com/ticket/10706) and [#10707](https://dev.ckeditor.com/ticket/10707).
1443
+ * [#10704](https://dev.ckeditor.com/ticket/10704): Fixed a JAWS issue with the Select Color dialog window title not being announced.
1444
+ * [#10753](https://dev.ckeditor.com/ticket/10753): The floating toolbar in inline instances now has a dedicated accessibility label.
1445
+
1446
+ ## CKEditor 4.2.1
1447
+
1448
+ Fixed Issues:
1449
+
1450
+ * [#10301](https://dev.ckeditor.com/ticket/10301): [IE9-10] Undo fails after 3+ consecutive paste actions with a JavaScript error.
1451
+ * [#10689](https://dev.ckeditor.com/ticket/10689): Save toolbar button saves only the first editor instance.
1452
+ * [#10368](https://dev.ckeditor.com/ticket/10368): Move language reading direction definition (`dir`) from main language file to core.
1453
+ * [#9330](https://dev.ckeditor.com/ticket/9330): Fixed pasting anchors from MS Word.
1454
+ * [#8103](https://dev.ckeditor.com/ticket/8103): Fixed pasting nested lists from MS Word.
1455
+ * [#9958](https://dev.ckeditor.com/ticket/9958): [IE9] Pressing the "OK" button will trigger the `onbeforeunload` event in the popup dialog.
1456
+ * [#10662](https://dev.ckeditor.com/ticket/10662): Fixed styles from the Styles drop-down list not registering to the ACF in case when the [Shared Spaces plugin](https://ckeditor.com/cke4/addon/sharedspace) is used.
1457
+ * [#9654](https://dev.ckeditor.com/ticket/9654): Problems with Internet Explorer 10 Quirks Mode.
1458
+ * [#9816](https://dev.ckeditor.com/ticket/9816): Floating toolbar does not reposition vertically in several cases.
1459
+ * [#10646](https://dev.ckeditor.com/ticket/10646): Removing a selected sublist or nested table with *Backspace/Delete* removes the parent element.
1460
+ * [#10623](https://dev.ckeditor.com/ticket/10623): [WebKit] Page is scrolled when opening a drop-down list.
1461
+ * [#10004](https://dev.ckeditor.com/ticket/10004): [ChromeVox] Button names are not announced.
1462
+ * [#10731](https://dev.ckeditor.com/ticket/10731): [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin breaks cloning of editor configuration.
1463
+ * It is now possible to set per instance [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin configuration instead of setting the configuration globally.
1464
+
1465
+ ## CKEditor 4.2
1466
+
1467
+ **Important Notes:**
1468
+
1469
+ * Dropped compatibility support for Internet Explorer 7 and Firefox 3.6.
1470
+
1471
+ * Both the Basic and the Standard distribution packages will not contain the new [Indent Block](https://ckeditor.com/cke4/addon/indentblock) plugin. Because of this the [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) might remove block indentations from existing contents. If you want to prevent this, either [add an appropriate ACF rule to your filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_allowed_content_rules.html) or create a custom build based on the Basic/Standard package and add the Indent Block plugin in [CKBuilder](https://ckeditor.com/cke4/builder).
1472
+
1473
+ New Features:
1474
+
1475
+ * [#10027](https://dev.ckeditor.com/ticket/10027): Separated list and block indentation into two plugins: [Indent List](https://ckeditor.com/cke4/addon/indentlist) and [Indent Block](https://ckeditor.com/cke4/addon/indentblock).
1476
+ * [#8244](https://dev.ckeditor.com/ticket/8244): Use *(Shift+)Tab* to indent and outdent lists.
1477
+ * [#10281](https://dev.ckeditor.com/ticket/10281): The [jQuery Adapter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_jquery.html) is now available. Several jQuery-related issues fixed: [#8261](https://dev.ckeditor.com/ticket/8261), [#9077](https://dev.ckeditor.com/ticket/9077), [#8710](https://dev.ckeditor.com/ticket/8710), [#8530](https://dev.ckeditor.com/ticket/8530), [#9019](https://dev.ckeditor.com/ticket/9019), [#6181](https://dev.ckeditor.com/ticket/6181), [#7876](https://dev.ckeditor.com/ticket/7876), [#6906](https://dev.ckeditor.com/ticket/6906).
1478
+ * [#10042](https://dev.ckeditor.com/ticket/10042): Introduced [`config.title`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-title) setting to change the human-readable title of the editor.
1479
+ * [#9794](https://dev.ckeditor.com/ticket/9794): Added [`editor.change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event.
1480
+ * [#9923](https://dev.ckeditor.com/ticket/9923): HiDPI support in the editor UI. HiDPI icons for [Moono skin](https://ckeditor.com/cke4/addon/moono) added.
1481
+ * [#8031](https://dev.ckeditor.com/ticket/8031): Handle `required` attributes on `<textarea>` elements &mdash; introduced [`editor.required`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-required) event.
1482
+ * [#10280](https://dev.ckeditor.com/ticket/10280): Ability to replace `<textarea>` elements with the inline editor.
1483
+
1484
+ Fixed Issues:
1485
+
1486
+ * [#10599](https://dev.ckeditor.com/ticket/10599): [Indent](https://ckeditor.com/cke4/addon/indent) plugin is no longer required by the [List](https://ckeditor.com/cke4/addon/list) plugin.
1487
+ * [#10370](https://dev.ckeditor.com/ticket/10370): Inconsistency in data events between framed and inline editors.
1488
+ * [#10438](https://dev.ckeditor.com/ticket/10438): [FF, IE] No selection is done on an editable element on executing [`editor.setData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setData).
1489
+
1490
+ ## CKEditor 4.1.3
1491
+
1492
+ New Features:
1493
+
1494
+ * Added new translation: Indonesian.
1495
+
1496
+ Fixed Issues:
1497
+
1498
+ * [#10644](https://dev.ckeditor.com/ticket/10644): Fixed a critical bug when pasting plain text in Blink-based browsers.
1499
+ * [#5189](https://dev.ckeditor.com/ticket/5189): [Find/Replace](https://ckeditor.com/cke4/addon/find) dialog window: rename "Cancel" button to "Close".
1500
+ * [#10562](https://dev.ckeditor.com/ticket/10562): [Housekeeping] Unified CSS gradient filter formats in the [Moono](https://ckeditor.com/cke4/addon/moono) skin.
1501
+ * [#10537](https://dev.ckeditor.com/ticket/10537): Advanced Content Filter should register a default rule for [`config.shiftEnterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-shiftEnterMode).
1502
+ * [#10610](https://dev.ckeditor.com/ticket/10610): [`CKEDITOR.dialog.addIframe()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#static-method-addIframe) incorrectly sets the iframe size in dialog windows.
1503
+
1504
+ ## CKEditor 4.1.2
1505
+
1506
+ New Features:
1507
+
1508
+ * Added new translation: Sinhala.
1509
+
1510
+ Fixed Issues:
1511
+
1512
+ * [#10339](https://dev.ckeditor.com/ticket/10339): Fixed: Error thrown when inserted data was totally stripped out after filtering and processing.
1513
+ * [#10298](https://dev.ckeditor.com/ticket/10298): Fixed: Data processor breaks attributes containing protected parts.
1514
+ * [#10367](https://dev.ckeditor.com/ticket/10367): Fixed: [`editable.insertText()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editable.html#method-insertText) loses characters when `RegExp` replace controls are being inserted.
1515
+ * [#10165](https://dev.ckeditor.com/ticket/10165): [IE] Access denied error when `document.domain` has been altered.
1516
+ * [#9761](https://dev.ckeditor.com/ticket/9761): Update the *Backspace* key state in [`keystrokeHandler.blockedKeystrokes`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_keystrokeHandler.html#property-blockedKeystrokes) when calling [`editor.setReadOnly()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setReadOnly).
1517
+ * [#6504](https://dev.ckeditor.com/ticket/6504): Fixed: Race condition while loading several [`config.customConfig`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-customConfig) files.
1518
+ * [#10146](https://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is [`CKEDITOR.ENTER_BR`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_BR).
1519
+ * [#10360](https://dev.ckeditor.com/ticket/10360): Fixed: ARIA `role="application"` should not be used for dialog windows.
1520
+ * [#10361](https://dev.ckeditor.com/ticket/10361): Fixed: ARIA `role="application"` should not be used for floating panels.
1521
+ * [#10510](https://dev.ckeditor.com/ticket/10510): Introduced unique voice labels to differentiate between different editor instances.
1522
+ * [#9945](https://dev.ckeditor.com/ticket/9945): [iOS] Scrolling not possible on iPad.
1523
+ * [#10389](https://dev.ckeditor.com/ticket/10389): Fixed: Invalid HTML in the "Text and Table" template.
1524
+ * [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin user interface was changed to match CKEditor 4 style.
1525
+
1526
+ ## CKEditor 4.1.1
1527
+
1528
+ New Features:
1529
+
1530
+ * Added new translation: Albanian.
1531
+
1532
+ Fixed Issues:
1533
+
1534
+ * [#10172](https://dev.ckeditor.com/ticket/10172): Pressing *Delete* or *Backspace* in an empty table cell moves the cursor to the next/previous cell.
1535
+ * [#10219](https://dev.ckeditor.com/ticket/10219): Error thrown when destroying an editor instance in parallel with a `mouseup` event.
1536
+ * [#10265](https://dev.ckeditor.com/ticket/10265): Wrong loop type in the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin.
1537
+ * [#10249](https://dev.ckeditor.com/ticket/10249): Wrong undo/redo states at start.
1538
+ * [#10268](https://dev.ckeditor.com/ticket/10268): [Show Blocks](https://ckeditor.com/cke4/addon/showblocks) does not recover after switching to Source view.
1539
+ * [#9995](https://dev.ckeditor.com/ticket/9995): HTML code in the `<textarea>` should not be modified by the [`htmlDataProcessor`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlDataProcessor.html).
1540
+ * [#10320](https://dev.ckeditor.com/ticket/10320): [Justify](https://ckeditor.com/cke4/addon/justify) plugin should add elements to Advanced Content Filter based on current [Enter mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode).
1541
+ * [#10260](https://dev.ckeditor.com/ticket/10260): Fixed: Advanced Content Filter blocks [`tabSpaces`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-tabSpaces). Unified `data-cke-*` attributes filtering.
1542
+ * [#10315](https://dev.ckeditor.com/ticket/10315): [WebKit] [Undo manager](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.undo.UndoManager.html) should not record snapshots after a filling character was added/removed.
1543
+ * [#10291](https://dev.ckeditor.com/ticket/10291): [WebKit] Space after a filling character should be secured.
1544
+ * [#10330](https://dev.ckeditor.com/ticket/10330): [WebKit] The filling character is not removed on `keydown` in specific cases.
1545
+ * [#10285](https://dev.ckeditor.com/ticket/10285): Fixed: Styled text pasted from MS Word causes an infinite loop.
1546
+ * [#10131](https://dev.ckeditor.com/ticket/10131): Fixed: [`undoManager.update()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#method-update) does not refresh the command state.
1547
+ * [#10337](https://dev.ckeditor.com/ticket/10337): Fixed: Unable to remove `<s>` using [Remove Format](https://ckeditor.com/cke4/addon/removeformat).
1548
+
1549
+ ## CKEditor 4.1
1550
+
1551
+ Fixed Issues:
1552
+
1553
+ * [#10192](https://dev.ckeditor.com/ticket/10192): Closing lists with the *Enter* key does not work with [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) in several cases.
1554
+ * [#10191](https://dev.ckeditor.com/ticket/10191): Fixed allowed content rules unification, so the [`filter.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-allowedContent) property always contains rules in the same format.
1555
+ * [#10224](https://dev.ckeditor.com/ticket/10224): Advanced Content Filter does not remove non-empty `<a>` elements anymore.
1556
+ * Minor issues in plugin integration with Advanced Content Filter:
1557
+ * [#10166](https://dev.ckeditor.com/ticket/10166): Added transformation from the `align` attribute to `float` style to preserve backward compatibility after the introduction of Advanced Content Filter.
1558
+ * [#10195](https://dev.ckeditor.com/ticket/10195): [Image](https://ckeditor.com/cke4/addon/image) plugin no longer registers rules for links to Advanced Content Filter.
1559
+ * [#10213](https://dev.ckeditor.com/ticket/10213): [Justify](https://ckeditor.com/cke4/addon/justify) plugin is now correctly registering rules to Advanced Content Filter when [`config.justifyClasses`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-justifyClasses) is defined.
1560
+
1561
+ ## CKEditor 4.1 RC
1562
+
1563
+ New Features:
1564
+
1565
+ * [#9829](https://dev.ckeditor.com/ticket/9829): Advanced Content Filter - data and features activation based on editor configuration.
1566
+
1567
+ Brand new data filtering system that works in 2 modes:
1568
+
1569
+ * Based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its
1570
+ current configuration can handle.
1571
+ * Based on [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent) rules - the data
1572
+ will be filtered and the editor features (toolbar items, commands, keystrokes) will be enabled if they are allowed.
1573
+
1574
+ See the `datafiltering.html` sample, [guides](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_advanced_content_filter.html) and [`CKEDITOR.filter` API documentation](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html).
1575
+ * [#9387](https://dev.ckeditor.com/ticket/9387): Reintroduced [Shared Spaces](https://ckeditor.com/cke4/addon/sharedspace) - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances.
1576
+ * [#9907](https://dev.ckeditor.com/ticket/9907): Added the [`contentPreview`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#event-contentPreview) event for preview data manipulation.
1577
+ * [#9713](https://dev.ckeditor.com/ticket/9713): Introduced the [Source Dialog](https://ckeditor.com/cke4/addon/sourcedialog) plugin that brings raw HTML editing for inline editor instances.
1578
+ * Included in [#9829](https://dev.ckeditor.com/ticket/9829): Introduced new events, [`toHtml`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-toHtml) and [`toDataFormat`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-toDataFormat), allowing for better integration with data processing.
1579
+ * [#9981](https://dev.ckeditor.com/ticket/9981): Added ability to filter [`htmlParser.fragment`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.fragment.html), [`htmlParser.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.element.html) etc. by many [`htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.htmlParser.filter.html)s before writing structure to an HTML string.
1580
+ * Included in [#10103](https://dev.ckeditor.com/ticket/10103):
1581
+ * Introduced the [`editor.status`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-status) property to make it easier to check the current status of the editor.
1582
+ * Default [`command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.command.html) state is now [`CKEDITOR.TRISTATE_DISABLE`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-TRISTATE_DISABLED). It will be activated on [`editor.instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#event-instanceReady) or immediately after being added if the editor is already initialized.
1583
+ * [#9796](https://dev.ckeditor.com/ticket/9796): Introduced `<s>` as a default tag for strikethrough, which replaces obsolete `<strike>` in HTML5.
1584
+
1585
+ ## CKEditor 4.0.3
1586
+
1587
+ Fixed Issues:
1588
+
1589
+ * [#10196](https://dev.ckeditor.com/ticket/10196): Fixed context menus not opening with keyboard shortcuts when [Autogrow](https://ckeditor.com/cke4/addon/autogrow) is enabled.
1590
+ * [#10212](https://dev.ckeditor.com/ticket/10212): [IE7-10] Undo command throws errors after multiple switches between Source and WYSIWYG view.
1591
+ * [#10219](https://dev.ckeditor.com/ticket/10219): [Inline editor] Error thrown after calling [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy).
1592
+
1593
+ ## CKEditor 4.0.2
1594
+
1595
+ Fixed Issues:
1596
+
1597
+ * [#9779](https://dev.ckeditor.com/ticket/9779): Fixed overriding [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) with `CKEDITOR_GETURL`.
1598
+ * [#9772](https://dev.ckeditor.com/ticket/9772): Custom buttons in the dialog window footer have different look and size ([Moono](https://ckeditor.com/cke4/addon/moono), [Kama](https://ckeditor.com/cke4/addon/kama) skins).
1599
+ * [#9029](https://dev.ckeditor.com/ticket/9029): Custom styles added with the [`stylesSet.add()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_stylesSet.html#method-add) are displayed in the wrong order.
1600
+ * [#9887](https://dev.ckeditor.com/ticket/9887): Disable [Magic Line](https://ckeditor.com/cke4/addon/magicline) when [`editor.readOnly`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) is set.
1601
+ * [#9882](https://dev.ckeditor.com/ticket/9882): Fixed empty document title on [`editor.getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) if set via the Document Properties dialog window.
1602
+ * [#9773](https://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin.
1603
+ * [#9851](https://dev.ckeditor.com/ticket/9851): The [`selectionChange`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-selectionChange) event is not fired when mouse selection ended outside editable.
1604
+ * [#9903](https://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll.
1605
+ * [#9872](https://dev.ckeditor.com/ticket/9872): [`editor.checkDirty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-checkDirty) returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag.
1606
+ * [#9893](https://dev.ckeditor.com/ticket/9893): [IE] Fixed broken toolbar when editing mixed direction content in Quirks mode.
1607
+ * [#9845](https://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the [Link](https://ckeditor.com/cke4/addon/link) dialog window when the Anchor option is used and no anchors are available.
1608
+ * [#9883](https://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with [divarea](https://ckeditor.com/cke4/addon/divarea)-based editors.
1609
+ * [#9940](https://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable.
1610
+ * [#9966](https://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed [Magic Line](https://ckeditor.com/cke4/addon/magicline) keystrokes.
1611
+ * [#9507](https://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time.
1612
+ * [#9947](https://dev.ckeditor.com/ticket/9947): [WebKit] Editor overflows parent container in some edge cases.
1613
+ * [#10105](https://dev.ckeditor.com/ticket/10105): Fixed: Broken [sourcearea](https://ckeditor.com/cke4/addon/sourcearea) view when an RTL language is set.
1614
+ * [#10123](https://dev.ckeditor.com/ticket/10123): [WebKit] Fixed: Several dialog windows have broken layout since the latest WebKit release.
1615
+ * [#10152](https://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items.
1616
+
1617
+ ## CKEditor 4.0.1.1
1618
+
1619
+ Fixed Issues:
1620
+
1621
+ * Security update: Added protection against XSS attack and possible path disclosure in the PHP sample.
1622
+
1623
+ ## CKEditor 4.0.1
1624
+
1625
+ Fixed Issues:
1626
+
1627
+ * [#9655](https://dev.ckeditor.com/ticket/9655): Support for IE Quirks Mode in the new [Moono skin](https://ckeditor.com/cke4/addon/moono).
1628
+ * Accessibility issues (mainly in inline editor): [#9364](https://dev.ckeditor.com/ticket/9364), [#9368](https://dev.ckeditor.com/ticket/9368), [#9369](https://dev.ckeditor.com/ticket/9369), [#9370](https://dev.ckeditor.com/ticket/9370), [#9541](https://dev.ckeditor.com/ticket/9541), [#9543](https://dev.ckeditor.com/ticket/9543), [#9841](https://dev.ckeditor.com/ticket/9841), [#9844](https://dev.ckeditor.com/ticket/9844).
1629
+ * [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin:
1630
+ * [#9481](https://dev.ckeditor.com/ticket/9481): Added accessibility support for Magic Line.
1631
+ * [#9509](https://dev.ckeditor.com/ticket/9509): Added Magic Line support for forms.
1632
+ * [#9573](https://dev.ckeditor.com/ticket/9573): Magic Line does not disappear on `mouseout` in a specific case.
1633
+ * [#9754](https://dev.ckeditor.com/ticket/9754): [WebKit] Cutting & pasting simple unformatted text generates an inline wrapper in WebKit browsers.
1634
+ * [#9456](https://dev.ckeditor.com/ticket/9456): [Chrome] Properly paste bullet list style from MS Word.
1635
+ * [#9699](https://dev.ckeditor.com/ticket/9699), [#9758](https://dev.ckeditor.com/ticket/9758): Improved selection locking when selecting by dragging.
1636
+ * Context menu:
1637
+ * [#9712](https://dev.ckeditor.com/ticket/9712): Opening the context menu destroys editor focus.
1638
+ * [#9366](https://dev.ckeditor.com/ticket/9366): Context menu should be displayed over the floating toolbar.
1639
+ * [#9706](https://dev.ckeditor.com/ticket/9706): Context menu generates a JavaScript error in inline mode when the editor is attached to a header element.
1640
+ * [#9800](https://dev.ckeditor.com/ticket/9800): Hide float panel when resizing the window.
1641
+ * [#9721](https://dev.ckeditor.com/ticket/9721): Padding in content of div-based editor puts the editing area under the bottom UI space.
1642
+ * [#9528](https://dev.ckeditor.com/ticket/9528): Host page `box-sizing` style should not influence the editor UI elements.
1643
+ * [#9503](https://dev.ckeditor.com/ticket/9503): [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin adds context menu listeners only on supported input types. Added support for `tel`, `email`, `search` and `url` input types.
1644
+ * [#9769](https://dev.ckeditor.com/ticket/9769): Improved floating toolbar positioning in a narrow window.
1645
+ * [#9875](https://dev.ckeditor.com/ticket/9875): Table dialog window does not populate width correctly.
1646
+ * [#8675](https://dev.ckeditor.com/ticket/8675): Deleting cells in a nested table removes the outer table cell.
1647
+ * [#9815](https://dev.ckeditor.com/ticket/9815): Cannot edit dialog window fields in an editor initialized in the jQuery UI modal dialog.
1648
+ * [#8888](https://dev.ckeditor.com/ticket/8888): CKEditor dialog windows do not show completely in a small window.
1649
+ * [#9360](https://dev.ckeditor.com/ticket/9360): [Inline editor] Blocks shown for a `<div>` element stay permanently even after the user exits editing the `<div>`.
1650
+ * [#9531](https://dev.ckeditor.com/ticket/9531): [Firefox & Inline editor] Toolbar is lost when closing the Format drop-down list by clicking its button.
1651
+ * [#9553](https://dev.ckeditor.com/ticket/9553): Table width incorrectly set when the `border-width` style is specified.
1652
+ * [#9594](https://dev.ckeditor.com/ticket/9594): Cannot tab past CKEditor when it is in read-only mode.
1653
+ * [#9658](https://dev.ckeditor.com/ticket/9658): [IE9] Justify not working on selected images.
1654
+ * [#9686](https://dev.ckeditor.com/ticket/9686): Added missing contents styles for `<pre>` elements.
1655
+ * [#9709](https://dev.ckeditor.com/ticket/9709): [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) should not depend on configuration from other styles.
1656
+ * [#9726](https://dev.ckeditor.com/ticket/9726): Removed [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin dependency from [Table Tools](https://ckeditor.com/cke4/addon/tabletools).
1657
+ * [#9765](https://dev.ckeditor.com/ticket/9765): Toolbar Collapse command documented incorrectly in the [Accessibility Instructions](https://ckeditor.com/cke4/addon/a11yhelp) dialog window.
1658
+ * [#9771](https://dev.ckeditor.com/ticket/9771): [WebKit & Opera] Fixed scrolling issues when pasting.
1659
+ * [#9787](https://dev.ckeditor.com/ticket/9787): [IE9] `onChange` is not fired for checkboxes in dialogs.
1660
+ * [#9842](https://dev.ckeditor.com/ticket/9842): [Firefox 17] When opening a toolbar menu for the first time and pressing the *Down Arrow* key, focus goes to the next toolbar button instead of the menu options.
1661
+ * [#9847](https://dev.ckeditor.com/ticket/9847): [Elements Path](https://ckeditor.com/cke4/addon/elementspath) should not be initialized in the inline editor.
1662
+ * [#9853](https://dev.ckeditor.com/ticket/9853): [`editor.addRemoveFormatFilter()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addRemoveFormatFilter) is exposed before it really works.
1663
+ * [#8893](https://dev.ckeditor.com/ticket/8893): Value of the [`pasteFromWordCleanupFile`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWordCleanupFile) configuration option is now taken from the instance configuration.
1664
+ * [#9693](https://dev.ckeditor.com/ticket/9693): Removed "Live Preview" checkbox from UI color picker.
1665
+
1666
+
1667
+ ## CKEditor 4.0
1668
+
1669
+ The first stable release of the new CKEditor 4 code line.
1670
+
1671
+ The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever
1672
+ possible. The list of relevant changes can be found in the [API Changes page of
1673
+ the CKEditor 4 documentation][1].
1674
+
1675
+ [1]: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_api_changes.html "API Changes"
wordpress-creation-kit-api/assets/js/ckeditor/LICENSE.md CHANGED
@@ -1,1420 +1,1420 @@
1
- Software License Agreement
2
- ==========================
3
-
4
- CKEditor - The text editor for Internet - https://ckeditor.com/
5
- Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
6
-
7
- Licensed under the terms of any of the following licenses at your
8
- choice:
9
-
10
- - GNU General Public License Version 2 or later (the "GPL")
11
- http://www.gnu.org/licenses/gpl.html
12
- (See Appendix A)
13
-
14
- - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
- http://www.gnu.org/licenses/lgpl.html
16
- (See Appendix B)
17
-
18
- - Mozilla Public License Version 1.1 or later (the "MPL")
19
- http://www.mozilla.org/MPL/MPL-1.1.html
20
- (See Appendix C)
21
-
22
- You are not required to, but if you want to explicitly declare the
23
- license you have chosen to be bound to when using, reproducing,
24
- modifying and distributing this software, just include a text file
25
- titled "legal.txt" in your version of this software, indicating your
26
- license choice. In any case, your choice will not restrict any
27
- recipient of your version of this software to use, reproduce, modify
28
- and distribute this software under any of the above licenses.
29
-
30
- Sources of Intellectual Property Included in CKEditor
31
- -----------------------------------------------------
32
-
33
- Where not otherwise indicated, all CKEditor content is authored by
34
- CKSource engineers and consists of CKSource-owned intellectual
35
- property. In some specific instances, CKEditor will incorporate work
36
- done by developers outside of CKSource with their express permission.
37
-
38
- The following libraries are included in CKEditor under the MIT license (see Appendix D):
39
-
40
- * CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2019, CKSource - Frederico Knabben.
41
- * PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca.
42
- * CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others.
43
-
44
- Parts of code taken from the following libraries are included in CKEditor under the MIT license (see Appendix D):
45
-
46
- * jQuery (inspired the domReady function, ckeditor_base.js) - Copyright (c) 2011 John Resig, http://jquery.com/
47
-
48
- The following libraries are included in CKEditor under the SIL Open Font License, Version 1.1 (see Appendix E):
49
-
50
- * Font Awesome (included in the toolbar configurator) - Copyright (C) 2012 by Dave Gandy.
51
-
52
- The following libraries are included in CKEditor under the BSD-3 License (see Appendix F):
53
-
54
- * highlight.js (included in the `codesnippet` plugin) - Copyright (c) 2006, Ivan Sagalaev.
55
- * YUI Library (included in the `uicolor` plugin) - Copyright (c) 2009, Yahoo! Inc.
56
-
57
-
58
- Trademarks
59
- ----------
60
-
61
- CKEditor is a trademark of CKSource - Frederico Knabben. All other brand
62
- and product names are trademarks, registered trademarks or service
63
- marks of their respective holders.
64
-
65
- ---
66
-
67
- Appendix A: The GPL License
68
- ---------------------------
69
-
70
- ```
71
- GNU GENERAL PUBLIC LICENSE
72
- Version 2, June 1991
73
-
74
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
75
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
76
- Everyone is permitted to copy and distribute verbatim copies
77
- of this license document, but changing it is not allowed.
78
-
79
- Preamble
80
-
81
- The licenses for most software are designed to take away your
82
- freedom to share and change it. By contrast, the GNU General Public
83
- License is intended to guarantee your freedom to share and change free
84
- software-to make sure the software is free for all its users. This
85
- General Public License applies to most of the Free Software
86
- Foundation's software and to any other program whose authors commit to
87
- using it. (Some other Free Software Foundation software is covered by
88
- the GNU Lesser General Public License instead.) You can apply it to
89
- your programs, too.
90
-
91
- When we speak of free software, we are referring to freedom, not
92
- price. Our General Public Licenses are designed to make sure that you
93
- have the freedom to distribute copies of free software (and charge for
94
- this service if you wish), that you receive source code or can get it
95
- if you want it, that you can change the software or use pieces of it
96
- in new free programs; and that you know you can do these things.
97
-
98
- To protect your rights, we need to make restrictions that forbid
99
- anyone to deny you these rights or to ask you to surrender the rights.
100
- These restrictions translate to certain responsibilities for you if you
101
- distribute copies of the software, or if you modify it.
102
-
103
- For example, if you distribute copies of such a program, whether
104
- gratis or for a fee, you must give the recipients all the rights that
105
- you have. You must make sure that they, too, receive or can get the
106
- source code. And you must show them these terms so they know their
107
- rights.
108
-
109
- We protect your rights with two steps: (1) copyright the software, and
110
- (2) offer you this license which gives you legal permission to copy,
111
- distribute and/or modify the software.
112
-
113
- Also, for each author's protection and ours, we want to make certain
114
- that everyone understands that there is no warranty for this free
115
- software. If the software is modified by someone else and passed on, we
116
- want its recipients to know that what they have is not the original, so
117
- that any problems introduced by others will not reflect on the original
118
- authors' reputations.
119
-
120
- Finally, any free program is threatened constantly by software
121
- patents. We wish to avoid the danger that redistributors of a free
122
- program will individually obtain patent licenses, in effect making the
123
- program proprietary. To prevent this, we have made it clear that any
124
- patent must be licensed for everyone's free use or not licensed at all.
125
-
126
- The precise terms and conditions for copying, distribution and
127
- modification follow.
128
-
129
- GNU GENERAL PUBLIC LICENSE
130
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
131
-
132
- 0. This License applies to any program or other work which contains
133
- a notice placed by the copyright holder saying it may be distributed
134
- under the terms of this General Public License. The "Program", below,
135
- refers to any such program or work, and a "work based on the Program"
136
- means either the Program or any derivative work under copyright law:
137
- that is to say, a work containing the Program or a portion of it,
138
- either verbatim or with modifications and/or translated into another
139
- language. (Hereinafter, translation is included without limitation in
140
- the term "modification".) Each licensee is addressed as "you".
141
-
142
- Activities other than copying, distribution and modification are not
143
- covered by this License; they are outside its scope. The act of
144
- running the Program is not restricted, and the output from the Program
145
- is covered only if its contents constitute a work based on the
146
- Program (independent of having been made by running the Program).
147
- Whether that is true depends on what the Program does.
148
-
149
- 1. You may copy and distribute verbatim copies of the Program's
150
- source code as you receive it, in any medium, provided that you
151
- conspicuously and appropriately publish on each copy an appropriate
152
- copyright notice and disclaimer of warranty; keep intact all the
153
- notices that refer to this License and to the absence of any warranty;
154
- and give any other recipients of the Program a copy of this License
155
- along with the Program.
156
-
157
- You may charge a fee for the physical act of transferring a copy, and
158
- you may at your option offer warranty protection in exchange for a fee.
159
-
160
- 2. You may modify your copy or copies of the Program or any portion
161
- of it, thus forming a work based on the Program, and copy and
162
- distribute such modifications or work under the terms of Section 1
163
- above, provided that you also meet all of these conditions:
164
-
165
- a) You must cause the modified files to carry prominent notices
166
- stating that you changed the files and the date of any change.
167
-
168
- b) You must cause any work that you distribute or publish, that in
169
- whole or in part contains or is derived from the Program or any
170
- part thereof, to be licensed as a whole at no charge to all third
171
- parties under the terms of this License.
172
-
173
- c) If the modified program normally reads commands interactively
174
- when run, you must cause it, when started running for such
175
- interactive use in the most ordinary way, to print or display an
176
- announcement including an appropriate copyright notice and a
177
- notice that there is no warranty (or else, saying that you provide
178
- a warranty) and that users may redistribute the program under
179
- these conditions, and telling the user how to view a copy of this
180
- License. (Exception: if the Program itself is interactive but
181
- does not normally print such an announcement, your work based on
182
- the Program is not required to print an announcement.)
183
-
184
- These requirements apply to the modified work as a whole. If
185
- identifiable sections of that work are not derived from the Program,
186
- and can be reasonably considered independent and separate works in
187
- themselves, then this License, and its terms, do not apply to those
188
- sections when you distribute them as separate works. But when you
189
- distribute the same sections as part of a whole which is a work based
190
- on the Program, the distribution of the whole must be on the terms of
191
- this License, whose permissions for other licensees extend to the
192
- entire whole, and thus to each and every part regardless of who wrote it.
193
-
194
- Thus, it is not the intent of this section to claim rights or contest
195
- your rights to work written entirely by you; rather, the intent is to
196
- exercise the right to control the distribution of derivative or
197
- collective works based on the Program.
198
-
199
- In addition, mere aggregation of another work not based on the Program
200
- with the Program (or with a work based on the Program) on a volume of
201
- a storage or distribution medium does not bring the other work under
202
- the scope of this License.
203
-
204
- 3. You may copy and distribute the Program (or a work based on it,
205
- under Section 2) in object code or executable form under the terms of
206
- Sections 1 and 2 above provided that you also do one of the following:
207
-
208
- a) Accompany it with the complete corresponding machine-readable
209
- source code, which must be distributed under the terms of Sections
210
- 1 and 2 above on a medium customarily used for software interchange; or,
211
-
212
- b) Accompany it with a written offer, valid for at least three
213
- years, to give any third party, for a charge no more than your
214
- cost of physically performing source distribution, a complete
215
- machine-readable copy of the corresponding source code, to be
216
- distributed under the terms of Sections 1 and 2 above on a medium
217
- customarily used for software interchange; or,
218
-
219
- c) Accompany it with the information you received as to the offer
220
- to distribute corresponding source code. (This alternative is
221
- allowed only for noncommercial distribution and only if you
222
- received the program in object code or executable form with such
223
- an offer, in accord with Subsection b above.)
224
-
225
- The source code for a work means the preferred form of the work for
226
- making modifications to it. For an executable work, complete source
227
- code means all the source code for all modules it contains, plus any
228
- associated interface definition files, plus the scripts used to
229
- control compilation and installation of the executable. However, as a
230
- special exception, the source code distributed need not include
231
- anything that is normally distributed (in either source or binary
232
- form) with the major components (compiler, kernel, and so on) of the
233
- operating system on which the executable runs, unless that component
234
- itself accompanies the executable.
235
-
236
- If distribution of executable or object code is made by offering
237
- access to copy from a designated place, then offering equivalent
238
- access to copy the source code from the same place counts as
239
- distribution of the source code, even though third parties are not
240
- compelled to copy the source along with the object code.
241
-
242
- 4. You may not copy, modify, sublicense, or distribute the Program
243
- except as expressly provided under this License. Any attempt
244
- otherwise to copy, modify, sublicense or distribute the Program is
245
- void, and will automatically terminate your rights under this License.
246
- However, parties who have received copies, or rights, from you under
247
- this License will not have their licenses terminated so long as such
248
- parties remain in full compliance.
249
-
250
- 5. You are not required to accept this License, since you have not
251
- signed it. However, nothing else grants you permission to modify or
252
- distribute the Program or its derivative works. These actions are
253
- prohibited by law if you do not accept this License. Therefore, by
254
- modifying or distributing the Program (or any work based on the
255
- Program), you indicate your acceptance of this License to do so, and
256
- all its terms and conditions for copying, distributing or modifying
257
- the Program or works based on it.
258
-
259
- 6. Each time you redistribute the Program (or any work based on the
260
- Program), the recipient automatically receives a license from the
261
- original licensor to copy, distribute or modify the Program subject to
262
- these terms and conditions. You may not impose any further
263
- restrictions on the recipients' exercise of the rights granted herein.
264
- You are not responsible for enforcing compliance by third parties to
265
- this License.
266
-
267
- 7. If, as a consequence of a court judgment or allegation of patent
268
- infringement or for any other reason (not limited to patent issues),
269
- conditions are imposed on you (whether by court order, agreement or
270
- otherwise) that contradict the conditions of this License, they do not
271
- excuse you from the conditions of this License. If you cannot
272
- distribute so as to satisfy simultaneously your obligations under this
273
- License and any other pertinent obligations, then as a consequence you
274
- may not distribute the Program at all. For example, if a patent
275
- license would not permit royalty-free redistribution of the Program by
276
- all those who receive copies directly or indirectly through you, then
277
- the only way you could satisfy both it and this License would be to
278
- refrain entirely from distribution of the Program.
279
-
280
- If any portion of this section is held invalid or unenforceable under
281
- any particular circumstance, the balance of the section is intended to
282
- apply and the section as a whole is intended to apply in other
283
- circumstances.
284
-
285
- It is not the purpose of this section to induce you to infringe any
286
- patents or other property right claims or to contest validity of any
287
- such claims; this section has the sole purpose of protecting the
288
- integrity of the free software distribution system, which is
289
- implemented by public license practices. Many people have made
290
- generous contributions to the wide range of software distributed
291
- through that system in reliance on consistent application of that
292
- system; it is up to the author/donor to decide if he or she is willing
293
- to distribute software through any other system and a licensee cannot
294
- impose that choice.
295
-
296
- This section is intended to make thoroughly clear what is believed to
297
- be a consequence of the rest of this License.
298
-
299
- 8. If the distribution and/or use of the Program is restricted in
300
- certain countries either by patents or by copyrighted interfaces, the
301
- original copyright holder who places the Program under this License
302
- may add an explicit geographical distribution limitation excluding
303
- those countries, so that distribution is permitted only in or among
304
- countries not thus excluded. In such case, this License incorporates
305
- the limitation as if written in the body of this License.
306
-
307
- 9. The Free Software Foundation may publish revised and/or new versions
308
- of the General Public License from time to time. Such new versions will
309
- be similar in spirit to the present version, but may differ in detail to
310
- address new problems or concerns.
311
-
312
- Each version is given a distinguishing version number. If the Program
313
- specifies a version number of this License which applies to it and "any
314
- later version", you have the option of following the terms and conditions
315
- either of that version or of any later version published by the Free
316
- Software Foundation. If the Program does not specify a version number of
317
- this License, you may choose any version ever published by the Free Software
318
- Foundation.
319
-
320
- 10. If you wish to incorporate parts of the Program into other free
321
- programs whose distribution conditions are different, write to the author
322
- to ask for permission. For software which is copyrighted by the Free
323
- Software Foundation, write to the Free Software Foundation; we sometimes
324
- make exceptions for this. Our decision will be guided by the two goals
325
- of preserving the free status of all derivatives of our free software and
326
- of promoting the sharing and reuse of software generally.
327
-
328
- NO WARRANTY
329
-
330
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
331
- FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
332
- OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
333
- PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
334
- OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
335
- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
336
- TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
337
- PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
338
- REPAIR OR CORRECTION.
339
-
340
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
341
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
342
- REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
343
- INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
344
- OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
345
- TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
346
- YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
347
- PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
348
- POSSIBILITY OF SUCH DAMAGES.
349
-
350
- END OF TERMS AND CONDITIONS
351
- ```
352
-
353
- Appendix B: The LGPL License
354
- ----------------------------
355
-
356
- ```
357
- GNU LESSER GENERAL PUBLIC LICENSE
358
- Version 2.1, February 1999
359
-
360
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
361
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
362
- Everyone is permitted to copy and distribute verbatim copies
363
- of this license document, but changing it is not allowed.
364
-
365
- [This is the first released version of the Lesser GPL. It also counts
366
- as the successor of the GNU Library Public License, version 2, hence
367
- the version number 2.1.]
368
-
369
- Preamble
370
-
371
- The licenses for most software are designed to take away your
372
- freedom to share and change it. By contrast, the GNU General Public
373
- Licenses are intended to guarantee your freedom to share and change
374
- free software-to make sure the software is free for all its users.
375
-
376
- This license, the Lesser General Public License, applies to some
377
- specially designated software packages-typically libraries-of the
378
- Free Software Foundation and other authors who decide to use it. You
379
- can use it too, but we suggest you first think carefully about whether
380
- this license or the ordinary General Public License is the better
381
- strategy to use in any particular case, based on the explanations below.
382
-
383
- When we speak of free software, we are referring to freedom of use,
384
- not price. Our General Public Licenses are designed to make sure that
385
- you have the freedom to distribute copies of free software (and charge
386
- for this service if you wish); that you receive source code or can get
387
- it if you want it; that you can change the software and use pieces of
388
- it in new free programs; and that you are informed that you can do
389
- these things.
390
-
391
- To protect your rights, we need to make restrictions that forbid
392
- distributors to deny you these rights or to ask you to surrender these
393
- rights. These restrictions translate to certain responsibilities for
394
- you if you distribute copies of the library or if you modify it.
395
-
396
- For example, if you distribute copies of the library, whether gratis
397
- or for a fee, you must give the recipients all the rights that we gave
398
- you. You must make sure that they, too, receive or can get the source
399
- code. If you link other code with the library, you must provide
400
- complete object files to the recipients, so that they can relink them
401
- with the library after making changes to the library and recompiling
402
- it. And you must show them these terms so they know their rights.
403
-
404
- We protect your rights with a two-step method: (1) we copyright the
405
- library, and (2) we offer you this license, which gives you legal
406
- permission to copy, distribute and/or modify the library.
407
-
408
- To protect each distributor, we want to make it very clear that
409
- there is no warranty for the free library. Also, if the library is
410
- modified by someone else and passed on, the recipients should know
411
- that what they have is not the original version, so that the original
412
- author's reputation will not be affected by problems that might be
413
- introduced by others.
414
-
415
- Finally, software patents pose a constant threat to the existence of
416
- any free program. We wish to make sure that a company cannot
417
- effectively restrict the users of a free program by obtaining a
418
- restrictive license from a patent holder. Therefore, we insist that
419
- any patent license obtained for a version of the library must be
420
- consistent with the full freedom of use specified in this license.
421
-
422
- Most GNU software, including some libraries, is covered by the
423
- ordinary GNU General Public License. This license, the GNU Lesser
424
- General Public License, applies to certain designated libraries, and
425
- is quite different from the ordinary General Public License. We use
426
- this license for certain libraries in order to permit linking those
427
- libraries into non-free programs.
428
-
429
- When a program is linked with a library, whether statically or using
430
- a shared library, the combination of the two is legally speaking a
431
- combined work, a derivative of the original library. The ordinary
432
- General Public License therefore permits such linking only if the
433
- entire combination fits its criteria of freedom. The Lesser General
434
- Public License permits more lax criteria for linking other code with
435
- the library.
436
-
437
- We call this license the "Lesser" General Public License because it
438
- does Less to protect the user's freedom than the ordinary General
439
- Public License. It also provides other free software developers Less
440
- of an advantage over competing non-free programs. These disadvantages
441
- are the reason we use the ordinary General Public License for many
442
- libraries. However, the Lesser license provides advantages in certain
443
- special circumstances.
444
-
445
- For example, on rare occasions, there may be a special need to
446
- encourage the widest possible use of a certain library, so that it becomes
447
- a de-facto standard. To achieve this, non-free programs must be
448
- allowed to use the library. A more frequent case is that a free
449
- library does the same job as widely used non-free libraries. In this
450
- case, there is little to gain by limiting the free library to free
451
- software only, so we use the Lesser General Public License.
452
-
453
- In other cases, permission to use a particular library in non-free
454
- programs enables a greater number of people to use a large body of
455
- free software. For example, permission to use the GNU C Library in
456
- non-free programs enables many more people to use the whole GNU
457
- operating system, as well as its variant, the GNU/Linux operating
458
- system.
459
-
460
- Although the Lesser General Public License is Less protective of the
461
- users' freedom, it does ensure that the user of a program that is
462
- linked with the Library has the freedom and the wherewithal to run
463
- that program using a modified version of the Library.
464
-
465
- The precise terms and conditions for copying, distribution and
466
- modification follow. Pay close attention to the difference between a
467
- "work based on the library" and a "work that uses the library". The
468
- former contains code derived from the library, whereas the latter must
469
- be combined with the library in order to run.
470
-
471
- GNU LESSER GENERAL PUBLIC LICENSE
472
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
473
-
474
- 0. This License Agreement applies to any software library or other
475
- program which contains a notice placed by the copyright holder or
476
- other authorized party saying it may be distributed under the terms of
477
- this Lesser General Public License (also called "this License").
478
- Each licensee is addressed as "you".
479
-
480
- A "library" means a collection of software functions and/or data
481
- prepared so as to be conveniently linked with application programs
482
- (which use some of those functions and data) to form executables.
483
-
484
- The "Library", below, refers to any such software library or work
485
- which has been distributed under these terms. A "work based on the
486
- Library" means either the Library or any derivative work under
487
- copyright law: that is to say, a work containing the Library or a
488
- portion of it, either verbatim or with modifications and/or translated
489
- straightforwardly into another language. (Hereinafter, translation is
490
- included without limitation in the term "modification".)
491
-
492
- "Source code" for a work means the preferred form of the work for
493
- making modifications to it. For a library, complete source code means
494
- all the source code for all modules it contains, plus any associated
495
- interface definition files, plus the scripts used to control compilation
496
- and installation of the library.
497
-
498
- Activities other than copying, distribution and modification are not
499
- covered by this License; they are outside its scope. The act of
500
- running a program using the Library is not restricted, and output from
501
- such a program is covered only if its contents constitute a work based
502
- on the Library (independent of the use of the Library in a tool for
503
- writing it). Whether that is true depends on what the Library does
504
- and what the program that uses the Library does.
505
-
506
- 1. You may copy and distribute verbatim copies of the Library's
507
- complete source code as you receive it, in any medium, provided that
508
- you conspicuously and appropriately publish on each copy an
509
- appropriate copyright notice and disclaimer of warranty; keep intact
510
- all the notices that refer to this License and to the absence of any
511
- warranty; and distribute a copy of this License along with the
512
- Library.
513
-
514
- You may charge a fee for the physical act of transferring a copy,
515
- and you may at your option offer warranty protection in exchange for a
516
- fee.
517
-
518
- 2. You may modify your copy or copies of the Library or any portion
519
- of it, thus forming a work based on the Library, and copy and
520
- distribute such modifications or work under the terms of Section 1
521
- above, provided that you also meet all of these conditions:
522
-
523
- a) The modified work must itself be a software library.
524
-
525
- b) You must cause the files modified to carry prominent notices
526
- stating that you changed the files and the date of any change.
527
-
528
- c) You must cause the whole of the work to be licensed at no
529
- charge to all third parties under the terms of this License.
530
-
531
- d) If a facility in the modified Library refers to a function or a
532
- table of data to be supplied by an application program that uses
533
- the facility, other than as an argument passed when the facility
534
- is invoked, then you must make a good faith effort to ensure that,
535
- in the event an application does not supply such function or
536
- table, the facility still operates, and performs whatever part of
537
- its purpose remains meaningful.
538
-
539
- (For example, a function in a library to compute square roots has
540
- a purpose that is entirely well-defined independent of the
541
- application. Therefore, Subsection 2d requires that any
542
- application-supplied function or table used by this function must
543
- be optional: if the application does not supply it, the square
544
- root function must still compute square roots.)
545
-
546
- These requirements apply to the modified work as a whole. If
547
- identifiable sections of that work are not derived from the Library,
548
- and can be reasonably considered independent and separate works in
549
- themselves, then this License, and its terms, do not apply to those
550
- sections when you distribute them as separate works. But when you
551
- distribute the same sections as part of a whole which is a work based
552
- on the Library, the distribution of the whole must be on the terms of
553
- this License, whose permissions for other licensees extend to the
554
- entire whole, and thus to each and every part regardless of who wrote
555
- it.
556
-
557
- Thus, it is not the intent of this section to claim rights or contest
558
- your rights to work written entirely by you; rather, the intent is to
559
- exercise the right to control the distribution of derivative or
560
- collective works based on the Library.
561
-
562
- In addition, mere aggregation of another work not based on the Library
563
- with the Library (or with a work based on the Library) on a volume of
564
- a storage or distribution medium does not bring the other work under
565
- the scope of this License.
566
-
567
- 3. You may opt to apply the terms of the ordinary GNU General Public
568
- License instead of this License to a given copy of the Library. To do
569
- this, you must alter all the notices that refer to this License, so
570
- that they refer to the ordinary GNU General Public License, version 2,
571
- instead of to this License. (If a newer version than version 2 of the
572
- ordinary GNU General Public License has appeared, then you can specify
573
- that version instead if you wish.) Do not make any other change in
574
- these notices.
575
-
576
- Once this change is made in a given copy, it is irreversible for
577
- that copy, so the ordinary GNU General Public License applies to all
578
- subsequent copies and derivative works made from that copy.
579
-
580
- This option is useful when you wish to copy part of the code of
581
- the Library into a program that is not a library.
582
-
583
- 4. You may copy and distribute the Library (or a portion or
584
- derivative of it, under Section 2) in object code or executable form
585
- under the terms of Sections 1 and 2 above provided that you accompany
586
- it with the complete corresponding machine-readable source code, which
587
- must be distributed under the terms of Sections 1 and 2 above on a
588
- medium customarily used for software interchange.
589
-
590
- If distribution of object code is made by offering access to copy
591
- from a designated place, then offering equivalent access to copy the
592
- source code from the same place satisfies the requirement to
593
- distribute the source code, even though third parties are not
594
- compelled to copy the source along with the object code.
595
-
596
- 5. A program that contains no derivative of any portion of the
597
- Library, but is designed to work with the Library by being compiled or
598
- linked with it, is called a "work that uses the Library". Such a
599
- work, in isolation, is not a derivative work of the Library, and
600
- therefore falls outside the scope of this License.
601
-
602
- However, linking a "work that uses the Library" with the Library
603
- creates an executable that is a derivative of the Library (because it
604
- contains portions of the Library), rather than a "work that uses the
605
- library". The executable is therefore covered by this License.
606
- Section 6 states terms for distribution of such executables.
607
-
608
- When a "work that uses the Library" uses material from a header file
609
- that is part of the Library, the object code for the work may be a
610
- derivative work of the Library even though the source code is not.
611
- Whether this is true is especially significant if the work can be
612
- linked without the Library, or if the work is itself a library. The
613
- threshold for this to be true is not precisely defined by law.
614
-
615
- If such an object file uses only numerical parameters, data
616
- structure layouts and accessors, and small macros and small inline
617
- functions (ten lines or less in length), then the use of the object
618
- file is unrestricted, regardless of whether it is legally a derivative
619
- work. (Executables containing this object code plus portions of the
620
- Library will still fall under Section 6.)
621
-
622
- Otherwise, if the work is a derivative of the Library, you may
623
- distribute the object code for the work under the terms of Section 6.
624
- Any executables containing that work also fall under Section 6,
625
- whether or not they are linked directly with the Library itself.
626
-
627
- 6. As an exception to the Sections above, you may also combine or
628
- link a "work that uses the Library" with the Library to produce a
629
- work containing portions of the Library, and distribute that work
630
- under terms of your choice, provided that the terms permit
631
- modification of the work for the customer's own use and reverse
632
- engineering for debugging such modifications.
633
-
634
- You must give prominent notice with each copy of the work that the
635
- Library is used in it and that the Library and its use are covered by
636
- this License. You must supply a copy of this License. If the work
637
- during execution displays copyright notices, you must include the
638
- copyright notice for the Library among them, as well as a reference
639
- directing the user to the copy of this License. Also, you must do one
640
- of these things:
641
-
642
- a) Accompany the work with the complete corresponding
643
- machine-readable source code for the Library including whatever
644
- changes were used in the work (which must be distributed under
645
- Sections 1 and 2 above); and, if the work is an executable linked
646
- with the Library, with the complete machine-readable "work that
647
- uses the Library", as object code and/or source code, so that the
648
- user can modify the Library and then relink to produce a modified
649
- executable containing the modified Library. (It is understood
650
- that the user who changes the contents of definitions files in the
651
- Library will not necessarily be able to recompile the application
652
- to use the modified definitions.)
653
-
654
- b) Use a suitable shared library mechanism for linking with the
655
- Library. A suitable mechanism is one that (1) uses at run time a
656
- copy of the library already present on the user's computer system,
657
- rather than copying library functions into the executable, and (2)
658
- will operate properly with a modified version of the library, if
659
- the user installs one, as long as the modified version is
660
- interface-compatible with the version that the work was made with.
661
-
662
- c) Accompany the work with a written offer, valid for at
663
- least three years, to give the same user the materials
664
- specified in Subsection 6a, above, for a charge no more
665
- than the cost of performing this distribution.
666
-
667
- d) If distribution of the work is made by offering access to copy
668
- from a designated place, offer equivalent access to copy the above
669
- specified materials from the same place.
670
-
671
- e) Verify that the user has already received a copy of these
672
- materials or that you have already sent this user a copy.
673
-
674
- For an executable, the required form of the "work that uses the
675
- Library" must include any data and utility programs needed for
676
- reproducing the executable from it. However, as a special exception,
677
- the materials to be distributed need not include anything that is
678
- normally distributed (in either source or binary form) with the major
679
- components (compiler, kernel, and so on) of the operating system on
680
- which the executable runs, unless that component itself accompanies
681
- the executable.
682
-
683
- It may happen that this requirement contradicts the license
684
- restrictions of other proprietary libraries that do not normally
685
- accompany the operating system. Such a contradiction means you cannot
686
- use both them and the Library together in an executable that you
687
- distribute.
688
-
689
- 7. You may place library facilities that are a work based on the
690
- Library side-by-side in a single library together with other library
691
- facilities not covered by this License, and distribute such a combined
692
- library, provided that the separate distribution of the work based on
693
- the Library and of the other library facilities is otherwise
694
- permitted, and provided that you do these two things:
695
-
696
- a) Accompany the combined library with a copy of the same work
697
- based on the Library, uncombined with any other library
698
- facilities. This must be distributed under the terms of the
699
- Sections above.
700
-
701
- b) Give prominent notice with the combined library of the fact
702
- that part of it is a work based on the Library, and explaining
703
- where to find the accompanying uncombined form of the same work.
704
-
705
- 8. You may not copy, modify, sublicense, link with, or distribute
706
- the Library except as expressly provided under this License. Any
707
- attempt otherwise to copy, modify, sublicense, link with, or
708
- distribute the Library is void, and will automatically terminate your
709
- rights under this License. However, parties who have received copies,
710
- or rights, from you under this License will not have their licenses
711
- terminated so long as such parties remain in full compliance.
712
-
713
- 9. You are not required to accept this License, since you have not
714
- signed it. However, nothing else grants you permission to modify or
715
- distribute the Library or its derivative works. These actions are
716
- prohibited by law if you do not accept this License. Therefore, by
717
- modifying or distributing the Library (or any work based on the
718
- Library), you indicate your acceptance of this License to do so, and
719
- all its terms and conditions for copying, distributing or modifying
720
- the Library or works based on it.
721
-
722
- 10. Each time you redistribute the Library (or any work based on the
723
- Library), the recipient automatically receives a license from the
724
- original licensor to copy, distribute, link with or modify the Library
725
- subject to these terms and conditions. You may not impose any further
726
- restrictions on the recipients' exercise of the rights granted herein.
727
- You are not responsible for enforcing compliance by third parties with
728
- this License.
729
-
730
- 11. If, as a consequence of a court judgment or allegation of patent
731
- infringement or for any other reason (not limited to patent issues),
732
- conditions are imposed on you (whether by court order, agreement or
733
- otherwise) that contradict the conditions of this License, they do not
734
- excuse you from the conditions of this License. If you cannot
735
- distribute so as to satisfy simultaneously your obligations under this
736
- License and any other pertinent obligations, then as a consequence you
737
- may not distribute the Library at all. For example, if a patent
738
- license would not permit royalty-free redistribution of the Library by
739
- all those who receive copies directly or indirectly through you, then
740
- the only way you could satisfy both it and this License would be to
741
- refrain entirely from distribution of the Library.
742
-
743
- If any portion of this section is held invalid or unenforceable under any
744
- particular circumstance, the balance of the section is intended to apply,
745
- and the section as a whole is intended to apply in other circumstances.
746
-
747
- It is not the purpose of this section to induce you to infringe any
748
- patents or other property right claims or to contest validity of any
749
- such claims; this section has the sole purpose of protecting the
750
- integrity of the free software distribution system which is
751
- implemented by public license practices. Many people have made
752
- generous contributions to the wide range of software distributed
753
- through that system in reliance on consistent application of that
754
- system; it is up to the author/donor to decide if he or she is willing
755
- to distribute software through any other system and a licensee cannot
756
- impose that choice.
757
-
758
- This section is intended to make thoroughly clear what is believed to
759
- be a consequence of the rest of this License.
760
-
761
- 12. If the distribution and/or use of the Library is restricted in
762
- certain countries either by patents or by copyrighted interfaces, the
763
- original copyright holder who places the Library under this License may add
764
- an explicit geographical distribution limitation excluding those countries,
765
- so that distribution is permitted only in or among countries not thus
766
- excluded. In such case, this License incorporates the limitation as if
767
- written in the body of this License.
768
-
769
- 13. The Free Software Foundation may publish revised and/or new
770
- versions of the Lesser General Public License from time to time.
771
- Such new versions will be similar in spirit to the present version,
772
- but may differ in detail to address new problems or concerns.
773
-
774
- Each version is given a distinguishing version number. If the Library
775
- specifies a version number of this License which applies to it and
776
- "any later version", you have the option of following the terms and
777
- conditions either of that version or of any later version published by
778
- the Free Software Foundation. If the Library does not specify a
779
- license version number, you may choose any version ever published by
780
- the Free Software Foundation.
781
-
782
- 14. If you wish to incorporate parts of the Library into other free
783
- programs whose distribution conditions are incompatible with these,
784
- write to the author to ask for permission. For software which is
785
- copyrighted by the Free Software Foundation, write to the Free
786
- Software Foundation; we sometimes make exceptions for this. Our
787
- decision will be guided by the two goals of preserving the free status
788
- of all derivatives of our free software and of promoting the sharing
789
- and reuse of software generally.
790
-
791
- NO WARRANTY
792
-
793
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
794
- WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
795
- EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
796
- OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
797
- KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
798
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
799
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
800
- LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
801
- THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
802
-
803
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
804
- WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
805
- AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
806
- FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
807
- CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
808
- LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
809
- RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
810
- FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
811
- SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
812
- DAMAGES.
813
-
814
- END OF TERMS AND CONDITIONS
815
- ```
816
-
817
- Appendix C: The MPL License
818
- ---------------------------
819
-
820
- ```
821
- MOZILLA PUBLIC LICENSE
822
- Version 1.1
823
-
824
- 1. Definitions.
825
-
826
- 1.0.1. "Commercial Use" means distribution or otherwise making the
827
- Covered Code available to a third party.
828
-
829
- 1.1. "Contributor" means each entity that creates or contributes to
830
- the creation of Modifications.
831
-
832
- 1.2. "Contributor Version" means the combination of the Original
833
- Code, prior Modifications used by a Contributor, and the Modifications
834
- made by that particular Contributor.
835
-
836
- 1.3. "Covered Code" means the Original Code or Modifications or the
837
- combination of the Original Code and Modifications, in each case
838
- including portions thereof.
839
-
840
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
841
- accepted in the software development community for the electronic
842
- transfer of data.
843
-
844
- 1.5. "Executable" means Covered Code in any form other than Source
845
- Code.
846
-
847
- 1.6. "Initial Developer" means the individual or entity identified
848
- as the Initial Developer in the Source Code notice required by Exhibit
849
- A.
850
-
851
- 1.7. "Larger Work" means a work which combines Covered Code or
852
- portions thereof with code not governed by the terms of this License.
853
-
854
- 1.8. "License" means this document.
855
-
856
- 1.8.1. "Licensable" means having the right to grant, to the maximum
857
- extent possible, whether at the time of the initial grant or
858
- subsequently acquired, any and all of the rights conveyed herein.
859
-
860
- 1.9. "Modifications" means any addition to or deletion from the
861
- substance or structure of either the Original Code or any previous
862
- Modifications. When Covered Code is released as a series of files, a
863
- Modification is:
864
- A. Any addition to or deletion from the contents of a file
865
- containing Original Code or previous Modifications.
866
-
867
- B. Any new file that contains any part of the Original Code or
868
- previous Modifications.
869
-
870
- 1.10. "Original Code" means Source Code of computer software code
871
- which is described in the Source Code notice required by Exhibit A as
872
- Original Code, and which, at the time of its release under this
873
- License is not already Covered Code governed by this License.
874
-
875
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
876
- hereafter acquired, including without limitation, method, process,
877
- and apparatus claims, in any patent Licensable by grantor.
878
-
879
- 1.11. "Source Code" means the preferred form of the Covered Code for
880
- making modifications to it, including all modules it contains, plus
881
- any associated interface definition files, scripts used to control
882
- compilation and installation of an Executable, or source code
883
- differential comparisons against either the Original Code or another
884
- well known, available Covered Code of the Contributor's choice. The
885
- Source Code can be in a compressed or archival form, provided the
886
- appropriate decompression or de-archiving software is widely available
887
- for no charge.
888
-
889
- 1.12. "You" (or "Your") means an individual or a legal entity
890
- exercising rights under, and complying with all of the terms of, this
891
- License or a future version of this License issued under Section 6.1.
892
- For legal entities, "You" includes any entity which controls, is
893
- controlled by, or is under common control with You. For purposes of
894
- this definition, "control" means (a) the power, direct or indirect,
895
- to cause the direction or management of such entity, whether by
896
- contract or otherwise, or (b) ownership of more than fifty percent
897
- (50%) of the outstanding shares or beneficial ownership of such
898
- entity.
899
-
900
- 2. Source Code License.
901
-
902
- 2.1. The Initial Developer Grant.
903
- The Initial Developer hereby grants You a world-wide, royalty-free,
904
- non-exclusive license, subject to third party intellectual property
905
- claims:
906
- (a) under intellectual property rights (other than patent or
907
- trademark) Licensable by Initial Developer to use, reproduce,
908
- modify, display, perform, sublicense and distribute the Original
909
- Code (or portions thereof) with or without Modifications, and/or
910
- as part of a Larger Work; and
911
-
912
- (b) under Patents Claims infringed by the making, using or
913
- selling of Original Code, to make, have made, use, practice,
914
- sell, and offer for sale, and/or otherwise dispose of the
915
- Original Code (or portions thereof).
916
-
917
- (c) the licenses granted in this Section 2.1(a) and (b) are
918
- effective on the date Initial Developer first distributes
919
- Original Code under the terms of this License.
920
-
921
- (d) Notwithstanding Section 2.1(b) above, no patent license is
922
- granted: 1) for code that You delete from the Original Code; 2)
923
- separate from the Original Code; or 3) for infringements caused
924
- by: i) the modification of the Original Code or ii) the
925
- combination of the Original Code with other software or devices.
926
-
927
- 2.2. Contributor Grant.
928
- Subject to third party intellectual property claims, each Contributor
929
- hereby grants You a world-wide, royalty-free, non-exclusive license
930
-
931
- (a) under intellectual property rights (other than patent or
932
- trademark) Licensable by Contributor, to use, reproduce, modify,
933
- display, perform, sublicense and distribute the Modifications
934
- created by such Contributor (or portions thereof) either on an
935
- unmodified basis, with other Modifications, as Covered Code
936
- and/or as part of a Larger Work; and
937
-
938
- (b) under Patent Claims infringed by the making, using, or
939
- selling of Modifications made by that Contributor either alone
940
- and/or in combination with its Contributor Version (or portions
941
- of such combination), to make, use, sell, offer for sale, have
942
- made, and/or otherwise dispose of: 1) Modifications made by that
943
- Contributor (or portions thereof); and 2) the combination of
944
- Modifications made by that Contributor with its Contributor
945
- Version (or portions of such combination).
946
-
947
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
948
- effective on the date Contributor first makes Commercial Use of
949
- the Covered Code.
950
-
951
- (d) Notwithstanding Section 2.2(b) above, no patent license is
952
- granted: 1) for any code that Contributor has deleted from the
953
- Contributor Version; 2) separate from the Contributor Version;
954
- 3) for infringements caused by: i) third party modifications of
955
- Contributor Version or ii) the combination of Modifications made
956
- by that Contributor with other software (except as part of the
957
- Contributor Version) or other devices; or 4) under Patent Claims
958
- infringed by Covered Code in the absence of Modifications made by
959
- that Contributor.
960
-
961
- 3. Distribution Obligations.
962
-
963
- 3.1. Application of License.
964
- The Modifications which You create or to which You contribute are
965
- governed by the terms of this License, including without limitation
966
- Section 2.2. The Source Code version of Covered Code may be
967
- distributed only under the terms of this License or a future version
968
- of this License released under Section 6.1, and You must include a
969
- copy of this License with every copy of the Source Code You
970
- distribute. You may not offer or impose any terms on any Source Code
971
- version that alters or restricts the applicable version of this
972
- License or the recipients' rights hereunder. However, You may include
973
- an additional document offering the additional rights described in
974
- Section 3.5.
975
-
976
- 3.2. Availability of Source Code.
977
- Any Modification which You create or to which You contribute must be
978
- made available in Source Code form under the terms of this License
979
- either on the same media as an Executable version or via an accepted
980
- Electronic Distribution Mechanism to anyone to whom you made an
981
- Executable version available; and if made available via Electronic
982
- Distribution Mechanism, must remain available for at least twelve (12)
983
- months after the date it initially became available, or at least six
984
- (6) months after a subsequent version of that particular Modification
985
- has been made available to such recipients. You are responsible for
986
- ensuring that the Source Code version remains available even if the
987
- Electronic Distribution Mechanism is maintained by a third party.
988
-
989
- 3.3. Description of Modifications.
990
- You must cause all Covered Code to which You contribute to contain a
991
- file documenting the changes You made to create that Covered Code and
992
- the date of any change. You must include a prominent statement that
993
- the Modification is derived, directly or indirectly, from Original
994
- Code provided by the Initial Developer and including the name of the
995
- Initial Developer in (a) the Source Code, and (b) in any notice in an
996
- Executable version or related documentation in which You describe the
997
- origin or ownership of the Covered Code.
998
-
999
- 3.4. Intellectual Property Matters
1000
- (a) Third Party Claims.
1001
- If Contributor has knowledge that a license under a third party's
1002
- intellectual property rights is required to exercise the rights
1003
- granted by such Contributor under Sections 2.1 or 2.2,
1004
- Contributor must include a text file with the Source Code
1005
- distribution titled "LEGAL" which describes the claim and the
1006
- party making the claim in sufficient detail that a recipient will
1007
- know whom to contact. If Contributor obtains such knowledge after
1008
- the Modification is made available as described in Section 3.2,
1009
- Contributor shall promptly modify the LEGAL file in all copies
1010
- Contributor makes available thereafter and shall take other steps
1011
- (such as notifying appropriate mailing lists or newsgroups)
1012
- reasonably calculated to inform those who received the Covered
1013
- Code that new knowledge has been obtained.
1014
-
1015
- (b) Contributor APIs.
1016
- If Contributor's Modifications include an application programming
1017
- interface and Contributor has knowledge of patent licenses which
1018
- are reasonably necessary to implement that API, Contributor must
1019
- also include this information in the LEGAL file.
1020
-
1021
- (c) Representations.
1022
- Contributor represents that, except as disclosed pursuant to
1023
- Section 3.4(a) above, Contributor believes that Contributor's
1024
- Modifications are Contributor's original creation(s) and/or
1025
- Contributor has sufficient rights to grant the rights conveyed by
1026
- this License.
1027
-
1028
- 3.5. Required Notices.
1029
- You must duplicate the notice in Exhibit A in each file of the Source
1030
- Code. If it is not possible to put such notice in a particular Source
1031
- Code file due to its structure, then You must include such notice in a
1032
- location (such as a relevant directory) where a user would be likely
1033
- to look for such a notice. If You created one or more Modification(s)
1034
- You may add your name as a Contributor to the notice described in
1035
- Exhibit A. You must also duplicate this License in any documentation
1036
- for the Source Code where You describe recipients' rights or ownership
1037
- rights relating to Covered Code. You may choose to offer, and to
1038
- charge a fee for, warranty, support, indemnity or liability
1039
- obligations to one or more recipients of Covered Code. However, You
1040
- may do so only on Your own behalf, and not on behalf of the Initial
1041
- Developer or any Contributor. You must make it absolutely clear than
1042
- any such warranty, support, indemnity or liability obligation is
1043
- offered by You alone, and You hereby agree to indemnify the Initial
1044
- Developer and every Contributor for any liability incurred by the
1045
- Initial Developer or such Contributor as a result of warranty,
1046
- support, indemnity or liability terms You offer.
1047
-
1048
- 3.6. Distribution of Executable Versions.
1049
- You may distribute Covered Code in Executable form only if the
1050
- requirements of Section 3.1-3.5 have been met for that Covered Code,
1051
- and if You include a notice stating that the Source Code version of
1052
- the Covered Code is available under the terms of this License,
1053
- including a description of how and where You have fulfilled the
1054
- obligations of Section 3.2. The notice must be conspicuously included
1055
- in any notice in an Executable version, related documentation or
1056
- collateral in which You describe recipients' rights relating to the
1057
- Covered Code. You may distribute the Executable version of Covered
1058
- Code or ownership rights under a license of Your choice, which may
1059
- contain terms different from this License, provided that You are in
1060
- compliance with the terms of this License and that the license for the
1061
- Executable version does not attempt to limit or alter the recipient's
1062
- rights in the Source Code version from the rights set forth in this
1063
- License. If You distribute the Executable version under a different
1064
- license You must make it absolutely clear that any terms which differ
1065
- from this License are offered by You alone, not by the Initial
1066
- Developer or any Contributor. You hereby agree to indemnify the
1067
- Initial Developer and every Contributor for any liability incurred by
1068
- the Initial Developer or such Contributor as a result of any such
1069
- terms You offer.
1070
-
1071
- 3.7. Larger Works.
1072
- You may create a Larger Work by combining Covered Code with other code
1073
- not governed by the terms of this License and distribute the Larger
1074
- Work as a single product. In such a case, You must make sure the
1075
- requirements of this License are fulfilled for the Covered Code.
1076
-
1077
- 4. Inability to Comply Due to Statute or Regulation.
1078
-
1079
- If it is impossible for You to comply with any of the terms of this
1080
- License with respect to some or all of the Covered Code due to
1081
- statute, judicial order, or regulation then You must: (a) comply with
1082
- the terms of this License to the maximum extent possible; and (b)
1083
- describe the limitations and the code they affect. Such description
1084
- must be included in the LEGAL file described in Section 3.4 and must
1085
- be included with all distributions of the Source Code. Except to the
1086
- extent prohibited by statute or regulation, such description must be
1087
- sufficiently detailed for a recipient of ordinary skill to be able to
1088
- understand it.
1089
-
1090
- 5. Application of this License.
1091
-
1092
- This License applies to code to which the Initial Developer has
1093
- attached the notice in Exhibit A and to related Covered Code.
1094
-
1095
- 6. Versions of the License.
1096
-
1097
- 6.1. New Versions.
1098
- Netscape Communications Corporation ("Netscape") may publish revised
1099
- and/or new versions of the License from time to time. Each version
1100
- will be given a distinguishing version number.
1101
-
1102
- 6.2. Effect of New Versions.
1103
- Once Covered Code has been published under a particular version of the
1104
- License, You may always continue to use it under the terms of that
1105
- version. You may also choose to use such Covered Code under the terms
1106
- of any subsequent version of the License published by Netscape. No one
1107
- other than Netscape has the right to modify the terms applicable to
1108
- Covered Code created under this License.
1109
-
1110
- 6.3. Derivative Works.
1111
- If You create or use a modified version of this License (which you may
1112
- only do in order to apply it to code which is not already Covered Code
1113
- governed by this License), You must (a) rename Your license so that
1114
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
1115
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
1116
- license (except to note that your license differs from this License)
1117
- and (b) otherwise make it clear that Your version of the license
1118
- contains terms which differ from the Mozilla Public License and
1119
- Netscape Public License. (Filling in the name of the Initial
1120
- Developer, Original Code or Contributor in the notice described in
1121
- Exhibit A shall not of themselves be deemed to be modifications of
1122
- this License.)
1123
-
1124
- 7. DISCLAIMER OF WARRANTY.
1125
-
1126
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
1127
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
1128
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
1129
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
1130
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
1131
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
1132
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
1133
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
1134
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
1135
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
1136
-
1137
- 8. TERMINATION.
1138
-
1139
- 8.1. This License and the rights granted hereunder will terminate
1140
- automatically if You fail to comply with terms herein and fail to cure
1141
- such breach within 30 days of becoming aware of the breach. All
1142
- sublicenses to the Covered Code which are properly granted shall
1143
- survive any termination of this License. Provisions which, by their
1144
- nature, must remain in effect beyond the termination of this License
1145
- shall survive.
1146
-
1147
- 8.2. If You initiate litigation by asserting a patent infringement
1148
- claim (excluding declatory judgment actions) against Initial Developer
1149
- or a Contributor (the Initial Developer or Contributor against whom
1150
- You file such action is referred to as "Participant") alleging that:
1151
-
1152
- (a) such Participant's Contributor Version directly or indirectly
1153
- infringes any patent, then any and all rights granted by such
1154
- Participant to You under Sections 2.1 and/or 2.2 of this License
1155
- shall, upon 60 days notice from Participant terminate prospectively,
1156
- unless if within 60 days after receipt of notice You either: (i)
1157
- agree in writing to pay Participant a mutually agreeable reasonable
1158
- royalty for Your past and future use of Modifications made by such
1159
- Participant, or (ii) withdraw Your litigation claim with respect to
1160
- the Contributor Version against such Participant. If within 60 days
1161
- of notice, a reasonable royalty and payment arrangement are not
1162
- mutually agreed upon in writing by the parties or the litigation claim
1163
- is not withdrawn, the rights granted by Participant to You under
1164
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
1165
- the 60 day notice period specified above.
1166
-
1167
- (b) any software, hardware, or device, other than such Participant's
1168
- Contributor Version, directly or indirectly infringes any patent, then
1169
- any rights granted to You by such Participant under Sections 2.1(b)
1170
- and 2.2(b) are revoked effective as of the date You first made, used,
1171
- sold, distributed, or had made, Modifications made by that
1172
- Participant.
1173
-
1174
- 8.3. If You assert a patent infringement claim against Participant
1175
- alleging that such Participant's Contributor Version directly or
1176
- indirectly infringes any patent where such claim is resolved (such as
1177
- by license or settlement) prior to the initiation of patent
1178
- infringement litigation, then the reasonable value of the licenses
1179
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
1180
- into account in determining the amount or value of any payment or
1181
- license.
1182
-
1183
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
1184
- all end user license agreements (excluding distributors and resellers)
1185
- which have been validly granted by You or any distributor hereunder
1186
- prior to termination shall survive termination.
1187
-
1188
- 9. LIMITATION OF LIABILITY.
1189
-
1190
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
1191
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
1192
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
1193
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
1194
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
1195
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
1196
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
1197
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
1198
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
1199
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
1200
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
1201
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
1202
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
1203
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
1204
-
1205
- 10. U.S. GOVERNMENT END USERS.
1206
-
1207
- The Covered Code is a "commercial item," as that term is defined in
1208
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
1209
- software" and "commercial computer software documentation," as such
1210
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
1211
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
1212
- all U.S. Government End Users acquire Covered Code with only those
1213
- rights set forth herein.
1214
-
1215
- 11. MISCELLANEOUS.
1216
-
1217
- This License represents the complete agreement concerning subject
1218
- matter hereof. If any provision of this License is held to be
1219
- unenforceable, such provision shall be reformed only to the extent
1220
- necessary to make it enforceable. This License shall be governed by
1221
- California law provisions (except to the extent applicable law, if
1222
- any, provides otherwise), excluding its conflict-of-law provisions.
1223
- With respect to disputes in which at least one party is a citizen of,
1224
- or an entity chartered or registered to do business in the United
1225
- States of America, any litigation relating to this License shall be
1226
- subject to the jurisdiction of the Federal Courts of the Northern
1227
- District of California, with venue lying in Santa Clara County,
1228
- California, with the losing party responsible for costs, including
1229
- without limitation, court costs and reasonable attorneys' fees and
1230
- expenses. The application of the United Nations Convention on
1231
- Contracts for the International Sale of Goods is expressly excluded.
1232
- Any law or regulation which provides that the language of a contract
1233
- shall be construed against the drafter shall not apply to this
1234
- License.
1235
-
1236
- 12. RESPONSIBILITY FOR CLAIMS.
1237
-
1238
- As between Initial Developer and the Contributors, each party is
1239
- responsible for claims and damages arising, directly or indirectly,
1240
- out of its utilization of rights under this License and You agree to
1241
- work with Initial Developer and Contributors to distribute such
1242
- responsibility on an equitable basis. Nothing herein is intended or
1243
- shall be deemed to constitute any admission of liability.
1244
-
1245
- 13. MULTIPLE-LICENSED CODE.
1246
-
1247
- Initial Developer may designate portions of the Covered Code as
1248
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
1249
- Developer permits you to utilize portions of the Covered Code under
1250
- Your choice of the NPL or the alternative licenses, if any, specified
1251
- by the Initial Developer in the file described in Exhibit A.
1252
-
1253
- EXHIBIT A -Mozilla Public License.
1254
-
1255
- ``The contents of this file are subject to the Mozilla Public License
1256
- Version 1.1 (the "License"); you may not use this file except in
1257
- compliance with the License. You may obtain a copy of the License at
1258
- http://www.mozilla.org/MPL/
1259
-
1260
- Software distributed under the License is distributed on an "AS IS"
1261
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
1262
- License for the specific language governing rights and limitations
1263
- under the License.
1264
-
1265
- The Original Code is ______________________________________.
1266
-
1267
- The Initial Developer of the Original Code is ________________________.
1268
- Portions created by ______________________ are Copyright (C) ______
1269
- _______________________. All Rights Reserved.
1270
-
1271
- Contributor(s): ______________________________________.
1272
-
1273
- Alternatively, the contents of this file may be used under the terms
1274
- of the _____ license (the "[___] License"), in which case the
1275
- provisions of [______] License are applicable instead of those
1276
- above. If you wish to allow use of your version of this file only
1277
- under the terms of the [____] License and not to allow others to use
1278
- your version of this file under the MPL, indicate your decision by
1279
- deleting the provisions above and replace them with the notice and
1280
- other provisions required by the [___] License. If you do not delete
1281
- the provisions above, a recipient may use your version of this file
1282
- under either the MPL or the [___] License."
1283
-
1284
- [NOTE: The text of this Exhibit A may differ slightly from the text of
1285
- the notices in the Source Code files of the Original Code. You should
1286
- use the text of this Exhibit A rather than the text found in the
1287
- Original Code Source Code for Your Modifications.]
1288
- ```
1289
-
1290
- Appendix D: The MIT License
1291
- ---------------------------
1292
-
1293
- ```
1294
- The MIT License (MIT)
1295
-
1296
- Permission is hereby granted, free of charge, to any person obtaining a copy
1297
- of this software and associated documentation files (the "Software"), to deal
1298
- in the Software without restriction, including without limitation the rights
1299
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1300
- copies of the Software, and to permit persons to whom the Software is
1301
- furnished to do so, subject to the following conditions:
1302
-
1303
- The above copyright notice and this permission notice shall be included in
1304
- all copies or substantial portions of the Software.
1305
-
1306
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1307
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1308
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1309
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1310
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1311
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1312
- THE SOFTWARE.
1313
- ```
1314
-
1315
- Appendix E: The SIL Open Font License Version 1.1
1316
- ---------------------------------------------
1317
-
1318
- ```
1319
- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
1320
- -----------------------------------------------------------
1321
-
1322
- PREAMBLE
1323
- The goals of the Open Font License (OFL) are to stimulate worldwide
1324
- development of collaborative font projects, to support the font creation
1325
- efforts of academic and linguistic communities, and to provide a free and
1326
- open framework in which fonts may be shared and improved in partnership
1327
- with others.
1328
-
1329
- The OFL allows the licensed fonts to be used, studied, modified and
1330
- redistributed freely as long as they are not sold by themselves. The
1331
- fonts, including any derivative works, can be bundled, embedded,
1332
- redistributed and/or sold with any software provided that any reserved
1333
- names are not used by derivative works. The fonts and derivatives,
1334
- however, cannot be released under any other type of license. The
1335
- requirement for fonts to remain under this license does not apply
1336
- to any document created using the fonts or their derivatives.
1337
-
1338
- DEFINITIONS
1339
- "Font Software" refers to the set of files released by the Copyright
1340
- Holder(s) under this license and clearly marked as such. This may
1341
- include source files, build scripts and documentation.
1342
-
1343
- "Reserved Font Name" refers to any names specified as such after the
1344
- copyright statement(s).
1345
-
1346
- "Original Version" refers to the collection of Font Software components as
1347
- distributed by the Copyright Holder(s).
1348
-
1349
- "Modified Version" refers to any derivative made by adding to, deleting,
1350
- or substituting -- in part or in whole -- any of the components of the
1351
- Original Version, by changing formats or by porting the Font Software to a
1352
- new environment.
1353
-
1354
- "Author" refers to any designer, engineer, programmer, technical
1355
- writer or other person who contributed to the Font Software.
1356
-
1357
- PERMISSION & CONDITIONS
1358
- Permission is hereby granted, free of charge, to any person obtaining
1359
- a copy of the Font Software, to use, study, copy, merge, embed, modify,
1360
- redistribute, and sell modified and unmodified copies of the Font
1361
- Software, subject to the following conditions:
1362
-
1363
- 1) Neither the Font Software nor any of its individual components,
1364
- in Original or Modified Versions, may be sold by itself.
1365
-
1366
- 2) Original or Modified Versions of the Font Software may be bundled,
1367
- redistributed and/or sold with any software, provided that each copy
1368
- contains the above copyright notice and this license. These can be
1369
- included either as stand-alone text files, human-readable headers or
1370
- in the appropriate machine-readable metadata fields within text or
1371
- binary files as long as those fields can be easily viewed by the user.
1372
-
1373
- 3) No Modified Version of the Font Software may use the Reserved Font
1374
- Name(s) unless explicit written permission is granted by the corresponding
1375
- Copyright Holder. This restriction only applies to the primary font name as
1376
- presented to the users.
1377
-
1378
- 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
1379
- Software shall not be used to promote, endorse or advertise any
1380
- Modified Version, except to acknowledge the contribution(s) of the
1381
- Copyright Holder(s) and the Author(s) or with their explicit written
1382
- permission.
1383
-
1384
- 5) The Font Software, modified or unmodified, in part or in whole,
1385
- must be distributed entirely under this license, and must not be
1386
- distributed under any other license. The requirement for fonts to
1387
- remain under this license does not apply to any document created
1388
- using the Font Software.
1389
-
1390
- TERMINATION
1391
- This license becomes null and void if any of the above conditions are
1392
- not met.
1393
-
1394
- DISCLAIMER
1395
- THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1396
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
1397
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
1398
- OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
1399
- COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
1400
- INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
1401
- DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1402
- FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
1403
- OTHER DEALINGS IN THE FONT SOFTWARE.
1404
- ```
1405
-
1406
- Appendix F: The BSD-3 License
1407
- -----------------------------
1408
-
1409
- ```
1410
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1411
-
1412
- 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
1413
-
1414
- 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
1415
-
1416
- 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
1417
-
1418
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1419
- ```
1420
-
1
+ Software License Agreement
2
+ ==========================
3
+
4
+ CKEditor - The text editor for Internet - https://ckeditor.com/
5
+ Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
6
+
7
+ Licensed under the terms of any of the following licenses at your
8
+ choice:
9
+
10
+ - GNU General Public License Version 2 or later (the "GPL")
11
+ http://www.gnu.org/licenses/gpl.html
12
+ (See Appendix A)
13
+
14
+ - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
+ http://www.gnu.org/licenses/lgpl.html
16
+ (See Appendix B)
17
+
18
+ - Mozilla Public License Version 1.1 or later (the "MPL")
19
+ http://www.mozilla.org/MPL/MPL-1.1.html
20
+ (See Appendix C)
21
+
22
+ You are not required to, but if you want to explicitly declare the
23
+ license you have chosen to be bound to when using, reproducing,
24
+ modifying and distributing this software, just include a text file
25
+ titled "legal.txt" in your version of this software, indicating your
26
+ license choice. In any case, your choice will not restrict any
27
+ recipient of your version of this software to use, reproduce, modify
28
+ and distribute this software under any of the above licenses.
29
+
30
+ Sources of Intellectual Property Included in CKEditor
31
+ -----------------------------------------------------
32
+
33
+ Where not otherwise indicated, all CKEditor content is authored by
34
+ CKSource engineers and consists of CKSource-owned intellectual
35
+ property. In some specific instances, CKEditor will incorporate work
36
+ done by developers outside of CKSource with their express permission.
37
+
38
+ The following libraries are included in CKEditor under the MIT license (see Appendix D):
39
+
40
+ * CKSource Samples Framework (included in the samples) - Copyright (c) 2014-2019, CKSource - Frederico Knabben.
41
+ * PicoModal (included in `samples/js/sf.js`) - Copyright (c) 2012 James Frasca.
42
+ * CodeMirror (included in the samples) - Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others.
43
+
44
+ Parts of code taken from the following libraries are included in CKEditor under the MIT license (see Appendix D):
45
+
46
+ * jQuery (inspired the domReady function, ckeditor_base.js) - Copyright (c) 2011 John Resig, http://jquery.com/
47
+
48
+ The following libraries are included in CKEditor under the SIL Open Font License, Version 1.1 (see Appendix E):
49
+
50
+ * Font Awesome (included in the toolbar configurator) - Copyright (C) 2012 by Dave Gandy.
51
+
52
+ The following libraries are included in CKEditor under the BSD-3 License (see Appendix F):
53
+
54
+ * highlight.js (included in the `codesnippet` plugin) - Copyright (c) 2006, Ivan Sagalaev.
55
+ * YUI Library (included in the `uicolor` plugin) - Copyright (c) 2009, Yahoo! Inc.
56
+
57
+
58
+ Trademarks
59
+ ----------
60
+
61
+ CKEditor is a trademark of CKSource - Frederico Knabben. All other brand
62
+ and product names are trademarks, registered trademarks or service
63
+ marks of their respective holders.
64
+
65
+ ---
66
+
67
+ Appendix A: The GPL License
68
+ ---------------------------
69
+
70
+ ```
71
+ GNU GENERAL PUBLIC LICENSE
72
+ Version 2, June 1991
73
+
74
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
75
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
76
+ Everyone is permitted to copy and distribute verbatim copies
77
+ of this license document, but changing it is not allowed.
78
+
79
+ Preamble
80
+
81
+ The licenses for most software are designed to take away your
82
+ freedom to share and change it. By contrast, the GNU General Public
83
+ License is intended to guarantee your freedom to share and change free
84
+ software-to make sure the software is free for all its users. This
85
+ General Public License applies to most of the Free Software
86
+ Foundation's software and to any other program whose authors commit to
87
+ using it. (Some other Free Software Foundation software is covered by
88
+ the GNU Lesser General Public License instead.) You can apply it to
89
+ your programs, too.
90
+
91
+ When we speak of free software, we are referring to freedom, not
92
+ price. Our General Public Licenses are designed to make sure that you
93
+ have the freedom to distribute copies of free software (and charge for
94
+ this service if you wish), that you receive source code or can get it
95
+ if you want it, that you can change the software or use pieces of it
96
+ in new free programs; and that you know you can do these things.
97
+
98
+ To protect your rights, we need to make restrictions that forbid
99
+ anyone to deny you these rights or to ask you to surrender the rights.
100
+ These restrictions translate to certain responsibilities for you if you
101
+ distribute copies of the software, or if you modify it.
102
+
103
+ For example, if you distribute copies of such a program, whether
104
+ gratis or for a fee, you must give the recipients all the rights that
105
+ you have. You must make sure that they, too, receive or can get the
106
+ source code. And you must show them these terms so they know their
107
+ rights.
108
+
109
+ We protect your rights with two steps: (1) copyright the software, and
110
+ (2) offer you this license which gives you legal permission to copy,
111
+ distribute and/or modify the software.
112
+
113
+ Also, for each author's protection and ours, we want to make certain
114
+ that everyone understands that there is no warranty for this free
115
+ software. If the software is modified by someone else and passed on, we
116
+ want its recipients to know that what they have is not the original, so
117
+ that any problems introduced by others will not reflect on the original
118
+ authors' reputations.
119
+
120
+ Finally, any free program is threatened constantly by software
121
+ patents. We wish to avoid the danger that redistributors of a free
122
+ program will individually obtain patent licenses, in effect making the
123
+ program proprietary. To prevent this, we have made it clear that any
124
+ patent must be licensed for everyone's free use or not licensed at all.
125
+
126
+ The precise terms and conditions for copying, distribution and
127
+ modification follow.
128
+
129
+ GNU GENERAL PUBLIC LICENSE
130
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
131
+
132
+ 0. This License applies to any program or other work which contains
133
+ a notice placed by the copyright holder saying it may be distributed
134
+ under the terms of this General Public License. The "Program", below,
135
+ refers to any such program or work, and a "work based on the Program"
136
+ means either the Program or any derivative work under copyright law:
137
+ that is to say, a work containing the Program or a portion of it,
138
+ either verbatim or with modifications and/or translated into another
139
+ language. (Hereinafter, translation is included without limitation in
140
+ the term "modification".) Each licensee is addressed as "you".
141
+
142
+ Activities other than copying, distribution and modification are not
143
+ covered by this License; they are outside its scope. The act of
144
+ running the Program is not restricted, and the output from the Program
145
+ is covered only if its contents constitute a work based on the
146
+ Program (independent of having been made by running the Program).
147
+ Whether that is true depends on what the Program does.
148
+
149
+ 1. You may copy and distribute verbatim copies of the Program's
150
+ source code as you receive it, in any medium, provided that you
151
+ conspicuously and appropriately publish on each copy an appropriate
152
+ copyright notice and disclaimer of warranty; keep intact all the
153
+ notices that refer to this License and to the absence of any warranty;
154
+ and give any other recipients of the Program a copy of this License
155
+ along with the Program.
156
+
157
+ You may charge a fee for the physical act of transferring a copy, and
158
+ you may at your option offer warranty protection in exchange for a fee.
159
+
160
+ 2. You may modify your copy or copies of the Program or any portion
161
+ of it, thus forming a work based on the Program, and copy and
162
+ distribute such modifications or work under the terms of Section 1
163
+ above, provided that you also meet all of these conditions:
164
+
165
+ a) You must cause the modified files to carry prominent notices
166
+ stating that you changed the files and the date of any change.
167
+
168
+ b) You must cause any work that you distribute or publish, that in
169
+ whole or in part contains or is derived from the Program or any
170
+ part thereof, to be licensed as a whole at no charge to all third
171
+ parties under the terms of this License.
172
+
173
+ c) If the modified program normally reads commands interactively
174
+ when run, you must cause it, when started running for such
175
+ interactive use in the most ordinary way, to print or display an
176
+ announcement including an appropriate copyright notice and a
177
+ notice that there is no warranty (or else, saying that you provide
178
+ a warranty) and that users may redistribute the program under
179
+ these conditions, and telling the user how to view a copy of this
180
+ License. (Exception: if the Program itself is interactive but
181
+ does not normally print such an announcement, your work based on
182
+ the Program is not required to print an announcement.)
183
+
184
+ These requirements apply to the modified work as a whole. If
185
+ identifiable sections of that work are not derived from the Program,
186
+ and can be reasonably considered independent and separate works in
187
+ themselves, then this License, and its terms, do not apply to those
188
+ sections when you distribute them as separate works. But when you
189
+ distribute the same sections as part of a whole which is a work based
190
+ on the Program, the distribution of the whole must be on the terms of
191
+ this License, whose permissions for other licensees extend to the
192
+ entire whole, and thus to each and every part regardless of who wrote it.
193
+
194
+ Thus, it is not the intent of this section to claim rights or contest
195
+ your rights to work written entirely by you; rather, the intent is to
196
+ exercise the right to control the distribution of derivative or
197
+ collective works based on the Program.
198
+
199
+ In addition, mere aggregation of another work not based on the Program
200
+ with the Program (or with a work based on the Program) on a volume of
201
+ a storage or distribution medium does not bring the other work under
202
+ the scope of this License.
203
+
204
+ 3. You may copy and distribute the Program (or a work based on it,
205
+ under Section 2) in object code or executable form under the terms of
206
+ Sections 1 and 2 above provided that you also do one of the following:
207
+
208
+ a) Accompany it with the complete corresponding machine-readable
209
+ source code, which must be distributed under the terms of Sections
210
+ 1 and 2 above on a medium customarily used for software interchange; or,
211
+
212
+ b) Accompany it with a written offer, valid for at least three
213
+ years, to give any third party, for a charge no more than your
214
+ cost of physically performing source distribution, a complete
215
+ machine-readable copy of the corresponding source code, to be
216
+ distributed under the terms of Sections 1 and 2 above on a medium
217
+ customarily used for software interchange; or,
218
+
219
+ c) Accompany it with the information you received as to the offer
220
+ to distribute corresponding source code. (This alternative is
221
+ allowed only for noncommercial distribution and only if you
222
+ received the program in object code or executable form with such
223
+ an offer, in accord with Subsection b above.)
224
+
225
+ The source code for a work means the preferred form of the work for
226
+ making modifications to it. For an executable work, complete source
227
+ code means all the source code for all modules it contains, plus any
228
+ associated interface definition files, plus the scripts used to
229
+ control compilation and installation of the executable. However, as a
230
+ special exception, the source code distributed need not include
231
+ anything that is normally distributed (in either source or binary
232
+ form) with the major components (compiler, kernel, and so on) of the
233
+ operating system on which the executable runs, unless that component
234
+ itself accompanies the executable.
235
+
236
+ If distribution of executable or object code is made by offering
237
+ access to copy from a designated place, then offering equivalent
238
+ access to copy the source code from the same place counts as
239
+ distribution of the source code, even though third parties are not
240
+ compelled to copy the source along with the object code.
241
+
242
+ 4. You may not copy, modify, sublicense, or distribute the Program
243
+ except as expressly provided under this License. Any attempt
244
+ otherwise to copy, modify, sublicense or distribute the Program is
245
+ void, and will automatically terminate your rights under this License.
246
+ However, parties who have received copies, or rights, from you under
247
+ this License will not have their licenses terminated so long as such
248
+ parties remain in full compliance.
249
+
250
+ 5. You are not required to accept this License, since you have not
251
+ signed it. However, nothing else grants you permission to modify or
252
+ distribute the Program or its derivative works. These actions are
253
+ prohibited by law if you do not accept this License. Therefore, by
254
+ modifying or distributing the Program (or any work based on the
255
+ Program), you indicate your acceptance of this License to do so, and
256
+ all its terms and conditions for copying, distributing or modifying
257
+ the Program or works based on it.
258
+
259
+ 6. Each time you redistribute the Program (or any work based on the
260
+ Program), the recipient automatically receives a license from the
261
+ original licensor to copy, distribute or modify the Program subject to
262
+ these terms and conditions. You may not impose any further
263
+ restrictions on the recipients' exercise of the rights granted herein.
264
+ You are not responsible for enforcing compliance by third parties to
265
+ this License.
266
+
267
+ 7. If, as a consequence of a court judgment or allegation of patent
268
+ infringement or for any other reason (not limited to patent issues),
269
+ conditions are imposed on you (whether by court order, agreement or
270
+ otherwise) that contradict the conditions of this License, they do not
271
+ excuse you from the conditions of this License. If you cannot
272
+ distribute so as to satisfy simultaneously your obligations under this
273
+ License and any other pertinent obligations, then as a consequence you
274
+ may not distribute the Program at all. For example, if a patent
275
+ license would not permit royalty-free redistribution of the Program by
276
+ all those who receive copies directly or indirectly through you, then
277
+ the only way you could satisfy both it and this License would be to
278
+ refrain entirely from distribution of the Program.
279
+
280
+ If any portion of this section is held invalid or unenforceable under
281
+ any particular circumstance, the balance of the section is intended to
282
+ apply and the section as a whole is intended to apply in other
283
+ circumstances.
284
+
285
+ It is not the purpose of this section to induce you to infringe any
286
+ patents or other property right claims or to contest validity of any
287
+ such claims; this section has the sole purpose of protecting the
288
+ integrity of the free software distribution system, which is
289
+ implemented by public license practices. Many people have made
290
+ generous contributions to the wide range of software distributed
291
+ through that system in reliance on consistent application of that
292
+ system; it is up to the author/donor to decide if he or she is willing
293
+ to distribute software through any other system and a licensee cannot
294
+ impose that choice.
295
+
296
+ This section is intended to make thoroughly clear what is believed to
297
+ be a consequence of the rest of this License.
298
+
299
+ 8. If the distribution and/or use of the Program is restricted in
300
+ certain countries either by patents or by copyrighted interfaces, the
301
+ original copyright holder who places the Program under this License
302
+ may add an explicit geographical distribution limitation excluding
303
+ those countries, so that distribution is permitted only in or among
304
+ countries not thus excluded. In such case, this License incorporates
305
+ the limitation as if written in the body of this License.
306
+
307
+ 9. The Free Software Foundation may publish revised and/or new versions
308
+ of the General Public License from time to time. Such new versions will
309
+ be similar in spirit to the present version, but may differ in detail to
310
+ address new problems or concerns.
311
+
312
+ Each version is given a distinguishing version number. If the Program
313
+ specifies a version number of this License which applies to it and "any
314
+ later version", you have the option of following the terms and conditions
315
+ either of that version or of any later version published by the Free
316
+ Software Foundation. If the Program does not specify a version number of
317
+ this License, you may choose any version ever published by the Free Software
318
+ Foundation.
319
+
320
+ 10. If you wish to incorporate parts of the Program into other free
321
+ programs whose distribution conditions are different, write to the author
322
+ to ask for permission. For software which is copyrighted by the Free
323
+ Software Foundation, write to the Free Software Foundation; we sometimes
324
+ make exceptions for this. Our decision will be guided by the two goals
325
+ of preserving the free status of all derivatives of our free software and
326
+ of promoting the sharing and reuse of software generally.
327
+
328
+ NO WARRANTY
329
+
330
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
331
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
332
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
333
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
334
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
335
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
336
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
337
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
338
+ REPAIR OR CORRECTION.
339
+
340
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
341
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
342
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
343
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
344
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
345
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
346
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
347
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
348
+ POSSIBILITY OF SUCH DAMAGES.
349
+
350
+ END OF TERMS AND CONDITIONS
351
+ ```
352
+
353
+ Appendix B: The LGPL License
354
+ ----------------------------
355
+
356
+ ```
357
+ GNU LESSER GENERAL PUBLIC LICENSE
358
+ Version 2.1, February 1999
359
+
360
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
361
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
362
+ Everyone is permitted to copy and distribute verbatim copies
363
+ of this license document, but changing it is not allowed.
364
+
365
+ [This is the first released version of the Lesser GPL. It also counts
366
+ as the successor of the GNU Library Public License, version 2, hence
367
+ the version number 2.1.]
368
+
369
+ Preamble
370
+
371
+ The licenses for most software are designed to take away your
372
+ freedom to share and change it. By contrast, the GNU General Public
373
+ Licenses are intended to guarantee your freedom to share and change
374
+ free software-to make sure the software is free for all its users.
375
+
376
+ This license, the Lesser General Public License, applies to some
377
+ specially designated software packages-typically libraries-of the
378
+ Free Software Foundation and other authors who decide to use it. You
379
+ can use it too, but we suggest you first think carefully about whether
380
+ this license or the ordinary General Public License is the better
381
+ strategy to use in any particular case, based on the explanations below.
382
+
383
+ When we speak of free software, we are referring to freedom of use,
384
+ not price. Our General Public Licenses are designed to make sure that
385
+ you have the freedom to distribute copies of free software (and charge
386
+ for this service if you wish); that you receive source code or can get
387
+ it if you want it; that you can change the software and use pieces of
388
+ it in new free programs; and that you are informed that you can do
389
+ these things.
390
+
391
+ To protect your rights, we need to make restrictions that forbid
392
+ distributors to deny you these rights or to ask you to surrender these
393
+ rights. These restrictions translate to certain responsibilities for
394
+ you if you distribute copies of the library or if you modify it.
395
+
396
+ For example, if you distribute copies of the library, whether gratis
397
+ or for a fee, you must give the recipients all the rights that we gave
398
+ you. You must make sure that they, too, receive or can get the source
399
+ code. If you link other code with the library, you must provide
400
+ complete object files to the recipients, so that they can relink them
401
+ with the library after making changes to the library and recompiling
402
+ it. And you must show them these terms so they know their rights.
403
+
404
+ We protect your rights with a two-step method: (1) we copyright the
405
+ library, and (2) we offer you this license, which gives you legal
406
+ permission to copy, distribute and/or modify the library.
407
+
408
+ To protect each distributor, we want to make it very clear that
409
+ there is no warranty for the free library. Also, if the library is
410
+ modified by someone else and passed on, the recipients should know
411
+ that what they have is not the original version, so that the original
412
+ author's reputation will not be affected by problems that might be
413
+ introduced by others.
414
+
415
+ Finally, software patents pose a constant threat to the existence of
416
+ any free program. We wish to make sure that a company cannot
417
+ effectively restrict the users of a free program by obtaining a
418
+ restrictive license from a patent holder. Therefore, we insist that
419
+ any patent license obtained for a version of the library must be
420
+ consistent with the full freedom of use specified in this license.
421
+
422
+ Most GNU software, including some libraries, is covered by the
423
+ ordinary GNU General Public License. This license, the GNU Lesser
424
+ General Public License, applies to certain designated libraries, and
425
+ is quite different from the ordinary General Public License. We use
426
+ this license for certain libraries in order to permit linking those
427
+ libraries into non-free programs.
428
+
429
+ When a program is linked with a library, whether statically or using
430
+ a shared library, the combination of the two is legally speaking a
431
+ combined work, a derivative of the original library. The ordinary
432
+ General Public License therefore permits such linking only if the
433
+ entire combination fits its criteria of freedom. The Lesser General
434
+ Public License permits more lax criteria for linking other code with
435
+ the library.
436
+
437
+ We call this license the "Lesser" General Public License because it
438
+ does Less to protect the user's freedom than the ordinary General
439
+ Public License. It also provides other free software developers Less
440
+ of an advantage over competing non-free programs. These disadvantages
441
+ are the reason we use the ordinary General Public License for many
442
+ libraries. However, the Lesser license provides advantages in certain
443
+ special circumstances.
444
+
445
+ For example, on rare occasions, there may be a special need to
446
+ encourage the widest possible use of a certain library, so that it becomes
447
+ a de-facto standard. To achieve this, non-free programs must be
448
+ allowed to use the library. A more frequent case is that a free
449
+ library does the same job as widely used non-free libraries. In this
450
+ case, there is little to gain by limiting the free library to free
451
+ software only, so we use the Lesser General Public License.
452
+
453
+ In other cases, permission to use a particular library in non-free
454
+ programs enables a greater number of people to use a large body of
455
+ free software. For example, permission to use the GNU C Library in
456
+ non-free programs enables many more people to use the whole GNU
457
+ operating system, as well as its variant, the GNU/Linux operating
458
+ system.
459
+
460
+ Although the Lesser General Public License is Less protective of the
461
+ users' freedom, it does ensure that the user of a program that is
462
+ linked with the Library has the freedom and the wherewithal to run
463
+ that program using a modified version of the Library.
464
+
465
+ The precise terms and conditions for copying, distribution and
466
+ modification follow. Pay close attention to the difference between a
467
+ "work based on the library" and a "work that uses the library". The
468
+ former contains code derived from the library, whereas the latter must
469
+ be combined with the library in order to run.
470
+
471
+ GNU LESSER GENERAL PUBLIC LICENSE
472
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
473
+
474
+ 0. This License Agreement applies to any software library or other
475
+ program which contains a notice placed by the copyright holder or
476
+ other authorized party saying it may be distributed under the terms of
477
+ this Lesser General Public License (also called "this License").
478
+ Each licensee is addressed as "you".
479
+
480
+ A "library" means a collection of software functions and/or data
481
+ prepared so as to be conveniently linked with application programs
482
+ (which use some of those functions and data) to form executables.
483
+
484
+ The "Library", below, refers to any such software library or work
485
+ which has been distributed under these terms. A "work based on the
486
+ Library" means either the Library or any derivative work under
487
+ copyright law: that is to say, a work containing the Library or a
488
+ portion of it, either verbatim or with modifications and/or translated
489
+ straightforwardly into another language. (Hereinafter, translation is
490
+ included without limitation in the term "modification".)
491
+
492
+ "Source code" for a work means the preferred form of the work for
493
+ making modifications to it. For a library, complete source code means
494
+ all the source code for all modules it contains, plus any associated
495
+ interface definition files, plus the scripts used to control compilation
496
+ and installation of the library.
497
+
498
+ Activities other than copying, distribution and modification are not
499
+ covered by this License; they are outside its scope. The act of
500
+ running a program using the Library is not restricted, and output from
501
+ such a program is covered only if its contents constitute a work based
502
+ on the Library (independent of the use of the Library in a tool for
503
+ writing it). Whether that is true depends on what the Library does
504
+ and what the program that uses the Library does.
505
+
506
+ 1. You may copy and distribute verbatim copies of the Library's
507
+ complete source code as you receive it, in any medium, provided that
508
+ you conspicuously and appropriately publish on each copy an
509
+ appropriate copyright notice and disclaimer of warranty; keep intact
510
+ all the notices that refer to this License and to the absence of any
511
+ warranty; and distribute a copy of this License along with the
512
+ Library.
513
+
514
+ You may charge a fee for the physical act of transferring a copy,
515
+ and you may at your option offer warranty protection in exchange for a
516
+ fee.
517
+
518
+ 2. You may modify your copy or copies of the Library or any portion
519
+ of it, thus forming a work based on the Library, and copy and
520
+ distribute such modifications or work under the terms of Section 1
521
+ above, provided that you also meet all of these conditions:
522
+
523
+ a) The modified work must itself be a software library.
524
+
525
+ b) You must cause the files modified to carry prominent notices
526
+ stating that you changed the files and the date of any change.
527
+
528
+ c) You must cause the whole of the work to be licensed at no
529
+ charge to all third parties under the terms of this License.
530
+
531
+ d) If a facility in the modified Library refers to a function or a
532
+ table of data to be supplied by an application program that uses
533
+ the facility, other than as an argument passed when the facility
534
+ is invoked, then you must make a good faith effort to ensure that,
535
+ in the event an application does not supply such function or
536
+ table, the facility still operates, and performs whatever part of
537
+ its purpose remains meaningful.
538
+
539
+ (For example, a function in a library to compute square roots has
540
+ a purpose that is entirely well-defined independent of the
541
+ application. Therefore, Subsection 2d requires that any
542
+ application-supplied function or table used by this function must
543
+ be optional: if the application does not supply it, the square
544
+ root function must still compute square roots.)
545
+
546
+ These requirements apply to the modified work as a whole. If
547
+ identifiable sections of that work are not derived from the Library,
548
+ and can be reasonably considered independent and separate works in
549
+ themselves, then this License, and its terms, do not apply to those
550
+ sections when you distribute them as separate works. But when you
551
+ distribute the same sections as part of a whole which is a work based
552
+ on the Library, the distribution of the whole must be on the terms of
553
+ this License, whose permissions for other licensees extend to the
554
+ entire whole, and thus to each and every part regardless of who wrote
555
+ it.
556
+
557
+ Thus, it is not the intent of this section to claim rights or contest
558
+ your rights to work written entirely by you; rather, the intent is to
559
+ exercise the right to control the distribution of derivative or
560
+ collective works based on the Library.
561
+
562
+ In addition, mere aggregation of another work not based on the Library
563
+ with the Library (or with a work based on the Library) on a volume of
564
+ a storage or distribution medium does not bring the other work under
565
+ the scope of this License.
566
+
567
+ 3. You may opt to apply the terms of the ordinary GNU General Public
568
+ License instead of this License to a given copy of the Library. To do
569
+ this, you must alter all the notices that refer to this License, so
570
+ that they refer to the ordinary GNU General Public License, version 2,
571
+ instead of to this License. (If a newer version than version 2 of the
572
+ ordinary GNU General Public License has appeared, then you can specify
573
+ that version instead if you wish.) Do not make any other change in
574
+ these notices.
575
+
576
+ Once this change is made in a given copy, it is irreversible for
577
+ that copy, so the ordinary GNU General Public License applies to all
578
+ subsequent copies and derivative works made from that copy.
579
+
580
+ This option is useful when you wish to copy part of the code of
581
+ the Library into a program that is not a library.
582
+
583
+ 4. You may copy and distribute the Library (or a portion or
584
+ derivative of it, under Section 2) in object code or executable form
585
+ under the terms of Sections 1 and 2 above provided that you accompany
586
+ it with the complete corresponding machine-readable source code, which
587
+ must be distributed under the terms of Sections 1 and 2 above on a
588
+ medium customarily used for software interchange.
589
+
590
+ If distribution of object code is made by offering access to copy
591
+ from a designated place, then offering equivalent access to copy the
592
+ source code from the same place satisfies the requirement to
593
+ distribute the source code, even though third parties are not
594
+ compelled to copy the source along with the object code.
595
+
596
+ 5. A program that contains no derivative of any portion of the
597
+ Library, but is designed to work with the Library by being compiled or
598
+ linked with it, is called a "work that uses the Library". Such a
599
+ work, in isolation, is not a derivative work of the Library, and
600
+ therefore falls outside the scope of this License.
601
+
602
+ However, linking a "work that uses the Library" with the Library
603
+ creates an executable that is a derivative of the Library (because it
604
+ contains portions of the Library), rather than a "work that uses the
605
+ library". The executable is therefore covered by this License.
606
+ Section 6 states terms for distribution of such executables.
607
+
608
+ When a "work that uses the Library" uses material from a header file
609
+ that is part of the Library, the object code for the work may be a
610
+ derivative work of the Library even though the source code is not.
611
+ Whether this is true is especially significant if the work can be
612
+ linked without the Library, or if the work is itself a library. The
613
+ threshold for this to be true is not precisely defined by law.
614
+
615
+ If such an object file uses only numerical parameters, data
616
+ structure layouts and accessors, and small macros and small inline
617
+ functions (ten lines or less in length), then the use of the object
618
+ file is unrestricted, regardless of whether it is legally a derivative
619
+ work. (Executables containing this object code plus portions of the
620
+ Library will still fall under Section 6.)
621
+
622
+ Otherwise, if the work is a derivative of the Library, you may
623
+ distribute the object code for the work under the terms of Section 6.
624
+ Any executables containing that work also fall under Section 6,
625
+ whether or not they are linked directly with the Library itself.
626
+
627
+ 6. As an exception to the Sections above, you may also combine or
628
+ link a "work that uses the Library" with the Library to produce a
629
+ work containing portions of the Library, and distribute that work
630
+ under terms of your choice, provided that the terms permit
631
+ modification of the work for the customer's own use and reverse
632
+ engineering for debugging such modifications.
633
+
634
+ You must give prominent notice with each copy of the work that the
635
+ Library is used in it and that the Library and its use are covered by
636
+ this License. You must supply a copy of this License. If the work
637
+ during execution displays copyright notices, you must include the
638
+ copyright notice for the Library among them, as well as a reference
639
+ directing the user to the copy of this License. Also, you must do one
640
+ of these things:
641
+
642
+ a) Accompany the work with the complete corresponding
643
+ machine-readable source code for the Library including whatever
644
+ changes were used in the work (which must be distributed under
645
+ Sections 1 and 2 above); and, if the work is an executable linked
646
+ with the Library, with the complete machine-readable "work that
647
+ uses the Library", as object code and/or source code, so that the
648
+ user can modify the Library and then relink to produce a modified
649
+ executable containing the modified Library. (It is understood
650
+ that the user who changes the contents of definitions files in the
651
+ Library will not necessarily be able to recompile the application
652
+ to use the modified definitions.)
653
+
654
+ b) Use a suitable shared library mechanism for linking with the
655
+ Library. A suitable mechanism is one that (1) uses at run time a
656
+ copy of the library already present on the user's computer system,
657
+ rather than copying library functions into the executable, and (2)
658
+ will operate properly with a modified version of the library, if
659
+ the user installs one, as long as the modified version is
660
+ interface-compatible with the version that the work was made with.
661
+
662
+ c) Accompany the work with a written offer, valid for at
663
+ least three years, to give the same user the materials
664
+ specified in Subsection 6a, above, for a charge no more
665
+ than the cost of performing this distribution.
666
+
667
+ d) If distribution of the work is made by offering access to copy
668
+ from a designated place, offer equivalent access to copy the above
669
+ specified materials from the same place.
670
+
671
+ e) Verify that the user has already received a copy of these
672
+ materials or that you have already sent this user a copy.
673
+
674
+ For an executable, the required form of the "work that uses the
675
+ Library" must include any data and utility programs needed for
676
+ reproducing the executable from it. However, as a special exception,
677
+ the materials to be distributed need not include anything that is
678
+ normally distributed (in either source or binary form) with the major
679
+ components (compiler, kernel, and so on) of the operating system on
680
+ which the executable runs, unless that component itself accompanies
681
+ the executable.
682
+
683
+ It may happen that this requirement contradicts the license
684
+ restrictions of other proprietary libraries that do not normally
685
+ accompany the operating system. Such a contradiction means you cannot
686
+ use both them and the Library together in an executable that you
687
+ distribute.
688
+
689
+ 7. You may place library facilities that are a work based on the
690
+ Library side-by-side in a single library together with other library
691
+ facilities not covered by this License, and distribute such a combined
692
+ library, provided that the separate distribution of the work based on
693
+ the Library and of the other library facilities is otherwise
694
+ permitted, and provided that you do these two things:
695
+
696
+ a) Accompany the combined library with a copy of the same work
697
+ based on the Library, uncombined with any other library
698
+ facilities. This must be distributed under the terms of the
699
+ Sections above.
700
+
701
+ b) Give prominent notice with the combined library of the fact
702
+ that part of it is a work based on the Library, and explaining
703
+ where to find the accompanying uncombined form of the same work.
704
+
705
+ 8. You may not copy, modify, sublicense, link with, or distribute
706
+ the Library except as expressly provided under this License. Any
707
+ attempt otherwise to copy, modify, sublicense, link with, or
708
+ distribute the Library is void, and will automatically terminate your
709
+ rights under this License. However, parties who have received copies,
710
+ or rights, from you under this License will not have their licenses
711
+ terminated so long as such parties remain in full compliance.
712
+
713
+ 9. You are not required to accept this License, since you have not
714
+ signed it. However, nothing else grants you permission to modify or
715
+ distribute the Library or its derivative works. These actions are
716
+ prohibited by law if you do not accept this License. Therefore, by
717
+ modifying or distributing the Library (or any work based on the
718
+ Library), you indicate your acceptance of this License to do so, and
719
+ all its terms and conditions for copying, distributing or modifying
720
+ the Library or works based on it.
721
+
722
+ 10. Each time you redistribute the Library (or any work based on the
723
+ Library), the recipient automatically receives a license from the
724
+ original licensor to copy, distribute, link with or modify the Library
725
+ subject to these terms and conditions. You may not impose any further
726
+ restrictions on the recipients' exercise of the rights granted herein.
727
+ You are not responsible for enforcing compliance by third parties with
728
+ this License.
729
+
730
+ 11. If, as a consequence of a court judgment or allegation of patent
731
+ infringement or for any other reason (not limited to patent issues),
732
+ conditions are imposed on you (whether by court order, agreement or
733
+ otherwise) that contradict the conditions of this License, they do not
734
+ excuse you from the conditions of this License. If you cannot
735
+ distribute so as to satisfy simultaneously your obligations under this
736
+ License and any other pertinent obligations, then as a consequence you
737
+ may not distribute the Library at all. For example, if a patent
738
+ license would not permit royalty-free redistribution of the Library by
739
+ all those who receive copies directly or indirectly through you, then
740
+ the only way you could satisfy both it and this License would be to
741
+ refrain entirely from distribution of the Library.
742
+
743
+ If any portion of this section is held invalid or unenforceable under any
744
+ particular circumstance, the balance of the section is intended to apply,
745
+ and the section as a whole is intended to apply in other circumstances.
746
+
747
+ It is not the purpose of this section to induce you to infringe any
748
+ patents or other property right claims or to contest validity of any
749
+ such claims; this section has the sole purpose of protecting the
750
+ integrity of the free software distribution system which is
751
+ implemented by public license practices. Many people have made
752
+ generous contributions to the wide range of software distributed
753
+ through that system in reliance on consistent application of that
754
+ system; it is up to the author/donor to decide if he or she is willing
755
+ to distribute software through any other system and a licensee cannot
756
+ impose that choice.
757
+
758
+ This section is intended to make thoroughly clear what is believed to
759
+ be a consequence of the rest of this License.
760
+
761
+ 12. If the distribution and/or use of the Library is restricted in
762
+ certain countries either by patents or by copyrighted interfaces, the
763
+ original copyright holder who places the Library under this License may add
764
+ an explicit geographical distribution limitation excluding those countries,
765
+ so that distribution is permitted only in or among countries not thus
766
+ excluded. In such case, this License incorporates the limitation as if
767
+ written in the body of this License.
768
+
769
+ 13. The Free Software Foundation may publish revised and/or new
770
+ versions of the Lesser General Public License from time to time.
771
+ Such new versions will be similar in spirit to the present version,
772
+ but may differ in detail to address new problems or concerns.
773
+
774
+ Each version is given a distinguishing version number. If the Library
775
+ specifies a version number of this License which applies to it and
776
+ "any later version", you have the option of following the terms and
777
+ conditions either of that version or of any later version published by
778
+ the Free Software Foundation. If the Library does not specify a
779
+ license version number, you may choose any version ever published by
780
+ the Free Software Foundation.
781
+
782
+ 14. If you wish to incorporate parts of the Library into other free
783
+ programs whose distribution conditions are incompatible with these,
784
+ write to the author to ask for permission. For software which is
785
+ copyrighted by the Free Software Foundation, write to the Free
786
+ Software Foundation; we sometimes make exceptions for this. Our
787
+ decision will be guided by the two goals of preserving the free status
788
+ of all derivatives of our free software and of promoting the sharing
789
+ and reuse of software generally.
790
+
791
+ NO WARRANTY
792
+
793
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
794
+ WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
795
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
796
+ OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
797
+ KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
798
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
799
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
800
+ LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
801
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
802
+
803
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
804
+ WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
805
+ AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
806
+ FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
807
+ CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
808
+ LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
809
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
810
+ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
811
+ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
812
+ DAMAGES.
813
+
814
+ END OF TERMS AND CONDITIONS
815
+ ```
816
+
817
+ Appendix C: The MPL License
818
+ ---------------------------
819
+
820
+ ```
821
+ MOZILLA PUBLIC LICENSE
822
+ Version 1.1
823
+
824
+ 1. Definitions.
825
+
826
+ 1.0.1. "Commercial Use" means distribution or otherwise making the
827
+ Covered Code available to a third party.
828
+
829
+ 1.1. "Contributor" means each entity that creates or contributes to
830
+ the creation of Modifications.
831
+
832
+ 1.2. "Contributor Version" means the combination of the Original
833
+ Code, prior Modifications used by a Contributor, and the Modifications
834
+ made by that particular Contributor.
835
+
836
+ 1.3. "Covered Code" means the Original Code or Modifications or the
837
+ combination of the Original Code and Modifications, in each case
838
+ including portions thereof.
839
+
840
+ 1.4. "Electronic Distribution Mechanism" means a mechanism generally
841
+ accepted in the software development community for the electronic
842
+ transfer of data.
843
+
844
+ 1.5. "Executable" means Covered Code in any form other than Source
845
+ Code.
846
+
847
+ 1.6. "Initial Developer" means the individual or entity identified
848
+ as the Initial Developer in the Source Code notice required by Exhibit
849
+ A.
850
+
851
+ 1.7. "Larger Work" means a work which combines Covered Code or
852
+ portions thereof with code not governed by the terms of this License.
853
+
854
+ 1.8. "License" means this document.
855
+
856
+ 1.8.1. "Licensable" means having the right to grant, to the maximum
857
+ extent possible, whether at the time of the initial grant or
858
+ subsequently acquired, any and all of the rights conveyed herein.
859
+
860
+ 1.9. "Modifications" means any addition to or deletion from the
861
+ substance or structure of either the Original Code or any previous
862
+ Modifications. When Covered Code is released as a series of files, a
863
+ Modification is:
864
+ A. Any addition to or deletion from the contents of a file
865
+ containing Original Code or previous Modifications.
866
+
867
+ B. Any new file that contains any part of the Original Code or
868
+ previous Modifications.
869
+
870
+ 1.10. "Original Code" means Source Code of computer software code
871
+ which is described in the Source Code notice required by Exhibit A as
872
+ Original Code, and which, at the time of its release under this
873
+ License is not already Covered Code governed by this License.
874
+
875
+ 1.10.1. "