Version Description
- 10/03/2016
- Added Custom Buttons API; other plugins/themes can add buttons to WP Edit.
- Added dismissable admin notice for Custom Buttons API (help spread the word!).
- Added plugin rating statistics to sidebar (Please rate and review).
- Added nonce fields for every form submission used to save database options.
- Moved plugins.php page styles to properly enqueue (used for notices).
Download this release
Release Info
Developer | josh401 |
Plugin | WP Edit |
Version | 4.0 |
Comparing to | |
See all releases |
Code changes from version 3.9 to 4.0
- css/admin.css +301 -236
- css/admin_plugins_page.css +51 -0
- images/banner.png +0 -0
- main.php +600 -157
- readme.txt +26 -15
css/admin.css
CHANGED
@@ -1,237 +1,302 @@
|
|
1 |
-
@media only screen and (min-width: 1200px) {
|
2 |
-
.sortable {
|
3 |
-
width: 100%;
|
4 |
-
}
|
5 |
-
.wrap {
|
6 |
-
float:left;width:70%;margin-right:3%;
|
7 |
-
}
|
8 |
-
#right_column_metaboxes {
|
9 |
-
width:25%;float:left;margin-top:98px;
|
10 |
-
}
|
11 |
-
}
|
12 |
-
@media only screen and (max-width: 1200px) {
|
13 |
-
#right_column_metaboxes .main_container {
|
14 |
-
margin-right:20px;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
.
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
}
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
background:
|
77 |
-
background: -
|
78 |
-
background: -
|
79 |
-
background: linear-gradient(
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
}
|
90 |
-
|
91 |
-
/*
|
92 |
-
Sortable rows
|
93 |
-
*/
|
94 |
-
#inside_button_hover > div > div:hover { /* Button hover */
|
95 |
-
border: 1px solid #FC94CC;
|
96 |
-
border-radius: 5px;
|
97 |
-
background: #FFF2F9;
|
98 |
-
-webkit-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
99 |
-
-moz-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
100 |
-
box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
101 |
-
}
|
102 |
-
.sortable { /* Button row containers */
|
103 |
-
width: 100%;
|
104 |
-
min-height: 42px;
|
105 |
-
margin-bottom: 10px;
|
106 |
-
overflow: auto;
|
107 |
-
border-radius: 5px;
|
108 |
-
-webkit-box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
109 |
-
-moz-box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
110 |
-
box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
111 |
-
}
|
112 |
-
.sortable > div { /* Main individual buttons */
|
113 |
-
float: left;
|
114 |
-
margin: 5px 0 5px 4px;
|
115 |
-
cursor: move;
|
116 |
-
border-radius: 5px;
|
117 |
-
padding: 5px;
|
118 |
-
width: auto;
|
119 |
-
min-width: 20px;
|
120 |
-
min-height: 20px;
|
121 |
-
}
|
122 |
-
.sortable > div > span {
|
123 |
-
text-align: center;
|
124 |
-
display: block;
|
125 |
-
}
|
126 |
-
.ui-sortable-helper { /* Pink highlight container */
|
127 |
-
width: auto !important;
|
128 |
-
height: auto !important;
|
129 |
-
padding-right: 0px !important;
|
130 |
-
border: 1px solid #FC94CC;
|
131 |
-
border-radius: 5px;
|
132 |
-
background: #FFF2F9;
|
133 |
-
-webkit-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
134 |
-
-moz-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
135 |
-
box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
136 |
-
}
|
137 |
-
.sortable_placeholder { /* Blue placeholder container */
|
138 |
-
background: #D9F7FC !important;
|
139 |
-
opacity: 0.8 !important;
|
140 |
-
border: 1px solid #72E7F9 !important;
|
141 |
-
border-radius: 5px !important;
|
142 |
-
-webkit-box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
143 |
-
-moz-box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
144 |
-
box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
145 |
-
}
|
146 |
-
.sortable_multiselect > div { /* Pink highlight container individual buttons */
|
147 |
-
float: left;
|
148 |
-
margin: 0 4px 0 0;
|
149 |
-
cursor: move;
|
150 |
-
border-radius: 5px;
|
151 |
-
padding: 5px;
|
152 |
-
width: auto;
|
153 |
-
min-width: 20px;
|
154 |
-
min-height: 20px;
|
155 |
-
position: relative;
|
156 |
-
}
|
157 |
-
.ui-state-active-button { /* Active buttons */
|
158 |
-
border: 1px solid #FC94CC !important;
|
159 |
-
border-radius: 5px;
|
160 |
-
background: #FFFED6 !important;
|
161 |
-
-webkit-box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
162 |
-
-moz-box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
163 |
-
box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
164 |
-
}
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
.
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
.
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
.
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
}
|
1 |
+
@media only screen and (min-width: 1200px) {
|
2 |
+
.sortable {
|
3 |
+
width: 100%;
|
4 |
+
}
|
5 |
+
.wrap {
|
6 |
+
float:left;width:70%;margin-right:3%;
|
7 |
+
}
|
8 |
+
#right_column_metaboxes {
|
9 |
+
width:25%;float:left;margin-top:98px;
|
10 |
+
}
|
11 |
+
}
|
12 |
+
@media only screen and (max-width: 1200px) {
|
13 |
+
#right_column_metaboxes .main_container {
|
14 |
+
margin-right:20px;
|
15 |
+
}
|
16 |
+
table.table {
|
17 |
+
width: 100% !important;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
.postbox {
|
22 |
+
min-width: 0px;
|
23 |
+
border-radius: 5px;
|
24 |
+
}
|
25 |
+
|
26 |
+
/*
|
27 |
+
Main navigation tabs
|
28 |
+
*/
|
29 |
+
h2 .nav-tab {
|
30 |
+
font-size: 13px;
|
31 |
+
}
|
32 |
+
|
33 |
+
|
34 |
+
/*
|
35 |
+
Buttons tooltips
|
36 |
+
*/
|
37 |
+
.ui-tooltip {
|
38 |
+
padding: 0 8px;
|
39 |
+
}
|
40 |
+
.data_tooltip_title {
|
41 |
+
margin: 5px 0;
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
/*
|
46 |
+
Metaboxes
|
47 |
+
*/
|
48 |
+
.metabox {
|
49 |
+
border: 1px solid black;
|
50 |
+
background-color: #FFF;
|
51 |
+
padding: 2px 5px;
|
52 |
+
}
|
53 |
+
.meta_title {
|
54 |
+
text-align: center;
|
55 |
+
font-weight: bold;
|
56 |
+
font-size: 16px;
|
57 |
+
padding: 5px 0;
|
58 |
+
border-bottom: 1px dotted #999;
|
59 |
+
}
|
60 |
+
.meta_body {
|
61 |
+
padding: 10px;
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/*
|
66 |
+
Main container
|
67 |
+
*/
|
68 |
+
.main_container {
|
69 |
+
|
70 |
+
background-color: white;
|
71 |
+
padding: 0 20px 20px 20px;
|
72 |
+
margin-bottom: 20px;
|
73 |
+
border: 1px solid #CCC;
|
74 |
+
border-radius: 0 0 10px 10px;
|
75 |
+
|
76 |
+
background: rgb(255,255,255);
|
77 |
+
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(247,249,255,1) 48%, rgba(217,222,224,1) 100%);
|
78 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(48%,rgba(247,249,255,1)), color-stop(100%,rgba(217,222,224,1)));
|
79 |
+
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(247,249,255,1) 48%,rgba(217,222,224,1) 100%);
|
80 |
+
background: -o-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(247,249,255,1) 48%,rgba(217,222,224,1) 100%);
|
81 |
+
background: -ms-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(247,249,255,1) 48%,rgba(217,222,224,1) 100%);
|
82 |
+
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(247,249,255,1) 48%,rgba(217,222,224,1) 100%);
|
83 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#d9dee0',GradientType=0 );
|
84 |
+
}
|
85 |
+
|
86 |
+
/* Pro Upgrade List */
|
87 |
+
.dashicons-yes {
|
88 |
+
color: deepskyblue;
|
89 |
+
}
|
90 |
+
|
91 |
+
/*
|
92 |
+
Sortable rows
|
93 |
+
*/
|
94 |
+
#inside_button_hover > div > div:hover { /* Button hover */
|
95 |
+
border: 1px solid #FC94CC;
|
96 |
+
border-radius: 5px;
|
97 |
+
background: #FFF2F9;
|
98 |
+
-webkit-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
99 |
+
-moz-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
100 |
+
box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
101 |
+
}
|
102 |
+
.sortable { /* Button row containers */
|
103 |
+
width: 100%;
|
104 |
+
min-height: 42px;
|
105 |
+
margin-bottom: 10px;
|
106 |
+
overflow: auto;
|
107 |
+
border-radius: 5px;
|
108 |
+
-webkit-box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
109 |
+
-moz-box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
110 |
+
box-shadow: 0px 0px 5px 0px rgba(204,204,204,1);
|
111 |
+
}
|
112 |
+
.sortable > div { /* Main individual buttons */
|
113 |
+
float: left;
|
114 |
+
margin: 5px 0 5px 4px;
|
115 |
+
cursor: move;
|
116 |
+
border-radius: 5px;
|
117 |
+
padding: 5px;
|
118 |
+
width: auto;
|
119 |
+
min-width: 20px;
|
120 |
+
min-height: 20px;
|
121 |
+
}
|
122 |
+
.sortable > div > span {
|
123 |
+
text-align: center;
|
124 |
+
display: block;
|
125 |
+
}
|
126 |
+
.ui-sortable-helper { /* Pink highlight container */
|
127 |
+
width: auto !important;
|
128 |
+
height: auto !important;
|
129 |
+
padding-right: 0px !important;
|
130 |
+
border: 1px solid #FC94CC;
|
131 |
+
border-radius: 5px;
|
132 |
+
background: #FFF2F9;
|
133 |
+
-webkit-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
134 |
+
-moz-box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
135 |
+
box-shadow: 0px 0px 20px 0px rgba(233,186,245,1);
|
136 |
+
}
|
137 |
+
.sortable_placeholder { /* Blue placeholder container */
|
138 |
+
background: #D9F7FC !important;
|
139 |
+
opacity: 0.8 !important;
|
140 |
+
border: 1px solid #72E7F9 !important;
|
141 |
+
border-radius: 5px !important;
|
142 |
+
-webkit-box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
143 |
+
-moz-box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
144 |
+
box-shadow: 0px 0px 20px 0px rgba(184,206,245,1) !important;
|
145 |
+
}
|
146 |
+
.sortable_multiselect > div { /* Pink highlight container individual buttons */
|
147 |
+
float: left;
|
148 |
+
margin: 0 4px 0 0;
|
149 |
+
cursor: move;
|
150 |
+
border-radius: 5px;
|
151 |
+
padding: 5px;
|
152 |
+
width: auto;
|
153 |
+
min-width: 20px;
|
154 |
+
min-height: 20px;
|
155 |
+
position: relative;
|
156 |
+
}
|
157 |
+
.ui-state-active-button { /* Active buttons */
|
158 |
+
border: 1px solid #FC94CC !important;
|
159 |
+
border-radius: 5px;
|
160 |
+
background: #FFFED6 !important;
|
161 |
+
-webkit-box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
162 |
+
-moz-box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
163 |
+
box-shadow: 0px 0px 10px 0px rgba(249, 247, 99,1);
|
164 |
+
}
|
165 |
+
|
166 |
+
/* New buttons class */
|
167 |
+
.new_button {
|
168 |
+
border: 1px solid #090;
|
169 |
+
border-radius: 5px;
|
170 |
+
background: #E3FBE9;
|
171 |
+
}
|
172 |
+
|
173 |
+
|
174 |
+
/*
|
175 |
+
Plugin ratings
|
176 |
+
*/
|
177 |
+
table.table_plugin_ratings tbody tr td:first-child {
|
178 |
+
width: 50px;
|
179 |
+
}
|
180 |
+
table.table_plugin_ratings tbody tr td {
|
181 |
+
padding: 0px;
|
182 |
+
border-top: none;
|
183 |
+
}
|
184 |
+
div.plugin_rating_container {
|
185 |
+
position: relative;
|
186 |
+
width: 100px;
|
187 |
+
height: 16px;
|
188 |
+
background-color: #DDD;
|
189 |
+
display: inline-block;
|
190 |
+
margin-right: 10px;
|
191 |
+
vertical-align: sub;
|
192 |
+
}
|
193 |
+
div.plugin_rating_percentage {
|
194 |
+
position: absolute;
|
195 |
+
height: 100%;
|
196 |
+
background-color: #008EC2;
|
197 |
+
display: inline-block;
|
198 |
+
}
|
199 |
+
|
200 |
+
.plugin_star_container {
|
201 |
+
position: relative;
|
202 |
+
vertical-align: middle;
|
203 |
+
display: inline-block;
|
204 |
+
color: #b1b1b1;
|
205 |
+
overflow: hidden;
|
206 |
+
}
|
207 |
+
.full-stars {
|
208 |
+
position: absolute;
|
209 |
+
left: 0;
|
210 |
+
top: 0;
|
211 |
+
white-space: nowrap;
|
212 |
+
overflow: hidden;
|
213 |
+
color: #fde16d;
|
214 |
+
}
|
215 |
+
.empty-stars:before, .full-stars:before {
|
216 |
+
content:"\2605\2605\2605\2605\2605";
|
217 |
+
font-size: 18pt;
|
218 |
+
}
|
219 |
+
.empty-stars:before {
|
220 |
+
-webkit-text-stroke: 1px #848484;
|
221 |
+
}
|
222 |
+
.full-stars:before {
|
223 |
+
-webkit-text-stroke: 1px orange;
|
224 |
+
}
|
225 |
+
@-moz-document url-prefix() {
|
226 |
+
.full-stars {
|
227 |
+
color: #ECBE24;
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
|
232 |
+
/*
|
233 |
+
Bootstrap Tables
|
234 |
+
*/
|
235 |
+
table {
|
236 |
+
max-width: 100%;
|
237 |
+
}
|
238 |
+
|
239 |
+
th {
|
240 |
+
text-align: left;
|
241 |
+
}
|
242 |
+
|
243 |
+
.table {
|
244 |
+
width: 100%;
|
245 |
+
margin-bottom: 20px;
|
246 |
+
}
|
247 |
+
|
248 |
+
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th,
|
249 |
+
.table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
250 |
+
padding: 8px;
|
251 |
+
line-height: 1.428571429;
|
252 |
+
vertical-align: top;
|
253 |
+
border-top: 1px solid #ddd;
|
254 |
+
}
|
255 |
+
|
256 |
+
.table > thead > tr > th {
|
257 |
+
vertical-align: bottom;
|
258 |
+
border-bottom: 2px solid #ddd;
|
259 |
+
font-size: 14px;
|
260 |
+
}
|
261 |
+
|
262 |
+
.table > caption + thead > tr:first-child > th, .table > colgroup + thead > tr:first-child > th, .table > thead:first-child > tr:first-child > th,
|
263 |
+
.table > caption + thead > tr:first-child > td, .table > colgroup + thead > tr:first-child > td, .table > thead:first-child > tr:first-child > td {
|
264 |
+
border-top: 0;
|
265 |
+
}
|
266 |
+
|
267 |
+
.table > tbody + tbody {
|
268 |
+
border-top: 2px solid #ddd;
|
269 |
+
}
|
270 |
+
|
271 |
+
.table .table {
|
272 |
+
background-color: #fff;
|
273 |
+
}
|
274 |
+
|
275 |
+
.table-condensed > thead > tr > th, .table-condensed > tbody > tr > th, .table-condensed > tfoot > tr > th,
|
276 |
+
.table-condensed > thead > tr > td, .table-condensed > tbody > tr > td, .table-condensed > tfoot > tr > td {
|
277 |
+
padding: 5px;
|
278 |
+
}
|
279 |
+
|
280 |
+
.table-bordered {
|
281 |
+
border: 1px solid #ddd;
|
282 |
+
}
|
283 |
+
|
284 |
+
.table-bordered > thead > tr > th, .table-bordered > tbody > tr > th, .table-bordered > tfoot > tr > th,
|
285 |
+
.table-bordered > thead > tr > td, .table-bordered > tbody > tr > td, .table-bordered > tfoot > tr > td {
|
286 |
+
border: 1px solid #ddd;
|
287 |
+
}
|
288 |
+
|
289 |
+
.table-bordered > thead > tr > th,
|
290 |
+
.table-bordered > thead > tr > td {
|
291 |
+
border-bottom-width: 2px;
|
292 |
+
}
|
293 |
+
|
294 |
+
.table-striped > tbody > tr:nth-child(odd) > td,
|
295 |
+
.table-striped > tbody > tr:nth-child(odd) > th {
|
296 |
+
background-color: #eaeaea;
|
297 |
+
}
|
298 |
+
|
299 |
+
.table-hover > tbody > tr:hover > td,
|
300 |
+
.table-hover > tbody > tr:hover > th {
|
301 |
+
background-color: #f5f5f5;
|
302 |
}
|
css/admin_plugins_page.css
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wpedit_plugins_page_banner {
|
2 |
+
border: 1px solid #d4d4d4;
|
3 |
+
margin: 12px 0;
|
4 |
+
background: #FFF;
|
5 |
+
position: relative;
|
6 |
+
overflow: hidden;
|
7 |
+
}
|
8 |
+
.wpedit_plugins_page_banner .text {
|
9 |
+
color: #000;
|
10 |
+
font-size: 15px;
|
11 |
+
line-height: 26px;
|
12 |
+
margin: 18px 18px 14px;
|
13 |
+
float: left;
|
14 |
+
width: auto;
|
15 |
+
max-width: 80%;
|
16 |
+
}
|
17 |
+
.wpedit_plugins_page_banner .text span {
|
18 |
+
font-size: 12px;
|
19 |
+
opacity: 0.7;
|
20 |
+
}
|
21 |
+
.wpedit_plugins_page_banner .button {
|
22 |
+
float: left;
|
23 |
+
border: none;
|
24 |
+
font-size: 14px;
|
25 |
+
margin: 18px 0 18px 16px;
|
26 |
+
padding: 12px 0;
|
27 |
+
color: #FFF;
|
28 |
+
text-shadow: none;
|
29 |
+
font-weight: bold;
|
30 |
+
background: #0074A2;
|
31 |
+
-moz-border-radius: 3px;
|
32 |
+
border-radius: 3px;
|
33 |
+
-webkit-border-radius: 3px;
|
34 |
+
text-decoration: none;
|
35 |
+
height: 50px;
|
36 |
+
text-align: center;
|
37 |
+
text-transform: uppercase;
|
38 |
+
width: 147px;
|
39 |
+
box-shadow: none;
|
40 |
+
line-height: 26px;
|
41 |
+
}
|
42 |
+
.wpedit_plugins_page_banner .button:hover,
|
43 |
+
.wpedit_plugins_page_banner .button:focus {
|
44 |
+
background: #0C0;
|
45 |
+
color: #FFF;
|
46 |
+
}
|
47 |
+
.wpedit_plugins_page_banner .close_icon {
|
48 |
+
float: right;
|
49 |
+
margin: 8px;
|
50 |
+
cursor: pointer;
|
51 |
+
}
|
images/banner.png
DELETED
Binary file
|
main.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WP Edit
|
4 |
* Plugin URI: https://wpeditpro.com
|
5 |
* Description: Ultimate WordPress Content Editing.
|
6 |
-
* Version:
|
7 |
* Author: Josh Lobe
|
8 |
* Author URI: https://wpeditpro.com
|
9 |
* License: GPL2
|
@@ -90,6 +90,11 @@ class wp_edit_class {
|
|
90 |
// Prepare global settings array (for future use)
|
91 |
public $wpedit_options_array = array();
|
92 |
|
|
|
|
|
|
|
|
|
|
|
93 |
/*
|
94 |
****************************************************************
|
95 |
Class construct
|
@@ -110,6 +115,8 @@ class wp_edit_class {
|
|
110 |
add_action('admin_init', array($this, 'process_settings_export')); // Export db options
|
111 |
add_action('admin_init', array($this, 'process_settings_import')); // Import db options
|
112 |
|
|
|
|
|
113 |
add_action('before_wp_tiny_mce', array($this, 'before_wp_tiny_mce')); // Add dashicons to tinymce
|
114 |
add_filter('tiny_mce_before_init', array($this, 'wp_edit_tiny_mce_before_init')); // Before tinymce initialization
|
115 |
add_action('init', array($this, 'wp_edit_init_tinymce')); // Tinymce initialization
|
@@ -121,6 +128,21 @@ class wp_edit_class {
|
|
121 |
$plugin_hook = "in_plugin_update_message-{$plugin_folder}/{$plugin_file}";
|
122 |
add_action($plugin_hook, array($this, 'wpedit_plugin_update_cb'), 10, 2); // Plugin update message
|
123 |
add_action('admin_footer', array($this, 'wpedit_plugin_update_js')); // Plugin update message javascript
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
}
|
125 |
|
126 |
/*
|
@@ -197,24 +219,28 @@ class wp_edit_class {
|
|
197 |
global $pagenow;
|
198 |
global $current_user;
|
199 |
$userid = $current_user->ID;
|
200 |
-
|
201 |
-
// Check if plugin install date is set in database
|
202 |
-
$opt_install = get_option('wp_edit_install');
|
203 |
-
if($opt_install === false) {
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
}
|
208 |
|
209 |
-
|
210 |
-
|
|
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
// If we are only on plugins.php admin page...
|
216 |
-
if($pagenow === 'plugins.php') {
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
// If the user clicked to dismiss notice...
|
219 |
if ( isset( $_GET['dismiss_wpedit_ug_notice'] ) && 'yes' == $_GET['dismiss_wpedit_ug_notice'] ) {
|
220 |
|
@@ -230,64 +256,6 @@ class wp_edit_class {
|
|
230 |
|
231 |
global $pagenow;
|
232 |
|
233 |
-
echo '<style type="text/css">';
|
234 |
-
echo '.wpedit_plugins_page_banner {
|
235 |
-
border: 1px solid #d4d4d4;
|
236 |
-
margin: 12px 0;
|
237 |
-
background: #FFF;
|
238 |
-
position: relative;
|
239 |
-
overflow: hidden
|
240 |
-
}
|
241 |
-
.wpedit_plugins_page_banner .text {
|
242 |
-
color: #000;
|
243 |
-
font-size: 15px;
|
244 |
-
line-height: 26px;
|
245 |
-
margin: 18px 18px 14px;
|
246 |
-
float: left;
|
247 |
-
width: auto;
|
248 |
-
max-width: 80%;
|
249 |
-
}
|
250 |
-
.wpedit_plugins_page_banner .text span {
|
251 |
-
font-size: 12px;
|
252 |
-
opacity: 0.7;
|
253 |
-
}
|
254 |
-
.wpedit_plugins_page_banner .button {
|
255 |
-
float: left;
|
256 |
-
border: none;
|
257 |
-
font-size: 14px;
|
258 |
-
margin: 18px 0 18px 16px;
|
259 |
-
padding: 12px 0;
|
260 |
-
color: #FFF;
|
261 |
-
text-shadow: none;
|
262 |
-
font-weight: bold;
|
263 |
-
background: #0074A2;
|
264 |
-
-moz-border-radius: 3px;
|
265 |
-
border-radius: 3px;
|
266 |
-
-webkit-border-radius: 3px;
|
267 |
-
text-decoration: none;
|
268 |
-
height: 50px;
|
269 |
-
text-align: center;
|
270 |
-
text-transform: uppercase;
|
271 |
-
width: 147px;
|
272 |
-
box-shadow: none;
|
273 |
-
line-height: 26px;
|
274 |
-
}
|
275 |
-
.wpedit_plugins_page_banner .button:hover,
|
276 |
-
.wpedit_plugins_page_banner .button:focus {
|
277 |
-
background: #222;
|
278 |
-
color: #FFF;
|
279 |
-
}
|
280 |
-
.wpedit_plugins_page_banner .icon {
|
281 |
-
float: right;
|
282 |
-
margin: 12px 8px 8px 0;
|
283 |
-
}
|
284 |
-
.wpedit_plugins_page_banner .close_icon {
|
285 |
-
float: right;
|
286 |
-
margin: 8px;
|
287 |
-
cursor: pointer;
|
288 |
-
}';
|
289 |
-
echo '</style>';
|
290 |
-
|
291 |
echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
292 |
<div class="wpedit_plugins_page_banner">
|
293 |
<a href="'.$pagenow.'?dismiss_wpedit_ug_notice=yes"><img class="close_icon" title="" src="'. plugins_url( 'images/close_banner.png', __FILE__ ) .'" alt=""/></a>
|
@@ -298,15 +266,56 @@ class wp_edit_class {
|
|
298 |
It\'s time to consider upgrading <strong>WP Edit</strong> to the <strong>PRO</strong> version.<br />
|
299 |
<span>Extend standard plugin functionality with new, enhanced options.</span>
|
300 |
</div>
|
301 |
-
<div class="icon">
|
302 |
-
<img title="" src="'.plugins_url( 'images/banner.png', __FILE__ ).'" alt=""/>
|
303 |
-
</div>
|
304 |
</div>
|
305 |
</div>';
|
306 |
}
|
307 |
add_action('admin_notices', 'wpedit_wordpress_version_notice');
|
308 |
}
|
309 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
}
|
311 |
}
|
312 |
|
@@ -371,6 +380,79 @@ class wp_edit_class {
|
|
371 |
<?php
|
372 |
settings_errors();
|
373 |
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'buttons';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
374 |
?>
|
375 |
|
376 |
<h2 class="nav-tab-wrapper">
|
@@ -412,6 +494,7 @@ class wp_edit_class {
|
|
412 |
|
413 |
<?php
|
414 |
$no_tooltips = false;
|
|
|
415 |
|
416 |
$options_global = get_option('wp_edit_global');
|
417 |
if(isset($options_global['disable_fancy_tooltips']) && $options_global['disable_fancy_tooltips'] === '1') {
|
@@ -419,6 +502,15 @@ class wp_edit_class {
|
|
419 |
$no_tooltips = true;
|
420 |
}
|
421 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
// Loop all buttons and create sortable divs
|
423 |
foreach ($options_buttons as $toolbar => $icons) {
|
424 |
|
@@ -450,146 +542,146 @@ class wp_edit_class {
|
|
450 |
$tooltip['title'] = 'Bold';
|
451 |
$tooltip['content'] = '<p>Apply <strong>bold</strong> to editor text.</p>';
|
452 |
}
|
453 |
-
if($icon === 'italic') {
|
454 |
$class = 'dashicons dashicons-editor-italic';
|
455 |
$title = 'Italic';
|
456 |
$tooltip['title'] = 'Italic';
|
457 |
$tooltip['content'] = '<p>Apply <em>italic</em> to editor text.</p>';
|
458 |
}
|
459 |
-
if($icon === 'strikethrough') {
|
460 |
$class = 'dashicons dashicons-editor-strikethrough';
|
461 |
$title = 'Strikethrough';
|
462 |
$tooltip['title'] = 'Strikethrough';
|
463 |
$tooltip['content'] = '<p>Apply <strike>strikethrough</strike> to editor text.</p>';
|
464 |
}
|
465 |
-
if($icon === 'bullist') {
|
466 |
$class = 'dashicons dashicons-editor-ul';
|
467 |
$title = 'Bullet List';
|
468 |
$tooltip['title'] = 'Bullet List';
|
469 |
$tooltip['content'] = '<p>Create a list of bulleted items.</p>';
|
470 |
}
|
471 |
-
if($icon === 'numlist') {
|
472 |
$class = 'dashicons dashicons-editor-ol';
|
473 |
$title = 'Numbered List';
|
474 |
$tooltip['title'] = 'Numbered List';
|
475 |
$tooltip['content'] = '<p>Create a list of numbered items.</p>';
|
476 |
}
|
477 |
-
if($icon === 'blockquote') {
|
478 |
$class = 'dashicons dashicons-editor-quote';
|
479 |
$title = 'Blockquote';
|
480 |
$tooltip['title'] = 'Blockquote';
|
481 |
$tooltip['content'] = '<p>Insert a block level quotation.</p>';
|
482 |
}
|
483 |
-
if($icon === 'hr') {
|
484 |
$class = 'dashicons dashicons-minus';
|
485 |
$title = 'Horizontal Rule';
|
486 |
$tooltip['title'] = 'Horizontal Rule';
|
487 |
$tooltip['content'] = '<p>Insert a horizontal rule.</p>';
|
488 |
}
|
489 |
-
if($icon === 'alignleft') {
|
490 |
$class = 'dashicons dashicons-editor-alignleft';
|
491 |
$title = 'Align Left';
|
492 |
$tooltip['title'] = 'Align Left';
|
493 |
$tooltip['content'] = '<p>Align editor content to the left side of the editor.</p>';
|
494 |
}
|
495 |
-
if($icon === 'aligncenter') {
|
496 |
$class = 'dashicons dashicons-editor-aligncenter';
|
497 |
$title = 'Align Center';
|
498 |
$tooltip['title'] = 'Align Center';
|
499 |
$tooltip['content'] = '<p>Align editor content to the center of the editor.</p>';
|
500 |
}
|
501 |
-
if($icon === 'alignright') {
|
502 |
$class = 'dashicons dashicons-editor-alignright';
|
503 |
$title = 'Align Right';
|
504 |
$tooltip['title'] = 'Align Right';
|
505 |
$tooltip['content'] = '<p>Align editor content to the right side of the editor.</p>';
|
506 |
}
|
507 |
-
if($icon === 'link') {
|
508 |
$class = 'dashicons dashicons-admin-links';
|
509 |
$title = 'Link';
|
510 |
$tooltip['title'] = 'Link';
|
511 |
$tooltip['content'] = '<p>Insert a link around currently selected content.</p>';
|
512 |
}
|
513 |
-
if($icon === 'unlink') {
|
514 |
$class = 'dashicons dashicons-editor-unlink';
|
515 |
$title = 'Unlink';
|
516 |
$tooltip['title'] = 'Unlink';
|
517 |
$tooltip['content'] = '<p>Remove the link around currently selected content.</p>';
|
518 |
}
|
519 |
-
if($icon === 'wp_more') {
|
520 |
$class = 'dashicons dashicons-editor-insertmore';
|
521 |
$title = 'More';
|
522 |
$tooltip['title'] = 'More';
|
523 |
$tooltip['content'] = '<p>Inserts the read_more() WordPress function; commonly used for excerpts.</p>';
|
524 |
}
|
525 |
|
526 |
-
if($icon === 'formatselect') {
|
527 |
$title = 'Format Select';
|
528 |
$text = 'Paragraph';
|
529 |
$tooltip['title'] = 'Paragraph';
|
530 |
$tooltip['content'] = '<p>Adds the Format Select dropdown button; used to select different styles.</p>';
|
531 |
}
|
532 |
-
if($icon === 'underline') {
|
533 |
$class = 'dashicons dashicons-editor-underline';
|
534 |
$title = 'Underline';
|
535 |
$tooltip['title'] = 'Underline';
|
536 |
$tooltip['content'] = '<p>Apply <u>underline</u> to editor text.</p>';
|
537 |
}
|
538 |
-
if($icon === 'alignjustify') {
|
539 |
$class = 'dashicons dashicons-editor-justify';
|
540 |
$title = 'Align Full';
|
541 |
$tooltip['title'] = 'Align Full';
|
542 |
$tooltip['content'] = '<p>Align selected content to full width of the page.</p>';
|
543 |
}
|
544 |
-
if($icon === 'forecolor') {
|
545 |
$class = 'dashicons dashicons-editor-textcolor';
|
546 |
$title = 'Foreground Color';
|
547 |
$tooltip['title'] = 'Foreground Color';
|
548 |
$tooltip['content'] = '<p>Change the foreground color of selected content; commonly used to change text color.</p>';
|
549 |
}
|
550 |
-
if($icon === 'pastetext') {
|
551 |
$class = 'dashicons dashicons-editor-paste-text';
|
552 |
$title = 'Paste Text';
|
553 |
$tooltip['title'] = 'Paste Text';
|
554 |
$tooltip['content'] = '<p>Paste content as plain text.</p>';
|
555 |
}
|
556 |
-
if($icon === 'removeformat') {
|
557 |
$class = 'dashicons dashicons-editor-removeformatting';
|
558 |
$title = 'Remove Format';
|
559 |
$tooltip['title'] = 'Remove Format';
|
560 |
$tooltip['content'] = '<p>Remove all current formatting from selected content.</p>';
|
561 |
}
|
562 |
-
if($icon === 'charmap') {
|
563 |
$class = 'dashicons dashicons-editor-customchar';
|
564 |
$title = 'Character Map';
|
565 |
$tooltip['title'] = 'Character Map';
|
566 |
$tooltip['content'] = '<p>Display a characted map used for inserting special characters.</p>';
|
567 |
}
|
568 |
-
if($icon === 'outdent') {
|
569 |
$class = 'dashicons dashicons-editor-outdent';
|
570 |
$title = 'Outdent';
|
571 |
$tooltip['title'] = 'Outdent';
|
572 |
$tooltip['content'] = '<p>Outdent selected content; primary used for paragraph elements.</p>';
|
573 |
}
|
574 |
-
if($icon === 'indent') {
|
575 |
$class = 'dashicons dashicons-editor-indent';
|
576 |
$title = 'Indent';
|
577 |
$tooltip['title'] = 'Indent';
|
578 |
$tooltip['content'] = '<p>Indent selected content; primary used for paragraph elements.</p>';
|
579 |
}
|
580 |
-
if($icon === 'undo') {
|
581 |
$class = 'dashicons dashicons-undo';
|
582 |
$title = 'Undo';
|
583 |
$tooltip['title'] = 'Undo';
|
584 |
$tooltip['content'] = '<p>Undo last editor action.</p>';
|
585 |
}
|
586 |
-
if($icon === 'redo') {
|
587 |
$class = 'dashicons dashicons-redo';
|
588 |
$title = 'Redo';
|
589 |
$tooltip['title'] = 'Redo';
|
590 |
$tooltip['content'] = '<p>Redo last editor action.</p>';
|
591 |
}
|
592 |
-
if($icon === 'wp_help') {
|
593 |
$class = 'dashicons dashicons-editor-help';
|
594 |
$title = 'Help';
|
595 |
$tooltip['title'] = 'Help';
|
@@ -597,262 +689,379 @@ class wp_edit_class {
|
|
597 |
}
|
598 |
|
599 |
// WP Buttons not included by default
|
600 |
-
if($icon === 'fontselect') {
|
601 |
$title = 'Font Select';
|
602 |
$text = 'Font Family';
|
603 |
$tooltip['title'] = 'Font Select';
|
604 |
$tooltip['content'] = '<p>Apply various fonts to the editor selection.</p><p>Also displays fonts from Google Fonts options (if activated).</p>';
|
605 |
}
|
606 |
-
if($icon === 'fontsizeselect') {
|
607 |
$title = 'Font Size Select';
|
608 |
$text = 'Font Sizes';
|
609 |
$tooltip['title'] = 'Font Size Select';
|
610 |
$tooltip['content'] = '<p>Apply various font sizes to the editor selection.</p><p>Default values can be switched from "pt" to "px" via the Editor tab.</p>';
|
611 |
}
|
612 |
-
if($icon === 'styleselect') {
|
613 |
$title = 'Formats';
|
614 |
$text = 'Formats';
|
615 |
$tooltip['title'] = 'Formats';
|
616 |
$tooltip['content'] = '<p>Displays quick access to formats like "Headings", "Inline", "Blocks" and "Alignment".</p><p>Any custom styles created (Styles Tab) will also be shown here.</p>';
|
617 |
}
|
618 |
-
if($icon === 'backcolor') {
|
619 |
$title = 'Background Color Picker';
|
620 |
$text = '<i class="mce-ico mce-i-backcolor"></i>';
|
621 |
$tooltip['title'] = 'Background Color Picker';
|
622 |
$tooltip['content'] = '<p>Change the background color of selected content; commonly used for high-lighting text.</p>';
|
623 |
}
|
624 |
-
if($icon === 'media') {
|
625 |
$class = 'dashicons dashicons-format-video';
|
626 |
$title = 'Media';
|
627 |
$tooltip['title'] = 'Media';
|
628 |
$tooltip['content'] = '<p>Insert media from an external resource (by link); or embed media content into editor.</p>';
|
629 |
}
|
630 |
-
if($icon === 'rtl') {
|
631 |
$title = 'Text Direction Right to Left';
|
632 |
$text = '<i class="mce-ico mce-i-rtl"></i>';
|
633 |
$tooltip['title'] = 'Text Direction Right to Left';
|
634 |
$tooltip['content'] = '<p>Forces the text direction from right to left on selected block element.</p>';
|
635 |
}
|
636 |
-
if($icon === 'ltr') {
|
637 |
$title = 'Text Direction Left to Right';
|
638 |
$text = '<i class="mce-ico mce-i-ltr"></i>';
|
639 |
$tooltip['title'] = 'Text Direction Left to Right';
|
640 |
$tooltip['content'] = '<p>Forces the text direction from left to right on selected block element.</p>';
|
641 |
}
|
642 |
-
if($icon === 'table') {
|
643 |
$title = 'Tables';
|
644 |
$text = '<i class="mce-ico mce-i-table"></i>';
|
645 |
$tooltip['title'] = 'Tables';
|
646 |
$tooltip['content'] = '<p>Insert, edit and modify html tables.</p>';
|
647 |
}
|
648 |
-
if($icon === 'anchor') {
|
649 |
$title = 'Anchor';
|
650 |
$text = '<i class="mce-ico mce-i-anchor"></i>';
|
651 |
$tooltip['title'] = 'Anchor';
|
652 |
$tooltip['content'] = '<p>Create an anchor link on the page.</p>';
|
653 |
}
|
654 |
-
if($icon === 'code') {
|
655 |
$title = 'HTML Code';
|
656 |
$text = '<i class="mce-ico mce-i-code"></i>';
|
657 |
$tooltip['title'] = 'HTML Code';
|
658 |
$tooltip['content'] = '<p>Displays the html code of the editor content; in a popup window.</p><p>This can be helpful when editing code is necessary, but switching editor views is undesirable.</p><p>Also, the "Code Magic" button provides a much better interface.</p>';
|
659 |
}
|
660 |
-
if($icon === 'emoticons') {
|
661 |
$title = 'Emoticons';
|
662 |
$text = '<i class="mce-ico mce-i-emoticons"></i>';
|
663 |
$tooltip['title'] = 'Emoticons';
|
664 |
$tooltip['content'] = '<p>Opens an overlay window with access to common emoticons.</p>';
|
665 |
}
|
666 |
-
if($icon === 'inserttime') {
|
667 |
$title = 'Insert Date Time';
|
668 |
$text = '<i class="mce-ico mce-i-insertdatetime"></i>';
|
669 |
$tooltip['title'] = 'Insert Date Time';
|
670 |
$tooltip['content'] = '<p>Inserts the current date and time into the content editor.</p><p>The date format can be adjusted using the "Configuration" tab.</p>';
|
671 |
}
|
672 |
-
if($icon === 'wp_page') {
|
673 |
$title = 'Page Break';
|
674 |
$text = '<i class="mce-ico mce-i-pagebreak"></i>';
|
675 |
$tooltip['title'] = 'Page Break';
|
676 |
$tooltip['content'] = '<p>Inserts a page break; which can created "paged" sections of the content.</p>';
|
677 |
}
|
678 |
-
if($icon === 'preview') {
|
679 |
$title = 'Preview';
|
680 |
$text = '<i class="mce-ico mce-i-preview"></i>';
|
681 |
$tooltip['title'] = 'Preview';
|
682 |
$tooltip['content'] = '<p>A quick preview of the editor content.</p>';
|
683 |
}
|
684 |
-
if($icon === 'print') {
|
685 |
$title = 'Print';
|
686 |
$text = '<i class="mce-ico mce-i-print"></i>';
|
687 |
$tooltip['title'] = 'Print';
|
688 |
$tooltip['content'] = '<p>Print the editor content directly to a printer.</p>';
|
689 |
}
|
690 |
-
if($icon === 'searchreplace') {
|
691 |
$title = 'Search and Replace';
|
692 |
$text = '<i class="mce-ico mce-i-searchreplace"></i>';
|
693 |
$tooltip['title'] = 'Search and Replace';
|
694 |
$tooltip['content'] = '<p>Search and/or replace the editor content with specific characters.</p>';
|
695 |
}
|
696 |
-
if($icon === 'visualblocks') {
|
697 |
$title = 'Show Blocks';
|
698 |
$text = '<i class="mce-ico mce-i-visualblocks"></i>';
|
699 |
$tooltip['title'] = 'Show Blocks';
|
700 |
$tooltip['content'] = '<p>Shows all block level editor elements with a light border.</p>';
|
701 |
}
|
702 |
-
if($icon === 'subscript') {
|
703 |
$title = 'Subscript';
|
704 |
$text = '<i class="mce-ico mce-i-subscript"></i>';
|
705 |
$tooltip['title'] = 'Subscript';
|
706 |
$tooltip['content'] = '<p>Adds a <sub>subscript</sub> to selected editor content (mainly used with text).</p>';
|
707 |
}
|
708 |
-
if($icon === 'superscript') {
|
709 |
$title = 'Superscript';
|
710 |
$text = '<i class="mce-ico mce-i-superscript"></i>';
|
711 |
$tooltip['title'] = 'Superscript';
|
712 |
$tooltip['content'] = '<p>Adds a <sup>superscript</sup> to selected editor content (mainly used with text).</p>';
|
713 |
}
|
714 |
-
if($icon === 'image_orig') {
|
715 |
$class = 'dashicons dashicons-format-image';
|
716 |
$title = 'Image';
|
717 |
$tooltip['title'] = 'Image';
|
718 |
$tooltip['content'] = '<p>Insert images (by link).</p>';
|
719 |
}
|
720 |
-
if($icon === 'p_tags_button') {
|
721 |
$title = 'Paragraph Tag';
|
722 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/ptags/p_tag.png);width:20px;height:20px;';
|
723 |
$tooltip['title'] = 'Paragraph Tag';
|
724 |
$tooltip['content'] = '<p>Insert paragraph tags (along with attributes); which will not be removed from the editor.</p>';
|
725 |
}
|
726 |
-
if($icon === 'line_break_button') {
|
727 |
$title = 'Line Break';
|
728 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/linebreak/line_break.png);width:20px;height:20px;';
|
729 |
$tooltip['title'] = 'Line Break';
|
730 |
$tooltip['content'] = '<p>Insert line breaks; which will not be removed from the editor.</p><p>This is done by adding a class of "none" to the tag.</p>';
|
731 |
}
|
732 |
-
if($icon === 'mailto') {
|
733 |
$title = 'MailTo Link';
|
734 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/mailto/mailto.gif);width:20px;height:20px;';
|
735 |
$tooltip['title'] = 'MailTo Link';
|
736 |
$tooltip['content'] = '<p>Turns an email address into an active mail link.</p><p>When clicked, it will open the users default mail client to send a message.</p>';
|
737 |
}
|
738 |
-
if($icon === 'loremipsum') {
|
739 |
$title = 'Lorem Ipsum';
|
740 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/loremipsum/loremipsum.png);width:20px;height:20px;';
|
741 |
$tooltip['title'] = 'Lorem Ipsum';
|
742 |
$tooltip['content'] = '<p>Esaily insert placeholder text into the editor.</p><p>Select from multiple languages; and choose the number of elements to add.</p>';
|
743 |
}
|
744 |
-
if($icon === 'shortcodes') {
|
745 |
$title = 'Shortcodes';
|
746 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/shortcodes/shortcodes.gif);width:20px;height:20px;';
|
747 |
$tooltip['title'] = 'Shortcodes';
|
748 |
$tooltip['content'] = '<p>Gathers all available shortcodes and adds them to a dropdown list; for easy editor insertion.</p><p>Note: The shortcodes gathered here do not include any shortcode attributes.</p><p>If shortcode attributes are necessary, they will need to be entered into the shortcode manually.</p>';
|
749 |
}
|
750 |
-
if($icon === 'youTube') {
|
751 |
$title = 'YouTube Video';
|
752 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/youTube/images/youtube.png);width:20px;height:20px;';
|
753 |
$tooltip['title'] = 'YouTube Video';
|
754 |
$tooltip['content'] = '<p>Browse and insert YouTube videos without ever leaving the editor.</p><p>A custom interface allows browsing YouTube videos directly from the editor.</p>';
|
755 |
}
|
756 |
-
if($icon === 'clker') {
|
757 |
$title = 'Clker Images';
|
758 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/clker/img/clker.png);width:20px;height:20px;';
|
759 |
$tooltip['title'] = 'Clker Images';
|
760 |
$tooltip['content'] = '<p>Browse and insert images from the Clker.com website.</p>';
|
761 |
}
|
762 |
-
if($icon === 'cleardiv') {
|
763 |
$title = 'Clear Div';
|
764 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/cleardiv/images/cleardiv.png);width:20px;height:20px;';
|
765 |
$tooltip['title'] = 'Clear Div';
|
766 |
$tooltip['content'] = '<p>Clear editor divs. Selections include "left", "right" and "both".</p>';
|
767 |
}
|
768 |
-
if($icon === 'codemagic') {
|
769 |
$title = 'Code Magic';
|
770 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/codemagic/images/codemagic.png);width:20px;height:20px;';
|
771 |
$tooltip['title'] = 'Code Magic';
|
772 |
$tooltip['content'] = '<p>An advanced html code editor; view and edit the html code from an overlay window.</p><p>Includes syntax highlighting; search and replace; and proper element spacing.</p><p>This is a great option when editing html code is necessary; but swtiching editor views is undesirable.</p>';
|
773 |
}
|
774 |
-
if($icon === 'acheck') {
|
775 |
$title = 'Accessibility Checker';
|
776 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/acheck/img//acheck.png);width:20px;height:20px;';
|
777 |
$tooltip['title'] = 'Accessibility Checker';
|
778 |
$tooltip['content'] = '<p>Checks the editor content for accessibility by other devices.</p>';
|
779 |
}
|
780 |
-
if($icon === 'advlink') {
|
781 |
$title = 'Insert/Edit Advanced Link';
|
782 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advlink/images/advlink.png);width:20px;height:20px;';
|
783 |
$tooltip['title'] = 'Insert/Edit Advanced Link';
|
784 |
$tooltip['content'] = '<p>Insert and edit links; along with various atttributes.</p><p>Populates with all posts and pages; so linking to current content is a one-click process.</p><p>Also includes javascript attributes (onclick, onmouseover, etc.); which can be used for executing javascript functions.</p>';
|
785 |
}
|
786 |
-
if($icon === 'advhr') {
|
787 |
$title = 'Advanced Horizontal Line';
|
788 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advhr/images/advhr.png);width:20px;height:20px;';
|
789 |
$tooltip['title'] = 'Advanced Horizontal Line';
|
790 |
$tooltip['content'] = '<p>Modify various options of the horizontal line; like shadow and width.</p>';
|
791 |
}
|
792 |
-
if($icon === 'advimage') {
|
793 |
$title = 'Advanced Insert/Edit Image';
|
794 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advimage/images//advimage.png);width:20px;height:20px;';
|
795 |
$tooltip['title'] = 'Advanced Insert/Edit Image';
|
796 |
$tooltip['content'] = '<p>Insert/Edit images with more control.</p><p>Define image attributes, image margin, image padding and image border.</p><p>Also includes javascript attributes (onclick, onmouseover, etc.); which can be used for executing javascript functions.</p>';
|
797 |
}
|
798 |
-
if($icon === 'formatPainter') {
|
799 |
$class = 'dashicons dashicons-admin-appearance';
|
800 |
$title = 'Format Painter';
|
801 |
$tooltip['title'] = 'Format Painter';
|
802 |
$tooltip['content'] = '<p>Copies styling from one element; and applies the same styling to another element.</p>';
|
803 |
}
|
804 |
-
if($icon === 'googleImages') {
|
805 |
$title = 'Google Images';
|
806 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/googleImages/images/googleImages.png);width:20px;height:20px;';
|
807 |
$tooltip['title'] = 'Google Images';
|
808 |
$tooltip['content'] = '<p>Browse and insert Google images without ever leaving the content editor.</p>';
|
809 |
}
|
810 |
-
if($icon === 'abbr') {
|
811 |
$title = 'Abbreviation';
|
812 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/abbr/abbr.png);width:20px;height:20px;';
|
813 |
$tooltip['title'] = 'Abbreviation';
|
814 |
$tooltip['content'] = '<p>Add an abbreviation to selected editor content.</p>';
|
815 |
}
|
816 |
-
if($icon === 'imgmap') {
|
817 |
$title = 'Image Map';
|
818 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/imgmap/images/imgmap.png);width:20px;height:20px;';
|
819 |
$tooltip['title'] = 'Image Map';
|
820 |
$tooltip['content'] = '<p>Create an image map from an image.</p><p>Allows multiple "hot spots" on a single image. Each "hot spot" can link to a different url.</p>';
|
821 |
}
|
822 |
-
if($icon === 'columnShortcodes') {
|
823 |
$class = 'dashicons dashicons-schedule';
|
824 |
$title = 'Column Shortcodes';
|
825 |
$tooltip['title'] = 'Column Shortcodes';
|
826 |
$tooltip['content'] = '<p>A tool for easily inserting column shortcode templates.</p>';
|
827 |
}
|
828 |
-
if($icon === 'nonbreaking') {
|
829 |
$title = 'Nonbreaking Space';
|
830 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/nonbreaking/nonbreaking.png);width:20px;height:20px;';
|
831 |
$tooltip['title'] = 'Nonbreaking Space';
|
832 |
$tooltip['content'] = '<p>Insert a nonbreaking space; which will not be removed from the editor.</p>';
|
833 |
}
|
834 |
-
if($icon === 'eqneditor') {
|
835 |
$title = 'CodeCogs Equation Editor';
|
836 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/eqneditor/img/eqneditor.png);width:20px;height:20px;';
|
837 |
$tooltip['title'] = 'CodeCogs Equation Editor';
|
838 |
$tooltip['content'] = '<p>Create complex math equations from a simple interface.</p>';
|
839 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
840 |
|
841 |
// Process tooltips
|
842 |
$tooltip_title = isset($tooltip['title']) ? $tooltip['title'] : 'Title not found';
|
843 |
$tooltip_content = isset($tooltip['content']) ? $tooltip['content'] : '<p>Content not found. Please report to the plugin developer.</p>';
|
844 |
|
845 |
// Are we displaying fancy tooltips?
|
846 |
-
|
847 |
$tooltip_att = ($no_tooltips === false) ? 'data-tooltip="<h4 class=\'data_tooltip_title\'>'.htmlspecialchars($tooltip_title).'</h4><hr />'.htmlspecialchars($tooltip_content).'" ' : '';
|
848 |
|
849 |
-
|
850 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
851 |
}
|
852 |
}
|
853 |
echo '</div>'; // End foreach .sortable
|
854 |
} // End not rows 3 and 4
|
855 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
856 |
?>
|
857 |
</div> <!-- End #inside_button_hover -->
|
858 |
</div> <!-- End .postbox -->
|
@@ -873,6 +1082,9 @@ class wp_edit_class {
|
|
873 |
echo '<input type="button" value="'.__('Reset Buttons', 'wp-edit').'" class="button-primary reset_dd_buttons" />';
|
874 |
echo '<input type="submit" name="wpep_reset_buttons" class="button-primary wpep_reset_buttons" style="display:none;" />';
|
875 |
|
|
|
|
|
|
|
876 |
echo '</form>';
|
877 |
echo '</div>';
|
878 |
|
@@ -893,21 +1105,36 @@ class wp_edit_class {
|
|
893 |
<li><a href="#dragdrop"><?php _e('Drag/Drop', 'wp-edit'); ?></a></li>
|
894 |
<li><a href="#multiselect"><?php _e('Multi Select', 'wp-edit'); ?></a></li>
|
895 |
<li><a href="#reset"><?php _e('Reset', 'wp-edit'); ?></a></li>
|
|
|
896 |
</ul>
|
897 |
|
898 |
<div id="dragdrop">
|
899 |
-
<p
|
900 |
-
|
|
|
|
|
901 |
</div>
|
902 |
<div id="multiselect">
|
903 |
-
<p
|
904 |
-
|
905 |
-
|
906 |
-
<p
|
|
|
|
|
|
|
|
|
907 |
</div>
|
908 |
<div id="reset">
|
909 |
-
<p
|
910 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
911 |
</div>
|
912 |
</div>
|
913 |
</div>
|
@@ -975,6 +1202,7 @@ class wp_edit_class {
|
|
975 |
</div>
|
976 |
</div>
|
977 |
<input type="submit" value="<?php _e('Save Global Options', 'wp-edit'); ?>" class="button button-primary" id="submit_global" name="submit_global">
|
|
|
978 |
</form>
|
979 |
<?php
|
980 |
echo '</div>';
|
@@ -1060,7 +1288,7 @@ class wp_edit_class {
|
|
1060 |
</tbody>
|
1061 |
</table>
|
1062 |
|
1063 |
-
<h3><?php _e('Custom Post
|
1064 |
<table cellpadding="3" style="margin-left:7px;">
|
1065 |
<tbody>
|
1066 |
<?php
|
@@ -1085,6 +1313,7 @@ class wp_edit_class {
|
|
1085 |
</div>
|
1086 |
|
1087 |
<input type="submit" value="<?php _e('Save General Options', 'wp-edit'); ?>" class="button button-primary" id="submit_general" name="submit_general">
|
|
|
1088 |
</form>
|
1089 |
<?php
|
1090 |
echo '</div>';
|
@@ -1210,6 +1439,7 @@ class wp_edit_class {
|
|
1210 |
</div>
|
1211 |
</div>
|
1212 |
<input type="submit" value="<?php _e('Save Posts/Pages Options', 'wp-edit'); ?>" class="button button-primary" id="submit_posts" name="submit_posts">
|
|
|
1213 |
</form>
|
1214 |
<?php
|
1215 |
echo '</div>';
|
@@ -1307,6 +1537,7 @@ class wp_edit_class {
|
|
1307 |
</div>
|
1308 |
</div>
|
1309 |
<input type="submit" value="<?php _e('Save Editor Options', 'wp-edit'); ?>" class="button button-primary" id="submit_editor" name="submit_editor">
|
|
|
1310 |
</div>
|
1311 |
</form>
|
1312 |
<?php
|
@@ -1349,6 +1580,7 @@ class wp_edit_class {
|
|
1349 |
</div>
|
1350 |
|
1351 |
<input type="submit" value="Save Extras Options" class="button button-primary" id="submit_extras" name="submit_extras">
|
|
|
1352 |
</div>
|
1353 |
</form>
|
1354 |
<?php
|
@@ -1473,6 +1705,7 @@ class wp_edit_class {
|
|
1473 |
</div>
|
1474 |
|
1475 |
<input type="submit" value="<?php _e('Save User Specific Options', 'wp-edit'); ?>" class="button button-primary" id="submit_user_specific" name="submit_user_specific">
|
|
|
1476 |
</div>
|
1477 |
</form><?php
|
1478 |
}
|
@@ -1539,7 +1772,7 @@ class wp_edit_class {
|
|
1539 |
<?php _e('In order to completely uninstall the plugin, AND remove all associated database tables, please use the option below.', 'wp-edit'); ?><br />
|
1540 |
</p>
|
1541 |
<form method="post" action="">
|
1542 |
-
<?php wp_nonce_field('wp_edit_uninstall_nonce_check','wp_edit_uninstall_nonce'); ?>
|
1543 |
<input id="plugin" name="plugin" type="hidden" value="wp-edit/main.php" />
|
1544 |
<input name="uninstall_confirm" id="uninstall_confirm" type="checkbox" value="1" /><label for="uninstall_confirm"></label> <strong><?php _e('Please confirm before proceeding','wp-edit'); ?><br /><br /></strong>
|
1545 |
<input class="button-primary" name="uninstall" type="submit" value="<?php _e('Uninstall','wp-edit'); ?>" />
|
@@ -1553,7 +1786,7 @@ class wp_edit_class {
|
|
1553 |
}
|
1554 |
/*
|
1555 |
****************************************************************
|
1556 |
-
|
1557 |
****************************************************************
|
1558 |
*/
|
1559 |
else if($active_tab == 'about') {
|
@@ -1694,6 +1927,66 @@ class wp_edit_class {
|
|
1694 |
|
1695 |
<p><?php _e('Please take a moment to rate and review this plugin on the WordPress Plugin Repository.', 'wp-edit'); ?></p>
|
1696 |
<p><a href="https://wordpress.org/plugins/wp-edit/" target="_blank" class="button-primary"><?php _e('Rate Plugin', 'wp-edit'); ?></a></p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1697 |
</div>
|
1698 |
</div>
|
1699 |
</div>
|
@@ -1731,6 +2024,14 @@ class wp_edit_class {
|
|
1731 |
*/
|
1732 |
if(isset($_POST['wpep_reset_buttons'])) {
|
1733 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1734 |
// Check if DB value exists.. if YES, then keep value.. if NO, then replace with protected defaults
|
1735 |
$options_buttons = $this->global_options_buttons;
|
1736 |
|
@@ -1751,6 +2052,14 @@ class wp_edit_class {
|
|
1751 |
|
1752 |
if(isset($_POST['wpep_save_buttons'])) {
|
1753 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1754 |
if(isset($_POST['get_sorted_array_results']) && ($_POST['get_sorted_array_results'] != '')) {
|
1755 |
|
1756 |
//***************************************************
|
@@ -1896,6 +2205,20 @@ class wp_edit_class {
|
|
1896 |
$all_array = rtrim($all_array, ' '); // Remove trailing right space
|
1897 |
$plugin_array = explode(' ', $all_array); // Explode at spaces to make single array (this is an array of all current plugin buttons)
|
1898 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1899 |
// Create arrays of user saved buttons
|
1900 |
global $tot_array;
|
1901 |
$val_array = array();
|
@@ -1948,6 +2271,14 @@ class wp_edit_class {
|
|
1948 |
****************************************************************
|
1949 |
*/
|
1950 |
if(isset($_POST['submit_global'])) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1951 |
|
1952 |
$options_global = get_option('wp_edit_global');
|
1953 |
$options_global['jquery_theme'] = isset($_POST['jquery_theme']) ? $_POST['jquery_theme'] : 'smoothness';
|
@@ -1972,6 +2303,14 @@ class wp_edit_class {
|
|
1972 |
*/
|
1973 |
if(isset($_POST['submit_general'])) {
|
1974 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1975 |
$options_general = get_option('wp_edit_general');
|
1976 |
$options_general['linebreak_shortcode'] = isset($_POST['linebreak_shortcode']) ? '1' : '0';
|
1977 |
$options_general['shortcodes_in_widgets'] = isset($_POST['shortcodes_in_widgets']) ? '1' : '0';
|
@@ -2017,6 +2356,14 @@ class wp_edit_class {
|
|
2017 |
*/
|
2018 |
if(isset($_POST['submit_posts'])) {
|
2019 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020 |
// Delete database revisions
|
2021 |
if(isset($_POST['submit_posts']) && isset($_POST['delete_revisions'])) {
|
2022 |
|
@@ -2096,6 +2443,14 @@ class wp_edit_class {
|
|
2096 |
*/
|
2097 |
if(isset($_POST['submit_editor'])) {
|
2098 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2099 |
$options_editor = get_option('wp_edit_editor');
|
2100 |
|
2101 |
$options_editor['editor_add_pre_styles'] = isset($_POST['editor_add_pre_styles']) ? '1' : '0';
|
@@ -2121,6 +2476,14 @@ class wp_edit_class {
|
|
2121 |
*/
|
2122 |
if(isset($_POST['submit_extras'])) {
|
2123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2124 |
$options_extras = get_option('wp_edit_extras');
|
2125 |
$options_extras['signoff_text'] = isset($_POST['wp_edit_signoff']) ? stripslashes($_POST['wp_edit_signoff']) : 'Please enter text here...';
|
2126 |
|
@@ -2142,6 +2505,14 @@ class wp_edit_class {
|
|
2142 |
*/
|
2143 |
if(isset($_POST['submit_user_specific'])) {
|
2144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2145 |
// If User Specific was submitted
|
2146 |
$post_vars = isset($_POST['wp_edit_user_specific']) ? $_POST['wp_edit_user_specific'] : '';
|
2147 |
|
@@ -2464,12 +2835,56 @@ class wp_edit_class {
|
|
2464 |
****************************************************************
|
2465 |
*/
|
2466 |
public function wp_edit_init_tinymce() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2467 |
|
2468 |
// Build extra plugins array
|
2469 |
add_filter('mce_external_plugins', array($this, 'wp_edit_mce_external_plugins'));
|
2470 |
|
2471 |
// Get options and set appropriate tinymce toolbars
|
2472 |
-
$options_buttons = get_option('wp_edit_buttons');
|
2473 |
foreach ((array)$options_buttons as $key => $value) {
|
2474 |
|
2475 |
// Magic is happening right here...
|
@@ -2574,6 +2989,10 @@ class wp_edit_class {
|
|
2574 |
$default_wp_array_toolbar1 = array('bold','italic','strikethrough','bullist','numlist','blockquote','hr','alignleft','aligncenter','alignright','link','unlink','wp_more');
|
2575 |
$array_back = array();
|
2576 |
|
|
|
|
|
|
|
|
|
2577 |
// First, we explode the toolbar in the database
|
2578 |
$options_toolbar1 = explode(' ', $options_toolbar1);
|
2579 |
|
@@ -2586,7 +3005,7 @@ class wp_edit_class {
|
|
2586 |
foreach($array_diff as $array) {
|
2587 |
|
2588 |
// If the button is NOT in the original array (WP buttons), we know it is another plugin or theme button..
|
2589 |
-
if(!in_array($array, $default_wp_array_toolbar1)) {
|
2590 |
|
2591 |
// Create the new array of additional buttons to pass back to end of toolbar
|
2592 |
$array_back[] = $array;
|
@@ -2594,6 +3013,16 @@ class wp_edit_class {
|
|
2594 |
}
|
2595 |
}
|
2596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2597 |
// Merge the difference onto the end of our saved buttons
|
2598 |
$merge_buttons = array_merge($options_toolbar1, $array_back);
|
2599 |
|
@@ -2606,6 +3035,10 @@ class wp_edit_class {
|
|
2606 |
$default_wp_array_toolbar2 = array('formatselect','underline','alignjustify','forecolor','pastetext','removeformat','charmap','outdent','indent','undo','redo','wp_help');
|
2607 |
$array_back = array();
|
2608 |
|
|
|
|
|
|
|
|
|
2609 |
// First, we explode the toolbar in the database
|
2610 |
$options_toolbar2 = explode(' ', $options_toolbar2);
|
2611 |
|
@@ -2618,7 +3051,7 @@ class wp_edit_class {
|
|
2618 |
foreach($array_diff as $array) {
|
2619 |
|
2620 |
// If the button is NOT in the original array (WP buttons), we know it is another plugin or theme button..
|
2621 |
-
if(!in_array($array, $default_wp_array_toolbar2)) {
|
2622 |
|
2623 |
// Create the new array of additional buttons to pass back to end of toolbar
|
2624 |
$array_back[] = $array;
|
@@ -2626,6 +3059,16 @@ class wp_edit_class {
|
|
2626 |
}
|
2627 |
}
|
2628 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2629 |
// Merge the difference onto the end of our saved buttons
|
2630 |
$merge_buttons = array_merge($options_toolbar2, $array_back);
|
2631 |
|
3 |
* Plugin Name: WP Edit
|
4 |
* Plugin URI: https://wpeditpro.com
|
5 |
* Description: Ultimate WordPress Content Editing.
|
6 |
+
* Version: 4.0
|
7 |
* Author: Josh Lobe
|
8 |
* Author URI: https://wpeditpro.com
|
9 |
* License: GPL2
|
90 |
// Prepare global settings array (for future use)
|
91 |
public $wpedit_options_array = array();
|
92 |
|
93 |
+
public $filtered_buttons = array();
|
94 |
+
public $new_plugin_array = array();
|
95 |
+
public $default_buttons_array = array();
|
96 |
+
public $filtered_plugin_buttons = array();
|
97 |
+
|
98 |
/*
|
99 |
****************************************************************
|
100 |
Class construct
|
115 |
add_action('admin_init', array($this, 'process_settings_export')); // Export db options
|
116 |
add_action('admin_init', array($this, 'process_settings_import')); // Import db options
|
117 |
|
118 |
+
add_action('admin_enqueue_scripts', array($this, 'admin_plugins_page_stylesheet'));
|
119 |
+
|
120 |
add_action('before_wp_tiny_mce', array($this, 'before_wp_tiny_mce')); // Add dashicons to tinymce
|
121 |
add_filter('tiny_mce_before_init', array($this, 'wp_edit_tiny_mce_before_init')); // Before tinymce initialization
|
122 |
add_action('init', array($this, 'wp_edit_init_tinymce')); // Tinymce initialization
|
128 |
$plugin_hook = "in_plugin_update_message-{$plugin_folder}/{$plugin_file}";
|
129 |
add_action($plugin_hook, array($this, 'wpedit_plugin_update_cb'), 10, 2); // Plugin update message
|
130 |
add_action('admin_footer', array($this, 'wpedit_plugin_update_js')); // Plugin update message javascript
|
131 |
+
|
132 |
+
|
133 |
+
// Populate this plugin filtered buttons
|
134 |
+
$filter_args = array();
|
135 |
+
$get_filters = apply_filters( 'wp_edit_custom_buttons', $filter_args );
|
136 |
+
$filters_array = array();
|
137 |
+
|
138 |
+
// If the array set is not empty (filters being applied)
|
139 |
+
if( ! empty( $get_filters ) ) {
|
140 |
+
foreach( $get_filters as $key => $values ) {
|
141 |
+
|
142 |
+
$filters_array[] = $values;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
$this->filtered_buttons = $filters_array;
|
146 |
}
|
147 |
|
148 |
/*
|
219 |
global $pagenow;
|
220 |
global $current_user;
|
221 |
$userid = $current_user->ID;
|
|
|
|
|
|
|
|
|
222 |
|
223 |
+
// If we are only on plugins.php admin page...
|
224 |
+
if($pagenow === 'plugins.php') {
|
|
|
225 |
|
226 |
+
//******************************************************/
|
227 |
+
// Check 30 day installation notice
|
228 |
+
//******************************************************/
|
229 |
|
230 |
+
// Check if plugin install date is set in database
|
231 |
+
$opt_install = get_option('wp_edit_install');
|
232 |
+
if($opt_install === false) {
|
|
|
|
|
233 |
|
234 |
+
// Set install date to today
|
235 |
+
update_option('wp_edit_install', date('Y-m-d'));
|
236 |
+
}
|
237 |
+
|
238 |
+
// Compare install date with today
|
239 |
+
$date_install = isset($opt_install) ? $opt_install : date('Y-m-d');
|
240 |
+
|
241 |
+
// If install date is more than 30 days old...
|
242 |
+
if(strtotime($date_install) < strtotime('-30 days')){
|
243 |
+
|
244 |
// If the user clicked to dismiss notice...
|
245 |
if ( isset( $_GET['dismiss_wpedit_ug_notice'] ) && 'yes' == $_GET['dismiss_wpedit_ug_notice'] ) {
|
246 |
|
256 |
|
257 |
global $pagenow;
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
260 |
<div class="wpedit_plugins_page_banner">
|
261 |
<a href="'.$pagenow.'?dismiss_wpedit_ug_notice=yes"><img class="close_icon" title="" src="'. plugins_url( 'images/close_banner.png', __FILE__ ) .'" alt=""/></a>
|
266 |
It\'s time to consider upgrading <strong>WP Edit</strong> to the <strong>PRO</strong> version.<br />
|
267 |
<span>Extend standard plugin functionality with new, enhanced options.</span>
|
268 |
</div>
|
|
|
|
|
|
|
269 |
</div>
|
270 |
</div>';
|
271 |
}
|
272 |
add_action('admin_notices', 'wpedit_wordpress_version_notice');
|
273 |
}
|
274 |
}
|
275 |
+
|
276 |
+
//******************************************************/
|
277 |
+
// Check Custom Buttons API notice
|
278 |
+
//******************************************************/
|
279 |
+
// If the user clicked to dismiss notice...
|
280 |
+
if ( isset( $_GET['dismiss_wpedit_custom_buttons_notice'] ) && 'yes' == $_GET['dismiss_wpedit_custom_buttons_notice'] ) {
|
281 |
+
|
282 |
+
// Update user meta
|
283 |
+
add_user_meta( $userid, 'ignore_wpedit_custom_buttons_notice', 'yes', true );
|
284 |
+
}
|
285 |
+
|
286 |
+
// If user meta is not set...
|
287 |
+
if ( !get_user_meta( $userid, 'ignore_wpedit_custom_buttons_notice' ) ) {
|
288 |
+
|
289 |
+
// Alert plugin update message
|
290 |
+
function wpedit_custom_buttons_notice() {
|
291 |
+
|
292 |
+
global $pagenow;
|
293 |
+
|
294 |
+
echo '<div class="updated" style="padding: 0; margin: 0; border: none; background: none;">
|
295 |
+
<div class="wpedit_plugins_page_banner">
|
296 |
+
<a href="'.$pagenow.'?dismiss_wpedit_custom_buttons_notice=yes"><img class="close_icon" title="" src="'. plugins_url( 'images/close_banner.png', __FILE__ ) .'" alt=""/></a>
|
297 |
+
<div class="button_div">
|
298 |
+
<a class="button" target="_blank" href="http://learn.wpeditpro.com/custom-buttons-api/">Learn More</a>
|
299 |
+
</div>
|
300 |
+
<div class="text">
|
301 |
+
Introducing the WP Edit Custom Buttons API<br />
|
302 |
+
<span>Tell all your favorite plugin/theme developers they can now add their editor buttons to WP Edit and WP Edit Pro.</span>
|
303 |
+
</div>
|
304 |
+
</div>
|
305 |
+
</div>';
|
306 |
+
}
|
307 |
+
add_action('admin_notices', 'wpedit_custom_buttons_notice');
|
308 |
+
}
|
309 |
+
|
310 |
+
}
|
311 |
+
}
|
312 |
+
|
313 |
+
public function admin_plugins_page_stylesheet( $hook ) {
|
314 |
+
|
315 |
+
if( $hook == 'plugins.php' ) {
|
316 |
+
|
317 |
+
wp_register_style( 'wp_edit_admin_plugins_page_styles', plugin_dir_url( __FILE__ ) . 'css/admin_plugins_page.css', array() ); // Main Admin Page Script File
|
318 |
+
wp_enqueue_style( 'wp_edit_admin_plugins_page_styles' );
|
319 |
}
|
320 |
}
|
321 |
|
380 |
<?php
|
381 |
settings_errors();
|
382 |
$active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'buttons';
|
383 |
+
|
384 |
+
|
385 |
+
/******************************************************************************/
|
386 |
+
// Make filtered button comparison; alert users if counts do not match
|
387 |
+
/******************************************************************************/
|
388 |
+
// First; get all buttons saved in database
|
389 |
+
$plugin_buttons = get_option('wp_edit_buttons');
|
390 |
+
$plugin_buttons_string = '';
|
391 |
+
|
392 |
+
foreach( $plugin_buttons as $key => $button_string ) {
|
393 |
+
|
394 |
+
if( !empty( $button_string ) )
|
395 |
+
$plugin_buttons_string .= $button_string. ' ';
|
396 |
+
}
|
397 |
+
|
398 |
+
$plugin_buttons_string = rtrim( $plugin_buttons_string, ' ' );
|
399 |
+
$explode_buttons_string = explode( ' ', $plugin_buttons_string );
|
400 |
+
|
401 |
+
|
402 |
+
|
403 |
+
// Second; get all plugin default buttons
|
404 |
+
$plugin_buttons = $this->global_options_buttons;
|
405 |
+
|
406 |
+
// Merge all default plugin buttons into single array
|
407 |
+
$all_array = '';
|
408 |
+
foreach($plugin_buttons as $slot_array) {
|
409 |
+
|
410 |
+
if(!empty($slot_array) && $slot_array != '') { // Skip containter array if empty
|
411 |
+
$all_array .= $slot_array.' '; // Create single string of all default plugin buttons
|
412 |
+
}
|
413 |
+
}
|
414 |
+
$all_array = rtrim($all_array, ' '); // Remove trailing right space
|
415 |
+
$plugin_array = explode(' ', $all_array); // Explode at spaces to make single array (this is an array of all current plugin buttons)
|
416 |
+
|
417 |
+
|
418 |
+
// Third; add filtered buttons to second array
|
419 |
+
$get_filters = $this->filtered_buttons;
|
420 |
+
|
421 |
+
// If the array set is not empty (filters being applied)
|
422 |
+
if( ! empty( $get_filters ) ) {
|
423 |
+
foreach( $get_filters as $key => $values ) {
|
424 |
+
|
425 |
+
$plugin_array[] = $values['button_id'];
|
426 |
+
}
|
427 |
+
}
|
428 |
+
|
429 |
+
|
430 |
+
// Create an array of buttons that have been removed
|
431 |
+
$array_diff = array_diff( $explode_buttons_string, $plugin_array );
|
432 |
+
|
433 |
+
|
434 |
+
// Fourth; make comparison and alert user if filtered buttons have been removed (deactivated)
|
435 |
+
if( count( $plugin_array ) < count( $explode_buttons_string ) ) {
|
436 |
+
|
437 |
+
?>
|
438 |
+
<div class="error wpep_info">
|
439 |
+
|
440 |
+
<p>
|
441 |
+
<?php _e('The following buttons have been removed:', 'wp_edit_pro'); ?><br />
|
442 |
+
<strong>
|
443 |
+
<?php
|
444 |
+
$buttons = '';
|
445 |
+
foreach( $array_diff as $key => $button ) { $buttons .= $button . ', '; }
|
446 |
+
$buttons = rtrim( $buttons, ', ' );
|
447 |
+
echo $buttons;
|
448 |
+
?>
|
449 |
+
</strong><br /><br />
|
450 |
+
<?php _e('These buttons came from a plugin or theme that has been deactivated.', 'wp_edit_pro'); ?><br />
|
451 |
+
<?php _e('To remove this message; simply visit the "Buttons" tab and save the buttons.', 'wp_edit_pro'); ?><br />
|
452 |
+
</p>
|
453 |
+
</div>
|
454 |
+
<?php
|
455 |
+
}
|
456 |
?>
|
457 |
|
458 |
<h2 class="nav-tab-wrapper">
|
494 |
|
495 |
<?php
|
496 |
$no_tooltips = false;
|
497 |
+
$icons_filter = '';
|
498 |
|
499 |
$options_global = get_option('wp_edit_global');
|
500 |
if(isset($options_global['disable_fancy_tooltips']) && $options_global['disable_fancy_tooltips'] === '1') {
|
502 |
$no_tooltips = true;
|
503 |
}
|
504 |
|
505 |
+
// Loop each toolbar and create array of icons (for later comparison)
|
506 |
+
foreach( $options_buttons as $toolbar => $icons ) {
|
507 |
+
|
508 |
+
if(!empty($icons)) {
|
509 |
+
|
510 |
+
$icons_filter .= ' ' . $icons;
|
511 |
+
}
|
512 |
+
}
|
513 |
+
|
514 |
// Loop all buttons and create sortable divs
|
515 |
foreach ($options_buttons as $toolbar => $icons) {
|
516 |
|
542 |
$tooltip['title'] = 'Bold';
|
543 |
$tooltip['content'] = '<p>Apply <strong>bold</strong> to editor text.</p>';
|
544 |
}
|
545 |
+
else if($icon === 'italic') {
|
546 |
$class = 'dashicons dashicons-editor-italic';
|
547 |
$title = 'Italic';
|
548 |
$tooltip['title'] = 'Italic';
|
549 |
$tooltip['content'] = '<p>Apply <em>italic</em> to editor text.</p>';
|
550 |
}
|
551 |
+
else if($icon === 'strikethrough') {
|
552 |
$class = 'dashicons dashicons-editor-strikethrough';
|
553 |
$title = 'Strikethrough';
|
554 |
$tooltip['title'] = 'Strikethrough';
|
555 |
$tooltip['content'] = '<p>Apply <strike>strikethrough</strike> to editor text.</p>';
|
556 |
}
|
557 |
+
else if($icon === 'bullist') {
|
558 |
$class = 'dashicons dashicons-editor-ul';
|
559 |
$title = 'Bullet List';
|
560 |
$tooltip['title'] = 'Bullet List';
|
561 |
$tooltip['content'] = '<p>Create a list of bulleted items.</p>';
|
562 |
}
|
563 |
+
else if($icon === 'numlist') {
|
564 |
$class = 'dashicons dashicons-editor-ol';
|
565 |
$title = 'Numbered List';
|
566 |
$tooltip['title'] = 'Numbered List';
|
567 |
$tooltip['content'] = '<p>Create a list of numbered items.</p>';
|
568 |
}
|
569 |
+
else if($icon === 'blockquote') {
|
570 |
$class = 'dashicons dashicons-editor-quote';
|
571 |
$title = 'Blockquote';
|
572 |
$tooltip['title'] = 'Blockquote';
|
573 |
$tooltip['content'] = '<p>Insert a block level quotation.</p>';
|
574 |
}
|
575 |
+
else if($icon === 'hr') {
|
576 |
$class = 'dashicons dashicons-minus';
|
577 |
$title = 'Horizontal Rule';
|
578 |
$tooltip['title'] = 'Horizontal Rule';
|
579 |
$tooltip['content'] = '<p>Insert a horizontal rule.</p>';
|
580 |
}
|
581 |
+
else if($icon === 'alignleft') {
|
582 |
$class = 'dashicons dashicons-editor-alignleft';
|
583 |
$title = 'Align Left';
|
584 |
$tooltip['title'] = 'Align Left';
|
585 |
$tooltip['content'] = '<p>Align editor content to the left side of the editor.</p>';
|
586 |
}
|
587 |
+
else if($icon === 'aligncenter') {
|
588 |
$class = 'dashicons dashicons-editor-aligncenter';
|
589 |
$title = 'Align Center';
|
590 |
$tooltip['title'] = 'Align Center';
|
591 |
$tooltip['content'] = '<p>Align editor content to the center of the editor.</p>';
|
592 |
}
|
593 |
+
else if($icon === 'alignright') {
|
594 |
$class = 'dashicons dashicons-editor-alignright';
|
595 |
$title = 'Align Right';
|
596 |
$tooltip['title'] = 'Align Right';
|
597 |
$tooltip['content'] = '<p>Align editor content to the right side of the editor.</p>';
|
598 |
}
|
599 |
+
else if($icon === 'link') {
|
600 |
$class = 'dashicons dashicons-admin-links';
|
601 |
$title = 'Link';
|
602 |
$tooltip['title'] = 'Link';
|
603 |
$tooltip['content'] = '<p>Insert a link around currently selected content.</p>';
|
604 |
}
|
605 |
+
else if($icon === 'unlink') {
|
606 |
$class = 'dashicons dashicons-editor-unlink';
|
607 |
$title = 'Unlink';
|
608 |
$tooltip['title'] = 'Unlink';
|
609 |
$tooltip['content'] = '<p>Remove the link around currently selected content.</p>';
|
610 |
}
|
611 |
+
else if($icon === 'wp_more') {
|
612 |
$class = 'dashicons dashicons-editor-insertmore';
|
613 |
$title = 'More';
|
614 |
$tooltip['title'] = 'More';
|
615 |
$tooltip['content'] = '<p>Inserts the read_more() WordPress function; commonly used for excerpts.</p>';
|
616 |
}
|
617 |
|
618 |
+
else if($icon === 'formatselect') {
|
619 |
$title = 'Format Select';
|
620 |
$text = 'Paragraph';
|
621 |
$tooltip['title'] = 'Paragraph';
|
622 |
$tooltip['content'] = '<p>Adds the Format Select dropdown button; used to select different styles.</p>';
|
623 |
}
|
624 |
+
else if($icon === 'underline') {
|
625 |
$class = 'dashicons dashicons-editor-underline';
|
626 |
$title = 'Underline';
|
627 |
$tooltip['title'] = 'Underline';
|
628 |
$tooltip['content'] = '<p>Apply <u>underline</u> to editor text.</p>';
|
629 |
}
|
630 |
+
else if($icon === 'alignjustify') {
|
631 |
$class = 'dashicons dashicons-editor-justify';
|
632 |
$title = 'Align Full';
|
633 |
$tooltip['title'] = 'Align Full';
|
634 |
$tooltip['content'] = '<p>Align selected content to full width of the page.</p>';
|
635 |
}
|
636 |
+
else if($icon === 'forecolor') {
|
637 |
$class = 'dashicons dashicons-editor-textcolor';
|
638 |
$title = 'Foreground Color';
|
639 |
$tooltip['title'] = 'Foreground Color';
|
640 |
$tooltip['content'] = '<p>Change the foreground color of selected content; commonly used to change text color.</p>';
|
641 |
}
|
642 |
+
else if($icon === 'pastetext') {
|
643 |
$class = 'dashicons dashicons-editor-paste-text';
|
644 |
$title = 'Paste Text';
|
645 |
$tooltip['title'] = 'Paste Text';
|
646 |
$tooltip['content'] = '<p>Paste content as plain text.</p>';
|
647 |
}
|
648 |
+
else if($icon === 'removeformat') {
|
649 |
$class = 'dashicons dashicons-editor-removeformatting';
|
650 |
$title = 'Remove Format';
|
651 |
$tooltip['title'] = 'Remove Format';
|
652 |
$tooltip['content'] = '<p>Remove all current formatting from selected content.</p>';
|
653 |
}
|
654 |
+
else if($icon === 'charmap') {
|
655 |
$class = 'dashicons dashicons-editor-customchar';
|
656 |
$title = 'Character Map';
|
657 |
$tooltip['title'] = 'Character Map';
|
658 |
$tooltip['content'] = '<p>Display a characted map used for inserting special characters.</p>';
|
659 |
}
|
660 |
+
else if($icon === 'outdent') {
|
661 |
$class = 'dashicons dashicons-editor-outdent';
|
662 |
$title = 'Outdent';
|
663 |
$tooltip['title'] = 'Outdent';
|
664 |
$tooltip['content'] = '<p>Outdent selected content; primary used for paragraph elements.</p>';
|
665 |
}
|
666 |
+
else if($icon === 'indent') {
|
667 |
$class = 'dashicons dashicons-editor-indent';
|
668 |
$title = 'Indent';
|
669 |
$tooltip['title'] = 'Indent';
|
670 |
$tooltip['content'] = '<p>Indent selected content; primary used for paragraph elements.</p>';
|
671 |
}
|
672 |
+
else if($icon === 'undo') {
|
673 |
$class = 'dashicons dashicons-undo';
|
674 |
$title = 'Undo';
|
675 |
$tooltip['title'] = 'Undo';
|
676 |
$tooltip['content'] = '<p>Undo last editor action.</p>';
|
677 |
}
|
678 |
+
else if($icon === 'redo') {
|
679 |
$class = 'dashicons dashicons-redo';
|
680 |
$title = 'Redo';
|
681 |
$tooltip['title'] = 'Redo';
|
682 |
$tooltip['content'] = '<p>Redo last editor action.</p>';
|
683 |
}
|
684 |
+
else if($icon === 'wp_help') {
|
685 |
$class = 'dashicons dashicons-editor-help';
|
686 |
$title = 'Help';
|
687 |
$tooltip['title'] = 'Help';
|
689 |
}
|
690 |
|
691 |
// WP Buttons not included by default
|
692 |
+
else if($icon === 'fontselect') {
|
693 |
$title = 'Font Select';
|
694 |
$text = 'Font Family';
|
695 |
$tooltip['title'] = 'Font Select';
|
696 |
$tooltip['content'] = '<p>Apply various fonts to the editor selection.</p><p>Also displays fonts from Google Fonts options (if activated).</p>';
|
697 |
}
|
698 |
+
else if($icon === 'fontsizeselect') {
|
699 |
$title = 'Font Size Select';
|
700 |
$text = 'Font Sizes';
|
701 |
$tooltip['title'] = 'Font Size Select';
|
702 |
$tooltip['content'] = '<p>Apply various font sizes to the editor selection.</p><p>Default values can be switched from "pt" to "px" via the Editor tab.</p>';
|
703 |
}
|
704 |
+
else if($icon === 'styleselect') {
|
705 |
$title = 'Formats';
|
706 |
$text = 'Formats';
|
707 |
$tooltip['title'] = 'Formats';
|
708 |
$tooltip['content'] = '<p>Displays quick access to formats like "Headings", "Inline", "Blocks" and "Alignment".</p><p>Any custom styles created (Styles Tab) will also be shown here.</p>';
|
709 |
}
|
710 |
+
else if($icon === 'backcolor') {
|
711 |
$title = 'Background Color Picker';
|
712 |
$text = '<i class="mce-ico mce-i-backcolor"></i>';
|
713 |
$tooltip['title'] = 'Background Color Picker';
|
714 |
$tooltip['content'] = '<p>Change the background color of selected content; commonly used for high-lighting text.</p>';
|
715 |
}
|
716 |
+
else if($icon === 'media') {
|
717 |
$class = 'dashicons dashicons-format-video';
|
718 |
$title = 'Media';
|
719 |
$tooltip['title'] = 'Media';
|
720 |
$tooltip['content'] = '<p>Insert media from an external resource (by link); or embed media content into editor.</p>';
|
721 |
}
|
722 |
+
else if($icon === 'rtl') {
|
723 |
$title = 'Text Direction Right to Left';
|
724 |
$text = '<i class="mce-ico mce-i-rtl"></i>';
|
725 |
$tooltip['title'] = 'Text Direction Right to Left';
|
726 |
$tooltip['content'] = '<p>Forces the text direction from right to left on selected block element.</p>';
|
727 |
}
|
728 |
+
else if($icon === 'ltr') {
|
729 |
$title = 'Text Direction Left to Right';
|
730 |
$text = '<i class="mce-ico mce-i-ltr"></i>';
|
731 |
$tooltip['title'] = 'Text Direction Left to Right';
|
732 |
$tooltip['content'] = '<p>Forces the text direction from left to right on selected block element.</p>';
|
733 |
}
|
734 |
+
else if($icon === 'table') {
|
735 |
$title = 'Tables';
|
736 |
$text = '<i class="mce-ico mce-i-table"></i>';
|
737 |
$tooltip['title'] = 'Tables';
|
738 |
$tooltip['content'] = '<p>Insert, edit and modify html tables.</p>';
|
739 |
}
|
740 |
+
else if($icon === 'anchor') {
|
741 |
$title = 'Anchor';
|
742 |
$text = '<i class="mce-ico mce-i-anchor"></i>';
|
743 |
$tooltip['title'] = 'Anchor';
|
744 |
$tooltip['content'] = '<p>Create an anchor link on the page.</p>';
|
745 |
}
|
746 |
+
else if($icon === 'code') {
|
747 |
$title = 'HTML Code';
|
748 |
$text = '<i class="mce-ico mce-i-code"></i>';
|
749 |
$tooltip['title'] = 'HTML Code';
|
750 |
$tooltip['content'] = '<p>Displays the html code of the editor content; in a popup window.</p><p>This can be helpful when editing code is necessary, but switching editor views is undesirable.</p><p>Also, the "Code Magic" button provides a much better interface.</p>';
|
751 |
}
|
752 |
+
else if($icon === 'emoticons') {
|
753 |
$title = 'Emoticons';
|
754 |
$text = '<i class="mce-ico mce-i-emoticons"></i>';
|
755 |
$tooltip['title'] = 'Emoticons';
|
756 |
$tooltip['content'] = '<p>Opens an overlay window with access to common emoticons.</p>';
|
757 |
}
|
758 |
+
else if($icon === 'inserttime') {
|
759 |
$title = 'Insert Date Time';
|
760 |
$text = '<i class="mce-ico mce-i-insertdatetime"></i>';
|
761 |
$tooltip['title'] = 'Insert Date Time';
|
762 |
$tooltip['content'] = '<p>Inserts the current date and time into the content editor.</p><p>The date format can be adjusted using the "Configuration" tab.</p>';
|
763 |
}
|
764 |
+
else if($icon === 'wp_page') {
|
765 |
$title = 'Page Break';
|
766 |
$text = '<i class="mce-ico mce-i-pagebreak"></i>';
|
767 |
$tooltip['title'] = 'Page Break';
|
768 |
$tooltip['content'] = '<p>Inserts a page break; which can created "paged" sections of the content.</p>';
|
769 |
}
|
770 |
+
else if($icon === 'preview') {
|
771 |
$title = 'Preview';
|
772 |
$text = '<i class="mce-ico mce-i-preview"></i>';
|
773 |
$tooltip['title'] = 'Preview';
|
774 |
$tooltip['content'] = '<p>A quick preview of the editor content.</p>';
|
775 |
}
|
776 |
+
else if($icon === 'print') {
|
777 |
$title = 'Print';
|
778 |
$text = '<i class="mce-ico mce-i-print"></i>';
|
779 |
$tooltip['title'] = 'Print';
|
780 |
$tooltip['content'] = '<p>Print the editor content directly to a printer.</p>';
|
781 |
}
|
782 |
+
else if($icon === 'searchreplace') {
|
783 |
$title = 'Search and Replace';
|
784 |
$text = '<i class="mce-ico mce-i-searchreplace"></i>';
|
785 |
$tooltip['title'] = 'Search and Replace';
|
786 |
$tooltip['content'] = '<p>Search and/or replace the editor content with specific characters.</p>';
|
787 |
}
|
788 |
+
else if($icon === 'visualblocks') {
|
789 |
$title = 'Show Blocks';
|
790 |
$text = '<i class="mce-ico mce-i-visualblocks"></i>';
|
791 |
$tooltip['title'] = 'Show Blocks';
|
792 |
$tooltip['content'] = '<p>Shows all block level editor elements with a light border.</p>';
|
793 |
}
|
794 |
+
else if($icon === 'subscript') {
|
795 |
$title = 'Subscript';
|
796 |
$text = '<i class="mce-ico mce-i-subscript"></i>';
|
797 |
$tooltip['title'] = 'Subscript';
|
798 |
$tooltip['content'] = '<p>Adds a <sub>subscript</sub> to selected editor content (mainly used with text).</p>';
|
799 |
}
|
800 |
+
else if($icon === 'superscript') {
|
801 |
$title = 'Superscript';
|
802 |
$text = '<i class="mce-ico mce-i-superscript"></i>';
|
803 |
$tooltip['title'] = 'Superscript';
|
804 |
$tooltip['content'] = '<p>Adds a <sup>superscript</sup> to selected editor content (mainly used with text).</p>';
|
805 |
}
|
806 |
+
else if($icon === 'image_orig') {
|
807 |
$class = 'dashicons dashicons-format-image';
|
808 |
$title = 'Image';
|
809 |
$tooltip['title'] = 'Image';
|
810 |
$tooltip['content'] = '<p>Insert images (by link).</p>';
|
811 |
}
|
812 |
+
else if($icon === 'p_tags_button') {
|
813 |
$title = 'Paragraph Tag';
|
814 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/ptags/p_tag.png);width:20px;height:20px;';
|
815 |
$tooltip['title'] = 'Paragraph Tag';
|
816 |
$tooltip['content'] = '<p>Insert paragraph tags (along with attributes); which will not be removed from the editor.</p>';
|
817 |
}
|
818 |
+
else if($icon === 'line_break_button') {
|
819 |
$title = 'Line Break';
|
820 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/linebreak/line_break.png);width:20px;height:20px;';
|
821 |
$tooltip['title'] = 'Line Break';
|
822 |
$tooltip['content'] = '<p>Insert line breaks; which will not be removed from the editor.</p><p>This is done by adding a class of "none" to the tag.</p>';
|
823 |
}
|
824 |
+
else if($icon === 'mailto') {
|
825 |
$title = 'MailTo Link';
|
826 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/mailto/mailto.gif);width:20px;height:20px;';
|
827 |
$tooltip['title'] = 'MailTo Link';
|
828 |
$tooltip['content'] = '<p>Turns an email address into an active mail link.</p><p>When clicked, it will open the users default mail client to send a message.</p>';
|
829 |
}
|
830 |
+
else if($icon === 'loremipsum') {
|
831 |
$title = 'Lorem Ipsum';
|
832 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/loremipsum/loremipsum.png);width:20px;height:20px;';
|
833 |
$tooltip['title'] = 'Lorem Ipsum';
|
834 |
$tooltip['content'] = '<p>Esaily insert placeholder text into the editor.</p><p>Select from multiple languages; and choose the number of elements to add.</p>';
|
835 |
}
|
836 |
+
else if($icon === 'shortcodes') {
|
837 |
$title = 'Shortcodes';
|
838 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/shortcodes/shortcodes.gif);width:20px;height:20px;';
|
839 |
$tooltip['title'] = 'Shortcodes';
|
840 |
$tooltip['content'] = '<p>Gathers all available shortcodes and adds them to a dropdown list; for easy editor insertion.</p><p>Note: The shortcodes gathered here do not include any shortcode attributes.</p><p>If shortcode attributes are necessary, they will need to be entered into the shortcode manually.</p>';
|
841 |
}
|
842 |
+
else if($icon === 'youTube') {
|
843 |
$title = 'YouTube Video';
|
844 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/youTube/images/youtube.png);width:20px;height:20px;';
|
845 |
$tooltip['title'] = 'YouTube Video';
|
846 |
$tooltip['content'] = '<p>Browse and insert YouTube videos without ever leaving the editor.</p><p>A custom interface allows browsing YouTube videos directly from the editor.</p>';
|
847 |
}
|
848 |
+
else if($icon === 'clker') {
|
849 |
$title = 'Clker Images';
|
850 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/clker/img/clker.png);width:20px;height:20px;';
|
851 |
$tooltip['title'] = 'Clker Images';
|
852 |
$tooltip['content'] = '<p>Browse and insert images from the Clker.com website.</p>';
|
853 |
}
|
854 |
+
else if($icon === 'cleardiv') {
|
855 |
$title = 'Clear Div';
|
856 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/cleardiv/images/cleardiv.png);width:20px;height:20px;';
|
857 |
$tooltip['title'] = 'Clear Div';
|
858 |
$tooltip['content'] = '<p>Clear editor divs. Selections include "left", "right" and "both".</p>';
|
859 |
}
|
860 |
+
else if($icon === 'codemagic') {
|
861 |
$title = 'Code Magic';
|
862 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/codemagic/images/codemagic.png);width:20px;height:20px;';
|
863 |
$tooltip['title'] = 'Code Magic';
|
864 |
$tooltip['content'] = '<p>An advanced html code editor; view and edit the html code from an overlay window.</p><p>Includes syntax highlighting; search and replace; and proper element spacing.</p><p>This is a great option when editing html code is necessary; but swtiching editor views is undesirable.</p>';
|
865 |
}
|
866 |
+
else if($icon === 'acheck') {
|
867 |
$title = 'Accessibility Checker';
|
868 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/acheck/img//acheck.png);width:20px;height:20px;';
|
869 |
$tooltip['title'] = 'Accessibility Checker';
|
870 |
$tooltip['content'] = '<p>Checks the editor content for accessibility by other devices.</p>';
|
871 |
}
|
872 |
+
else if($icon === 'advlink') {
|
873 |
$title = 'Insert/Edit Advanced Link';
|
874 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advlink/images/advlink.png);width:20px;height:20px;';
|
875 |
$tooltip['title'] = 'Insert/Edit Advanced Link';
|
876 |
$tooltip['content'] = '<p>Insert and edit links; along with various atttributes.</p><p>Populates with all posts and pages; so linking to current content is a one-click process.</p><p>Also includes javascript attributes (onclick, onmouseover, etc.); which can be used for executing javascript functions.</p>';
|
877 |
}
|
878 |
+
else if($icon === 'advhr') {
|
879 |
$title = 'Advanced Horizontal Line';
|
880 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advhr/images/advhr.png);width:20px;height:20px;';
|
881 |
$tooltip['title'] = 'Advanced Horizontal Line';
|
882 |
$tooltip['content'] = '<p>Modify various options of the horizontal line; like shadow and width.</p>';
|
883 |
}
|
884 |
+
else if($icon === 'advimage') {
|
885 |
$title = 'Advanced Insert/Edit Image';
|
886 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/advimage/images//advimage.png);width:20px;height:20px;';
|
887 |
$tooltip['title'] = 'Advanced Insert/Edit Image';
|
888 |
$tooltip['content'] = '<p>Insert/Edit images with more control.</p><p>Define image attributes, image margin, image padding and image border.</p><p>Also includes javascript attributes (onclick, onmouseover, etc.); which can be used for executing javascript functions.</p>';
|
889 |
}
|
890 |
+
else if($icon === 'formatPainter') {
|
891 |
$class = 'dashicons dashicons-admin-appearance';
|
892 |
$title = 'Format Painter';
|
893 |
$tooltip['title'] = 'Format Painter';
|
894 |
$tooltip['content'] = '<p>Copies styling from one element; and applies the same styling to another element.</p>';
|
895 |
}
|
896 |
+
else if($icon === 'googleImages') {
|
897 |
$title = 'Google Images';
|
898 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/googleImages/images/googleImages.png);width:20px;height:20px;';
|
899 |
$tooltip['title'] = 'Google Images';
|
900 |
$tooltip['content'] = '<p>Browse and insert Google images without ever leaving the content editor.</p>';
|
901 |
}
|
902 |
+
else if($icon === 'abbr') {
|
903 |
$title = 'Abbreviation';
|
904 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/abbr/abbr.png);width:20px;height:20px;';
|
905 |
$tooltip['title'] = 'Abbreviation';
|
906 |
$tooltip['content'] = '<p>Add an abbreviation to selected editor content.</p>';
|
907 |
}
|
908 |
+
else if($icon === 'imgmap') {
|
909 |
$title = 'Image Map';
|
910 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/imgmap/images/imgmap.png);width:20px;height:20px;';
|
911 |
$tooltip['title'] = 'Image Map';
|
912 |
$tooltip['content'] = '<p>Create an image map from an image.</p><p>Allows multiple "hot spots" on a single image. Each "hot spot" can link to a different url.</p>';
|
913 |
}
|
914 |
+
else if($icon === 'columnShortcodes') {
|
915 |
$class = 'dashicons dashicons-schedule';
|
916 |
$title = 'Column Shortcodes';
|
917 |
$tooltip['title'] = 'Column Shortcodes';
|
918 |
$tooltip['content'] = '<p>A tool for easily inserting column shortcode templates.</p>';
|
919 |
}
|
920 |
+
else if($icon === 'nonbreaking') {
|
921 |
$title = 'Nonbreaking Space';
|
922 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/nonbreaking/nonbreaking.png);width:20px;height:20px;';
|
923 |
$tooltip['title'] = 'Nonbreaking Space';
|
924 |
$tooltip['content'] = '<p>Insert a nonbreaking space; which will not be removed from the editor.</p>';
|
925 |
}
|
926 |
+
else if($icon === 'eqneditor') {
|
927 |
$title = 'CodeCogs Equation Editor';
|
928 |
$style='background-image:url('.WPEDIT_PLUGIN_URL.'plugins/eqneditor/img/eqneditor.png);width:20px;height:20px;';
|
929 |
$tooltip['title'] = 'CodeCogs Equation Editor';
|
930 |
$tooltip['content'] = '<p>Create complex math equations from a simple interface.</p>';
|
931 |
}
|
932 |
+
else {
|
933 |
+
|
934 |
+
$get_filters = $this->filtered_buttons;
|
935 |
+
|
936 |
+
// If the array set is not empty (filters being applied)
|
937 |
+
if( ! empty( $get_filters ) ) {
|
938 |
+
|
939 |
+
$check_filter = array();
|
940 |
+
foreach( $get_filters as $key => $values ) {
|
941 |
+
|
942 |
+
$check_filter[$values['button_id']] = $values;
|
943 |
+
}
|
944 |
+
|
945 |
+
// If this button is in filtered array
|
946 |
+
if( array_key_exists( $icon, $check_filter ) ) {
|
947 |
+
|
948 |
+
$array_key = $check_filter[$icon];
|
949 |
+
|
950 |
+
$title = isset( $array_key['tooltip_title'] ) && $array_key['tooltip_title'] !== '' ? $array_key['tooltip_title'] : '';
|
951 |
+
$class = isset( $array_key['dashicon'] ) && $array_key['dashicon'] !== '' ? $array_key['dashicon'] : '';
|
952 |
+
$text = isset( $array_key['button_text'] ) && $array_key['button_text'] !== '' ? $array_key['button_text'] : '';
|
953 |
+
$style = isset( $array_key['custom_icon'] ) && $array_key['custom_icon'] !== '' ? 'background-image:url(' . $array_key['custom_icon'] . ');width:20px;height:20px;' : '';
|
954 |
+
$tooltip['title'] = isset( $array_key['tooltip_title'] ) && $array_key['tooltip_title'] !== '' ? $array_key['tooltip_title'] : '';
|
955 |
+
$tooltip['content'] = isset( $array_key['tooltip_content'] ) && $array_key['tooltip_content'] !== '' ? $array_key['tooltip_content'] : '';
|
956 |
+
}
|
957 |
+
}
|
958 |
+
}
|
959 |
|
960 |
// Process tooltips
|
961 |
$tooltip_title = isset($tooltip['title']) ? $tooltip['title'] : 'Title not found';
|
962 |
$tooltip_content = isset($tooltip['content']) ? $tooltip['content'] : '<p>Content not found. Please report to the plugin developer.</p>';
|
963 |
|
964 |
// Are we displaying fancy tooltips?
|
|
|
965 |
$tooltip_att = ($no_tooltips === false) ? 'data-tooltip="<h4 class=\'data_tooltip_title\'>'.htmlspecialchars($tooltip_title).'</h4><hr />'.htmlspecialchars($tooltip_content).'" ' : '';
|
966 |
|
967 |
+
|
968 |
+
// ARRAY CHECKING BEFORE DISPLAYING BUTTON FROM DATABASE
|
969 |
+
// This will keep saved filtered buttons from displaying (and removes when user saves); if their parent was deactivated
|
970 |
+
|
971 |
+
// Create array of default buttons (and filter buttons)
|
972 |
+
$plugin_buttons = $this->global_options_buttons;
|
973 |
+
$check_array = '';
|
974 |
+
|
975 |
+
foreach( $plugin_buttons as $button ) {
|
976 |
+
if( !empty( $button ) && $button != '' ) { // Skip containter array if empty
|
977 |
+
|
978 |
+
$check_array .= $button . ' '; // Create single string of all default plugin buttons
|
979 |
+
}
|
980 |
+
}
|
981 |
+
|
982 |
+
$get_filters = $this->filtered_buttons;
|
983 |
+
|
984 |
+
// If the array set is not empty (filters being applied)
|
985 |
+
if( ! empty( $get_filters ) ) {
|
986 |
+
foreach( $get_filters as $key => $values ) {
|
987 |
+
|
988 |
+
$check_array .= $values['button_id'] . ' ';
|
989 |
+
}
|
990 |
+
}
|
991 |
+
|
992 |
+
$trim_check_array = rtrim( $check_array, ' ' );
|
993 |
+
$explode_check_array = explode( ' ', $trim_check_array );
|
994 |
+
|
995 |
+
|
996 |
+
// If button is in active array; display div
|
997 |
+
if( in_array( $icon, $explode_check_array ) ) {
|
998 |
+
|
999 |
+
// Display button
|
1000 |
+
echo '<div '.$tooltip_att.' id="'.$icon.'" class="ui-state-default draggable '.$class.'" title="'.$title.'"><span style="'.esc_attr($style).'">'.$text.'</span></div>';
|
1001 |
+
}
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
|
1005 |
+
|
1006 |
+
/**************************************/
|
1007 |
+
// Button filter for plugins/themes
|
1008 |
+
/**************************************/
|
1009 |
+
$filter_flag = false;
|
1010 |
+
|
1011 |
+
// Create array of saved buttons
|
1012 |
+
if( $icons_filter !== '' ) {
|
1013 |
+
|
1014 |
+
$trim_filter = trim( $icons_filter );
|
1015 |
+
$icons_filter_array = explode( ' ', $trim_filter );
|
1016 |
+
}
|
1017 |
+
|
1018 |
+
$get_filters = $this->filtered_buttons;
|
1019 |
+
|
1020 |
+
// If the array set is not empty (filters being applied)
|
1021 |
+
if( ! empty( $get_filters ) ) {
|
1022 |
+
foreach( $get_filters as $key => $values ) {
|
1023 |
+
|
1024 |
+
if( ! in_array( $values['button_id'], $icons_filter_array ) ) {
|
1025 |
+
|
1026 |
+
$title = isset( $values['tooltip_title'] ) && $values['tooltip_title'] !== '' ? $values['tooltip_title'] : '';
|
1027 |
+
$content = isset( $values['tooltip_content'] ) && $values['tooltip_content'] !== '' ? $values['tooltip_content'] : '';
|
1028 |
+
$class = isset( $values['dashicon'] ) && $values['dashicon'] !== '' ? $values['dashicon'] : '';
|
1029 |
+
$text = isset( $values['button_text'] ) && $values['button_text'] !== '' ? $values['button_text'] : '';
|
1030 |
+
$style = isset( $values['custom_icon'] ) && $values['custom_icon'] !== '' ? 'background-image:url(' . $values['custom_icon'] . ');width:20px;height:20px;' : '';
|
1031 |
+
$span = $style !== '' ? '<span style="' . $style . '">' . $text . '</span>' : '<span>' . $text . '</span>';
|
1032 |
+
$row = isset( $values['editor_row'] ) && $values['editor_row'] !== '' ? $values['editor_row'] : 'tmce_container';
|
1033 |
+
|
1034 |
+
/// Filter buttons by row
|
1035 |
+
if( $toolbar === $row ) {
|
1036 |
+
|
1037 |
+
echo '<div
|
1038 |
+
data-tooltip="<h4 class=\'data_tooltip_title\'>'.htmlspecialchars( $title ) . '</h4>
|
1039 |
+
<hr /><p>'.htmlspecialchars( $content ).'</p>"
|
1040 |
+
id="' . $values['button_id'] . '"
|
1041 |
+
class="ui-state-default draggable new_button ' . $class . '"
|
1042 |
+
title="' . $title . '">' . $span .
|
1043 |
+
'</div>'
|
1044 |
+
;
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
$filter_flag = true;
|
1048 |
+
}
|
1049 |
}
|
1050 |
}
|
1051 |
echo '</div>'; // End foreach .sortable
|
1052 |
} // End not rows 3 and 4
|
1053 |
}
|
1054 |
+
|
1055 |
+
if( $filter_flag === true ) {
|
1056 |
+
|
1057 |
+
echo '<div class="error">';
|
1058 |
+
echo '<h4>';
|
1059 |
+
_e('New buttons have been added via other plugins (or theme).', 'wp_edit_pro');
|
1060 |
+
echo '<br />';
|
1061 |
+
_e('Move them to a new location (if desired) and click "Save Buttons".', 'wp_edit_pro');
|
1062 |
+
echo '</h4>';
|
1063 |
+
echo '</div>';
|
1064 |
+
}
|
1065 |
?>
|
1066 |
</div> <!-- End #inside_button_hover -->
|
1067 |
</div> <!-- End .postbox -->
|
1082 |
echo '<input type="button" value="'.__('Reset Buttons', 'wp-edit').'" class="button-primary reset_dd_buttons" />';
|
1083 |
echo '<input type="submit" name="wpep_reset_buttons" class="button-primary wpep_reset_buttons" style="display:none;" />';
|
1084 |
|
1085 |
+
// Create nonce
|
1086 |
+
wp_nonce_field( 'wpe_save_buttons_opts' );
|
1087 |
+
|
1088 |
echo '</form>';
|
1089 |
echo '</div>';
|
1090 |
|
1105 |
<li><a href="#dragdrop"><?php _e('Drag/Drop', 'wp-edit'); ?></a></li>
|
1106 |
<li><a href="#multiselect"><?php _e('Multi Select', 'wp-edit'); ?></a></li>
|
1107 |
<li><a href="#reset"><?php _e('Reset', 'wp-edit'); ?></a></li>
|
1108 |
+
<li><a href="#custom_api"><?php _e('Custom Buttons API', 'wp-edit'); ?></a></li>
|
1109 |
</ul>
|
1110 |
|
1111 |
<div id="dragdrop">
|
1112 |
+
<p>
|
1113 |
+
<?php _e('Buttons can be dragged and dropped into desired button rows.', 'wp-edit'); ?><br />
|
1114 |
+
<?php _e('The "Button Container" is a placeholder for buttons not used in the editor; these buttons will not appear when editing a post or page.', 'wp-edit'); ?>
|
1115 |
+
</p>
|
1116 |
</div>
|
1117 |
<div id="multiselect">
|
1118 |
+
<p>
|
1119 |
+
<?php _e('Buttons may also be selected in quantities; or multiple selections, before being moved.', 'wp-edit'); ?>
|
1120 |
+
</p>
|
1121 |
+
<p>
|
1122 |
+
<?php _e('Clicking a button will set it as "active"; a yellowish highlight color. Multiple buttons can be clicked and set as "active".', 'wp-edit'); ?><br />
|
1123 |
+
<?php _e('Clicking and dragging one of the "active" buttons will move the entire "active" selection.', 'wp-edit'); ?><br />
|
1124 |
+
<?php _e('Clicking outside the button area will remove all currently active button selections.', 'wp-edit'); ?>
|
1125 |
+
</p>
|
1126 |
</div>
|
1127 |
<div id="reset">
|
1128 |
+
<p>
|
1129 |
+
<?php _e('Clicking "Reset Buttons" will restore the editor buttons to their original default values.', 'wp-edit'); ?><br />
|
1130 |
+
<?php _e('All button rows will get the default WordPress button arrangements; and the extra buttons will be added to the "Button Container".', 'wp-edit'); ?>
|
1131 |
+
</p>
|
1132 |
+
</div>
|
1133 |
+
<div id="custom_api">
|
1134 |
+
<p>
|
1135 |
+
<?php _e('WP Edit now uses a Custom Buttons API which allows other plugin/theme developers to add their editor buttons into the system.', 'wp-edit'); ?><br />
|
1136 |
+
<?php printf( __('Please direct all your favorite plugin/theme developers to the <a target="_blank" href="%s">Custom Buttons API</a> documentation.', 'wp-edit'), 'http://learn.wpeditpro.com/custom-buttons-api/'); ?>
|
1137 |
+
</p>
|
1138 |
</div>
|
1139 |
</div>
|
1140 |
</div>
|
1202 |
</div>
|
1203 |
</div>
|
1204 |
<input type="submit" value="<?php _e('Save Global Options', 'wp-edit'); ?>" class="button button-primary" id="submit_global" name="submit_global">
|
1205 |
+
<?php wp_nonce_field( 'wpe_save_global_opts' ); ?>
|
1206 |
</form>
|
1207 |
<?php
|
1208 |
echo '</div>';
|
1288 |
</tbody>
|
1289 |
</table>
|
1290 |
|
1291 |
+
<h3><?php _e('Custom Post Type Excerpts', 'wp-edit'); ?></h3>
|
1292 |
<table cellpadding="3" style="margin-left:7px;">
|
1293 |
<tbody>
|
1294 |
<?php
|
1313 |
</div>
|
1314 |
|
1315 |
<input type="submit" value="<?php _e('Save General Options', 'wp-edit'); ?>" class="button button-primary" id="submit_general" name="submit_general">
|
1316 |
+
<?php wp_nonce_field( 'wpe_save_general_opts' ); ?>
|
1317 |
</form>
|
1318 |
<?php
|
1319 |
echo '</div>';
|
1439 |
</div>
|
1440 |
</div>
|
1441 |
<input type="submit" value="<?php _e('Save Posts/Pages Options', 'wp-edit'); ?>" class="button button-primary" id="submit_posts" name="submit_posts">
|
1442 |
+
<?php wp_nonce_field( 'wpe_save_posts_pages_opts' ); ?>
|
1443 |
</form>
|
1444 |
<?php
|
1445 |
echo '</div>';
|
1537 |
</div>
|
1538 |
</div>
|
1539 |
<input type="submit" value="<?php _e('Save Editor Options', 'wp-edit'); ?>" class="button button-primary" id="submit_editor" name="submit_editor">
|
1540 |
+
<?php wp_nonce_field( 'wpe_save_editor_opts' ); ?>
|
1541 |
</div>
|
1542 |
</form>
|
1543 |
<?php
|
1580 |
</div>
|
1581 |
|
1582 |
<input type="submit" value="Save Extras Options" class="button button-primary" id="submit_extras" name="submit_extras">
|
1583 |
+
<?php wp_nonce_field( 'wpe_save_extras_opts' ); ?>
|
1584 |
</div>
|
1585 |
</form>
|
1586 |
<?php
|
1705 |
</div>
|
1706 |
|
1707 |
<input type="submit" value="<?php _e('Save User Specific Options', 'wp-edit'); ?>" class="button button-primary" id="submit_user_specific" name="submit_user_specific">
|
1708 |
+
<?php wp_nonce_field( 'wpe_save_user_specific_opts' ); ?>
|
1709 |
</div>
|
1710 |
</form><?php
|
1711 |
}
|
1772 |
<?php _e('In order to completely uninstall the plugin, AND remove all associated database tables, please use the option below.', 'wp-edit'); ?><br />
|
1773 |
</p>
|
1774 |
<form method="post" action="">
|
1775 |
+
<?php wp_nonce_field('wp_edit_uninstall_nonce_check', 'wp_edit_uninstall_nonce'); ?>
|
1776 |
<input id="plugin" name="plugin" type="hidden" value="wp-edit/main.php" />
|
1777 |
<input name="uninstall_confirm" id="uninstall_confirm" type="checkbox" value="1" /><label for="uninstall_confirm"></label> <strong><?php _e('Please confirm before proceeding','wp-edit'); ?><br /><br /></strong>
|
1778 |
<input class="button-primary" name="uninstall" type="submit" value="<?php _e('Uninstall','wp-edit'); ?>" />
|
1786 |
}
|
1787 |
/*
|
1788 |
****************************************************************
|
1789 |
+
About Tab
|
1790 |
****************************************************************
|
1791 |
*/
|
1792 |
else if($active_tab == 'about') {
|
1927 |
|
1928 |
<p><?php _e('Please take a moment to rate and review this plugin on the WordPress Plugin Repository.', 'wp-edit'); ?></p>
|
1929 |
<p><a href="https://wordpress.org/plugins/wp-edit/" target="_blank" class="button-primary"><?php _e('Rate Plugin', 'wp-edit'); ?></a></p>
|
1930 |
+
|
1931 |
+
<?php
|
1932 |
+
if ( ! function_exists( 'plugins_api' ) ) {
|
1933 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );
|
1934 |
+
}
|
1935 |
+
|
1936 |
+
/** Prepare our query */
|
1937 |
+
$call_api = plugins_api( 'plugin_information', array( 'slug' => 'wp-edit', 'fields' => array( 'active_installs' => true ) ) );
|
1938 |
+
|
1939 |
+
/** Check for Errors & Display the results */
|
1940 |
+
if ( is_wp_error( $call_api ) ) {
|
1941 |
+
|
1942 |
+
echo '<pre>' . print_r( $call_api->get_error_message(), true ) . '</pre>';
|
1943 |
+
}
|
1944 |
+
else {
|
1945 |
+
|
1946 |
+
echo '<h3>';
|
1947 |
+
_e( 'WP Edit Rating Statistics', 'wp_edit_pro' );
|
1948 |
+
echo '</h3>';
|
1949 |
+
|
1950 |
+
// Get ratings array
|
1951 |
+
$ratings = $call_api->ratings;
|
1952 |
+
|
1953 |
+
echo '<table><tbody>';
|
1954 |
+
echo '<tr><td>Downloaded:</td><td>' . number_format( $call_api->downloaded ) . ' times</td></tr>';
|
1955 |
+
echo '<tr><td>Active Installs:</td><td>' . number_format( $call_api->active_installs ) . '+</td></tr>';
|
1956 |
+
echo '<tr><td>Number of Ratings:</td><td>' . $call_api->num_ratings . '</td></tr>';
|
1957 |
+
echo '</tbody></table>';
|
1958 |
+
echo '<br />';
|
1959 |
+
|
1960 |
+
// Calculations
|
1961 |
+
$total_ratings = $call_api->num_ratings;
|
1962 |
+
|
1963 |
+
$five_star = round( ( $ratings[5] / $total_ratings ) * 100 );
|
1964 |
+
$four_star = round( ( $ratings[4] / $total_ratings ) * 100 );
|
1965 |
+
$three_star = round( ( $ratings[3] / $total_ratings ) * 100 );
|
1966 |
+
$two_star = round( ( $ratings[2] / $total_ratings ) * 100 );
|
1967 |
+
$one_star = round( ( $ratings[1] / $total_ratings ) * 100 );
|
1968 |
+
|
1969 |
+
$overall_stars = number_format( ( $call_api->rating / 20 ), 1 );
|
1970 |
+
|
1971 |
+
// Setup plugin star container
|
1972 |
+
echo '<div class="plugin_star_container">';
|
1973 |
+
echo '<div class="empty-stars"></div>';
|
1974 |
+
echo '<div class="full-stars" style="width:' . $call_api->rating . '%"></div>';
|
1975 |
+
echo '</div>';
|
1976 |
+
|
1977 |
+
echo '<p style="margin:0px 0px 10px;">' . $overall_stars . ' out of 5 stars</p>';
|
1978 |
+
|
1979 |
+
// Setup plugin rating table
|
1980 |
+
echo '<table class="table table_plugin_ratings"><tbody>';
|
1981 |
+
echo '<tr><td>5 stars:</td><td><div class="plugin_rating_container"><div class="plugin_rating_percentage" style="width:' . $five_star . '%;"></div></div>' . $ratings[5] . '</td></tr>';
|
1982 |
+
echo '<tr><td>4 stars:</td><td><div class="plugin_rating_container"><div class="plugin_rating_percentage" style="width:' . $four_star . '%;"></div></div>' . $ratings[4] . '</td></tr>';
|
1983 |
+
echo '<tr><td>3 stars:</td><td><div class="plugin_rating_container"><div class="plugin_rating_percentage" style="width:' . $three_star . '%;"></div></div>' . $ratings[3] . '</td></tr>';
|
1984 |
+
echo '<tr><td>2 stars:</td><td><div class="plugin_rating_container"><div class="plugin_rating_percentage" style="width:' . $two_star . '%;"></div></div>' . $ratings[2] . '</td></tr>';
|
1985 |
+
echo '<tr><td>1 star:</td><td><div class="plugin_rating_container"><div class="plugin_rating_percentage" style="width:' . $one_star . '%;"></div></div>' . $ratings[1] . '</td></tr>';
|
1986 |
+
echo '</tbody></table>';
|
1987 |
+
}
|
1988 |
+
?>
|
1989 |
+
|
1990 |
</div>
|
1991 |
</div>
|
1992 |
</div>
|
2024 |
*/
|
2025 |
if(isset($_POST['wpep_reset_buttons'])) {
|
2026 |
|
2027 |
+
// Verify nonce
|
2028 |
+
$buttons_opts_nonce = $_REQUEST['_wpnonce'];
|
2029 |
+
if ( ! wp_verify_nonce( $buttons_opts_nonce, 'wpe_save_buttons_opts' ) ) {
|
2030 |
+
|
2031 |
+
echo 'This request could not be verified.';
|
2032 |
+
exit;
|
2033 |
+
}
|
2034 |
+
|
2035 |
// Check if DB value exists.. if YES, then keep value.. if NO, then replace with protected defaults
|
2036 |
$options_buttons = $this->global_options_buttons;
|
2037 |
|
2052 |
|
2053 |
if(isset($_POST['wpep_save_buttons'])) {
|
2054 |
|
2055 |
+
// Verify nonce
|
2056 |
+
$buttons_opts_nonce = $_REQUEST['_wpnonce'];
|
2057 |
+
if ( ! wp_verify_nonce( $buttons_opts_nonce, 'wpe_save_buttons_opts' ) ) {
|
2058 |
+
|
2059 |
+
echo 'This request could not be verified.';
|
2060 |
+
exit;
|
2061 |
+
}
|
2062 |
+
|
2063 |
if(isset($_POST['get_sorted_array_results']) && ($_POST['get_sorted_array_results'] != '')) {
|
2064 |
|
2065 |
//***************************************************
|
2205 |
$all_array = rtrim($all_array, ' '); // Remove trailing right space
|
2206 |
$plugin_array = explode(' ', $all_array); // Explode at spaces to make single array (this is an array of all current plugin buttons)
|
2207 |
|
2208 |
+
|
2209 |
+
// Get filtered plugin buttons
|
2210 |
+
$get_filters = $this->filtered_buttons;
|
2211 |
+
|
2212 |
+
// If the array set is not empty (filters being applied)
|
2213 |
+
if( ! empty( $get_filters ) ) {
|
2214 |
+
foreach( $get_filters as $key => $values ) {
|
2215 |
+
|
2216 |
+
$plugin_array[] = $values['button_id'];
|
2217 |
+
}
|
2218 |
+
}
|
2219 |
+
|
2220 |
+
|
2221 |
+
|
2222 |
// Create arrays of user saved buttons
|
2223 |
global $tot_array;
|
2224 |
$val_array = array();
|
2271 |
****************************************************************
|
2272 |
*/
|
2273 |
if(isset($_POST['submit_global'])) {
|
2274 |
+
|
2275 |
+
// Verify nonce
|
2276 |
+
$global_opts_nonce = $_REQUEST['_wpnonce'];
|
2277 |
+
if ( ! wp_verify_nonce( $global_opts_nonce, 'wpe_save_global_opts' ) ) {
|
2278 |
+
|
2279 |
+
echo 'This request could not be verified.';
|
2280 |
+
exit;
|
2281 |
+
}
|
2282 |
|
2283 |
$options_global = get_option('wp_edit_global');
|
2284 |
$options_global['jquery_theme'] = isset($_POST['jquery_theme']) ? $_POST['jquery_theme'] : 'smoothness';
|
2303 |
*/
|
2304 |
if(isset($_POST['submit_general'])) {
|
2305 |
|
2306 |
+
// Verify nonce
|
2307 |
+
$general_opts_nonce = $_REQUEST['_wpnonce'];
|
2308 |
+
if ( ! wp_verify_nonce( $general_opts_nonce, 'wpe_save_general_opts' ) ) {
|
2309 |
+
|
2310 |
+
echo 'This request could not be verified.';
|
2311 |
+
exit;
|
2312 |
+
}
|
2313 |
+
|
2314 |
$options_general = get_option('wp_edit_general');
|
2315 |
$options_general['linebreak_shortcode'] = isset($_POST['linebreak_shortcode']) ? '1' : '0';
|
2316 |
$options_general['shortcodes_in_widgets'] = isset($_POST['shortcodes_in_widgets']) ? '1' : '0';
|
2356 |
*/
|
2357 |
if(isset($_POST['submit_posts'])) {
|
2358 |
|
2359 |
+
// Verify nonce
|
2360 |
+
$posts_pages_opts_nonce = $_REQUEST['_wpnonce'];
|
2361 |
+
if ( ! wp_verify_nonce( $posts_pages_opts_nonce, 'wpe_save_posts_pages_opts' ) ) {
|
2362 |
+
|
2363 |
+
echo 'This request could not be verified.';
|
2364 |
+
exit;
|
2365 |
+
}
|
2366 |
+
|
2367 |
// Delete database revisions
|
2368 |
if(isset($_POST['submit_posts']) && isset($_POST['delete_revisions'])) {
|
2369 |
|
2443 |
*/
|
2444 |
if(isset($_POST['submit_editor'])) {
|
2445 |
|
2446 |
+
// Verify nonce
|
2447 |
+
$editor_opts_nonce = $_REQUEST['_wpnonce'];
|
2448 |
+
if ( ! wp_verify_nonce( $editor_opts_nonce, 'wpe_save_editor_opts' ) ) {
|
2449 |
+
|
2450 |
+
echo 'This request could not be verified.';
|
2451 |
+
exit;
|
2452 |
+
}
|
2453 |
+
|
2454 |
$options_editor = get_option('wp_edit_editor');
|
2455 |
|
2456 |
$options_editor['editor_add_pre_styles'] = isset($_POST['editor_add_pre_styles']) ? '1' : '0';
|
2476 |
*/
|
2477 |
if(isset($_POST['submit_extras'])) {
|
2478 |
|
2479 |
+
// Verify nonce
|
2480 |
+
$extras_opts_nonce = $_REQUEST['_wpnonce'];
|
2481 |
+
if ( ! wp_verify_nonce( $extras_opts_nonce, 'wpe_save_extras_opts' ) ) {
|
2482 |
+
|
2483 |
+
echo 'This request could not be verified.';
|
2484 |
+
exit;
|
2485 |
+
}
|
2486 |
+
|
2487 |
$options_extras = get_option('wp_edit_extras');
|
2488 |
$options_extras['signoff_text'] = isset($_POST['wp_edit_signoff']) ? stripslashes($_POST['wp_edit_signoff']) : 'Please enter text here...';
|
2489 |
|
2505 |
*/
|
2506 |
if(isset($_POST['submit_user_specific'])) {
|
2507 |
|
2508 |
+
// Verify nonce
|
2509 |
+
$user_specific_opts_nonce = $_REQUEST['_wpnonce'];
|
2510 |
+
if ( ! wp_verify_nonce( $user_specific_opts_nonce, 'wpe_save_user_specific_opts' ) ) {
|
2511 |
+
|
2512 |
+
echo 'This request could not be verified.';
|
2513 |
+
exit;
|
2514 |
+
}
|
2515 |
+
|
2516 |
// If User Specific was submitted
|
2517 |
$post_vars = isset($_POST['wp_edit_user_specific']) ? $_POST['wp_edit_user_specific'] : '';
|
2518 |
|
2835 |
****************************************************************
|
2836 |
*/
|
2837 |
public function wp_edit_init_tinymce() {
|
2838 |
+
|
2839 |
+
|
2840 |
+
$options_buttons = get_option('wp_edit_buttons');
|
2841 |
+
$default_opts = $this->global_options_buttons;
|
2842 |
+
|
2843 |
+
|
2844 |
+
// Define plugin array of database options for comparison
|
2845 |
+
$new_array = '';
|
2846 |
+
foreach($options_buttons as $slot_array) {
|
2847 |
+
|
2848 |
+
if(!empty($slot_array) && $slot_array != '') { // Skip containter array if empty
|
2849 |
+
$new_array .= $slot_array.' '; // Create single string of all default plugin buttons
|
2850 |
+
}
|
2851 |
+
}
|
2852 |
+
$new_array = rtrim($new_array, ' '); // Remove trailing right space
|
2853 |
+
$new_plugin_array = explode(' ', $new_array); // Explode at spaces to make single array (this is an array of all current plugin buttons)
|
2854 |
+
$this->new_plugin_array = $new_plugin_array;
|
2855 |
+
|
2856 |
+
|
2857 |
+
// Define plugin array of default buttons for comparison
|
2858 |
+
$default_array = '';
|
2859 |
+
foreach($default_opts as $slot_array) {
|
2860 |
+
|
2861 |
+
if(!empty($slot_array) && $slot_array != '') { // Skip containter array if empty
|
2862 |
+
$default_array .= $slot_array.' '; // Create single string of all default plugin buttons
|
2863 |
+
}
|
2864 |
+
}
|
2865 |
+
$default_array = rtrim($default_array, ' '); // Remove trailing right space
|
2866 |
+
$default_buttons_array = explode(' ', $default_array); // Explode at spaces to make single array (this is an array of all current plugin buttons)
|
2867 |
+
$this->default_buttons_array = $default_buttons_array;
|
2868 |
+
|
2869 |
+
|
2870 |
+
// Get filtered plugin buttons array
|
2871 |
+
$filtered_plugin_buttons = array();
|
2872 |
+
$get_filters = $this->filtered_buttons;
|
2873 |
+
// If the array set is not empty (filters being applied)
|
2874 |
+
if( ! empty( $get_filters ) ) {
|
2875 |
+
foreach( $get_filters as $key => $values ) {
|
2876 |
+
|
2877 |
+
$filtered_plugin_buttons[] = $values['button_id'];
|
2878 |
+
}
|
2879 |
+
}
|
2880 |
+
$this->filtered_plugin_buttons = $filtered_plugin_buttons;
|
2881 |
+
|
2882 |
+
|
2883 |
|
2884 |
// Build extra plugins array
|
2885 |
add_filter('mce_external_plugins', array($this, 'wp_edit_mce_external_plugins'));
|
2886 |
|
2887 |
// Get options and set appropriate tinymce toolbars
|
|
|
2888 |
foreach ((array)$options_buttons as $key => $value) {
|
2889 |
|
2890 |
// Magic is happening right here...
|
2989 |
$default_wp_array_toolbar1 = array('bold','italic','strikethrough','bullist','numlist','blockquote','hr','alignleft','aligncenter','alignright','link','unlink','wp_more');
|
2990 |
$array_back = array();
|
2991 |
|
2992 |
+
$new_plugin_array = $this->new_plugin_array;
|
2993 |
+
$default_buttons_array = $this->default_buttons_array;
|
2994 |
+
$filtered_plugin_buttons = $this->filtered_plugin_buttons;
|
2995 |
+
|
2996 |
// First, we explode the toolbar in the database
|
2997 |
$options_toolbar1 = explode(' ', $options_toolbar1);
|
2998 |
|
3005 |
foreach($array_diff as $array) {
|
3006 |
|
3007 |
// If the button is NOT in the original array (WP buttons), we know it is another plugin or theme button..
|
3008 |
+
if( !in_array( $array, $default_wp_array_toolbar1 ) && !in_array( $array, $new_plugin_array ) ) {
|
3009 |
|
3010 |
// Create the new array of additional buttons to pass back to end of toolbar
|
3011 |
$array_back[] = $array;
|
3013 |
}
|
3014 |
}
|
3015 |
|
3016 |
+
// Loop each saved toolbar button
|
3017 |
+
foreach( $options_toolbar1 as $key => $value ) {
|
3018 |
+
|
3019 |
+
// If button is not a default button (it is a filtered button); and not in filtered plugin buttons (the button was removed when plugin deactivated)
|
3020 |
+
if( !in_array( $value, $default_buttons_array ) && !in_array( $value, $filtered_plugin_buttons ) ) {
|
3021 |
+
|
3022 |
+
unset( $options_toolbar1[$key]);
|
3023 |
+
}
|
3024 |
+
}
|
3025 |
+
|
3026 |
// Merge the difference onto the end of our saved buttons
|
3027 |
$merge_buttons = array_merge($options_toolbar1, $array_back);
|
3028 |
|
3035 |
$default_wp_array_toolbar2 = array('formatselect','underline','alignjustify','forecolor','pastetext','removeformat','charmap','outdent','indent','undo','redo','wp_help');
|
3036 |
$array_back = array();
|
3037 |
|
3038 |
+
$new_plugin_array = $this->new_plugin_array;
|
3039 |
+
$default_buttons_array = $this->default_buttons_array;
|
3040 |
+
$filtered_plugin_buttons = $this->filtered_plugin_buttons;
|
3041 |
+
|
3042 |
// First, we explode the toolbar in the database
|
3043 |
$options_toolbar2 = explode(' ', $options_toolbar2);
|
3044 |
|
3051 |
foreach($array_diff as $array) {
|
3052 |
|
3053 |
// If the button is NOT in the original array (WP buttons), we know it is another plugin or theme button..
|
3054 |
+
if( !in_array( $array, $default_wp_array_toolbar2 ) && !in_array( $array, $new_plugin_array ) ) {
|
3055 |
|
3056 |
// Create the new array of additional buttons to pass back to end of toolbar
|
3057 |
$array_back[] = $array;
|
3059 |
}
|
3060 |
}
|
3061 |
|
3062 |
+
// Loop each saved toolbar button
|
3063 |
+
foreach( $options_toolbar2 as $key => $value ) {
|
3064 |
+
|
3065 |
+
// If button is not a default button (it is a filtered button); and not in filtered plugin buttons (the button was removed when plugin deactivated)
|
3066 |
+
if( !in_array( $value, $default_buttons_array ) && !in_array( $value, $filtered_plugin_buttons ) ) {
|
3067 |
+
|
3068 |
+
unset( $options_toolbar2[$key]);
|
3069 |
+
}
|
3070 |
+
}
|
3071 |
+
|
3072 |
// Merge the difference onto the end of our saved buttons
|
3073 |
$merge_buttons = array_merge($options_toolbar2, $array_back);
|
3074 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: wpedit, wp edit, editor, buttons, button, add, font, font style, font select, table, tables, visual editor, search, replace, colors, color, anchor, advance, advanced, links, link, popup, javascript, upgrade, update, admin, image, images, citations, preview, html, custom css, borders, pages, posts, colorful, php, php widget, shortcode, shortcodes, style, styles, plugin, login, excerpt, id, post, page, youtube, tinymce
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.7
|
7 |
-
Stable tag:
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -12,6 +12,11 @@ Take complete control over the WordPress content editor.
|
|
12 |
|
13 |
== Description ==
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
= Introduction =
|
16 |
For a riveting video introduction into the possibilities available with WP Edit; please visit [Jupiter Jim's Marketing Team](http://jupiterjim.club/wordpress/tutorials/change-font-family-font-size-wordpress-4-4-1/).
|
17 |
|
@@ -88,6 +93,7 @@ OR...
|
|
88 |
|
89 |
== Frequently asked questions ==
|
90 |
|
|
|
91 |
|
92 |
== Screenshots ==
|
93 |
|
@@ -97,21 +103,26 @@ OR...
|
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
-
=
|
101 |
-
*
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
-
|
|
|
|
|
104 |
* Fixed strict standards error on wp_widget_rss_output() function (final fix will be done upstream when WordPress 4.7 is released).
|
105 |
* Adjusted plugin css file.
|
106 |
|
107 |
= 3.8.1 =
|
108 |
-
* 05/11/
|
109 |
-
|
110 |
* Removed a stray var_dump() function.
|
111 |
|
112 |
= 3.8 =
|
113 |
-
* 05/11/
|
114 |
-
|
115 |
* Added support for WP Edit toolbars in custom post types excerpt areas.
|
116 |
* Fixed deprecated function. (htmledit_pre changed to format_for_editor) (main.php ~line 115).
|
117 |
* Updated introduction video link.
|
@@ -119,7 +130,7 @@ OR...
|
|
119 |
* Increased stable tag version.
|
120 |
|
121 |
= 3.7 =
|
122 |
-
* 01/11/
|
123 |
|
124 |
* Fixed Feedblitz image loading insecure over https.
|
125 |
* Fixed WP_PLUGIN_URL constant; switched to using plugins_url() function.
|
@@ -127,27 +138,27 @@ OR...
|
|
127 |
* Updated compatibility version.
|
128 |
|
129 |
= 3.6 =
|
130 |
-
* 12/16/
|
131 |
* Update to be stable with WordPress 4.4.
|
132 |
|
133 |
= 3.5 =
|
134 |
-
* 10/02/
|
135 |
* Updated plugin translation code to handle new WordPress language packs.
|
136 |
* Fixed call to jquery theme only loading over http. Will now load over https when applicable.
|
137 |
|
138 |
= 3.4 =
|
139 |
-
* 08/21/
|
140 |
* Removed PHP Widget option for two reasons:
|
141 |
* 1 - It presented a potential security risk. It is recommended to use a plugin dedicated to this functionality.
|
142 |
* 2 - It used the older PHP construct method. I could have updated the class; but I think it's better to remove the option entirely.
|
143 |
|
144 |
= 3.3 =
|
145 |
-
* 08/10/
|
146 |
* Minor code enhancements to prepare for the WordPress 4.3 release.
|
147 |
|
148 |
= 3.2 =
|
149 |
|
150 |
-
* 06/12/
|
151 |
* Fixed issue with OptimizePress theme.
|
152 |
* Added "title" attribute to "Insert/Edit Advanced Link" button.
|
153 |
* Made minor changes to plugin update message and styling.
|
@@ -164,7 +175,7 @@ OR...
|
|
164 |
|
165 |
= 3.0.1 =
|
166 |
|
167 |
-
* 01/05/
|
168 |
* Fixed security risk with Post/Page Title option.
|
169 |
|
170 |
= 3.0 =
|
4 |
Tags: wpedit, wp edit, editor, buttons, button, add, font, font style, font select, table, tables, visual editor, search, replace, colors, color, anchor, advance, advanced, links, link, popup, javascript, upgrade, update, admin, image, images, citations, preview, html, custom css, borders, pages, posts, colorful, php, php widget, shortcode, shortcodes, style, styles, plugin, login, excerpt, id, post, page, youtube, tinymce
|
5 |
Requires at least: 3.9
|
6 |
Tested up to: 4.7
|
7 |
+
Stable tag: 4.0
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
= NEW Custom Buttons API =
|
16 |
+
WP Edit now uses a custom buttons API which allows other plugin/theme developers to add their editor buttons into the WP Edit button configuration; allowing a WP Edit user to place the plugin/theme buttons into any desired location.
|
17 |
+
|
18 |
+
Refer your favorite plugin/theme developers to the [WP Edit Custom Buttons API](http://learn.wpeditpro.com/custom-buttons-api/) documentation to get your favorite buttons added to WP Edit.
|
19 |
+
|
20 |
= Introduction =
|
21 |
For a riveting video introduction into the possibilities available with WP Edit; please visit [Jupiter Jim's Marketing Team](http://jupiterjim.club/wordpress/tutorials/change-font-family-font-size-wordpress-4-4-1/).
|
22 |
|
93 |
|
94 |
== Frequently asked questions ==
|
95 |
|
96 |
+
* Nothing at the moment.
|
97 |
|
98 |
== Screenshots ==
|
99 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= 4.0 =
|
107 |
+
* 10/03/2016
|
108 |
+
* Added Custom Buttons API; other plugins/themes can add buttons to WP Edit.
|
109 |
+
* Added dismissable admin notice for Custom Buttons API (help spread the word!).
|
110 |
+
* Added plugin rating statistics to sidebar (Please rate and review).
|
111 |
+
* Added nonce fields for every form submission used to save database options.
|
112 |
+
* Moved plugins.php page styles to properly enqueue (used for notices).
|
113 |
|
114 |
+
= 3.9 =
|
115 |
+
* 09/05/2016
|
116 |
+
* Added functionality to enable visual editor on BBPress forums (Editor tab).
|
117 |
* Fixed strict standards error on wp_widget_rss_output() function (final fix will be done upstream when WordPress 4.7 is released).
|
118 |
* Adjusted plugin css file.
|
119 |
|
120 |
= 3.8.1 =
|
121 |
+
* 05/11/2016
|
|
|
122 |
* Removed a stray var_dump() function.
|
123 |
|
124 |
= 3.8 =
|
125 |
+
* 05/11/2016
|
|
|
126 |
* Added support for WP Edit toolbars in custom post types excerpt areas.
|
127 |
* Fixed deprecated function. (htmledit_pre changed to format_for_editor) (main.php ~line 115).
|
128 |
* Updated introduction video link.
|
130 |
* Increased stable tag version.
|
131 |
|
132 |
= 3.7 =
|
133 |
+
* 01/11/2016
|
134 |
|
135 |
* Fixed Feedblitz image loading insecure over https.
|
136 |
* Fixed WP_PLUGIN_URL constant; switched to using plugins_url() function.
|
138 |
* Updated compatibility version.
|
139 |
|
140 |
= 3.6 =
|
141 |
+
* 12/16/2015
|
142 |
* Update to be stable with WordPress 4.4.
|
143 |
|
144 |
= 3.5 =
|
145 |
+
* 10/02/2015
|
146 |
* Updated plugin translation code to handle new WordPress language packs.
|
147 |
* Fixed call to jquery theme only loading over http. Will now load over https when applicable.
|
148 |
|
149 |
= 3.4 =
|
150 |
+
* 08/21/2015
|
151 |
* Removed PHP Widget option for two reasons:
|
152 |
* 1 - It presented a potential security risk. It is recommended to use a plugin dedicated to this functionality.
|
153 |
* 2 - It used the older PHP construct method. I could have updated the class; but I think it's better to remove the option entirely.
|
154 |
|
155 |
= 3.3 =
|
156 |
+
* 08/10/2015
|
157 |
* Minor code enhancements to prepare for the WordPress 4.3 release.
|
158 |
|
159 |
= 3.2 =
|
160 |
|
161 |
+
* 06/12/2015
|
162 |
* Fixed issue with OptimizePress theme.
|
163 |
* Added "title" attribute to "Insert/Edit Advanced Link" button.
|
164 |
* Made minor changes to plugin update message and styling.
|
175 |
|
176 |
= 3.0.1 =
|
177 |
|
178 |
+
* 01/05/2015
|
179 |
* Fixed security risk with Post/Page Title option.
|
180 |
|
181 |
= 3.0 =
|